Commit 25746091 by 谢中龙

修改bug

parent 3254fb8b
...@@ -28,6 +28,11 @@ wxService.page({ ...@@ -28,6 +28,11 @@ wxService.page({
}, },
achivementType : 1,//1 个人 2门店 achivementType : 1,//1 个人 2门店
chartImg : '', chartImg : '',
monthAchievement : {
amount :0,
monthAchievementObj :null
},
}, },
//切换个人和门店 //切换个人和门店
...@@ -244,6 +249,16 @@ wxService.page({ ...@@ -244,6 +249,16 @@ wxService.page({
wxService.post('/marketing/shoppingguide/achievement/orderPreview?type=' + type).then(res => { wxService.post('/marketing/shoppingguide/achievement/orderPreview?type=' + type).then(res => {
if (!res) return; if (!res) return;
this.data.currentOrderData = res.data.data; this.data.currentOrderData = res.data.data;
if(type == 1){
//记录一下本月的业绩
this.data.monthAchievement.monthAchievementObj = this.data.currentOrderData;
let salesVolume = this.data.currentOrderData.salesVolume ? this.data.currentOrderData.salesVolume : 0;
let refundVolume = this.data.currentOrderData.refundVolume ? this.data.currentOrderData.refundVolume : 0;
this.data.monthAchievement.amount = parseFloat(salesVolume - refundVolume).toFixed(2);
this.setData({
monthAchievement: this.data.monthAchievement
});
}
this.setData({ this.setData({
currentOrderData: this.data.currentOrderData currentOrderData: this.data.currentOrderData
}) })
......
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
<view class='number-item'> <view class='number-item'>
<view>本月业绩(元)</view> <view>本月业绩(元)</view>
<view class='number' style='color:#F7B500;'> <view class='number' style='color:#F7B500;'>
{{achievement.achievementMonth ? achievement.achievementMonth : 0}} {{monthAchievement.amount}}
</view> </view>
</view> </view>
<view class='number-item'> <view class='number-item'>
......
...@@ -22,6 +22,10 @@ wxService.page({ ...@@ -22,6 +22,10 @@ wxService.page({
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
*/ */
onLoad: function (options) { onLoad: function (options) {
this.data.amount = options.amount;
this.setData({
amount: this.data.amount,
});
this.data.type = options.type; this.data.type = options.type;
wx.hideShareMenu() wx.hideShareMenu()
}, },
...@@ -36,9 +40,8 @@ wxService.page({ ...@@ -36,9 +40,8 @@ wxService.page({
* 生命周期函数--监听页面显示 * 生命周期函数--监听页面显示
*/ */
onShow: function () { onShow: function () {
const { amount, status } = this.options const {status } = this.options
this.setData({ this.setData({
amount,
status status
}, () => { }, () => {
// 当前用户是否关注公众号 // 当前用户是否关注公众号
......
...@@ -301,7 +301,7 @@ wxService.page({ ...@@ -301,7 +301,7 @@ wxService.page({
ctx.setTextAlign('left') ctx.setTextAlign('left')
ctx.fillText(self.data.username, rpx2px(66 * 2), rpx2px(65 * 2)) ctx.fillText(self.data.username, rpx2px(66 * 2), rpx2px(65 * 2))
ctx.setFillStyle('#000') ctx.setFillStyle('#000')
ctx.fillText('跟我一起种草,我们一起收益哟~', rpx2px(66 * 2), rpx2px(85 * 2)) ctx.fillText('Pick我的种草指南!', rpx2px(66 * 2), rpx2px(85 * 2))
//商品文字 //商品文字
self.data.product.productName = self.data.product.productName ? self.data.product.productName : '暂无分享文本信息~'; self.data.product.productName = self.data.product.productName ? self.data.product.productName : '暂无分享文本信息~';
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment