jufubao-food 1.0.15-beta4 → 1.0.15-beta51
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
|
@@ -98,7 +98,7 @@
|
|
|
98
98
|
</view>
|
|
99
99
|
<view v-if="isShowPlusSaveMoney" class="section">
|
|
100
100
|
<xd-list-item label="" paddingLR="60rpx" size="small">
|
|
101
|
-
<view slot="label" style="color: #86541E;">PLUS
|
|
101
|
+
<view slot="label" style="color: #86541E;">PLUS会员立减</view>
|
|
102
102
|
<xd-unit :price="-plus_saving_money" :largeZero="false" :isOld="false" :fontSize="24" :iconSize="0.3"></xd-unit>
|
|
103
103
|
</xd-list-item>
|
|
104
104
|
</view>
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
<!-- #endif -->
|
|
18
18
|
<view class="jfb-food-product-list__body" :style="[bodyStyleComp]">
|
|
19
19
|
<view v-if="shopInfo">
|
|
20
|
-
<view class="shop_info" :style="{top: layoutInfo.top+'rpx'}" @click="
|
|
20
|
+
<view class="shop_info" :style="{top: layoutInfo.top+'rpx'}" @click="handleSwitchShop">
|
|
21
21
|
<view class="flex-center">
|
|
22
22
|
<xd-font-icon icon="icona-Buy2" size="36" style="margin-right: 8rpx;"></xd-font-icon>
|
|
23
23
|
<view class="shop_name">{{ shopInfo.shop_name }}</view><text style="margin:0 20rpx;">|</text> <text class="_distance">{{ shopInfo.distance }}</text>
|
|
@@ -269,7 +269,7 @@
|
|
|
269
269
|
scrollTopTimer: null,
|
|
270
270
|
brand_id: "",
|
|
271
271
|
shopList: [],
|
|
272
|
-
curShopIndex:
|
|
272
|
+
curShopIndex: -1,
|
|
273
273
|
|
|
274
274
|
//商品列表
|
|
275
275
|
column_num: 1,
|
|
@@ -437,7 +437,15 @@
|
|
|
437
437
|
this.resource_shop_id = options.resource_shop_id;
|
|
438
438
|
this.consume_mode = options.consume_mode || 'HDSELF';
|
|
439
439
|
this.brand_id = options.brand_id;
|
|
440
|
-
this.
|
|
440
|
+
if(this.resource_shop_id){
|
|
441
|
+
this.p_getFoodShopDetail(this.resource_shop_id);
|
|
442
|
+
}else if(this.brand_id || this.$configProject['isPreview']){
|
|
443
|
+
this.p_getFoodShopList();
|
|
444
|
+
}else{
|
|
445
|
+
this.$xdAlert({
|
|
446
|
+
content: '请配置品牌ID',
|
|
447
|
+
})
|
|
448
|
+
}
|
|
441
449
|
},
|
|
442
450
|
/**
|
|
443
451
|
* @description 监听事件变化
|
|
@@ -538,12 +546,22 @@
|
|
|
538
546
|
})
|
|
539
547
|
},
|
|
540
548
|
toSwitchShopPage(){
|
|
549
|
+
if(this.shopList.length===0){
|
|
550
|
+
this.p_getFoodShopList(false);
|
|
551
|
+
}
|
|
541
552
|
this.showTakeoutShop = true;
|
|
542
553
|
},
|
|
543
554
|
handleSwitchShop(){
|
|
544
|
-
|
|
545
|
-
|
|
555
|
+
//切换门店
|
|
556
|
+
let curPage = this.$xdUniHelper.getCurrentPages();
|
|
557
|
+
let query = {...curPage.query};
|
|
558
|
+
let callback= Base64.encode(curPage.path + '?' + this.$xdUniHelper.jsonToParams(query));
|
|
559
|
+
this.$xdUniHelper.redirectTo({
|
|
560
|
+
url: this.switchStorePath + '?brand_id=' + this.brand_id + '&callback=' + callback
|
|
546
561
|
})
|
|
562
|
+
// this.$xdUniHelper.navigateTo({
|
|
563
|
+
// url: this.switchStorePath + "?brand_id=" + this.brand_id + "&resource_shop_id=" + this.resource_shop_id,
|
|
564
|
+
// })
|
|
547
565
|
},
|
|
548
566
|
setCurShop(index){
|
|
549
567
|
if(this.curShopIndex !== index){
|
|
@@ -552,7 +570,7 @@
|
|
|
552
570
|
}
|
|
553
571
|
this.showTakeoutShop = false;
|
|
554
572
|
},
|
|
555
|
-
p_getFoodShopList(){
|
|
573
|
+
p_getFoodShopList(loadFirstShop=true){
|
|
556
574
|
jfbRootExec("getFoodShopList", {
|
|
557
575
|
vm: this,
|
|
558
576
|
data: {
|
|
@@ -566,8 +584,13 @@
|
|
|
566
584
|
}).then(res => {
|
|
567
585
|
if(res.list && res.list.length > 0){
|
|
568
586
|
this.shopList = res.list;
|
|
569
|
-
|
|
570
|
-
|
|
587
|
+
if(loadFirstShop){
|
|
588
|
+
this.curShopIndex = 0;
|
|
589
|
+
this.p_getFoodShopDetail();
|
|
590
|
+
}else{
|
|
591
|
+
let findShopIndex = this.shopList.findIndex(item => item.resource_shop_id == this.resource_shop_id);
|
|
592
|
+
this.curShopIndex = findShopIndex;
|
|
593
|
+
}
|
|
571
594
|
if(!this.$configProject['isPreview']){
|
|
572
595
|
this.showTakeoutShop = true;
|
|
573
596
|
}
|
|
@@ -576,13 +599,13 @@
|
|
|
576
599
|
}
|
|
577
600
|
})
|
|
578
601
|
},
|
|
579
|
-
p_getFoodShopDetail(){
|
|
580
|
-
let curShop = this.shopList[this.curShopIndex];
|
|
602
|
+
p_getFoodShopDetail(resource_shop_id){
|
|
603
|
+
let curShop = this.shopList[this.curShopIndex]||{};
|
|
581
604
|
jfbRootExec("getFoodShopDetail", {
|
|
582
605
|
vm: this,
|
|
583
606
|
data: {
|
|
584
607
|
xnamespace: this.xnamespace,
|
|
585
|
-
resource_shop_id: curShop.resource_shop_id,
|
|
608
|
+
resource_shop_id: resource_shop_id || curShop.resource_shop_id,
|
|
586
609
|
consume_mode: this.consume_mode,
|
|
587
610
|
latitude: this.stateLocation.latitude,
|
|
588
611
|
longitude: this.stateLocation.longitude,
|
|
@@ -1029,6 +1052,10 @@
|
|
|
1029
1052
|
.jfb-food-product-list {
|
|
1030
1053
|
&__body{
|
|
1031
1054
|
background-color: #FFFFFF;
|
|
1055
|
+
::v-deep .xd-up-drawer__warper{
|
|
1056
|
+
border-radius: 24rpx 24rpx 0 0 !important;
|
|
1057
|
+
overflow: hidden;
|
|
1058
|
+
}
|
|
1032
1059
|
.empty_shop{
|
|
1033
1060
|
background-color: #FFFFFF;
|
|
1034
1061
|
height: 100%;
|
|
@@ -1337,7 +1364,7 @@
|
|
|
1337
1364
|
.prod_specs{
|
|
1338
1365
|
padding-top: unit(10, rpx);
|
|
1339
1366
|
display: block;
|
|
1340
|
-
font-size:
|
|
1367
|
+
font-size: 24rpx;
|
|
1341
1368
|
color: #999999;
|
|
1342
1369
|
line-height: unit(32, rpx);
|
|
1343
1370
|
}
|