jufubao-food 1.0.15-beta3 → 1.0.15-beta5
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/JfbFoodProductInfo/JfbFoodProductInfo.vue +33 -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 +102 -22
- package/src/components/JfbFoodProductList/cusAttr/content.js +94 -0
package/package.json
CHANGED
|
@@ -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">
|
|
@@ -125,8 +127,10 @@
|
|
|
125
127
|
|
|
126
128
|
is_plus_site: false,
|
|
127
129
|
//面板
|
|
128
|
-
|
|
130
|
+
showDiscount: "Y", //是否展示划线价
|
|
129
131
|
differ: 1, //原价与现价的差值
|
|
132
|
+
bodyPadding: "",
|
|
133
|
+
contentColor: "",
|
|
130
134
|
|
|
131
135
|
shopBtnBgColor: "",
|
|
132
136
|
bottomBtnRadius: "100",
|
|
@@ -150,6 +154,7 @@
|
|
|
150
154
|
'--main-color': this.mainColor,
|
|
151
155
|
'--bg-color': this.mainColorAlpha,
|
|
152
156
|
'--bg-main-color': this.mainColorAlpha,
|
|
157
|
+
backgroundColor: this.contentColor
|
|
153
158
|
}
|
|
154
159
|
},
|
|
155
160
|
prod_bottom() {
|
|
@@ -185,6 +190,11 @@
|
|
|
185
190
|
item.p = p;
|
|
186
191
|
return item;
|
|
187
192
|
})
|
|
193
|
+
},
|
|
194
|
+
contBodyStyleComp(){
|
|
195
|
+
return {
|
|
196
|
+
padding: this.getMarginAndPadding(this.bodyPadding, 0)
|
|
197
|
+
}
|
|
188
198
|
}
|
|
189
199
|
},
|
|
190
200
|
watch: {
|
|
@@ -214,6 +224,11 @@
|
|
|
214
224
|
init(container) {
|
|
215
225
|
this.foodProductListPath = getContainerPropsValue(container, 'content.foodProductListPath', {value: ""}).value;
|
|
216
226
|
this.shopBtnBgColor = gCPVal(container, 'shopBtnBgColor', this.mainColor, {sKey:'cartBtnStatus',fields:['shopBtnBgColor']});
|
|
227
|
+
this.showDiscount = gCPVal(container, 'showDiscount', "Y");
|
|
228
|
+
this.differ = gCPVal(container, 'differ', 1);
|
|
229
|
+
this.bodyPadding = gCPVal(container, 'bodyPadding', [16], {sKey:'bodyPaddingStatus',fields:['bodyPadding'], isPMR:true});
|
|
230
|
+
this.contentColor = gCPVal(container,'contentColor', '#f8f8f8', {sKey:'contentColorStatus',fields:['contentColor']});
|
|
231
|
+
console.log("this.bodyPadding", this.bodyPadding)
|
|
217
232
|
},
|
|
218
233
|
handleSkuChange(sku){
|
|
219
234
|
console.log('handleSkuChange', sku);
|
|
@@ -241,7 +256,7 @@
|
|
|
241
256
|
category_id: this.category_id,
|
|
242
257
|
consume_mode: this.consume_mode,
|
|
243
258
|
shop_id: this.shop_id,
|
|
244
|
-
is_show_uprice: this.
|
|
259
|
+
is_show_uprice: this.showDiscount !== 'Y' ? 0 : this.multiply(this.differ),
|
|
245
260
|
}
|
|
246
261
|
}).then(res => {
|
|
247
262
|
this.$xdHideLoading()
|
|
@@ -333,7 +348,6 @@
|
|
|
333
348
|
|
|
334
349
|
.jfb-food-product-info {
|
|
335
350
|
&__body{
|
|
336
|
-
background-color: #f8f8f8;
|
|
337
351
|
.xd-store-product {
|
|
338
352
|
color: #333;
|
|
339
353
|
&__swiper {
|
|
@@ -358,7 +372,7 @@
|
|
|
358
372
|
.prod_title_number{
|
|
359
373
|
background-color: #FFFFFF;
|
|
360
374
|
padding: 24rpx 32rpx;
|
|
361
|
-
margin: 20rpx;
|
|
375
|
+
margin: 20rpx 0;
|
|
362
376
|
border-radius: 16rpx;
|
|
363
377
|
display: flex;
|
|
364
378
|
align-items: center;
|
|
@@ -378,13 +392,13 @@
|
|
|
378
392
|
.sku_wrap{
|
|
379
393
|
background-color: #FFFFFF;
|
|
380
394
|
padding: 24rpx;
|
|
381
|
-
margin: 16rpx;
|
|
395
|
+
margin: 16rpx 0;
|
|
382
396
|
border-radius: 16rpx;
|
|
383
397
|
}
|
|
384
398
|
.attr_wrap{
|
|
385
399
|
background-color: #FFFFFF;
|
|
386
400
|
padding: 24rpx;
|
|
387
|
-
margin: 16rpx;
|
|
401
|
+
margin: 16rpx 0;
|
|
388
402
|
border-radius: 16rpx;
|
|
389
403
|
}
|
|
390
404
|
.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
|
}
|
|
@@ -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>
|
|
@@ -267,7 +269,7 @@
|
|
|
267
269
|
scrollTopTimer: null,
|
|
268
270
|
brand_id: "",
|
|
269
271
|
shopList: [],
|
|
270
|
-
curShopIndex:
|
|
272
|
+
curShopIndex: -1,
|
|
271
273
|
|
|
272
274
|
//商品列表
|
|
273
275
|
column_num: 1,
|
|
@@ -289,6 +291,10 @@
|
|
|
289
291
|
//导航
|
|
290
292
|
titleBgcColor: '#FFFFFF',
|
|
291
293
|
titleStyle: {},
|
|
294
|
+
navStyle: "",
|
|
295
|
+
isAddCart: "Y",
|
|
296
|
+
cartStyle: "",
|
|
297
|
+
cartName: "",
|
|
292
298
|
|
|
293
299
|
//面板
|
|
294
300
|
showDiscount: "Y", //是否展示划线价
|
|
@@ -351,6 +357,54 @@
|
|
|
351
357
|
|
|
352
358
|
}
|
|
353
359
|
},
|
|
360
|
+
navActiveBarStyle(){
|
|
361
|
+
if(this.navStyle === 'long'){
|
|
362
|
+
return {
|
|
363
|
+
top: 0,
|
|
364
|
+
bottom: 0
|
|
365
|
+
}
|
|
366
|
+
}else if(this.navStyle === 'no'){
|
|
367
|
+
return {
|
|
368
|
+
display: 'none'
|
|
369
|
+
}
|
|
370
|
+
}
|
|
371
|
+
},
|
|
372
|
+
choseSpuStyleComp(){
|
|
373
|
+
if(this.cartStyle === 'btn_cartCFull'){}
|
|
374
|
+
else if(this.cartStyle === 'btn_cartCPlain'){
|
|
375
|
+
return {
|
|
376
|
+
border: '1px solid ' + this.mainColor,
|
|
377
|
+
color: this.mainColor,
|
|
378
|
+
backgroundColor: 'transparent'
|
|
379
|
+
}
|
|
380
|
+
}
|
|
381
|
+
else if(this.cartStyle === 'btn_cartFFull'){
|
|
382
|
+
return {
|
|
383
|
+
borderRadius: 0,
|
|
384
|
+
}
|
|
385
|
+
}else if(this.cartStyle === 'btn_cartFPlain'){
|
|
386
|
+
return {
|
|
387
|
+
border: '1px solid ' + this.mainColor,
|
|
388
|
+
color: this.mainColor,
|
|
389
|
+
backgroundColor: 'transparent',
|
|
390
|
+
borderRadius: 0,
|
|
391
|
+
}
|
|
392
|
+
}
|
|
393
|
+
},
|
|
394
|
+
pointCusStyle(){
|
|
395
|
+
if(this.cartStyle === 'btn_cartFFull'){
|
|
396
|
+
return {
|
|
397
|
+
borderRadius: 0,
|
|
398
|
+
}
|
|
399
|
+
}else if(this.cartStyle === 'btn_cartFPlain'){
|
|
400
|
+
return {
|
|
401
|
+
// border: '1px solid ' + this.mainColor,
|
|
402
|
+
// color: this.mainColor,
|
|
403
|
+
// backgroundColor: 'transparent',
|
|
404
|
+
borderRadius: 0,
|
|
405
|
+
}
|
|
406
|
+
}
|
|
407
|
+
},
|
|
354
408
|
fixed_bottom() {
|
|
355
409
|
return this.fixedStyle({height: 30, zIndex: 111});
|
|
356
410
|
},
|
|
@@ -383,7 +437,11 @@
|
|
|
383
437
|
this.resource_shop_id = options.resource_shop_id;
|
|
384
438
|
this.consume_mode = options.consume_mode || 'HDSELF';
|
|
385
439
|
this.brand_id = options.brand_id;
|
|
386
|
-
this.
|
|
440
|
+
if(this.resource_shop_id){
|
|
441
|
+
this.p_getFoodShopDetail(this.resource_shop_id);
|
|
442
|
+
}else if(this.brand_id){
|
|
443
|
+
this.p_getFoodShopList();
|
|
444
|
+
}
|
|
387
445
|
},
|
|
388
446
|
/**
|
|
389
447
|
* @description 监听事件变化
|
|
@@ -435,7 +493,11 @@
|
|
|
435
493
|
}],
|
|
436
494
|
{sKey:'titleStyleStatus',fields:['titleStyle'],isMerge: true}
|
|
437
495
|
);
|
|
438
|
-
|
|
496
|
+
this.navStyle = gCPVal(container, 'navStyle', 'short');
|
|
497
|
+
this.isAddCart = gCPVal(container, 'isAddCart', 'Y');
|
|
498
|
+
this.cartStyle = gCPVal(container, 'cartStyle', 'btn_cartCFull')
|
|
499
|
+
this.cartName = gCPVal(container, 'cartName', '选规格');
|
|
500
|
+
console.log("this.z cartStyle", this.cartStyle)
|
|
439
501
|
|
|
440
502
|
//预览mock数据
|
|
441
503
|
if (this.$configProject['isPreview']) {
|
|
@@ -480,6 +542,9 @@
|
|
|
480
542
|
})
|
|
481
543
|
},
|
|
482
544
|
toSwitchShopPage(){
|
|
545
|
+
if(this.shopList.length===0){
|
|
546
|
+
this.p_getFoodShopList(false);
|
|
547
|
+
}
|
|
483
548
|
this.showTakeoutShop = true;
|
|
484
549
|
},
|
|
485
550
|
handleSwitchShop(){
|
|
@@ -494,7 +559,7 @@
|
|
|
494
559
|
}
|
|
495
560
|
this.showTakeoutShop = false;
|
|
496
561
|
},
|
|
497
|
-
p_getFoodShopList(){
|
|
562
|
+
p_getFoodShopList(loadFirstShop=true){
|
|
498
563
|
jfbRootExec("getFoodShopList", {
|
|
499
564
|
vm: this,
|
|
500
565
|
data: {
|
|
@@ -508,8 +573,13 @@
|
|
|
508
573
|
}).then(res => {
|
|
509
574
|
if(res.list && res.list.length > 0){
|
|
510
575
|
this.shopList = res.list;
|
|
511
|
-
|
|
512
|
-
|
|
576
|
+
if(loadFirstShop){
|
|
577
|
+
this.curShopIndex = 0;
|
|
578
|
+
this.p_getFoodShopDetail();
|
|
579
|
+
}else{
|
|
580
|
+
let findShopIndex = this.shopList.findIndex(item => item.resource_shop_id == this.resource_shop_id);
|
|
581
|
+
this.curShopIndex = findShopIndex;
|
|
582
|
+
}
|
|
513
583
|
if(!this.$configProject['isPreview']){
|
|
514
584
|
this.showTakeoutShop = true;
|
|
515
585
|
}
|
|
@@ -518,13 +588,13 @@
|
|
|
518
588
|
}
|
|
519
589
|
})
|
|
520
590
|
},
|
|
521
|
-
p_getFoodShopDetail(){
|
|
591
|
+
p_getFoodShopDetail(resource_shop_id){
|
|
522
592
|
let curShop = this.shopList[this.curShopIndex];
|
|
523
593
|
jfbRootExec("getFoodShopDetail", {
|
|
524
594
|
vm: this,
|
|
525
595
|
data: {
|
|
526
596
|
xnamespace: this.xnamespace,
|
|
527
|
-
resource_shop_id: curShop.resource_shop_id,
|
|
597
|
+
resource_shop_id: resource_shop_id || curShop.resource_shop_id,
|
|
528
598
|
consume_mode: this.consume_mode,
|
|
529
599
|
latitude: this.stateLocation.latitude,
|
|
530
600
|
longitude: this.stateLocation.longitude,
|
|
@@ -1045,6 +1115,15 @@
|
|
|
1045
1115
|
padding: 24rpx;
|
|
1046
1116
|
text-align: center;
|
|
1047
1117
|
position: relative;
|
|
1118
|
+
.nav_active_bar{
|
|
1119
|
+
position: absolute;
|
|
1120
|
+
left: 0;
|
|
1121
|
+
top: 28rpx;
|
|
1122
|
+
bottom: 28rpx;
|
|
1123
|
+
width: 12rpx;
|
|
1124
|
+
background-color: var(--main-color);
|
|
1125
|
+
border-radius: 0 4rpx 4rpx 0;
|
|
1126
|
+
}
|
|
1048
1127
|
|
|
1049
1128
|
.cate_num{
|
|
1050
1129
|
position: absolute;
|
|
@@ -1062,15 +1141,16 @@
|
|
|
1062
1141
|
// color: var(--main-color);
|
|
1063
1142
|
font-weight: 500;
|
|
1064
1143
|
background-color: #FFFFFF;
|
|
1065
|
-
&::after{
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1144
|
+
// &::after{
|
|
1145
|
+
// content: '';
|
|
1146
|
+
// position: absolute;
|
|
1147
|
+
// left: 0;
|
|
1148
|
+
// top: 28rpx;
|
|
1149
|
+
// bottom: 28rpx;
|
|
1150
|
+
// width: 12rpx;
|
|
1151
|
+
// background-color: var(--main-color);
|
|
1152
|
+
// border-radius: 0 4rpx 4rpx 0;
|
|
1153
|
+
// }
|
|
1074
1154
|
}
|
|
1075
1155
|
}
|
|
1076
1156
|
}
|
|
@@ -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',
|