jufubao-food 1.0.13-beta2 → 1.0.13-beta3
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
|
@@ -655,20 +655,31 @@
|
|
|
655
655
|
url: curPage.path + '?' + this.$xdUniHelper.jsonToParams(otherParams)
|
|
656
656
|
})
|
|
657
657
|
},
|
|
658
|
+
p_clearFoodCart(){
|
|
659
|
+
return new Promise((resolve, reject) => {
|
|
660
|
+
//清空购物车
|
|
661
|
+
this.$xdShowLoading({})
|
|
662
|
+
jfbRootExec("clearFoodCart", {
|
|
663
|
+
vm: this,
|
|
664
|
+
data: {
|
|
665
|
+
namespace: this.xnamespace,
|
|
666
|
+
shop_id: this.shopInfo.shop_id,
|
|
667
|
+
consume_mode: this.consume_mode,
|
|
668
|
+
cart_order_id: this.order_id
|
|
669
|
+
}
|
|
670
|
+
}).then(res => {
|
|
671
|
+
this.$xdHideLoading();
|
|
672
|
+
resolve(res);
|
|
673
|
+
}).catch(err => {
|
|
674
|
+
this.$xdHideLoading();
|
|
675
|
+
reject(err);
|
|
676
|
+
})
|
|
677
|
+
})
|
|
678
|
+
},
|
|
658
679
|
handleSwitchShop(){
|
|
659
680
|
this.showDialogChangeShop = false;
|
|
660
681
|
//清空购物车
|
|
661
|
-
this
|
|
662
|
-
jfbRootExec("clearFoodCart", {
|
|
663
|
-
vm: this,
|
|
664
|
-
data: {
|
|
665
|
-
namespace: this.xnamespace,
|
|
666
|
-
shop_id: this.shopInfo.shop_id,
|
|
667
|
-
consume_mode: this.consume_mode,
|
|
668
|
-
cart_order_id: this.order_id
|
|
669
|
-
}
|
|
670
|
-
}).then(res => {
|
|
671
|
-
this.$xdHideLoading();
|
|
682
|
+
this.p_clearFoodCart().then(res => {
|
|
672
683
|
this.$xdUniHelper.redirectTo({
|
|
673
684
|
url: this.productListPath + '?resource_shop_id=' + this.resource_shop_id,
|
|
674
685
|
})
|
|
@@ -196,14 +196,8 @@ export default {
|
|
|
196
196
|
notify_provider_id: this.projectAttr['notify_provider_id'],
|
|
197
197
|
}
|
|
198
198
|
}).then(async res => {
|
|
199
|
+
this.p_clearFoodCart();
|
|
199
200
|
successCb({...res, order_id: res.order_id })
|
|
200
|
-
// setTimeout(() => {
|
|
201
|
-
// this.p_getOrderInfo(res, (res1) => {
|
|
202
|
-
// successCb(res1)
|
|
203
|
-
// });
|
|
204
|
-
// }, 1000)
|
|
205
|
-
|
|
206
|
-
// this.$xdHideLoading()
|
|
207
201
|
}).catch(err => {
|
|
208
202
|
this.$xdHideLoading()
|
|
209
203
|
this.$xdLog.catch(err);
|