jufubao-base 1.0.366-beta3 → 1.0.366-beta4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -1691,25 +1691,21 @@ export default {
|
|
|
1691
1691
|
}
|
|
1692
1692
|
}).then(res => {
|
|
1693
1693
|
this.$xdHideLoading();
|
|
1694
|
-
if(
|
|
1695
|
-
|
|
1696
|
-
|
|
1697
|
-
|
|
1698
|
-
|
|
1699
|
-
|
|
1700
|
-
|
|
1701
|
-
|
|
1702
|
-
|
|
1703
|
-
|
|
1704
|
-
|
|
1705
|
-
throw new Error('不合法的extras');
|
|
1706
|
-
}
|
|
1707
|
-
}catch(err){
|
|
1708
|
-
reOrderPath = {
|
|
1709
|
-
url: item.extras
|
|
1694
|
+
if(res.tips && res.tips.length){
|
|
1695
|
+
this.$xdConfirm({
|
|
1696
|
+
content: res.tips.join('\n'),
|
|
1697
|
+
cancel:false,
|
|
1698
|
+
confirmText: '我知道了',
|
|
1699
|
+
width: '85%',
|
|
1700
|
+
title: '提示',
|
|
1701
|
+
contentColor: this.$mainColor,
|
|
1702
|
+
isTitle: true,
|
|
1703
|
+
success:()=>{
|
|
1704
|
+
this.reorderNavigate(item);
|
|
1710
1705
|
}
|
|
1711
|
-
}
|
|
1712
|
-
|
|
1706
|
+
});
|
|
1707
|
+
}else{
|
|
1708
|
+
this.reorderNavigate(item);
|
|
1713
1709
|
}
|
|
1714
1710
|
}).catch(err => {
|
|
1715
1711
|
this.$xdHideLoading();
|
|
@@ -1719,6 +1715,28 @@ export default {
|
|
|
1719
1715
|
console.error(`item.action=${item.action}, 此action不可用`)
|
|
1720
1716
|
}
|
|
1721
1717
|
},
|
|
1718
|
+
reorderNavigate(item){
|
|
1719
|
+
if(item.extras){
|
|
1720
|
+
let reOrderPath = {};
|
|
1721
|
+
try{
|
|
1722
|
+
let extras = JSON.parse(item.extras);
|
|
1723
|
+
let urlObj = JSON.parse(extras.place_order_url);
|
|
1724
|
+
if(this.$xdUniHelper.checkVarType(urlObj) === 'object'){
|
|
1725
|
+
reOrderPath = {
|
|
1726
|
+
url: urlObj['page_value'],
|
|
1727
|
+
'jfb-platform': urlObj
|
|
1728
|
+
}
|
|
1729
|
+
}else{
|
|
1730
|
+
throw new Error('不合法的extras');
|
|
1731
|
+
}
|
|
1732
|
+
}catch(err){
|
|
1733
|
+
reOrderPath = {
|
|
1734
|
+
url: item.extras
|
|
1735
|
+
}
|
|
1736
|
+
}
|
|
1737
|
+
this.$xdUniHelper.navigateTo(reOrderPath);
|
|
1738
|
+
}
|
|
1739
|
+
},
|
|
1722
1740
|
handleToProduct(item){
|
|
1723
1741
|
let productPath = {};
|
|
1724
1742
|
if(item.product_detail_url){
|
|
@@ -482,26 +482,21 @@ export default {
|
|
|
482
482
|
}
|
|
483
483
|
}).then(res => {
|
|
484
484
|
this.$xdHideLoading();
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
}else{
|
|
497
|
-
throw new Error('不合法的extras');
|
|
485
|
+
if(res.tips && res.tips.length){
|
|
486
|
+
this.$xdConfirm({
|
|
487
|
+
content: res.tips.join('\n'),
|
|
488
|
+
cancel:false,
|
|
489
|
+
confirmText: '我知道了',
|
|
490
|
+
width: '85%',
|
|
491
|
+
title: '提示',
|
|
492
|
+
contentColor: this.$mainColor,
|
|
493
|
+
isTitle: true,
|
|
494
|
+
success:()=>{
|
|
495
|
+
this.reorderNavigate(item);
|
|
498
496
|
}
|
|
499
|
-
}
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
}
|
|
503
|
-
}
|
|
504
|
-
this.$xdUniHelper.navigateTo(reOrderPath);
|
|
497
|
+
});
|
|
498
|
+
}else{
|
|
499
|
+
this.reorderNavigate(item);
|
|
505
500
|
}
|
|
506
501
|
|
|
507
502
|
}).catch(err => {
|
|
@@ -509,6 +504,29 @@ export default {
|
|
|
509
504
|
})
|
|
510
505
|
}
|
|
511
506
|
},
|
|
507
|
+
reorderNavigate(item){
|
|
508
|
+
let btnReOrder = item.buttons.find(item => item.action === 'reorder');
|
|
509
|
+
if(btnReOrder.extras){
|
|
510
|
+
let reOrderPath = {};
|
|
511
|
+
try{
|
|
512
|
+
let extras = JSON.parse(btnReOrder.extras);
|
|
513
|
+
let urlObj = JSON.parse(extras.place_order_url);
|
|
514
|
+
if(this.$xdUniHelper.checkVarType(urlObj) === 'object'){
|
|
515
|
+
reOrderPath = {
|
|
516
|
+
url: urlObj['page_value'],
|
|
517
|
+
'jfb-platform': urlObj
|
|
518
|
+
}
|
|
519
|
+
}else{
|
|
520
|
+
throw new Error('不合法的extras');
|
|
521
|
+
}
|
|
522
|
+
}catch(err){
|
|
523
|
+
reOrderPath = {
|
|
524
|
+
url: btnReOrder.extras
|
|
525
|
+
}
|
|
526
|
+
}
|
|
527
|
+
this.$xdUniHelper.navigateTo(reOrderPath);
|
|
528
|
+
}
|
|
529
|
+
},
|
|
512
530
|
|
|
513
531
|
getList(status) {
|
|
514
532
|
this.$xdShowLoading({});
|