Commit a461b4bb by 张晓玮

Merge branch 'v3.0' into 'zhangxw_dev_3.0'

V3.0

See merge request !40
2 parents 889682c0 8c96e6bb
......@@ -4,12 +4,10 @@ Page({
data: {
IMGURL:IMG_URL,
STATUSICON:['wait','comlpete','fail'],
listData:[]
listData:[],
isNoResult:false
},
onRoute(options){
// let para = {
// status
// }
MineApi.getWithdrawalListApi().then(res=>{
if(res&&res.length){
res.map(item=>{
......@@ -24,8 +22,10 @@ Page({
return item
})
}
let flag = res.length?false:true
this.setData({
listData:res || []
listData:res || [],
isNoResult:flag
})
})
}
......
{
"usingComponents": {},
"usingComponents": {
"van-empty": "@vant/weapp/empty/index"
},
"navigationBarTitleText":"提现记录"
}
\ No newline at end of file
<view class="container">
<view class="title_widget flex_sc">
<view wx:if="{{!isNoResult}}" class="title_widget flex_sc">
<view class="text_1">提现记录</view>
<view class="text_2 marlf8">·</view>
<view class="text_2">{{listData.length}}</view>
</view>
<view class="list">
<view wx:if="{{!isNoResult}}" class="list">
<block wx:for="{{listData}}" wx:key="index">
<view class="element">
<image mode="widthFix" class="bgicon" src="{{IMGURL}}status_{{STATUSICON[item.iconType]}}.png" />
......@@ -24,4 +24,5 @@
</view>
</block>
</view>
<van-empty wx:if="{{isNoResult}}" description="暂无提现记录" />
</view>
\ No newline at end of file
......@@ -12,7 +12,9 @@ Page({
navStyle,
headerHeight: 0,
senceData,
actNum: 3,
actNum: 0,
activeNavIdx: 0,
fromLocal: 0,
// 模态框
isShow: true,
......@@ -34,23 +36,23 @@ Page({
],
posterUrl: "", //海报url
},
observers: {
actNum: function (actNum) {
let imgList = [
`${IMGURL}index/scene${actNum + 1}1.png`,
`${IMGURL}index/scene${actNum + 1}2.png`,
`${IMGURL}index/scene${actNum + 1}3.png`,
`${IMGURL}index/scene${actNum + 1}4.png`,
`${IMGURL}index/scene${actNum + 1}5.png`,
];
if (actNum != 2) {
imgList.push(`${IMGURL}index/scene${actNum + 1}6.png`);
}
this.setData({
imgList,
});
},
},
// observers: {
// actNum: function (actNum) {
// let imgList = [
// `${IMGURL}index/scene${actNum + 1}1.png`,
// `${IMGURL}index/scene${actNum + 1}2.png`,
// `${IMGURL}index/scene${actNum + 1}3.png`,
// `${IMGURL}index/scene${actNum + 1}4.png`,
// `${IMGURL}index/scene${actNum + 1}5.png`,
// ];
// if (actNum != 2) {
// imgList.push(`${IMGURL}index/scene${actNum + 1}6.png`);
// }
// this.setData({
// imgList,
// });
// },
// },
navbarReady(e) {
let {
height
......@@ -74,6 +76,59 @@ Page({
isShow: true,
});
},
createImg(){
if(this.data.isShow && this.data.fromLocal==1){
let { actNum,activeNavIdx } = this.data;
let img = `${IMGURL}scene/longpic${actNum + 1}.png`
wx.showLoading({
title: '图片加载中',
})
wx.getImageInfo({
src: img,
success:(res)=> {
ActivityApi.getActivityVisitorList({
actNum, activeNavIdx
}).then(response => {
let imgW = res.width/5, imgH =res.height/5;
this.setData({
imgH: (imgH/imgW)*450
})
let drawFun = new Draw({
width: imgW,
height: imgH
});
let arr = [456,222,0,496]
let imgList = [
{
x: 0,
y: 0,
width: imgW,
height: imgH,
url: img,
},
{
x:imgW-64,
y: imgH-arr[actNum]-64,
width: 64,
height: 64,
url: response, //二维码
},
];
drawFun.begin({
imageList: imgList,
}).then(resp => {
console.log('posterUrl.path',resp)
this.setData({
posterUrl: resp.path,
});
wx.hideLoading()
})
console.log(response,'response')
})
}
})
}
},
// 分享按钮
handleClick(e) {
let { index } = e.currentTarget.dataset;
......@@ -98,7 +153,7 @@ Page({
filePath: this.data.posterUrl, //仅为示例,并非真实的资源
success (res) {
console.log('res: ', res);
wx.$api.showToast('图片下载成功!')
wx.$api.showToast('下载成功!')
}
})
}
......@@ -116,65 +171,23 @@ Page({
imgHeight: (event.detail.height * 0.2).toFixed(0),
});
},
onRouter(options) {
onRoute(options) {
console.log("options: ", options);
let { actNum,activeNavIdx,fromLocal } = options
this.setData({
actNum,
activeNavIdx,
fromLocal
})
this.createImg()
},
noPageAuth : true,
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
if(this.data.isShow){
let { actNum } = this.data;
let img = `${IMGURL}scene/longpic${actNum + 1}.png`
wx.showLoading({
title: '加载图片中',
})
wx.getImageInfo({
src: img,
success:(res)=> {
ActivityApi.getActivityVisitorList({
actNum, activeNavIdx: 0
}).then(response => {
let imgW = res.width/5, imgH =res.height/5;
this.setData({
imgH: (imgH/imgW)*450
})
let drawFun = new Draw({
width: imgW,
height: imgH
});
let imgList = [
{
x: 0,
y: 0,
width: imgW,
height: imgH,
url: img,
},
{
x:imgW-64,
y: imgH-496-64,
width: 64,
height: 64,
url: response, //二维码
},
];
drawFun.begin({
imageList: imgList,
}).then(resp => {
console.log('posterUrl.path',resp)
this.setData({
posterUrl: resp.path,
});
wx.hideLoading()
})
console.log(response,'response')
})
}
})
}
},
/**
......
......@@ -2,8 +2,5 @@
"usingComponents": {
"product": "../tab/discovery/components/product/product"
},
"navigationBarTitleText": "特色产品",
"onReachBottomDistance": 10,
"backgroundColor": "#FC5B32",
"enablePullDownRefresh": true
"navigationBarTitleText": "特色产品"
}
......@@ -4,7 +4,7 @@
</view> -->
<product actNum="{{actNum}}" senceData="{{senceData}}" isShare="{{true}}"/>
<product actNum="{{actNum}}" navIdx="{{activeNavIdx}}" senceData="{{senceData}}" isShare="{{true}}"/>
<!-- 分享弹框 -->
<view class="share-wrap" wx:if="{{isShow}}">
<view class="img-wrap" wx:if="{{posterUrl}}">
......
......@@ -7,6 +7,7 @@ Component({
headerHeight: Number,
senceData:Object,
actNum: Number,
navIdx: Number,
isShare:{
type: Boolean,
value: false
......@@ -60,7 +61,7 @@ Component({
this.setData({
navList,
intoViewId: `to-0`,
activeNavIdx: 0,
activeNavIdx:this.data.isShare ? this.data.navIdx : 0,
tab
})
this.getImgHeight();
......@@ -114,9 +115,9 @@ Component({
})
.exec();
},
onShareFn() {
toSharePage() {
let { actNum, activeNavIdx ,senceData} = this.data;
wx.$router.go("checkProduct", { actNum, activeNavIdx ,senceData});
wx.$router.go("checkProduct", { actNum, activeNavIdx ,senceData, fromLocal:1});
},
}
})
......@@ -2,7 +2,7 @@
<text class="big-title">特色产品</text>
<scroll-view enhanced="{{true}}" show-scrollbar="{{false}}" class="nav-wrap" scroll-x="{{true}}">
<block wx:for="{{senceData[actNum].productList}}" wx:key="index">
<text class='nav {{activeNavIdx==index ? "active-nav": ""}}' bindtap="changeNav" data-index="{{index}}">{{item.proName}}</text>
<text wx:if="{{!isShare || activeNavIdx==index}}" class='nav {{activeNavIdx==index ? "active-nav": ""}}' bindtap="changeNav" data-index="{{index}}">{{item.proName}}</text>
</block>
</scroll-view>
<view class="prod-item">
......@@ -20,7 +20,7 @@
</text>
</view>
<view class="share-btn" wx:if="{{!isShare}}" bindtap="onShareFn">
<view class="share-btn" wx:if="{{!isShare}}" bindtap="toSharePage">
<image class="icon" src="{{IMGURL}}share.png"></image>
<text>分享</text>
</view>
......
......@@ -9,8 +9,7 @@ var senceData = [
img: 'product-img1',
proName: '数字无忧权益卡',
price: '1500',
// profit: '92.4万',
profit: '120万',
profit: '1200000',
type: 'service',
productType: 'benefitCard',
path: 'equity',
......@@ -51,7 +50,7 @@ var senceData = [
img: 'product-img2',
proName: '汽车太阳膜',
price: '1500',
profit: '1008万',
profit: '10080000',
type: 'membrane',
productType: 'sunMembrane',
path: 'solarFilm',
......@@ -77,22 +76,22 @@ var senceData = [
img: 'product-img3',
proName: '漆面保护膜',
price: '12000',
profit: '216万',
profit: '21600万',
type: 'membrane',
productType: 'protectMembrane',
path: 'paintProtect',
sale:100, //销量
sale:10000, //销量
varType: 1
},
{
img: 'product-img4',
proName: '改色膜',
price: '5000',
profit: '30万',
profit: '30000000',
type: 'membrane',
productType: 'colorMembrane',
path: 'changingFilm',
sale:100, //销量
sale:10000, //销量
varType: 1
}
]
......@@ -107,7 +106,7 @@ var senceData = [
img: 'product-img5',
proName: '数字化美容',
price: '300',
profit: '36万',
profit: '360000',
type: 'beauty',
productType: 'digitBeauty',
path: 'carBeauty',
......@@ -118,7 +117,7 @@ var senceData = [
img: 'product-img6',
proName: '座椅通风',
price: '1500',
profit: '1008万',
profit: '10080000',
type: 'light',
productType: 'chair',
path: 'seatVentilate',
......@@ -129,7 +128,7 @@ var senceData = [
img: 'product-img7',
proName: 'AR导航',
price: '1680',
profit: '22.68万',
profit: '226800',
type: 'light',
productType: 'ar',
path: 'arNavigation',
......@@ -140,7 +139,7 @@ var senceData = [
img: 'product-img8',
proName: '氛围灯',
price: '2680',
profit: '36.18万',
profit: '361800',
type: 'light',
productType: 'lamp',
path: 'ambientLighting',
......@@ -151,7 +150,7 @@ var senceData = [
img: 'product-img9',
proName: '360全景导航',
price: '2880',
profit: '38.88万',
profit: '388800',
type: 'service',
productType: 'navigation',
path: 'navigationArround',
......
......@@ -86,7 +86,7 @@ Page({
showCalculate() {
this.setData({
visible: !this.data.visible,
isReset: false,
isReset: false
});
},
clickDialog(e) {
......@@ -234,7 +234,7 @@ Page({
}
console.log(profit.length);
console.log(productType, sales, flow, profit);
if (profit.length > 6) {
if (profit.length > 9) {
return (profit / 10000).toFixed(0) + "万";
} else {
return profit;
......
......@@ -2,7 +2,7 @@
width: 100%;
height: 232rpx;
position: relative;
z-index: 2;
z-index: 10;
box-sizing: border-box;
padding-top: 16rpx;
......@@ -46,7 +46,6 @@
font-size: 24rpx;
color: #999999;
margin-left: 16rpx;
.icon {
width: 32rpx;
height: 32rpx;
......
......@@ -59,7 +59,6 @@ Page({
id:user.bussinessId
}
MineApi.wechatBindApi(para).then(res => {
wx.hideLoading();
this.getStaffInfo()
})
})
......@@ -71,6 +70,7 @@ Page({
id: userStorage.bussinessId
}
MineApi.getStaffDetailApi(para).then(res => {
wx.hideLoading();
const temp = this.handleUserInfo(res)
this.setData({
user: temp
......@@ -85,9 +85,13 @@ Page({
merchantName: userStorage.merchantName,
phone: userStorage.phone,
}
const { id, staffPhone, phone, department, weChatNickName, weChatAvatarUrl, weChatOpenId, staffName } = data
const { id, staffPhone, phone, department, weChatNickName, weChatAvatarUrl, weChatOpenId, staffName,merchantFileResponse } = data
let avatar = ''
if(merchantFileResponse){
avatar = merchantFileResponse.fileUrl
}
const USERINFO = {
headImgUrl: weChatAvatarUrl,
headImgUrl: avatar || weChatAvatarUrl,
nickName: staffName,
seriseName: DEPARTMENTLIST[department - 1],
brandName: weChatNickName || phone || staffPhone,
......@@ -101,5 +105,9 @@ Page({
this.getStaffInfo()
this.toAddEvent()
},
onPullDownRefresh: function () {
this.getStaffInfo()
wx.$eventbus.emit('REFRESH_WITHDRALWAL')
},
})
{
"navigationStyle": "custom",
"enablePullDownRefresh": false,
"onReachBottomDistance": 10,
"enablePullDownRefresh": true,
"usingComponents": {
"user-info-widget":"./components/userInfo/userInfo",
"count-info-widget":"./components/countInfo/countInfo",
......
......@@ -8,7 +8,7 @@
<image mode="widthFix" src="{{IMGURL}}mine_center_bg.png" />
</view>
<!-- 个人基础信息 -->
<user-info-widget bind:showModal="toShowBindModal" user="{{user}}" boxStyle="{{user_box_style}}"></user-info-widget>
<user-info-widget style="z-index:99" bind:showModal="toShowBindModal" user="{{user}}" boxStyle="{{user_box_style}}"></user-info-widget>
<!-- 积分信息 -->
<count-info-widget bind:showModal="toShowBindModal" user="{{user}}" boxStyle="{{count_box_style}}"></count-info-widget>
<!-- 收益明细信息 -->
......
......@@ -132,41 +132,6 @@
"query": "",
"launchMode": "default",
"scene": null
},
{
"name": "发现页",
"pathName": "pages/tab/discovery/discovery",
"query": "",
"launchMode": "default",
"scene": null
},
{
"name": "模拟分享",
"pathName": "pages/authentication/loading/loading",
"query": "url=%2Fpages%2Ftab%2Fdiscovery%2Fdiscovery",
"launchMode": "default",
"scene": null
},
{
"name": "申请活动",
"pathName": "packageActivity/pages/applyActivity/applyActivity",
"query": "",
"launchMode": "default",
"scene": null
},
{
"name": "",
"pathName": "packageActivity/pages/shareTaskDetail/shareTaskDetail",
"query": "",
"launchMode": "default",
"scene": null
},
{
"name": "",
"pathName": "packageActivity/pages/shareTaskDetail/shareTaskDetail",
"query": "",
"launchMode": "default",
"scene": null
}
]
}
......
......@@ -6,7 +6,7 @@ const target = ['ip', 'dev', 'uat', 'prod']
2测试
3生产
*/
const index = 1
const index = 2
const secretKey = {
ip: {},
dev: {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!