Commit ed05fa97c5b9ca926a1aa050881ac9fcc4bd918a
1 parent
c5c99d20
物流组件,分包的优化
Showing
6 changed files
with
100 additions
and
20 deletions
app.js
@@ -1314,24 +1314,10 @@ App({ | @@ -1314,24 +1314,10 @@ App({ | ||
1314 | if(conf && conf.express_searchtype==1){ | 1314 | if(conf && conf.express_searchtype==1){ |
1315 | //在此通过调用api来查询微信快递服务详情 | 1315 | //在此通过调用api来查询微信快递服务详情 |
1316 | //必须用预览才能测试这个功能,无法在工具端模拟 | 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); | 1317 | + url="/packageF/pages/wuliu/wuliu?order_id="+order_id; |
1334 | } | 1318 | } |
1319 | + th.goto(url); | ||
1320 | + | ||
1335 | }) | 1321 | }) |
1336 | } | 1322 | } |
1337 | 1323 |
packageF/pages/wuliu/wuliu.js
0 → 100644
1 | +var os=getApp().globalData.setting; | ||
2 | +Page({ | ||
3 | + data:{ | ||
4 | + isLoad:0, | ||
5 | + url: os.imghost, | ||
6 | + show:0 | ||
7 | + }, | ||
8 | + onLoad:function(t){ | ||
9 | + var th=this; | ||
10 | + var order_id=t.order_id; | ||
11 | + getApp().promiseGet('/api/weshop/order/getWaybillToken/'+os.stoid+'/'+order_id,{}).then(res=>{ | ||
12 | + | ||
13 | + if(res.data.code==0){ | ||
14 | + th.data.isLoad=1; | ||
15 | + this.setData({show:0}); | ||
16 | + setTimeout(()=>{ | ||
17 | + var plugin = requirePlugin("logisticsPlugin"); | ||
18 | + plugin.openWaybillTracking({ | ||
19 | + waybillToken: res.data.data | ||
20 | + }); | ||
21 | + },100) | ||
22 | + }else{ | ||
23 | + var msg="查询物流失败"; | ||
24 | + if(res.data.msg) msg=res.data.msg; | ||
25 | + wx.showToast({ | ||
26 | + title: msg, | ||
27 | + icon: 'none', | ||
28 | + duration: 1000, | ||
29 | + }); | ||
30 | + } | ||
31 | + }) | ||
32 | + }, | ||
33 | + onShow: function(){ | ||
34 | + this.setData({show:0}) | ||
35 | + if(this.data.isLoad){ | ||
36 | + this.data.isLoad=0; | ||
37 | + wx.navigateBack({ delta: 1 }) //返回上一页 | ||
38 | + return false; | ||
39 | + } | ||
40 | + this.setData({show:1}) | ||
41 | + | ||
42 | + | ||
43 | + } | ||
44 | + | ||
45 | + | ||
46 | +}); |
packageF/pages/wuliu/wuliu.json
0 → 100644
packageF/pages/wuliu/wuliu.wxml
0 → 100644
1 | +<view wx:if="{{show}}" class="flex j_c a_c" style="height:80vh"> | ||
2 | + <view> | ||
3 | + <view style="text-align:center">查询中</view> | ||
4 | + <view class="loading4"> | ||
5 | + <text class="three1"></text> | ||
6 | + <text class="three2" style="margin-left:15rpx"></text> | ||
7 | + <text class="three3" style="margin-left:15rpx"></text> | ||
8 | + </view> | ||
9 | + </view> | ||
10 | +</view> |
packageF/pages/wuliu/wuliu.wxss
0 → 100644
1 | +.flex{ | ||
2 | + display: flex | ||
3 | +} | ||
4 | +.j_c{ justify-content: center} | ||
5 | +.a_c{ align-items: center} | ||
6 | + | ||
7 | +.loading4{ | ||
8 | + width:150px; | ||
9 | + margin:10px auto; | ||
10 | + text-align: center; | ||
11 | +} | ||
12 | +.loading4 text{ | ||
13 | + width: 24rpx; | ||
14 | + height: 24rpx; | ||
15 | + border-radius: 100%; | ||
16 | + display:inline-block; | ||
17 | + /*background-color: #67CF22;*/ | ||
18 | + background-color: #999; | ||
19 | + -webkit-animation: three 1.4s infinite ease-in-out; | ||
20 | + animation: three 1.4s infinite ease-in-out; | ||
21 | + -webkit-animation-fill-mode: both; | ||
22 | + animation-fill-mode: both; | ||
23 | +} | ||
24 | +.loading4 .three1{ | ||
25 | + -webkit-animation-delay: -0.30s; | ||
26 | + animation-delay: -0.30s; | ||
27 | +} | ||
28 | +.loading4 .three2{ | ||
29 | + -webkit-animation-delay: -0.15s; | ||
30 | + animation-delay: -0.15s; | ||
31 | +} | ||
32 | +@-webkit-keyframes three { | ||
33 | + 0%, 80%, 100% {-webkit-transform: scale(0.0) } | ||
34 | + 40% { -webkit-transform: scale(1.0) } | ||
35 | +} | ||
36 | +@keyframes three { | ||
37 | + 0%, 80%, 100% {-webkit-transform: scale(0.0) } | ||
38 | + 40% { -webkit-transform: scale(1.0) } | ||
39 | +} | ||
0 | \ No newline at end of file | 40 | \ No newline at end of file |
pages/index/index/index.js
@@ -91,9 +91,7 @@ Page({ | @@ -91,9 +91,7 @@ Page({ | ||
91 | 91 | ||
92 | 92 | ||
93 | onLoad: async function (tt) { | 93 | onLoad: async function (tt) { |
94 | - console.error('分享群id'); | ||
95 | - console.error(tt); | ||
96 | - console.error('...................................'); | 94 | + |
97 | wx.showShareMenu({ | 95 | wx.showShareMenu({ |
98 | withShareTicket:true, | 96 | withShareTicket:true, |
99 | menus:['shareAppMessage','shareTimeline'] | 97 | menus:['shareAppMessage','shareTimeline'] |