jufubao-food 1.0.15-beta14 → 1.0.15-beta16
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
|
@@ -200,7 +200,7 @@
|
|
|
200
200
|
</xd-down-drawer>
|
|
201
201
|
<view v-if="showEmptyShop" class="empty_shop">
|
|
202
202
|
<xd-no-data :scaleSize="2" iconType="shop">附近暂无门店</xd-no-data>
|
|
203
|
-
<view class="empty_chose_btn" @click="
|
|
203
|
+
<view class="empty_chose_btn" @click="handleSwitchCity">选择其他城市 <xd-font-icon icon="iconxiangyou_xian" :size="24"></xd-font-icon></view>
|
|
204
204
|
</view>
|
|
205
205
|
</view>
|
|
206
206
|
</view>
|
|
@@ -238,6 +238,7 @@
|
|
|
238
238
|
],
|
|
239
239
|
data() {
|
|
240
240
|
return {
|
|
241
|
+
pageOptions: {},
|
|
241
242
|
closeMask: true,
|
|
242
243
|
isPreview: false,
|
|
243
244
|
resource_shop_id: "",
|
|
@@ -305,6 +306,7 @@
|
|
|
305
306
|
foodDetailPath: "",
|
|
306
307
|
confirmPath: "",
|
|
307
308
|
switchStorePath: "",
|
|
309
|
+
switchCityPath: "",
|
|
308
310
|
}
|
|
309
311
|
},
|
|
310
312
|
computed: {
|
|
@@ -427,6 +429,11 @@
|
|
|
427
429
|
if (JSON.stringify(value) === JSON.stringify(oldValue)) return;
|
|
428
430
|
if (this.$configProject['isPreview']) this.init(value)
|
|
429
431
|
},
|
|
432
|
+
stateCity(n, o) {
|
|
433
|
+
if(n && JSON.stringify(n) !== JSON.stringify(o)){
|
|
434
|
+
this.onJfbLoad(this.pageOptions);
|
|
435
|
+
}
|
|
436
|
+
}
|
|
430
437
|
},
|
|
431
438
|
created() {
|
|
432
439
|
this.init(this.container);
|
|
@@ -436,6 +443,7 @@
|
|
|
436
443
|
},
|
|
437
444
|
methods: {
|
|
438
445
|
onJfbLoad(options) {
|
|
446
|
+
this.pageOptions = options;
|
|
439
447
|
this.setNameSpace(options);
|
|
440
448
|
this.resource_shop_id = options.resource_shop_id;
|
|
441
449
|
this.consume_mode = options.consume_mode || 'HDSELF';
|
|
@@ -455,9 +463,11 @@
|
|
|
455
463
|
* @param container {object} 业务组件对象自己
|
|
456
464
|
*/
|
|
457
465
|
init(container) {
|
|
466
|
+
this.xnamespace = gCPVal(container, 'xnamespace', this.projectAttr.business_code||this.xnamespace);
|
|
458
467
|
this.foodDetailPath = getContainerPropsValue(container, 'content.foodDetailPath', {value: ""}).value;
|
|
459
468
|
this.confirmPath = getContainerPropsValue(container, 'content.confirmPath', {value: ""}).value;
|
|
460
469
|
this.switchStorePath = getContainerPropsValue(container, 'content.switchStorePath', { value: ''}).value;
|
|
470
|
+
this.switchCityPath = getContainerPropsValue(container, 'content.switchCityPath', { value: ''}).value;
|
|
461
471
|
this.showDiscount = gCPVal(container, 'showDiscount', "Y");
|
|
462
472
|
this.differ = gCPVal(container, 'differ', 1);
|
|
463
473
|
|
|
@@ -554,6 +564,11 @@
|
|
|
554
564
|
}
|
|
555
565
|
this.showTakeoutShop = true;
|
|
556
566
|
},
|
|
567
|
+
handleSwitchCity(){
|
|
568
|
+
this.$xdUniHelper.navigateTo({
|
|
569
|
+
url: this.switchCityPath
|
|
570
|
+
})
|
|
571
|
+
},
|
|
557
572
|
handleSwitchShop(){
|
|
558
573
|
//切换门店
|
|
559
574
|
let curPage = this.$xdUniHelper.getCurrentPages();
|
|
@@ -591,6 +606,7 @@
|
|
|
591
606
|
}
|
|
592
607
|
}).then(res => {
|
|
593
608
|
if(res.list && res.list.length > 0){
|
|
609
|
+
this.showEmptyShop = false;
|
|
594
610
|
this.shopList = res.list;
|
|
595
611
|
if(loadFirstShop){
|
|
596
612
|
this.curShopIndex = 0;
|
|
@@ -41,6 +41,19 @@ export default (data)=>{
|
|
|
41
41
|
groupKey:'advanced',
|
|
42
42
|
className: 'input100',
|
|
43
43
|
},
|
|
44
|
+
{
|
|
45
|
+
label: '切换城市',
|
|
46
|
+
ele: 'xd-select-pages-path',
|
|
47
|
+
valueKey: 'switchCityPath',
|
|
48
|
+
placeholder: '请选择切换城市跳转地址',
|
|
49
|
+
value: data.switchCityPath || null,
|
|
50
|
+
setting: {
|
|
51
|
+
router: XdBus.getParentApi('getPagesTree'),
|
|
52
|
+
},
|
|
53
|
+
labelInline: true,
|
|
54
|
+
groupKey:'advanced',
|
|
55
|
+
className: 'input100',
|
|
56
|
+
},
|
|
44
57
|
|
|
45
58
|
{
|
|
46
59
|
label: '版本号:',
|