diff --git a/app.js b/app.js index b0064fb..55775a4 100644 --- a/app.js +++ b/app.js @@ -1105,9 +1105,9 @@ App({ var third_rate = th.data.dis_config.third_rate; // 三级比例 if(this.globalData.userInfo.first_leader){ - return parseFloat(first_money); + return parseFloat(parseFloat(first_money).toFixed(2)) }else{ - return parseFloat(first_money)+parseFloat(second_money)+parseFloat(third_money); + return parseFloat((parseFloat(first_money)+parseFloat(second_money)+parseFloat(third_money)).toFixed(2)); } } }, @@ -1299,4 +1299,40 @@ App({ } }, + //--- 统一跳转到物流的优化 --- + go_wuliu(e){ + var url=e.currentTarget.dataset.url; + var order_id=e.currentTarget.dataset.order_id; + var conf=null; + var th=this; + var stoid=this.globalData.setting.stoid; + var user_id=this.globalData.user_id; + + + this.getConfig2(async function (e){ + if(e && e.switch_list) conf=JSON.parse(e.switch_list); + if(conf && conf.express_searchtype==1){ + //在此通过调用api来查询微信快递服务详情 + //必须用预览才能测试这个功能,无法在工具端模拟 + var res= await th.promiseGet('/api/weshop/order/getWaybillToken/'+stoid+'/'+order_id,{}); + if(res.data.code==0){ + var plugin = requirePlugin("logisticsPlugin") + plugin.openWaybillTracking({ + waybillToken: res.data.data + }); + }else{ + var msg="查询物流失败"; + if(res.data.msg) msg=res.data.msg; + wx.showToast({ + title: msg, + icon: 'none', + duration: 1000, + }); + } + }else{ + getApp().goto(url); + } + }) + } + });