Commit c5c99d20c8eb773a7d5f142f1dc5ab13a1cd6acd

Authored by yvan.ni
1 parent 3b534063

1、 佣金显示的优化

2、物流
Showing 1 changed file with 38 additions and 2 deletions
... ... @@ -1105,9 +1105,9 @@ App({
1105 1105 var third_rate = th.data.dis_config.third_rate; // 三级比例
1106 1106  
1107 1107 if(this.globalData.userInfo.first_leader){
1108   - return parseFloat(first_money);
  1108 + return parseFloat(parseFloat(first_money).toFixed(2))
1109 1109 }else{
1110   - return parseFloat(first_money)+parseFloat(second_money)+parseFloat(third_money);
  1110 + return parseFloat((parseFloat(first_money)+parseFloat(second_money)+parseFloat(third_money)).toFixed(2));
1111 1111 }
1112 1112 }
1113 1113 },
... ... @@ -1299,4 +1299,40 @@ App({
1299 1299 }
1300 1300 },
1301 1301  
  1302 + //--- 统一跳转到物流的优化 ---
  1303 + go_wuliu(e){
  1304 + var url=e.currentTarget.dataset.url;
  1305 + var order_id=e.currentTarget.dataset.order_id;
  1306 + var conf=null;
  1307 + var th=this;
  1308 + var stoid=this.globalData.setting.stoid;
  1309 + var user_id=this.globalData.user_id;
  1310 +
  1311 +
  1312 + this.getConfig2(async function (e){
  1313 + if(e && e.switch_list) conf=JSON.parse(e.switch_list);
  1314 + if(conf && conf.express_searchtype==1){
  1315 + //在此通过调用api来查询微信快递服务详情
  1316 + //必须用预览才能测试这个功能,无法在工具端模拟
  1317 + var res= await th.promiseGet('/api/weshop/order/getWaybillToken/'+stoid+'/'+order_id,{});
  1318 + if(res.data.code==0){
  1319 + var plugin = requirePlugin("logisticsPlugin")
  1320 + plugin.openWaybillTracking({
  1321 + waybillToken: res.data.data
  1322 + });
  1323 + }else{
  1324 + var msg="查询物流失败";
  1325 + if(res.data.msg) msg=res.data.msg;
  1326 + wx.showToast({
  1327 + title: msg,
  1328 + icon: 'none',
  1329 + duration: 1000,
  1330 + });
  1331 + }
  1332 + }else{
  1333 + getApp().goto(url);
  1334 + }
  1335 + })
  1336 + }
  1337 +
1302 1338 });
... ...