Commit 6517842c4860e761023875a1ae48b1c7bbad14e7
1 parent
f203e270
服务卡的跳转
Showing
1 changed file
with
38 additions
and
0 deletions
app.js
| @@ -1319,6 +1319,44 @@ App({ | @@ -1319,6 +1319,44 @@ App({ | ||
| 1319 | th.goto(url); | 1319 | th.goto(url); |
| 1320 | 1320 | ||
| 1321 | }) | 1321 | }) |
| 1322 | + }, | ||
| 1323 | + | ||
| 1324 | + //--- 统一跳转到物流的优化 --- | ||
| 1325 | + async check_go_fw(goods_id,func){ | ||
| 1326 | + | ||
| 1327 | + var user_id=this.globalData.user_id?this.globalData.user_id:0; | ||
| 1328 | + var flag=null; | ||
| 1329 | + //判断拼团的---会员身份-- | ||
| 1330 | + await this.promiseGet("/api/weshop/teamlist/pageteam/2", { | ||
| 1331 | + data: { | ||
| 1332 | + store_id: os.stoid, | ||
| 1333 | + is_end: 0, | ||
| 1334 | + is_show: 1, | ||
| 1335 | + user_id: user_id, | ||
| 1336 | + pageSize: 1000, | ||
| 1337 | + goods_id:goods_id | ||
| 1338 | + } | ||
| 1339 | + }).then(res => { | ||
| 1340 | + let pd_list = res.data.data.pageData; | ||
| 1341 | + if (res.data.code == 0 && pd_list.length > 0) { | ||
| 1342 | + flag = pd_list.find(pd => { | ||
| 1343 | + return pd.goods_type==1; | ||
| 1344 | + }) | ||
| 1345 | + } | ||
| 1346 | + }) | ||
| 1347 | + | ||
| 1348 | + var url= "/packageA/pages/goodsInfo/goodsInfo?goods_id="+goods_id; | ||
| 1349 | + if(flag){ | ||
| 1350 | + url='/packageA/pages/serviceCard_pd/goodsInfo/goodsInfo?goods_id='+goods_id+'&prom_type=6&prom_id='+flag.id; | ||
| 1351 | + } | ||
| 1352 | + if(func){ | ||
| 1353 | + func(flag,url) | ||
| 1354 | + }else{ | ||
| 1355 | + this.goto(url); | ||
| 1356 | + } | ||
| 1357 | + | ||
| 1358 | + | ||
| 1322 | } | 1359 | } |
| 1323 | 1360 | ||
| 1361 | + | ||
| 1324 | }); | 1362 | }); |