jufubao-food 1.0.15-beta2 → 1.0.15-beta20
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 +1 -1
- package/src/components/JfbFoodConfirmV2/JfbFoodConfirmV2.vue +4 -2
- package/src/components/JfbFoodProductInfo/JfbFoodProductInfo.vue +35 -19
- package/src/components/JfbFoodProductInfo/XdSpu.vue +5 -1
- package/src/components/JfbFoodProductInfo/cusAttr/content.js +35 -0
- package/src/components/JfbFoodProductInfo/cusAttr/style.js +32 -3
- package/src/components/JfbFoodProductList/JfbFoodProductList.vue +181 -43
- package/src/components/JfbFoodProductList/Mock.js +115 -1
- package/src/components/JfbFoodProductList/cusAttr/advanced.js +26 -0
- package/src/components/JfbFoodProductList/cusAttr/content.js +94 -0
- package/src/components/JfbFoodProductList/cusAttr/style.js +3 -3
package/package.json
CHANGED
|
@@ -21,7 +21,9 @@
|
|
|
21
21
|
<view class="shop_wrap" @click="toSwitchShop">
|
|
22
22
|
<view class="shop_info">
|
|
23
23
|
<view class="_name"><xd-font-icon icon="iconshouye" :color="mainColor" size="36" style="margin-right: 8rpx;"></xd-font-icon>{{ shopInfo.shop_name }}</view>
|
|
24
|
-
<view class="_dist">
|
|
24
|
+
<view class="_dist">
|
|
25
|
+
<!-- {{ shopInfo.distance_conversion}} -->
|
|
26
|
+
更多门店
|
|
25
27
|
<xd-font-icon icon="iconxiangyou_xian" color="#666666" :size="20" style="margin-left: 8rpx;"></xd-font-icon>
|
|
26
28
|
</view>
|
|
27
29
|
</view>
|
|
@@ -453,7 +455,7 @@
|
|
|
453
455
|
this.bgColor = this.$colorChange(this.warningColor).alpha(0.1).toString();
|
|
454
456
|
this.bgColor2 = this.$colorChange(this.mainColor).alpha(0.1).toString();
|
|
455
457
|
|
|
456
|
-
this.xnamespace = getContainerPropsValue(container, 'content.xnamespace',
|
|
458
|
+
this.xnamespace = getContainerPropsValue(container, 'content.xnamespace', "");
|
|
457
459
|
this.showBuyer = getContainerPropsValue(container, 'content.showBuyer', "Y");
|
|
458
460
|
this.showOrderComment = getContainerPropsValue(container, 'content.showOrderComment', "Y");
|
|
459
461
|
this.payPath = getContainerPropsValue(container, 'content.payPath', { value: "/system/system/pay" }).value;
|
|
@@ -31,23 +31,25 @@
|
|
|
31
31
|
</xd-swiper>
|
|
32
32
|
<view class="xd-store-product__swiper-tips">{{swiperCurrent + 1}}/{{images.length}}</view>
|
|
33
33
|
</view>
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
34
|
+
<view :style="[contBodyStyleComp]">
|
|
35
|
+
<view class="prod_title_number">
|
|
36
|
+
<view class="prod_title">{{ baseInfo.product_name }}</view>
|
|
37
|
+
<view class="prod_number">
|
|
38
|
+
<xd-number v-model="number" :min="1" :max="99" circle></xd-number>
|
|
39
|
+
</view>
|
|
39
40
|
</view>
|
|
40
|
-
</view>
|
|
41
41
|
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
42
|
+
<view v-if="skus.length" class="sku_wrap">
|
|
43
|
+
<!-- <xd-sku @change="handleSkuChange"></xd-sku> -->
|
|
44
|
+
<xd-sku :skus="skus" @change="handleSkuChange"></xd-sku>
|
|
45
|
+
</view>
|
|
46
46
|
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
47
|
+
<view v-if="spuList.length" class="attr_wrap">
|
|
48
|
+
<!-- <xd-spu ref="mySpu" @change="handleSpuChange"></xd-spu> -->
|
|
49
|
+
<xd-spu ref="mySpu" :list="spuList" @change="handleSpuChange"></xd-spu>
|
|
50
|
+
</view>
|
|
50
51
|
</view>
|
|
52
|
+
|
|
51
53
|
|
|
52
54
|
<view style="height: 120rpx;"></view>
|
|
53
55
|
<view class="fixed_bottom" :style="prod_bottom">
|
|
@@ -114,6 +116,7 @@
|
|
|
114
116
|
consume_mode: "",
|
|
115
117
|
category_id: "",
|
|
116
118
|
specsPrice: 0,
|
|
119
|
+
xnamespace: "",
|
|
117
120
|
|
|
118
121
|
baseInfo: null,
|
|
119
122
|
images: [],
|
|
@@ -125,8 +128,10 @@
|
|
|
125
128
|
|
|
126
129
|
is_plus_site: false,
|
|
127
130
|
//面板
|
|
128
|
-
|
|
131
|
+
showDiscount: "Y", //是否展示划线价
|
|
129
132
|
differ: 1, //原价与现价的差值
|
|
133
|
+
bodyPadding: "",
|
|
134
|
+
contentColor: "",
|
|
130
135
|
|
|
131
136
|
shopBtnBgColor: "",
|
|
132
137
|
bottomBtnRadius: "100",
|
|
@@ -150,6 +155,7 @@
|
|
|
150
155
|
'--main-color': this.mainColor,
|
|
151
156
|
'--bg-color': this.mainColorAlpha,
|
|
152
157
|
'--bg-main-color': this.mainColorAlpha,
|
|
158
|
+
backgroundColor: this.contentColor
|
|
153
159
|
}
|
|
154
160
|
},
|
|
155
161
|
prod_bottom() {
|
|
@@ -185,6 +191,11 @@
|
|
|
185
191
|
item.p = p;
|
|
186
192
|
return item;
|
|
187
193
|
})
|
|
194
|
+
},
|
|
195
|
+
contBodyStyleComp(){
|
|
196
|
+
return {
|
|
197
|
+
padding: this.getMarginAndPadding(this.bodyPadding, 0)
|
|
198
|
+
}
|
|
188
199
|
}
|
|
189
200
|
},
|
|
190
201
|
watch: {
|
|
@@ -212,8 +223,14 @@
|
|
|
212
223
|
* @param container {object} 业务组件对象自己
|
|
213
224
|
*/
|
|
214
225
|
init(container) {
|
|
226
|
+
this.xnamespace = gCPVal(container, 'xnamespace', "");
|
|
215
227
|
this.foodProductListPath = getContainerPropsValue(container, 'content.foodProductListPath', {value: ""}).value;
|
|
216
228
|
this.shopBtnBgColor = gCPVal(container, 'shopBtnBgColor', this.mainColor, {sKey:'cartBtnStatus',fields:['shopBtnBgColor']});
|
|
229
|
+
this.showDiscount = gCPVal(container, 'showDiscount', "Y");
|
|
230
|
+
this.differ = gCPVal(container, 'differ', 1);
|
|
231
|
+
this.bodyPadding = gCPVal(container, 'bodyPadding', [16], {sKey:'bodyPaddingStatus',fields:['bodyPadding'], isPMR:true});
|
|
232
|
+
this.contentColor = gCPVal(container,'contentColor', '#f8f8f8', {sKey:'contentColorStatus',fields:['contentColor']});
|
|
233
|
+
console.log("this.bodyPadding", this.bodyPadding)
|
|
217
234
|
},
|
|
218
235
|
handleSkuChange(sku){
|
|
219
236
|
console.log('handleSkuChange', sku);
|
|
@@ -241,7 +258,7 @@
|
|
|
241
258
|
category_id: this.category_id,
|
|
242
259
|
consume_mode: this.consume_mode,
|
|
243
260
|
shop_id: this.shop_id,
|
|
244
|
-
is_show_uprice: this.
|
|
261
|
+
is_show_uprice: this.showDiscount !== 'Y' ? 0 : this.multiply(this.differ),
|
|
245
262
|
}
|
|
246
263
|
}).then(res => {
|
|
247
264
|
this.$xdHideLoading()
|
|
@@ -333,7 +350,6 @@
|
|
|
333
350
|
|
|
334
351
|
.jfb-food-product-info {
|
|
335
352
|
&__body{
|
|
336
|
-
background-color: #f8f8f8;
|
|
337
353
|
.xd-store-product {
|
|
338
354
|
color: #333;
|
|
339
355
|
&__swiper {
|
|
@@ -358,7 +374,7 @@
|
|
|
358
374
|
.prod_title_number{
|
|
359
375
|
background-color: #FFFFFF;
|
|
360
376
|
padding: 24rpx 32rpx;
|
|
361
|
-
margin: 20rpx;
|
|
377
|
+
margin: 20rpx 0;
|
|
362
378
|
border-radius: 16rpx;
|
|
363
379
|
display: flex;
|
|
364
380
|
align-items: center;
|
|
@@ -378,13 +394,13 @@
|
|
|
378
394
|
.sku_wrap{
|
|
379
395
|
background-color: #FFFFFF;
|
|
380
396
|
padding: 24rpx;
|
|
381
|
-
margin: 16rpx;
|
|
397
|
+
margin: 16rpx 0;
|
|
382
398
|
border-radius: 16rpx;
|
|
383
399
|
}
|
|
384
400
|
.attr_wrap{
|
|
385
401
|
background-color: #FFFFFF;
|
|
386
402
|
padding: 24rpx;
|
|
387
|
-
margin: 16rpx;
|
|
403
|
+
margin: 16rpx 0;
|
|
388
404
|
border-radius: 16rpx;
|
|
389
405
|
}
|
|
390
406
|
.fixed_bottom{
|
|
@@ -213,7 +213,7 @@ export default {
|
|
|
213
213
|
margin-bottom: 20rpx;
|
|
214
214
|
flex-wrap: wrap;
|
|
215
215
|
&.img_list{
|
|
216
|
-
justify-content: space-between;
|
|
216
|
+
// justify-content: space-between;
|
|
217
217
|
}
|
|
218
218
|
|
|
219
219
|
.specs_img_item{
|
|
@@ -229,6 +229,10 @@ export default {
|
|
|
229
229
|
position: relative;
|
|
230
230
|
margin-bottom: 16rpx;
|
|
231
231
|
overflow: hidden;
|
|
232
|
+
margin-right: 16rpx;
|
|
233
|
+
&:nth-of-type(3n){
|
|
234
|
+
margin-right: 0;
|
|
235
|
+
}
|
|
232
236
|
|
|
233
237
|
&.active{
|
|
234
238
|
border-color: var(--main-color);
|
|
@@ -36,5 +36,40 @@ export default function (data, gValue,gColor,oldData){
|
|
|
36
36
|
.catch();
|
|
37
37
|
}
|
|
38
38
|
},
|
|
39
|
+
{
|
|
40
|
+
ele: 'title',
|
|
41
|
+
label: '展示内容',
|
|
42
|
+
size: 'small',
|
|
43
|
+
groupKey:'content',
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
label: '划线价',
|
|
47
|
+
ele: 'xd-cus-switch',
|
|
48
|
+
valueKey: 'showDiscount',
|
|
49
|
+
value: dataVal({ data, key: 'showDiscount', dValue: 'Y', gValue }),
|
|
50
|
+
className: 'input100',
|
|
51
|
+
labelInline: true,
|
|
52
|
+
groupKey: 'content',
|
|
53
|
+
setting: {
|
|
54
|
+
tips: ['显示', '不显示'],
|
|
55
|
+
isBackType: 'string'
|
|
56
|
+
},
|
|
57
|
+
},
|
|
58
|
+
{ ele: 'group_start' },
|
|
59
|
+
{
|
|
60
|
+
label: '差值',
|
|
61
|
+
ele: 'el-input',
|
|
62
|
+
type: 'number',
|
|
63
|
+
valueKey: 'differ',
|
|
64
|
+
labelInline: true,
|
|
65
|
+
value: dataVal({ data, key: 'differ', dValue: '', gValue }),
|
|
66
|
+
hidden: data.showDiscount !== 'Y',
|
|
67
|
+
groupKey: 'content',
|
|
68
|
+
placeholder: '价差,默认值:1',
|
|
69
|
+
className: 'input80',
|
|
70
|
+
notice: '划线价取市场价,市场价-售价差值大于等于设置值时展示',
|
|
71
|
+
inline: false
|
|
72
|
+
},
|
|
73
|
+
{ ele: 'group_end' },
|
|
39
74
|
]
|
|
40
75
|
}
|
|
@@ -21,11 +21,11 @@ export default function (data={},gValue={},gColor={},oldData) {
|
|
|
21
21
|
groupKey:'style',
|
|
22
22
|
},
|
|
23
23
|
{
|
|
24
|
-
label: '
|
|
24
|
+
label: '内容区边距',
|
|
25
25
|
ele: 'xd-radio',
|
|
26
26
|
groupKey: 'style',
|
|
27
27
|
valueKey: 'bodyPaddingStatus',
|
|
28
|
-
value: statusDataVal({data, key:'bodyPaddingStatus',
|
|
28
|
+
value: statusDataVal({data, key:'bodyPaddingStatus', dValue: 'D', gValue}),
|
|
29
29
|
labelInline:true,
|
|
30
30
|
list: [
|
|
31
31
|
{label: '默认', value: 'D'},
|
|
@@ -42,7 +42,7 @@ export default function (data={},gValue={},gColor={},oldData) {
|
|
|
42
42
|
value: dataVal({
|
|
43
43
|
data,
|
|
44
44
|
key:'bodyPadding',
|
|
45
|
-
dValue:[
|
|
45
|
+
dValue:[16],
|
|
46
46
|
gValue,
|
|
47
47
|
isPM: true,
|
|
48
48
|
isCPM: true,
|
|
@@ -52,5 +52,34 @@ export default function (data={},gValue={},gColor={},oldData) {
|
|
|
52
52
|
},
|
|
53
53
|
},
|
|
54
54
|
{ele: 'group_end'},
|
|
55
|
+
|
|
56
|
+
{
|
|
57
|
+
label: '背景色',
|
|
58
|
+
ele: 'xd-radio',
|
|
59
|
+
groupKey: 'style',
|
|
60
|
+
valueKey: 'contentColorStatus',
|
|
61
|
+
value: statusDataVal({data, key: 'contentColorStatus', fields:['contentColor'], gValue}),
|
|
62
|
+
labelInline:true,
|
|
63
|
+
list: [
|
|
64
|
+
{label: '默认', value: 'D'},
|
|
65
|
+
{label: '自定义', value: 'C'},
|
|
66
|
+
]
|
|
67
|
+
},
|
|
68
|
+
{ele: 'group_start'},
|
|
69
|
+
{
|
|
70
|
+
label: '',
|
|
71
|
+
ele: 'xd-color',
|
|
72
|
+
groupKey:'style',
|
|
73
|
+
valueKey: 'contentColor',
|
|
74
|
+
value: dataVal({data, key:'contentColor', dValue: '#f8f8f8', gValue}),
|
|
75
|
+
hidden: !statusShow({data, key: 'contentColorStatus', fields:['contentColor'], gValue}),
|
|
76
|
+
placeholder: '请选择背景颜色',
|
|
77
|
+
classNmae: 'input80',
|
|
78
|
+
setting: {
|
|
79
|
+
showAlpha: true
|
|
80
|
+
},
|
|
81
|
+
inline: false,
|
|
82
|
+
},
|
|
83
|
+
{ele: 'group_end'},
|
|
55
84
|
]
|
|
56
85
|
}
|
|
@@ -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>
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
</view>
|
|
29
29
|
<view style="height: 100rpx;"></view>
|
|
30
30
|
|
|
31
|
-
<view class="section_main" :style="[sectionMainStyleComp]">
|
|
31
|
+
<view v-if="categoryList.length" class="section_main" :style="[sectionMainStyleComp]">
|
|
32
32
|
<view class="left_nav" :style="[navStyleComp]">
|
|
33
33
|
<scroll-view style="height:100%" scroll-y="true" class="nav_scroll">
|
|
34
34
|
<view v-for="(item, index) in categoryList" :key="item.category_id"
|
|
@@ -43,6 +43,7 @@
|
|
|
43
43
|
>
|
|
44
44
|
{{ item.category_name }}
|
|
45
45
|
<view v-if="item.cart_num" class="cate_num">{{ item.cart_num }}</view>
|
|
46
|
+
<view v-if="index === cateIndex" :style="[navActiveBarStyle]" class="nav_active_bar"></view>
|
|
46
47
|
</view>
|
|
47
48
|
<view style="height: 80rpx;"></view>
|
|
48
49
|
</scroll-view>
|
|
@@ -80,15 +81,16 @@
|
|
|
80
81
|
<view style="display:flex;align-items:center">
|
|
81
82
|
<CusPrice :isPlus="is_plus_site" :isShowIcon="false" salePriceFontSize="32" :showPrice="item.show_prices"></CusPrice>
|
|
82
83
|
</view>
|
|
83
|
-
<view class="p_r" style="font-size: 28rpx;color:#999" @click.stop>
|
|
84
|
-
<view v-if="item.has_choose" class="chose_spu" @click="handleChoseProduct(item)">
|
|
85
|
-
选规格
|
|
84
|
+
<view v-if="isAddCart==='Y'" class="p_r" style="font-size: 28rpx;color:#999" @click.stop>
|
|
85
|
+
<view v-if="item.has_choose" class="chose_spu" :style="[choseSpuStyleComp]" @click="handleChoseProduct(item)">
|
|
86
|
+
<!-- 选规格 -->
|
|
87
|
+
{{ cartName }}
|
|
86
88
|
<view v-if="item.num" class="cart_edg">{{ item.num }}</view>
|
|
87
89
|
</view>
|
|
88
90
|
<view v-else>
|
|
89
|
-
<xd-number v-if="item.num" v-model="item.num" circle @change="val => handleCartNumChange(val, item)"></xd-number>
|
|
91
|
+
<xd-number v-if="item.num" v-model="item.num" circle :pointCusStyle="pointCusStyle" @change="val => handleCartNumChange(val, item)"></xd-number>
|
|
90
92
|
<!-- <xd-font-icon v-else icon="iconaddcart" :color="mainColor" size="46"></xd-font-icon> -->
|
|
91
|
-
<view class="icon_add_cart" v-else @click="handleChoseProduct(item)">+</view>
|
|
93
|
+
<view class="icon_add_cart" :style="[choseSpuStyleComp]" v-else @click="handleChoseProduct(item)">+</view>
|
|
92
94
|
</view>
|
|
93
95
|
</view>
|
|
94
96
|
</view>
|
|
@@ -107,6 +109,9 @@
|
|
|
107
109
|
</scroll-view>
|
|
108
110
|
</view>
|
|
109
111
|
</view>
|
|
112
|
+
<view v-else class="section_main" :style="[sectionMainStyleComp]" style="display: flex;align-items: center;justify-content: center;">
|
|
113
|
+
<xd-no-data height="250rpx" :scaleSize="2">暂无商品</xd-no-data>
|
|
114
|
+
</view>
|
|
110
115
|
|
|
111
116
|
<view style="height: 120rpx;"></view>
|
|
112
117
|
<view class="fixed_bottom" :style="fixed_bottom">
|
|
@@ -118,8 +123,15 @@
|
|
|
118
123
|
<xd-unit :price="cartPrice" :isOld="false"></xd-unit>
|
|
119
124
|
</view>
|
|
120
125
|
<view>
|
|
121
|
-
<xd-button v-if="cartProductList.length"
|
|
122
|
-
|
|
126
|
+
<xd-button v-if="cartProductList.length"
|
|
127
|
+
:cusStyle="{fontSize: '28rpx'}"
|
|
128
|
+
width="170rpx" size="small" type="primary"
|
|
129
|
+
@click="handleSubmitCart"
|
|
130
|
+
>选好了</xd-button>
|
|
131
|
+
<xd-button v-else
|
|
132
|
+
:cusStyle="{fontSize: '28rpx'}"
|
|
133
|
+
width="170rpx" size="small" type="primary" :disabled="true"
|
|
134
|
+
>选好了</xd-button>
|
|
123
135
|
</view>
|
|
124
136
|
</view>
|
|
125
137
|
<view class="cart_product_modal" v-if="cartProductShow">
|
|
@@ -170,14 +182,17 @@
|
|
|
170
182
|
@click="setCurShop(i)"
|
|
171
183
|
>
|
|
172
184
|
<view class="shop_name_bar">
|
|
173
|
-
<view class="shop_name">
|
|
174
|
-
|
|
185
|
+
<view class="shop_name">
|
|
186
|
+
<text style="margin-right: 16rpx;">{{item.resource_shop_name}}</text>
|
|
187
|
+
<view class="curr_active">正在预览</view>
|
|
188
|
+
</view>
|
|
189
|
+
<view class="more_r" @click.stop="toShopDetail(item)">详情 <xd-font-icon icon="iconxiangyou_xian" :size="24"></xd-font-icon></view>
|
|
175
190
|
</view>
|
|
176
191
|
<view class="shop_addr_bar">
|
|
177
192
|
<view>{{item.address}}</view>
|
|
178
193
|
<view>{{item.distance}}</view>
|
|
179
194
|
</view>
|
|
180
|
-
<view class="shop_time">营业时间:
|
|
195
|
+
<view class="shop_time" v-if="item.business_time_name">营业时间:{{ item.business_time_name }}</view>
|
|
181
196
|
</view>
|
|
182
197
|
</view>
|
|
183
198
|
<view class="chose_other" @click="handleSwitchShop">选择其他门店 <xd-font-icon icon="iconxiangyou_xian" :size="24"></xd-font-icon></view>
|
|
@@ -185,7 +200,7 @@
|
|
|
185
200
|
</xd-down-drawer>
|
|
186
201
|
<view v-if="showEmptyShop" class="empty_shop">
|
|
187
202
|
<xd-no-data :scaleSize="2" iconType="shop">附近暂无门店</xd-no-data>
|
|
188
|
-
<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>
|
|
189
204
|
</view>
|
|
190
205
|
</view>
|
|
191
206
|
</view>
|
|
@@ -223,6 +238,7 @@
|
|
|
223
238
|
],
|
|
224
239
|
data() {
|
|
225
240
|
return {
|
|
241
|
+
pageOptions: {},
|
|
226
242
|
closeMask: true,
|
|
227
243
|
isPreview: false,
|
|
228
244
|
resource_shop_id: "",
|
|
@@ -257,13 +273,13 @@
|
|
|
257
273
|
scrollTopTimer: null,
|
|
258
274
|
brand_id: "",
|
|
259
275
|
shopList: [],
|
|
260
|
-
curShopIndex:
|
|
276
|
+
curShopIndex: -1,
|
|
261
277
|
|
|
262
278
|
//商品列表
|
|
263
279
|
column_num: 1,
|
|
264
280
|
skeNumber:10,
|
|
265
281
|
rowSpacing: 16,
|
|
266
|
-
columnSpacing:
|
|
282
|
+
columnSpacing: 32,
|
|
267
283
|
listPadding:{},
|
|
268
284
|
productConfig:{},
|
|
269
285
|
itemPadding:{},
|
|
@@ -279,6 +295,10 @@
|
|
|
279
295
|
//导航
|
|
280
296
|
titleBgcColor: '#FFFFFF',
|
|
281
297
|
titleStyle: {},
|
|
298
|
+
navStyle: "",
|
|
299
|
+
isAddCart: "Y",
|
|
300
|
+
cartStyle: "",
|
|
301
|
+
cartName: "",
|
|
282
302
|
|
|
283
303
|
//面板
|
|
284
304
|
showDiscount: "Y", //是否展示划线价
|
|
@@ -286,6 +306,8 @@
|
|
|
286
306
|
foodDetailPath: "",
|
|
287
307
|
confirmPath: "",
|
|
288
308
|
switchStorePath: "",
|
|
309
|
+
switchCityPath: "",
|
|
310
|
+
shopDetailPath: "",
|
|
289
311
|
}
|
|
290
312
|
},
|
|
291
313
|
computed: {
|
|
@@ -341,6 +363,54 @@
|
|
|
341
363
|
|
|
342
364
|
}
|
|
343
365
|
},
|
|
366
|
+
navActiveBarStyle(){
|
|
367
|
+
if(this.navStyle === 'long'){
|
|
368
|
+
return {
|
|
369
|
+
top: 0,
|
|
370
|
+
bottom: 0
|
|
371
|
+
}
|
|
372
|
+
}else if(this.navStyle === 'no'){
|
|
373
|
+
return {
|
|
374
|
+
display: 'none'
|
|
375
|
+
}
|
|
376
|
+
}
|
|
377
|
+
},
|
|
378
|
+
choseSpuStyleComp(){
|
|
379
|
+
if(this.cartStyle === 'btn_cartCFull'){}
|
|
380
|
+
else if(this.cartStyle === 'btn_cartCPlain'){
|
|
381
|
+
return {
|
|
382
|
+
border: '1px solid ' + this.mainColor,
|
|
383
|
+
color: this.mainColor,
|
|
384
|
+
backgroundColor: 'transparent'
|
|
385
|
+
}
|
|
386
|
+
}
|
|
387
|
+
else if(this.cartStyle === 'btn_cartFFull'){
|
|
388
|
+
return {
|
|
389
|
+
borderRadius: 0,
|
|
390
|
+
}
|
|
391
|
+
}else if(this.cartStyle === 'btn_cartFPlain'){
|
|
392
|
+
return {
|
|
393
|
+
border: '1px solid ' + this.mainColor,
|
|
394
|
+
color: this.mainColor,
|
|
395
|
+
backgroundColor: 'transparent',
|
|
396
|
+
borderRadius: 0,
|
|
397
|
+
}
|
|
398
|
+
}
|
|
399
|
+
},
|
|
400
|
+
pointCusStyle(){
|
|
401
|
+
if(this.cartStyle === 'btn_cartFFull'){
|
|
402
|
+
return {
|
|
403
|
+
borderRadius: 0,
|
|
404
|
+
}
|
|
405
|
+
}else if(this.cartStyle === 'btn_cartFPlain'){
|
|
406
|
+
return {
|
|
407
|
+
// border: '1px solid ' + this.mainColor,
|
|
408
|
+
// color: this.mainColor,
|
|
409
|
+
// backgroundColor: 'transparent',
|
|
410
|
+
borderRadius: 0,
|
|
411
|
+
}
|
|
412
|
+
}
|
|
413
|
+
},
|
|
344
414
|
fixed_bottom() {
|
|
345
415
|
return this.fixedStyle({height: 30, zIndex: 111});
|
|
346
416
|
},
|
|
@@ -360,6 +430,11 @@
|
|
|
360
430
|
if (JSON.stringify(value) === JSON.stringify(oldValue)) return;
|
|
361
431
|
if (this.$configProject['isPreview']) this.init(value)
|
|
362
432
|
},
|
|
433
|
+
stateCity(n, o) {
|
|
434
|
+
if(n && JSON.stringify(n) !== JSON.stringify(o)){
|
|
435
|
+
this.onJfbLoad(this.pageOptions);
|
|
436
|
+
}
|
|
437
|
+
}
|
|
363
438
|
},
|
|
364
439
|
created() {
|
|
365
440
|
this.init(this.container);
|
|
@@ -369,20 +444,32 @@
|
|
|
369
444
|
},
|
|
370
445
|
methods: {
|
|
371
446
|
onJfbLoad(options) {
|
|
447
|
+
this.pageOptions = options;
|
|
372
448
|
this.setNameSpace(options);
|
|
373
449
|
this.resource_shop_id = options.resource_shop_id;
|
|
374
450
|
this.consume_mode = options.consume_mode || 'HDSELF';
|
|
375
451
|
this.brand_id = options.brand_id;
|
|
376
|
-
this.
|
|
452
|
+
if(this.resource_shop_id){
|
|
453
|
+
this.p_getFoodShopDetail(this.resource_shop_id);
|
|
454
|
+
}else if(this.brand_id || this.$configProject['isPreview']){
|
|
455
|
+
this.p_getFoodShopList();
|
|
456
|
+
}else{
|
|
457
|
+
this.$xdAlert({
|
|
458
|
+
content: '请配置品牌ID',
|
|
459
|
+
})
|
|
460
|
+
}
|
|
377
461
|
},
|
|
378
462
|
/**
|
|
379
463
|
* @description 监听事件变化
|
|
380
464
|
* @param container {object} 业务组件对象自己
|
|
381
465
|
*/
|
|
382
466
|
init(container) {
|
|
383
|
-
this.
|
|
384
|
-
this.
|
|
467
|
+
this.xnamespace = gCPVal(container, 'xnamespace', "");
|
|
468
|
+
this.foodDetailPath = getContainerPropsValue(container, 'content.foodDetailPath', {value: ""}).value;
|
|
469
|
+
this.confirmPath = getContainerPropsValue(container, 'content.confirmPath', {value: ""}).value;
|
|
385
470
|
this.switchStorePath = getContainerPropsValue(container, 'content.switchStorePath', { value: ''}).value;
|
|
471
|
+
this.switchCityPath = getContainerPropsValue(container, 'content.switchCityPath', { value: ''}).value;
|
|
472
|
+
this.shopDetailPath = getContainerPropsValue(container, 'content.shopDetailPath', { value: ''}).value;
|
|
386
473
|
this.showDiscount = gCPVal(container, 'showDiscount', "Y");
|
|
387
474
|
this.differ = gCPVal(container, 'differ', 1);
|
|
388
475
|
|
|
@@ -406,7 +493,7 @@
|
|
|
406
493
|
this.radius = gCPVal(container,'radius', [this.gStyleValue.radius,'0'], {sKey:'radiusStatus',fields:['radius']})||0;
|
|
407
494
|
this.imageRadius = gCPVal(container,'imageRadius', [this.gStyleValue.radius/2,'0'], {sKey:'imageRadiusStatus',fields:['imageRadius']})||0;
|
|
408
495
|
this.contShadow = gCPVal(container, 'contShadow', [this.gStyleValue.shadow,'none'], {isShadow:true});
|
|
409
|
-
this.columnSpacing = gCPVal(container,'columnSpacing', [
|
|
496
|
+
this.columnSpacing = gCPVal(container,'columnSpacing', [32,20], {sKey:'columnRowStatus',fields:['columnSpacing']});
|
|
410
497
|
|
|
411
498
|
//导航
|
|
412
499
|
this.titleBgcColor = gCPVal(container,'titleBgcColor', '#f8f8f8', {sKey:'titleBgcColorStatus',fields:['titleBgcColor']});
|
|
@@ -425,7 +512,11 @@
|
|
|
425
512
|
}],
|
|
426
513
|
{sKey:'titleStyleStatus',fields:['titleStyle'],isMerge: true}
|
|
427
514
|
);
|
|
428
|
-
|
|
515
|
+
this.navStyle = gCPVal(container, 'navStyle', 'short');
|
|
516
|
+
this.isAddCart = gCPVal(container, 'isAddCart', 'Y');
|
|
517
|
+
this.cartStyle = gCPVal(container, 'cartStyle', 'btn_cartCFull')
|
|
518
|
+
this.cartName = gCPVal(container, 'cartName', '选规格');
|
|
519
|
+
console.log("this.z cartStyle", this.cartStyle)
|
|
429
520
|
|
|
430
521
|
//预览mock数据
|
|
431
522
|
if (this.$configProject['isPreview']) {
|
|
@@ -434,6 +525,11 @@
|
|
|
434
525
|
}
|
|
435
526
|
|
|
436
527
|
},
|
|
528
|
+
toShopDetail(item){
|
|
529
|
+
this.$xdUniHelper.navigateTo({
|
|
530
|
+
url: this.shopDetailPath + "?resource_shop_id=" + item.resource_shop_id,
|
|
531
|
+
})
|
|
532
|
+
},
|
|
437
533
|
handleCartNumChange(val, prod){
|
|
438
534
|
console.log("handleCartNumChange", val, prod)
|
|
439
535
|
let product = {
|
|
@@ -470,13 +566,31 @@
|
|
|
470
566
|
})
|
|
471
567
|
},
|
|
472
568
|
toSwitchShopPage(){
|
|
569
|
+
if(this.shopList.length===0){
|
|
570
|
+
this.p_getFoodShopList(false);
|
|
571
|
+
}
|
|
473
572
|
this.showTakeoutShop = true;
|
|
474
573
|
},
|
|
475
|
-
|
|
574
|
+
handleSwitchCity(){
|
|
476
575
|
this.$xdUniHelper.navigateTo({
|
|
477
|
-
url: this.
|
|
576
|
+
url: this.switchCityPath
|
|
478
577
|
})
|
|
479
578
|
},
|
|
579
|
+
handleSwitchShop(){
|
|
580
|
+
//切换门店
|
|
581
|
+
let curPage = this.$xdUniHelper.getCurrentPages();
|
|
582
|
+
let query = {...curPage.query};
|
|
583
|
+
let callback= Base64.encode(curPage.path + '?' + this.$xdUniHelper.jsonToParams(query));
|
|
584
|
+
let linkQuery = '?brand_id=' + (this.brand_id || this.shopInfo.brand_id);
|
|
585
|
+
let rShopId = this.shopInfo.resource_shop_id || this.resource_shop_id;
|
|
586
|
+
linkQuery = rShopId ? linkQuery + '&resource_shop_id=' + rShopId : linkQuery;
|
|
587
|
+
this.$xdUniHelper.redirectTo({
|
|
588
|
+
url: this.switchStorePath + linkQuery + '&callback=' + callback
|
|
589
|
+
})
|
|
590
|
+
// this.$xdUniHelper.navigateTo({
|
|
591
|
+
// url: this.switchStorePath + "?brand_id=" + this.brand_id + "&resource_shop_id=" + this.resource_shop_id,
|
|
592
|
+
// })
|
|
593
|
+
},
|
|
480
594
|
setCurShop(index){
|
|
481
595
|
if(this.curShopIndex !== index){
|
|
482
596
|
this.curShopIndex = index;
|
|
@@ -484,7 +598,7 @@
|
|
|
484
598
|
}
|
|
485
599
|
this.showTakeoutShop = false;
|
|
486
600
|
},
|
|
487
|
-
p_getFoodShopList(){
|
|
601
|
+
p_getFoodShopList(loadFirstShop=true){
|
|
488
602
|
jfbRootExec("getFoodShopList", {
|
|
489
603
|
vm: this,
|
|
490
604
|
data: {
|
|
@@ -494,12 +608,20 @@
|
|
|
494
608
|
city_code: this.stateCity.city_code,
|
|
495
609
|
page_token: 1,
|
|
496
610
|
page_size: 3,
|
|
611
|
+
consume_mode: this.consume_mode,
|
|
612
|
+
xnamespace: this.xnamespace
|
|
497
613
|
}
|
|
498
614
|
}).then(res => {
|
|
499
615
|
if(res.list && res.list.length > 0){
|
|
616
|
+
this.showEmptyShop = false;
|
|
500
617
|
this.shopList = res.list;
|
|
501
|
-
|
|
502
|
-
|
|
618
|
+
if(loadFirstShop){
|
|
619
|
+
this.curShopIndex = 0;
|
|
620
|
+
this.p_getFoodShopDetail();
|
|
621
|
+
}else{
|
|
622
|
+
let findShopIndex = this.shopList.findIndex(item => item.resource_shop_id == this.resource_shop_id);
|
|
623
|
+
this.curShopIndex = findShopIndex;
|
|
624
|
+
}
|
|
503
625
|
if(!this.$configProject['isPreview']){
|
|
504
626
|
this.showTakeoutShop = true;
|
|
505
627
|
}
|
|
@@ -508,13 +630,13 @@
|
|
|
508
630
|
}
|
|
509
631
|
})
|
|
510
632
|
},
|
|
511
|
-
p_getFoodShopDetail(){
|
|
512
|
-
let curShop = this.shopList[this.curShopIndex];
|
|
633
|
+
p_getFoodShopDetail(resource_shop_id){
|
|
634
|
+
let curShop = this.shopList[this.curShopIndex]||{};
|
|
513
635
|
jfbRootExec("getFoodShopDetail", {
|
|
514
636
|
vm: this,
|
|
515
637
|
data: {
|
|
516
638
|
xnamespace: this.xnamespace,
|
|
517
|
-
resource_shop_id: curShop.resource_shop_id,
|
|
639
|
+
resource_shop_id: resource_shop_id || curShop.resource_shop_id,
|
|
518
640
|
consume_mode: this.consume_mode,
|
|
519
641
|
latitude: this.stateLocation.latitude,
|
|
520
642
|
longitude: this.stateLocation.longitude,
|
|
@@ -961,6 +1083,10 @@
|
|
|
961
1083
|
.jfb-food-product-list {
|
|
962
1084
|
&__body{
|
|
963
1085
|
background-color: #FFFFFF;
|
|
1086
|
+
::v-deep .xd-up-drawer__warper{
|
|
1087
|
+
border-radius: 24rpx 24rpx 0 0 !important;
|
|
1088
|
+
overflow: hidden;
|
|
1089
|
+
}
|
|
964
1090
|
.empty_shop{
|
|
965
1091
|
background-color: #FFFFFF;
|
|
966
1092
|
height: 100%;
|
|
@@ -1035,6 +1161,15 @@
|
|
|
1035
1161
|
padding: 24rpx;
|
|
1036
1162
|
text-align: center;
|
|
1037
1163
|
position: relative;
|
|
1164
|
+
.nav_active_bar{
|
|
1165
|
+
position: absolute;
|
|
1166
|
+
left: 0;
|
|
1167
|
+
top: 28rpx;
|
|
1168
|
+
bottom: 28rpx;
|
|
1169
|
+
width: 12rpx;
|
|
1170
|
+
background-color: var(--main-color);
|
|
1171
|
+
border-radius: 0 4rpx 4rpx 0;
|
|
1172
|
+
}
|
|
1038
1173
|
|
|
1039
1174
|
.cate_num{
|
|
1040
1175
|
position: absolute;
|
|
@@ -1052,15 +1187,16 @@
|
|
|
1052
1187
|
// color: var(--main-color);
|
|
1053
1188
|
font-weight: 500;
|
|
1054
1189
|
background-color: #FFFFFF;
|
|
1055
|
-
&::after{
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1190
|
+
// &::after{
|
|
1191
|
+
// content: '';
|
|
1192
|
+
// position: absolute;
|
|
1193
|
+
// left: 0;
|
|
1194
|
+
// top: 28rpx;
|
|
1195
|
+
// bottom: 28rpx;
|
|
1196
|
+
// width: 12rpx;
|
|
1197
|
+
// background-color: var(--main-color);
|
|
1198
|
+
// border-radius: 0 4rpx 4rpx 0;
|
|
1199
|
+
// }
|
|
1064
1200
|
}
|
|
1065
1201
|
}
|
|
1066
1202
|
}
|
|
@@ -1259,7 +1395,7 @@
|
|
|
1259
1395
|
.prod_specs{
|
|
1260
1396
|
padding-top: unit(10, rpx);
|
|
1261
1397
|
display: block;
|
|
1262
|
-
font-size:
|
|
1398
|
+
font-size: 24rpx;
|
|
1263
1399
|
color: #999999;
|
|
1264
1400
|
line-height: unit(32, rpx);
|
|
1265
1401
|
}
|
|
@@ -1304,7 +1440,7 @@
|
|
|
1304
1440
|
}
|
|
1305
1441
|
}
|
|
1306
1442
|
.take_shop_wrap{
|
|
1307
|
-
background-color: #
|
|
1443
|
+
background-color: #f8f8f8;
|
|
1308
1444
|
.take_title{
|
|
1309
1445
|
background-color: #FFFFFF;
|
|
1310
1446
|
padding: 24rpx 32rpx;
|
|
@@ -1333,19 +1469,20 @@
|
|
|
1333
1469
|
background-color: rgba(229, 1, 14, 0.03);
|
|
1334
1470
|
.shop_name_bar{
|
|
1335
1471
|
.curr_active{
|
|
1336
|
-
display: flex;
|
|
1472
|
+
display: inline-flex;
|
|
1337
1473
|
}
|
|
1338
1474
|
}
|
|
1339
1475
|
}
|
|
1340
1476
|
.shop_name_bar{
|
|
1341
1477
|
display: flex;
|
|
1342
|
-
align-items:
|
|
1478
|
+
align-items: flex-start;
|
|
1343
1479
|
justify-content: space-between;
|
|
1344
1480
|
font-size: 32rpx;
|
|
1345
1481
|
color: #333333;
|
|
1346
1482
|
.shop_name{
|
|
1347
|
-
display: flex;
|
|
1348
1483
|
align-items: center;
|
|
1484
|
+
flex: 1;
|
|
1485
|
+
padding-right: 40rpx;
|
|
1349
1486
|
}
|
|
1350
1487
|
.curr_active{
|
|
1351
1488
|
border: 1px solid rgba(229, 1, 14, 0.2);
|
|
@@ -1356,7 +1493,7 @@
|
|
|
1356
1493
|
align-items: center;
|
|
1357
1494
|
justify-content: center;
|
|
1358
1495
|
font-size: 24rpx;
|
|
1359
|
-
margin-left: 16rpx;
|
|
1496
|
+
// margin-left: 16rpx;
|
|
1360
1497
|
display: none;
|
|
1361
1498
|
}
|
|
1362
1499
|
.more_r{
|
|
@@ -1364,6 +1501,7 @@
|
|
|
1364
1501
|
align-items: center;
|
|
1365
1502
|
color: #999999;
|
|
1366
1503
|
font-size: 24rpx;
|
|
1504
|
+
padding-top: 8rpx;
|
|
1367
1505
|
}
|
|
1368
1506
|
}
|
|
1369
1507
|
.shop_addr_bar{
|
|
@@ -126,7 +126,7 @@ module.exports = {
|
|
|
126
126
|
show_prices: [
|
|
127
127
|
{ p: 1875, n: "", t: "S" },
|
|
128
128
|
{ p: 1625, n: "PLUS价", t: "D" },
|
|
129
|
-
{
|
|
129
|
+
{ p: 2000, n: "原价", t: "U" }
|
|
130
130
|
]
|
|
131
131
|
},
|
|
132
132
|
{
|
|
@@ -299,5 +299,119 @@ module.exports = {
|
|
|
299
299
|
],
|
|
300
300
|
total_num: 1,
|
|
301
301
|
request_id: "9c2bfb2c0f6817fd"
|
|
302
|
+
},
|
|
303
|
+
getFoodShopList: {
|
|
304
|
+
list: [
|
|
305
|
+
{
|
|
306
|
+
brand_id: 100021,
|
|
307
|
+
brand_name: "万象院线",
|
|
308
|
+
brand_type: "MC",
|
|
309
|
+
distance: "13.1km",
|
|
310
|
+
phone: "0316-8366949",
|
|
311
|
+
address: "大厂回族自治县大厂回族自治县鑫华商场三层盛世影城",
|
|
312
|
+
consume_mode: ["SEAT"],
|
|
313
|
+
shop_icon: "//sandbox-img.jufubao.cn/uploads/20230725/a343d6a8aab0bd9419ddad1030be7cd1.jpg",
|
|
314
|
+
shop_id: 0,
|
|
315
|
+
resource_shop_id: 8003557,
|
|
316
|
+
params: {
|
|
317
|
+
consume_mode: "SELL,CODE,SEAT,TRAVEL",
|
|
318
|
+
resource_shop:
|
|
319
|
+
"eyJyZXNvdXJjZV9zaG9wX2lkIjo2NzcxOTUzLCJzaG9wX2lkIjowfQ"
|
|
320
|
+
},
|
|
321
|
+
resource_shop_name: "廊坊盛世影城",
|
|
322
|
+
province_name: "",
|
|
323
|
+
city_name: "",
|
|
324
|
+
area_name: "",
|
|
325
|
+
street_name: "",
|
|
326
|
+
latitude: "39.89214964393913",
|
|
327
|
+
longitude: "116.99514574878383",
|
|
328
|
+
default_consume_type: "",
|
|
329
|
+
consume_type: [],
|
|
330
|
+
is_support_jhd: false,
|
|
331
|
+
time_slot_name: "",
|
|
332
|
+
business_time_name: "",
|
|
333
|
+
business_code: "cake",
|
|
334
|
+
consume_options: [
|
|
335
|
+
{
|
|
336
|
+
consume_mode: "SEAT",
|
|
337
|
+
desc: "在线订票选座",
|
|
338
|
+
icon: "iconzuo",
|
|
339
|
+
show_price: []
|
|
340
|
+
}
|
|
341
|
+
]
|
|
342
|
+
},
|
|
343
|
+
{
|
|
344
|
+
brand_id: 14,
|
|
345
|
+
brand_name: "测试1111",
|
|
346
|
+
brand_type: "MA",
|
|
347
|
+
distance: "20.6km",
|
|
348
|
+
phone: "13152526323",
|
|
349
|
+
address: "三河市燕郊镇河北燕郊尚京广场",
|
|
350
|
+
consume_mode: ["SELL"],
|
|
351
|
+
shop_icon: "//sandbox-img.jufubao.cn/uploads/20230324/3265afeb6a1f2a94f25c968a09275574.png",
|
|
352
|
+
shop_id: 1220258,
|
|
353
|
+
resource_shop_id: 8005378,
|
|
354
|
+
params: {
|
|
355
|
+
consume_mode: "SELL,CODE,SEAT,TRAVEL",
|
|
356
|
+
resource_shop:
|
|
357
|
+
"eyJyZXNvdXJjZV9zaG9wX2lkIjo4MDA1Mzc4LCJzaG9wX2lkIjoxMjIwMjU4fQ"
|
|
358
|
+
},
|
|
359
|
+
resource_shop_name: "润旭商城-2号楼",
|
|
360
|
+
province_name: "",
|
|
361
|
+
city_name: "",
|
|
362
|
+
area_name: "",
|
|
363
|
+
street_name: "",
|
|
364
|
+
latitude: "39.960893804217115",
|
|
365
|
+
longitude: "116.84628655458927",
|
|
366
|
+
default_consume_type: "JHD",
|
|
367
|
+
consume_type: ["WB", "QP", "JHD", "CV", "POS"],
|
|
368
|
+
is_support_jhd: true,
|
|
369
|
+
time_slot_name: "",
|
|
370
|
+
business_time_name: "",
|
|
371
|
+
business_code: "cake",
|
|
372
|
+
consume_options: [
|
|
373
|
+
{
|
|
374
|
+
consume_mode: "JHD",
|
|
375
|
+
desc: "到店消费任意金额可用",
|
|
376
|
+
icon: "iconduihuan",
|
|
377
|
+
show_price: []
|
|
378
|
+
}
|
|
379
|
+
]
|
|
380
|
+
},
|
|
381
|
+
{
|
|
382
|
+
brand_id: 7,
|
|
383
|
+
brand_name: "goodlike",
|
|
384
|
+
brand_type: "MA",
|
|
385
|
+
distance: "20.6km",
|
|
386
|
+
phone: "18710035161",
|
|
387
|
+
address: "三河市燕郊镇华地1",
|
|
388
|
+
consume_mode: ["SELF", "STOD", "CODE"],
|
|
389
|
+
shop_icon: "//sandbox-img.jufubao.cn/uploads/20230508/c33ccd6408e911f0334cc2b44b6d4470.jpg",
|
|
390
|
+
shop_id: 0,
|
|
391
|
+
resource_shop_id: 8000009,
|
|
392
|
+
params: {
|
|
393
|
+
consume_mode: "SELL,CODE,SEAT,TRAVEL",
|
|
394
|
+
resource_shop:
|
|
395
|
+
"eyJyZXNvdXJjZV9zaG9wX2lkIjo4MDAwMDA5LCJzaG9wX2lkIjowfQ"
|
|
396
|
+
},
|
|
397
|
+
resource_shop_name: "验门店周期A-关联后",
|
|
398
|
+
province_name: "",
|
|
399
|
+
city_name: "",
|
|
400
|
+
area_name: "",
|
|
401
|
+
street_name: "",
|
|
402
|
+
latitude: "39.96091751137191",
|
|
403
|
+
longitude: "116.84556045424561",
|
|
404
|
+
default_consume_type: "",
|
|
405
|
+
consume_type: [],
|
|
406
|
+
is_support_jhd: false,
|
|
407
|
+
time_slot_name: "",
|
|
408
|
+
business_time_name: "",
|
|
409
|
+
business_code: "cake",
|
|
410
|
+
consume_options: []
|
|
411
|
+
},
|
|
412
|
+
],
|
|
413
|
+
total_size: 0,
|
|
414
|
+
next_page_token: 'a:3:{i:0;d:20725.13012367171;i:1;d:0;i:2;s:7:"8000003";}',
|
|
415
|
+
request_id: "ea411b018a2310c4"
|
|
302
416
|
}
|
|
303
417
|
};
|
|
@@ -15,6 +15,19 @@ export default (data)=>{
|
|
|
15
15
|
groupKey:'advanced',
|
|
16
16
|
className: 'input100',
|
|
17
17
|
},
|
|
18
|
+
{
|
|
19
|
+
label: '门店详情页',
|
|
20
|
+
ele: 'xd-select-pages-path',
|
|
21
|
+
valueKey: 'shopDetailPath',
|
|
22
|
+
placeholder: '请选择门店详情页跳转地址',
|
|
23
|
+
value: data.shopDetailPath || null,
|
|
24
|
+
labelInline: true,
|
|
25
|
+
setting: {
|
|
26
|
+
router: XdBus.getParentApi('getPagesTree'),
|
|
27
|
+
},
|
|
28
|
+
groupKey:'advanced',
|
|
29
|
+
className: 'input100',
|
|
30
|
+
},
|
|
18
31
|
{
|
|
19
32
|
label: '订单确认页',
|
|
20
33
|
ele: 'xd-select-pages-path',
|
|
@@ -41,6 +54,19 @@ export default (data)=>{
|
|
|
41
54
|
groupKey:'advanced',
|
|
42
55
|
className: 'input100',
|
|
43
56
|
},
|
|
57
|
+
{
|
|
58
|
+
label: '切换城市',
|
|
59
|
+
ele: 'xd-select-pages-path',
|
|
60
|
+
valueKey: 'switchCityPath',
|
|
61
|
+
placeholder: '请选择切换城市跳转地址',
|
|
62
|
+
value: data.switchCityPath || null,
|
|
63
|
+
setting: {
|
|
64
|
+
router: XdBus.getParentApi('getPagesTree'),
|
|
65
|
+
},
|
|
66
|
+
labelInline: true,
|
|
67
|
+
groupKey:'advanced',
|
|
68
|
+
className: 'input100',
|
|
69
|
+
},
|
|
44
70
|
|
|
45
71
|
{
|
|
46
72
|
label: '版本号:',
|
|
@@ -80,12 +80,106 @@ export default function (data, gValue,gColor,oldData){
|
|
|
80
80
|
});
|
|
81
81
|
},
|
|
82
82
|
},
|
|
83
|
+
{
|
|
84
|
+
label: "分类样式",
|
|
85
|
+
ele: "xd-style-image",
|
|
86
|
+
groupKey: 'content',
|
|
87
|
+
valueKey: "navStyle",
|
|
88
|
+
value: data['navStyle'] || 'short',
|
|
89
|
+
value: customVal({
|
|
90
|
+
data,
|
|
91
|
+
key: 'navStyle',
|
|
92
|
+
gValue,
|
|
93
|
+
sValue:"short",
|
|
94
|
+
}),
|
|
95
|
+
labelInline:true,
|
|
96
|
+
className: 'input100',
|
|
97
|
+
handleCustom(cusRes) {
|
|
98
|
+
XdBus.getParentApi('getCompStylesOptions')({
|
|
99
|
+
layout_ids: 'xdDbJ4IOirUK0lljEPIkF',
|
|
100
|
+
key: Date.now()
|
|
101
|
+
})
|
|
102
|
+
.then(res => {
|
|
103
|
+
cusRes.data.cb(res)
|
|
104
|
+
})
|
|
105
|
+
.catch(error => {
|
|
106
|
+
console.error(error);
|
|
107
|
+
});
|
|
108
|
+
},
|
|
109
|
+
},
|
|
83
110
|
{
|
|
84
111
|
ele: 'title',
|
|
85
112
|
label: '展示内容',
|
|
86
113
|
size: 'small',
|
|
87
114
|
groupKey:'content',
|
|
88
115
|
},
|
|
116
|
+
{
|
|
117
|
+
label: '加购按钮',
|
|
118
|
+
ele: 'xd-cus-switch',
|
|
119
|
+
valueKey: 'isAddCart',
|
|
120
|
+
value: data['isAddCart'] || 'Y',
|
|
121
|
+
className: 'input100',
|
|
122
|
+
groupKey:'content',
|
|
123
|
+
labelInline:true,
|
|
124
|
+
cusStyle:{marginBottom: '10px'},
|
|
125
|
+
setting: {
|
|
126
|
+
isBackType: 'string'
|
|
127
|
+
},
|
|
128
|
+
},
|
|
129
|
+
{ele: 'group_start'},
|
|
130
|
+
data['isAddCart'] === 'Y' && {
|
|
131
|
+
label: "",
|
|
132
|
+
ele: "xd-style-image",
|
|
133
|
+
groupKey: 'content',
|
|
134
|
+
valueKey: "cartStyle",
|
|
135
|
+
value: dataVal({data, key:'cartStyle', dValue:'btn_cartCFull', gValue}),
|
|
136
|
+
labelInline:true,
|
|
137
|
+
//isTplRef:true, //内容引用模版被禁用
|
|
138
|
+
className: 'input100',
|
|
139
|
+
handleCustom(cusRes) {
|
|
140
|
+
XdBus.getParentApi('getCompStylesOptions')({
|
|
141
|
+
layout_ids: 'wF0WmvAM3SB0t9cymnx0b',
|
|
142
|
+
key: Date.now()
|
|
143
|
+
})
|
|
144
|
+
.then(res => {
|
|
145
|
+
cusRes.data.cb(res)
|
|
146
|
+
})
|
|
147
|
+
.catch(error => {
|
|
148
|
+
console.error(error);
|
|
149
|
+
});
|
|
150
|
+
},
|
|
151
|
+
},
|
|
152
|
+
data['isAddCart'] === 'Y' && {
|
|
153
|
+
label: '按钮文字',
|
|
154
|
+
ele: 'el-input',
|
|
155
|
+
type: 'text',
|
|
156
|
+
valueKey: 'cartName',
|
|
157
|
+
value: dataVal({data, key:'cartName', dValue:'', gValue}),
|
|
158
|
+
placeholder: '请输入按钮文字,默认值:选规格',
|
|
159
|
+
className: 'input100',
|
|
160
|
+
labelInline: true,
|
|
161
|
+
groupKey:'content',
|
|
162
|
+
rules:[
|
|
163
|
+
{
|
|
164
|
+
required: false,
|
|
165
|
+
validator: (rule, value, callback) => {
|
|
166
|
+
if(typeof value === "string") value = value.trim();
|
|
167
|
+
// if(value.length === 0){
|
|
168
|
+
// callback('按钮文字不能为空');
|
|
169
|
+
// return
|
|
170
|
+
// }
|
|
171
|
+
if(value.length > 3) {
|
|
172
|
+
callback('按钮文字长度为:1-3字符');
|
|
173
|
+
return
|
|
174
|
+
}
|
|
175
|
+
callback();
|
|
176
|
+
},
|
|
177
|
+
trigger: ['blur', 'change']
|
|
178
|
+
}
|
|
179
|
+
]
|
|
180
|
+
},
|
|
181
|
+
{ele: 'group_end'},
|
|
182
|
+
{ ele:'xd-line', groupKey:'content' },
|
|
89
183
|
{
|
|
90
184
|
label: '划线价',
|
|
91
185
|
ele: 'xd-cus-switch',
|
|
@@ -192,7 +192,7 @@ export default function (data={},gValue={},gColor={},oldData) {
|
|
|
192
192
|
ele: 'xd-radio',
|
|
193
193
|
groupKey: 'style',
|
|
194
194
|
valueKey: 'radiusStatus',
|
|
195
|
-
value: statusDataVal({data, key:'radiusStatus', cValue:'
|
|
195
|
+
value: statusDataVal({data, key:'radiusStatus', cValue:'D',}),
|
|
196
196
|
labelInline:true,
|
|
197
197
|
list: [
|
|
198
198
|
{label: '默认', value: 'D'},
|
|
@@ -234,7 +234,7 @@ export default function (data={},gValue={},gColor={},oldData) {
|
|
|
234
234
|
ele: 'xd-radio',
|
|
235
235
|
groupKey: 'style',
|
|
236
236
|
valueKey: 'imageRadiusStatus',
|
|
237
|
-
value: statusDataVal({data, key:'imageRadiusStatus', cValue:'
|
|
237
|
+
value: statusDataVal({data, key:'imageRadiusStatus', cValue:'D'}),
|
|
238
238
|
labelInline:true,
|
|
239
239
|
list: [
|
|
240
240
|
{label: '默认', value: 'D'},
|
|
@@ -319,7 +319,7 @@ export default function (data={},gValue={},gColor={},oldData) {
|
|
|
319
319
|
labelInline: true,
|
|
320
320
|
groupKey:'style',
|
|
321
321
|
valueKey: 'columnSpacing',
|
|
322
|
-
value: dataVal({data, key:'columnSpacing', dValue:
|
|
322
|
+
value: dataVal({data, key:'columnSpacing', dValue: 32, gValue}),
|
|
323
323
|
hidden: !statusShow({data, key: 'columnRowStatus', fields:['columnSpacing'], gValue}),
|
|
324
324
|
inline: false,
|
|
325
325
|
append:'px',
|