Commit 8686a1e3b9e16f98a11c177b07ad9cba7ecef743
1 parent
28a2557d
全场佣金抵扣的优化
Showing
1 changed file
with
17 additions
and
4 deletions
app.js
@@ -51,7 +51,7 @@ App({ | @@ -51,7 +51,7 @@ App({ | ||
51 | config: null, //门店参数 | 51 | config: null, //门店参数 |
52 | config2: null, //门店配置 | 52 | config2: null, //门店配置 |
53 | code: null, | 53 | code: null, |
54 | - user_id:null,// 6520352,// qa-6519858,// | 54 | + user_id:null,//10153869,//6520352,// 10153869,// 6520352,// qa-6519858,// |
55 | // user_id:6520314,// qa-6519858,// | 55 | // user_id:6520314,// qa-6519858,// |
56 | // user_id:14148118,// qa-6519858,// | 56 | // user_id:14148118,// qa-6519858,// |
57 | buy_now: null, | 57 | buy_now: null, |
@@ -837,7 +837,7 @@ App({ | @@ -837,7 +837,7 @@ App({ | ||
837 | if (wx.canIUse('getUpdateManager')) { | 837 | if (wx.canIUse('getUpdateManager')) { |
838 | //创建 UpdateManager 实例 | 838 | //创建 UpdateManager 实例 |
839 | const updateManager = wx.getUpdateManager(); | 839 | const updateManager = wx.getUpdateManager(); |
840 | - if (!updateManager) { | 840 | + if (!updateManager || !updateManager.onCheckForUpdate) { |
841 | return false; | 841 | return false; |
842 | } | 842 | } |
843 | //检测版本更新 | 843 | //检测版本更新 |
@@ -1054,8 +1054,7 @@ App({ | @@ -1054,8 +1054,7 @@ App({ | ||
1054 | }, | 1054 | }, |
1055 | 1055 | ||
1056 | //获取佣金的比例 | 1056 | //获取佣金的比例 |
1057 | - get_commission(dis_config,gd_data,goods_num) { | ||
1058 | - | 1057 | + get_commission2(dis_config,gd_data,goods_num) { |
1059 | var fir_num=0; | 1058 | var fir_num=0; |
1060 | var sec_num=0; | 1059 | var sec_num=0; |
1061 | var thi_num=0; | 1060 | var thi_num=0; |
@@ -1082,7 +1081,21 @@ App({ | @@ -1082,7 +1081,21 @@ App({ | ||
1082 | } | 1081 | } |
1083 | } | 1082 | } |
1084 | }, | 1083 | }, |
1084 | + //获取佣金的比例 | ||
1085 | + get_commission(first_money,second_money,third_money,th) { | ||
1086 | + if(getApp().globalData.userInfo.is_distribut){ | ||
1087 | + var pattern = th.data.dis_config.pattern; // 分销模式 | ||
1088 | + var first_rate = th.data.dis_config.first_rate; // 一级比例 | ||
1089 | + var second_rate = th.data.dis_config.second_rate; // 二级比例 | ||
1090 | + var third_rate = th.data.dis_config.third_rate; // 三级比例 | ||
1085 | 1091 | ||
1092 | + if(this.globalData.userInfo.first_leader){ | ||
1093 | + return parseFloat(first_money); | ||
1094 | + }else{ | ||
1095 | + return parseFloat(first_money)+parseFloat(second_money)+parseFloat(third_money); | ||
1096 | + } | ||
1097 | + } | ||
1098 | + }, | ||
1086 | 1099 | ||
1087 | // 保存图片到手机 | 1100 | // 保存图片到手机 |
1088 | savePic(th) { | 1101 | savePic(th) { |