jufubao-food 1.0.13-beta1 → 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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jufubao-food",
3
- "version": "1.0.13-beta1",
3
+ "version": "1.0.13-beta3",
4
4
  "private": false,
5
5
  "description": "聚福宝业务组件餐饮插件包",
6
6
  "main": "index.js",
@@ -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.$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();
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);
@@ -70,7 +70,7 @@
70
70
  <view style="display:flex;align-items:center">
71
71
  <CusPrice :isPlus="is_plus_site" :isShowIcon="false" salePriceFontSize="32" :showPrice="item.show_prices"></CusPrice>
72
72
  </view>
73
- <view style="font-size: 28rpx;color:#999">
73
+ <view class="p_r" style="font-size: 28rpx;color:#999">
74
74
  <view v-if="item.has_choose" class="chose_spu" @click="toProductDetail(item)">
75
75
  选规格
76
76
  <view v-if="item.num" class="cart_edg">{{ item.num }}</view>
@@ -314,6 +314,8 @@
314
314
  num: val,
315
315
  category_id: prod.category_id
316
316
  }
317
+ if(prod.product_sku) product.product_sku = prod.product_sku;
318
+ if(prod.specs) product.specs = prod.specs;
317
319
  jfbRootExec("setFoodCartNum", {
318
320
  vm: this,
319
321
  data: {
@@ -342,7 +344,7 @@
342
344
  },
343
345
  handleSwitchShop(){
344
346
  this.$xdUniHelper.navigateTo({
345
- url: this.switchStorePath + "?brand_id=" + this.shopInfo.brand_id,
347
+ url: this.switchStorePath + "?brand_id=" + this.shopInfo.brand_id + "&resource_shop_id=" + this.resource_shop_id,
346
348
  })
347
349
  },
348
350
  p_getFoodShopDetail(){
@@ -947,6 +949,13 @@
947
949
  display: flex;
948
950
  align-items: flex-end;
949
951
  justify-content: space-between;
952
+ position: relative;
953
+
954
+ .p_r{
955
+ position: absolute;
956
+ right: 0;
957
+ bottom: 0;
958
+ }
950
959
 
951
960
  .icon_add_cart{
952
961
  background-color: var(--main-color);