|
|
@@ -23,7 +23,7 @@ Page({
|
|
|
that.setData({
|
|
|
order: data
|
|
|
})
|
|
|
- if(data.sign && data.express_order_no && data.express_code) that.getLogistics();
|
|
|
+ if(data.sign && data.express_order_no && data.express_code) that.getLogistics2();
|
|
|
|
|
|
}
|
|
|
_request.$get(url, params, success)
|
|
|
@@ -53,6 +53,46 @@ Page({
|
|
|
}
|
|
|
_request.$post(url, params, success)
|
|
|
},
|
|
|
+ getLogistics2(){
|
|
|
+ var that = this;
|
|
|
+ wx.showNavigationBarLoading()
|
|
|
+ var token = wx.getStorageSync('lbt_token_key');
|
|
|
+ // console.log('nowtoken',token);
|
|
|
+ wx.request({
|
|
|
+ url: 'https://jingcai.hiwavo.com/three/order/express?tf_code='+that.data.order.express_order_no/* 773175419643033 */,
|
|
|
+ method: 'GET',
|
|
|
+ header: {
|
|
|
+ "content-type": "application/json",
|
|
|
+ "terminal": 'mini-program',
|
|
|
+ "Authorization":"Bearer " + token
|
|
|
+ },
|
|
|
+ success: function (res) {
|
|
|
+ console.log('res',res);
|
|
|
+ if(res.data.s == 0){
|
|
|
+ var data = res.data.d;
|
|
|
+ // data['list'] = data.reverse();
|
|
|
+ console.log('data',data);
|
|
|
+ that.setData({
|
|
|
+ logistics: data
|
|
|
+ })
|
|
|
+ }else{
|
|
|
+ wx.showToast({
|
|
|
+ title: res.data.m+',请稍后再试',
|
|
|
+ icon: 'none',
|
|
|
+ duration: 2000
|
|
|
+ })
|
|
|
+ }
|
|
|
+ },
|
|
|
+ fail: function (res) {
|
|
|
+ console.log('errres',res);
|
|
|
+ },
|
|
|
+ complete: function (res) {
|
|
|
+ wx.hideNavigationBarLoading()
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+
|
|
|
+
|
|
|
copeOrder: function () {
|
|
|
var that = this
|
|
|
var id = this.data.order.express_order_no
|