jufubao-mall 2.0.29-beta1 → 2.0.31
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/JfbMallProductInfo/cusAttr/style.js +3 -0
- package/src/components/JfbMallSpecialHome/Attr.js +8 -584
- package/src/components/JfbMallSpecialHome/JfbMallSpecialHome.vue +230 -160
- package/src/components/JfbMallSpecialHome/Mock.js +90 -698
- package/src/components/JfbMallSpecialHome/cusAttr/advanced.js +38 -0
- package/src/components/JfbMallSpecialHome/cusAttr/content.js +319 -0
- package/src/components/JfbMallSpecialHome/cusAttr/style.js +983 -0
- package/src/components/JfbMallSpecialInfo/Attr.js +12 -383
- package/src/components/JfbMallSpecialInfo/JfbMallSpecialInfo.vue +107 -68
- package/src/components/JfbMallSpecialInfo/Mock.js +0 -177
- package/src/components/JfbMallSpecialInfo/cusAttr/advanced.js +24 -0
- package/src/components/JfbMallSpecialInfo/cusAttr/content.js +281 -0
- package/src/components/JfbMallSpecialInfo/cusAttr/style.js +459 -0
- package/src/components/JfbMallSpecialProduct/Attr.js +529 -714
- package/src/components/JfbMallSpecialProduct/JfbMallSpecialProduct.vue +255 -169
- package/src/components/JfbMallSpecialProduct/Mock.js +399 -0
- package/src/components/JfbMallSpecialProduct/components/title.vue +174 -0
- package/src/components/JfbMallSpecialProduct/cusAttr/advanced.js +21 -0
- package/src/components/JfbMallSpecialProduct/cusAttr/content.js +393 -0
- package/src/components/JfbMallSpecialProduct/cusAttr/style.js +1002 -0
|
@@ -29,38 +29,27 @@
|
|
|
29
29
|
:style="{ marginBottom: rowMainSpacing + 'rpx', paddingBottom:mainEventSpacing + 'rpx' }"
|
|
30
30
|
class="jfb-mall-special-product__body-list"
|
|
31
31
|
>
|
|
32
|
-
<
|
|
33
|
-
v-if="is_title === 'Y'"
|
|
34
|
-
:
|
|
32
|
+
<Title
|
|
33
|
+
v-if="is_title === 'Y'&&initStatus"
|
|
34
|
+
:title="Pitem.special_name"
|
|
35
|
+
:moreName="moreName"
|
|
36
|
+
:wrapStyle="[{
|
|
35
37
|
padding: titlePaddingComp,
|
|
36
38
|
borderRadius:titleRradius +'rpx',
|
|
37
39
|
boxShadow: titleShadow,
|
|
38
40
|
border: titleBorder,
|
|
41
|
+
backgroundColor: titleStyle.backgroundColor,
|
|
42
|
+
backgroundImage: `url(${titleBg})` ,
|
|
43
|
+
backgroundRepeat: 'no-repeat',
|
|
44
|
+
backgroundSize: '100% 100%'
|
|
39
45
|
}]"
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
:style="{
|
|
48
|
-
boxShadow: moreShadow,
|
|
49
|
-
border: moreBorder,
|
|
50
|
-
borderRadius: moreRradius + 'rpx',
|
|
51
|
-
backgroundColor: moreBgColor,
|
|
52
|
-
color: moreColor,
|
|
53
|
-
fontSize: moreFontSize,
|
|
54
|
-
fontWeight: moreFontWeight,
|
|
55
|
-
padding: '0 .6rem',
|
|
56
|
-
lineHeight: '1.4rem'
|
|
57
|
-
}"
|
|
58
|
-
class="jfb-mall-special-product__body-list-title-more"
|
|
59
|
-
>
|
|
60
|
-
<text>{{moreName}}</text>
|
|
61
|
-
<xd-font-icon icon="iconxiangyou_xian" :size="24"></xd-font-icon>
|
|
62
|
-
</view>
|
|
63
|
-
</view>
|
|
46
|
+
:titleStyle="titleStyle"
|
|
47
|
+
:moreStyle="moreStyle"
|
|
48
|
+
:isMore="isMore==='Y'"
|
|
49
|
+
:key="titleKey"
|
|
50
|
+
:titleType="title_type"
|
|
51
|
+
@click.native="handleTo(Pitem)"
|
|
52
|
+
></Title>
|
|
64
53
|
<!--图片显示-->
|
|
65
54
|
<view
|
|
66
55
|
:style="{
|
|
@@ -128,13 +117,15 @@
|
|
|
128
117
|
:style="[itemProductStyles]"
|
|
129
118
|
>
|
|
130
119
|
<cus-product
|
|
120
|
+
:column-one-layout="columnOneLayout"
|
|
131
121
|
:image-radius="itemImageRadius"
|
|
132
|
-
:brand-color="
|
|
122
|
+
:brand-color="brandStyleComp"
|
|
133
123
|
:height="itemProductImageHeight"
|
|
134
124
|
:cell="row_num"
|
|
135
125
|
:name-font="itemFont"
|
|
136
126
|
:product-config="productConfig"
|
|
137
127
|
:item="item"
|
|
128
|
+
:color="mainColor"
|
|
138
129
|
:isPlus="is_plus_site"
|
|
139
130
|
:row-spacing="rowMainSpacing"
|
|
140
131
|
:cell-spacing="itemSpacing"
|
|
@@ -169,9 +160,8 @@
|
|
|
169
160
|
enable-flex
|
|
170
161
|
v-else
|
|
171
162
|
>
|
|
172
|
-
<view class="prodcut-scroll-box">
|
|
163
|
+
<view class="prodcut-scroll-box" v-if="Pitem.products && Pitem.products.length">
|
|
173
164
|
<view
|
|
174
|
-
v-if="Pitem.products && Pitem.products.length"
|
|
175
165
|
class="prodcut-scroll-item"
|
|
176
166
|
v-for="item in Pitem.products"
|
|
177
167
|
:key="item.id"
|
|
@@ -180,11 +170,12 @@
|
|
|
180
170
|
<cus-product
|
|
181
171
|
v-if="item.content_type === 'product'"
|
|
182
172
|
:image-radius="itemImageRadius"
|
|
183
|
-
:brand-color="
|
|
173
|
+
:brand-color="brandStyleComp"
|
|
184
174
|
:height="itemProductImageHeight"
|
|
185
175
|
:cell="row_num"
|
|
186
176
|
:name-font="itemFont"
|
|
187
177
|
:product-config="productConfig"
|
|
178
|
+
:color="mainColor"
|
|
188
179
|
:item="item"
|
|
189
180
|
:isPlus="is_plus_site"
|
|
190
181
|
:row-spacing="rowMainSpacing"
|
|
@@ -218,15 +209,21 @@ import XdFontIcon from "@/components/XdFontIcon/XdFontIcon";
|
|
|
218
209
|
import XdMore from "@/components/XdMore/XdMore";
|
|
219
210
|
import { jfbRootExec } from "@/utils/xd.event";
|
|
220
211
|
import JfbMallSpecialProductMixin from "./JfbMallSpecialProductMixin";
|
|
221
|
-
import {getContainerPropsValue, getImageInfo, toProductDetail} from "@/utils/xd.base";
|
|
212
|
+
import {getContainerPropsValue, getImageInfo, toProductDetail,gCPVal} from "@/utils/xd.base";
|
|
222
213
|
import componentsMixins from "@/mixins/componentsMixins";
|
|
223
214
|
import extsMixins from "@/mixins/extsMixins";
|
|
215
|
+
import productCompMixins from "@/mixins/productCompMixins";
|
|
224
216
|
import getServiceUrl from "@/common/getServiceUrl";
|
|
225
217
|
import XdProductStatus from "@/components/XdProductStatus/XdProductStatus";
|
|
226
218
|
import XdUnit from "@/components/XdUnit/XdUnit";
|
|
227
219
|
import SkeProduct from "@/components/SkeProduct/SkeProduct.vue";
|
|
228
220
|
import CusProduct from "@/components/CusProduct/CusProduct.vue";
|
|
229
221
|
import XdVideo from "./XdVideo.vue";
|
|
222
|
+
import Title from './components/title.vue'
|
|
223
|
+
import {
|
|
224
|
+
statusShow,
|
|
225
|
+
} from "@/utils/AttrTools";
|
|
226
|
+
const Color = require('color');
|
|
230
227
|
|
|
231
228
|
export default {
|
|
232
229
|
name: "JfbMallSpecialProduct",
|
|
@@ -238,11 +235,13 @@ export default {
|
|
|
238
235
|
XdMore,
|
|
239
236
|
XdProductStatus,
|
|
240
237
|
XdUnit,
|
|
238
|
+
Title
|
|
241
239
|
},
|
|
242
240
|
mixins: [
|
|
243
241
|
componentsMixins,
|
|
244
242
|
extsMixins,
|
|
245
243
|
JfbMallSpecialProductMixin,
|
|
244
|
+
productCompMixins
|
|
246
245
|
],
|
|
247
246
|
data() {
|
|
248
247
|
return {
|
|
@@ -268,11 +267,6 @@ export default {
|
|
|
268
267
|
showActivityPrice: "N",
|
|
269
268
|
differ: 1,
|
|
270
269
|
row_num: 2,
|
|
271
|
-
isShowTag: "Y",
|
|
272
|
-
is_show_brand: "N",
|
|
273
|
-
isShowDiscount: "Y",
|
|
274
|
-
isAddCart: "N",
|
|
275
|
-
isPrice: "Y",
|
|
276
270
|
is_title: "Y",
|
|
277
271
|
product_limit: 6,
|
|
278
272
|
mainBgColor:'#f8f8f8',
|
|
@@ -287,7 +281,7 @@ export default {
|
|
|
287
281
|
titleRradius:'0',
|
|
288
282
|
titleBorder:0,
|
|
289
283
|
titleShadow:0,
|
|
290
|
-
|
|
284
|
+
titleBg: '',
|
|
291
285
|
|
|
292
286
|
//标题更多
|
|
293
287
|
moreBgColor:'',
|
|
@@ -312,9 +306,14 @@ export default {
|
|
|
312
306
|
itemBorder:0,
|
|
313
307
|
itemShadow:0,
|
|
314
308
|
itemShadowOrg:{},
|
|
315
|
-
itemBgColor:'
|
|
309
|
+
itemBgColor:'',
|
|
316
310
|
itemFont: {},
|
|
317
|
-
is_plus_site: false
|
|
311
|
+
is_plus_site: false,
|
|
312
|
+
|
|
313
|
+
columnOneLayout: 'H', //V=垂直 H=水平
|
|
314
|
+
title_type: '',
|
|
315
|
+
titleKey: 'titleKey',
|
|
316
|
+
initStatus: false
|
|
318
317
|
};
|
|
319
318
|
},
|
|
320
319
|
computed: {
|
|
@@ -398,7 +397,25 @@ export default {
|
|
|
398
397
|
border: this.itemBorder,
|
|
399
398
|
backgroundColor: this.itemBgColor,
|
|
400
399
|
}
|
|
401
|
-
}
|
|
400
|
+
},
|
|
401
|
+
//品牌样式
|
|
402
|
+
brandStyleComp(){
|
|
403
|
+
return {
|
|
404
|
+
color: this.itemBrandColor,
|
|
405
|
+
}
|
|
406
|
+
},
|
|
407
|
+
moreStyle() {
|
|
408
|
+
return {
|
|
409
|
+
boxShadow: this.moreShadow,
|
|
410
|
+
border: this.moreBorder,
|
|
411
|
+
borderRadius: this.moreRradius + 'rpx',
|
|
412
|
+
backgroundColor: this.moreBgColor,
|
|
413
|
+
color: this.moreColor,
|
|
414
|
+
fontSize: this.moreFontSize,
|
|
415
|
+
fontWeight: this.moreFontWeight,
|
|
416
|
+
padding: '8rpx 20rpx',
|
|
417
|
+
}
|
|
418
|
+
},
|
|
402
419
|
},
|
|
403
420
|
watch: {
|
|
404
421
|
container(value,oldValue) {
|
|
@@ -411,6 +428,21 @@ export default {
|
|
|
411
428
|
product_limit(){
|
|
412
429
|
if (this.$configProject['isPreview']) this.onJfbLoad(this.options)
|
|
413
430
|
},
|
|
431
|
+
columnOneLayout(){
|
|
432
|
+
this.reHandlePoster()
|
|
433
|
+
},
|
|
434
|
+
row_num(){
|
|
435
|
+
this.reHandlePoster()
|
|
436
|
+
},
|
|
437
|
+
need_show_tags(value,oldValue) {
|
|
438
|
+
if(JSON.stringify(value) === JSON.stringify(oldValue)) return;
|
|
439
|
+
if (this.$configProject['isPreview']){
|
|
440
|
+
this.onJfbLoad(this.options)
|
|
441
|
+
}
|
|
442
|
+
},
|
|
443
|
+
title_type() {
|
|
444
|
+
this.titleKey = new Date().getTime();
|
|
445
|
+
}
|
|
414
446
|
},
|
|
415
447
|
created() {
|
|
416
448
|
this.isPreview = this.$configProject.isPreview;
|
|
@@ -423,92 +455,133 @@ export default {
|
|
|
423
455
|
* @param container {object} 业务组件对象自己
|
|
424
456
|
*/
|
|
425
457
|
init(container) {
|
|
426
|
-
let
|
|
458
|
+
let moreBackgeound = Color(this.mainColor).alpha(0.15).toString();
|
|
459
|
+
let titleStyleDefault = [{
|
|
460
|
+
color: '#333',
|
|
461
|
+
fontSize: '28rpx',
|
|
462
|
+
fontWeight: '500',
|
|
463
|
+
bgColor: 'rgba(255, 255, 255, 0)'
|
|
464
|
+
}]
|
|
465
|
+
//content
|
|
466
|
+
this.xnamespace = gCPVal(container, 'xnamespace', this.projectAttr.business_code, {});
|
|
467
|
+
this.is_title = gCPVal(container, "is_title", "Y");
|
|
468
|
+
let showType = gCPVal(container, "showType", "list");
|
|
427
469
|
if(showType === 'carousel') showType = 'slide';
|
|
428
470
|
this.showType = showType;
|
|
429
|
-
|
|
430
|
-
this.
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
this.
|
|
434
|
-
this.
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
this.
|
|
471
|
+
this.isMore = gCPVal(container, "isMore", "Y");
|
|
472
|
+
this.moreName = gCPVal(container, "moreName", "更多");
|
|
473
|
+
let compConfig = getContainerPropsValue(container, "content.compConfig", null);
|
|
474
|
+
let tagsKeys= this.getProductTagsKeys(compConfig,container)
|
|
475
|
+
this.need_show_tags = this.getProductTagsParams(compConfig, tagsKeys)
|
|
476
|
+
this.productConfig = this.getProductConfig(container, { cartStyle: 'icongouwuche-01' });
|
|
477
|
+
let product_limit = Number(gCPVal(container, "product_limit", 6));
|
|
478
|
+
if(product_limit >=20) product_limit = 20;
|
|
479
|
+
this.product_limit = product_limit;
|
|
480
|
+
let row_num = gCPVal(container, 'row_num', 2);
|
|
481
|
+
this.row_num = row_num;
|
|
482
|
+
//一列水平
|
|
483
|
+
if (row_num === 1) {
|
|
484
|
+
this.skeNumber = 6;
|
|
485
|
+
this.columnOneLayout = 'H';
|
|
486
|
+
}
|
|
487
|
+
if (row_num === 2) {
|
|
488
|
+
this.skeNumber = 4;
|
|
489
|
+
}
|
|
490
|
+
if (row_num === 3) {
|
|
491
|
+
this.skeNumber = 5;
|
|
492
|
+
this.page_size = 21;
|
|
493
|
+
} else this.page_size = 20;
|
|
494
|
+
//一列垂直
|
|
495
|
+
if(row_num === 4) {
|
|
496
|
+
this.row_num = 1;
|
|
497
|
+
this.columnOneLayout = 'V';
|
|
498
|
+
this.skeNumber = 10;
|
|
499
|
+
this.page_size = 20;
|
|
500
|
+
}
|
|
438
501
|
if(this.showType === 'slide') {
|
|
439
502
|
this.row_num = 3;
|
|
440
503
|
}
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
this.
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
this.
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
this.
|
|
451
|
-
this.
|
|
452
|
-
this.
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
504
|
+
//商品样式关联属性
|
|
505
|
+
const sValue = "{\"border\":0,\"backgroundColor\":\"#fff\"}";
|
|
506
|
+
let itemBgcColoStyle = this.getRelationStatus(container,'productStyle',{ itemBgColorStatus:['itemBgColor'],itemBorder:['itemBorder', 'bs']},sValue);
|
|
507
|
+
this.itemBgColor = gCPVal(container, 'itemBgColor', '#fff', { sKey: 'itemBgColorStatus', cusFields: ['productStyle', 'backgroundColor', itemBgcColoStyle] });
|
|
508
|
+
|
|
509
|
+
//style
|
|
510
|
+
this.mainBgColor = getContainerPropsValue(container, "mainBgColor", '',{sKey:'mainBgStatus',fields:['mainBgColor']});
|
|
511
|
+
this.outMargin = gCPVal(container, 'outMargin', [16], {sKey:'outMarginStatus', isPMR: true, fields:['outMargin']});
|
|
512
|
+
this.mainEventSpacing = gCPVal(container, 'mainEventSpacing', 0, { sKey: 'mainEventSpacingStatus', fields: ['mainEventSpacing'] });
|
|
513
|
+
this.listBgColor = gCPVal(container, "listBgColor", '',{sKey:'listBgColorStatus',fields:['listBgColor']});
|
|
514
|
+
this.itemMargin = gCPVal(container, 'itemMargin', { top: 16, right: 0, bottom: 0, left: 0 }, {sKey:'itemMarginStatus', isPMR: true, fields:['itemMargin']});
|
|
515
|
+
this.listRadius = gCPVal(container, 'listRadius', [16], { sKey: 'listRadiusStatus', fields: ['listRadius'] }) || 0;
|
|
516
|
+
this.title_type = gCPVal(container, 'title_type', 'default');
|
|
517
|
+
this.titleBg = getServiceUrl(gCPVal(container, 'titleBg', { url: '' }, { sKey: 'titleStyleStatus', fields: ['titleBg'] }).url);
|
|
518
|
+
|
|
519
|
+
if (this.title_type == 'four' || this.title_type == 'five') {
|
|
520
|
+
titleStyleDefault = [{
|
|
521
|
+
color: '#fff',
|
|
522
|
+
fontSize: '28rpx',
|
|
523
|
+
fontWeight: '500',
|
|
524
|
+
bgColor: 'rgba(255, 255, 255, 0)'
|
|
525
|
+
}]
|
|
460
526
|
}
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
this.titlePadding =
|
|
469
|
-
this.
|
|
470
|
-
|
|
471
|
-
|
|
527
|
+
this.titleStyle = gCPVal(
|
|
528
|
+
container,
|
|
529
|
+
"titleStyle",
|
|
530
|
+
titleStyleDefault,
|
|
531
|
+
{sKey:'titleStyleStatus',fields:['titleStyle'],isMerge: true}
|
|
532
|
+
);
|
|
533
|
+
this.titleStyle.backgroundColor = this.titleStyle.bgColor || '#fff';
|
|
534
|
+
this.titlePadding = gCPVal(container, 'titlePadding', [32], {sKey:'titlePaddingStatus', isPMR: true, fields:['titlePadding']});
|
|
535
|
+
this.titleBorder = gCPVal(container, 'titleBorder', [{color: '#fff',width: 2,style: 'solid'}], {isBorder: true, bsOld:['is_border','is_border_w','is_border_c'], cusFields: ['productStyle','border']});
|
|
536
|
+
this.titleShadow = gCPVal(container, 'titleShadow', [{width:20, color:'rgba(0,0,0,0)'},'none'], {isShadow:true, bsOld:['is_shadow','is_shadow_w','is_shadow_bg']});
|
|
537
|
+
this.titleRradius = gCPVal(container, 'titleRradius', [16], { sKey: 'titleRradiusStatus', fields: ['titleRradius'] }) || 0;
|
|
538
|
+
let moreStyle = gCPVal(
|
|
539
|
+
container,
|
|
540
|
+
"moreStyle",
|
|
541
|
+
[{
|
|
542
|
+
color: this.mainColor,
|
|
543
|
+
fontSize: '24rpx',
|
|
544
|
+
fontWeight: '400',
|
|
545
|
+
bgColor: moreBackgeound
|
|
546
|
+
}],
|
|
547
|
+
{sKey:'moreStyleStatus',fields:['moreStyle'],isMerge: true}
|
|
472
548
|
);
|
|
473
|
-
this.titleRradius = getContainerPropsValue(container, "content.titleRradius", '0');
|
|
474
|
-
this.titleShadow = this.getXdShadow({width:20, color:'rgba(0,0,0,0)'},getContainerPropsValue(container, 'content.titleShadow', {}))
|
|
475
|
-
this.titleBorder = this.getXdBorder({width:2,color:'rgba(0,0,0,0)'},getContainerPropsValue(container, 'content.titleBorder', {}));
|
|
476
|
-
|
|
477
|
-
//标题设置
|
|
478
|
-
let moreStyle = getContainerPropsValue(container, "content.moreStyle", {});
|
|
479
|
-
this.moreName = getContainerPropsValue(container, "content.moreName", '更多');
|
|
480
549
|
this.moreBgColor = moreStyle.bgColor || ''
|
|
481
550
|
this.moreColor = moreStyle.color || '#333';
|
|
482
551
|
this.moreFontSize = moreStyle.fontSize|| '20rpx';
|
|
483
552
|
this.moreFontWeight = moreStyle.fontWeight || 'normal';
|
|
484
|
-
this.
|
|
485
|
-
this.moreShadow =
|
|
486
|
-
this.
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
this.itemBorderOrg = getContainerPropsValue(container, 'content.itemBorder', {});
|
|
499
|
-
this.itemBgColor = getContainerPropsValue(container, "content.itemBgColor", '#f8f8f8');
|
|
500
|
-
let itemStyle = getContainerPropsValue(container, 'content.itemStyle', {});
|
|
553
|
+
this.moreBorder = gCPVal(container, 'moreBorder', [{color: '#fff',width: 2,style: 'solid'}], {isBorder: true, bsOld:['is_border','is_border_w','is_border_c'], cusFields: ['productStyle','border']});
|
|
554
|
+
this.moreShadow = gCPVal(container, 'moreShadow', [{width:20, color:'rgba(0,0,0,0)'},'none'], {isShadow:true, bsOld:['is_shadow','is_shadow_w','is_shadow_bg']});
|
|
555
|
+
this.moreRradius = gCPVal(container, 'moreRradius', [40], { sKey: 'moreRradiusStatus', fields: ['moreRradius'] }) || 0;
|
|
556
|
+
this.bannerRradius = gCPVal(container, 'bannerRradius', [16], { sKey: 'bannerRradiusStatus', fields: ['bannerRradius'] }) || 0;
|
|
557
|
+
this.bannerPadding = gCPVal(container, 'bannerPadding', {top:16,right:0,bottom:0,left:0}, {sKey:'bannerPaddingStatus', isPMR: true, fields:['bannerPadding']});
|
|
558
|
+
let itemStyle = gCPVal(
|
|
559
|
+
container,
|
|
560
|
+
"itemStyle",
|
|
561
|
+
[{
|
|
562
|
+
color: '#333',
|
|
563
|
+
fontWeight: '500',
|
|
564
|
+
}],
|
|
565
|
+
{sKey:'itemStyleStatus',fields:['itemStyle'],isMerge: true}
|
|
566
|
+
);
|
|
501
567
|
this.itemFont = {
|
|
502
568
|
color: itemStyle.color || '#333',
|
|
503
|
-
fontSize: itemStyle.fontSize|| '30rpx',
|
|
504
569
|
fontWeight:itemStyle.fontWeight || 500
|
|
505
570
|
};
|
|
506
|
-
this.
|
|
507
|
-
this.
|
|
508
|
-
|
|
509
|
-
|
|
571
|
+
this.itemSpacing = gCPVal(container, 'itemSpacing', '16', { sKey: 'itemStyleStatus', fields: ['itemSpacing'] });
|
|
572
|
+
this.itemBrandColor = gCPVal(container, 'itemBrandColor', '#999', { sKey: 'itemBrandStatus', fields: ['itemBrandColor'] });
|
|
573
|
+
this.itemBorder = gCPVal(container, 'itemBorder', [{ color: '#fff', width: 2, style: 'solid' }], { isBorder: true, bsOld: ['is_border', 'is_border_w', 'is_border_c'], cusFields: ['productStyle', 'border', itemBgcColoStyle] });
|
|
574
|
+
this.itemBorderOrg = gCPVal(container, 'itemBorder', [{ color: '#fff', width: 2, style: 'solid' }], { isBorder: true, bsOld: ['is_border', 'is_border_w', 'is_border_c'], cusFields: ['productStyle', 'border', itemBgcColoStyle] });
|
|
575
|
+
this.itemRadius = gCPVal(container, 'itemRadius', [16], { sKey: 'itemRadiusStatus', fields: ['itemRadius'] }) || 0;
|
|
576
|
+
this.itemImageRadius = gCPVal(container, 'itemImageRadius', [8], { sKey: 'itemImageRadiusStatus', fields: ['itemImageRadius'] }) || 0;
|
|
577
|
+
this.itemShadow = gCPVal(container, 'itemShadow', [{width:20, color:'rgba(0,0,0,0)'},'none'], {isShadow:true, bsOld:['is_shadow','is_shadow_w','is_shadow_bg']});
|
|
578
|
+
this.itemShadowOrg = gCPVal(container, 'itemShadow', [{width:20, color:'rgba(0,0,0,0)'},'none'], {isShadow:true, bsOld:['is_shadow','is_shadow_w','is_shadow_bg']});
|
|
579
|
+
this.rowMainSpacing = Number(gCPVal(container, 'rowMainSpacing', 16, { sKey: 'columnRowStatus', fields: ['rowMainSpacing', 'columnMainSpacing'] }));
|
|
580
|
+
this.columnMainSpacing = Number(gCPVal(container,'columnMainSpacing', 16, {sKey:'columnRowStatus',fields:['rowMainSpacing','columnMainSpacing']}));
|
|
581
|
+
this.itemPadding = gCPVal(container, 'itemPadding', [16], {sKey:'itemPaddingStatus', isPMR: true, fields:['itemPadding']});
|
|
582
|
+
//advanced
|
|
510
583
|
this.productInfoPath = getContainerPropsValue(container, "content.productInfoPath", { value: "" }).value;
|
|
511
|
-
this.
|
|
584
|
+
this.initStatus=true
|
|
512
585
|
},
|
|
513
586
|
|
|
514
587
|
getSkeleton(cellIndex){
|
|
@@ -617,63 +690,75 @@ export default {
|
|
|
617
690
|
this.options = options;
|
|
618
691
|
//设置业务请求代码
|
|
619
692
|
this.setNameSpace(options);
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
SItem[
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
SItem
|
|
659
|
-
|
|
660
|
-
});
|
|
661
|
-
|
|
662
|
-
//滑动模式新增更多按钮
|
|
663
|
-
if(this.showType === 'slide') {
|
|
664
|
-
item.products.push({
|
|
665
|
-
content_type:'more'
|
|
693
|
+
this.getList()
|
|
694
|
+
},
|
|
695
|
+
|
|
696
|
+
getList() {
|
|
697
|
+
let data = {
|
|
698
|
+
xnamespace: this.xnamespace,
|
|
699
|
+
product_limit: this.product_limit,
|
|
700
|
+
need_show_tags: this.need_show_tags.join()
|
|
701
|
+
}
|
|
702
|
+
if(this.productConfig.isShowDiscount==='Y'){
|
|
703
|
+
data.is_show_uprice=this.$xdUniHelper.multiplyFloatNumber(this.productConfig.differ,100)
|
|
704
|
+
} else {
|
|
705
|
+
data.is_show_uprice=-1
|
|
706
|
+
}
|
|
707
|
+
jfbRootExec("getSpecialsProducts", {
|
|
708
|
+
vm: this,
|
|
709
|
+
data: data,
|
|
710
|
+
})
|
|
711
|
+
.then(async (res) => {
|
|
712
|
+
|
|
713
|
+
res.items = await this.getCategories(res.items);
|
|
714
|
+
if (res.items && res.items.length) {
|
|
715
|
+
let list = res.items;
|
|
716
|
+
this.list = list.map((item) => {
|
|
717
|
+
item.special_banner = getServiceUrl(item.special_banner);
|
|
718
|
+
if(this.isPreview) {
|
|
719
|
+
item.products = item.products.filter((item,index) => {
|
|
720
|
+
return index < this.product_limit
|
|
721
|
+
}).map((SItem) => {
|
|
722
|
+
if(this.productConfig.isPrice==='N'){
|
|
723
|
+
SItem.show_prices=[]
|
|
724
|
+
}
|
|
725
|
+
if(this.productConfig.isShowDiscount==='N'){
|
|
726
|
+
SItem.show_prices=SItem.show_prices.filter(Pitem=>Pitem.t!=='U')
|
|
727
|
+
}
|
|
728
|
+
console.log(SItem.show_prices,'show_prices');
|
|
729
|
+
|
|
730
|
+
if(SItem.tags&&SItem.tags.length>0){
|
|
731
|
+
SItem.tags=SItem.tags.filter(tag=>{
|
|
732
|
+
return this.need_show_tags.includes(tag.type)
|
|
666
733
|
})
|
|
667
734
|
}
|
|
735
|
+
SItem["thumb"] = getServiceUrl(SItem.thumb);
|
|
736
|
+
SItem["content_type"] = 'product';
|
|
737
|
+
return SItem;
|
|
738
|
+
})
|
|
739
|
+
}
|
|
740
|
+
else {
|
|
741
|
+
item.products = item.products.map((SItem) => {
|
|
742
|
+
SItem["thumb"] = getServiceUrl(SItem.thumb);
|
|
743
|
+
SItem["content_type"] = 'product';
|
|
744
|
+
return SItem;
|
|
745
|
+
});
|
|
746
|
+
|
|
747
|
+
//滑动模式新增更多按钮
|
|
748
|
+
if(this.showType === 'slide') {
|
|
749
|
+
item.products.push({
|
|
750
|
+
content_type:'more'
|
|
751
|
+
})
|
|
668
752
|
}
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
}
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
753
|
+
}
|
|
754
|
+
return item;
|
|
755
|
+
});
|
|
756
|
+
this.loadingList = false;
|
|
757
|
+
}
|
|
758
|
+
})
|
|
759
|
+
.catch((err) => {
|
|
760
|
+
this.$xdLog.catch(err);
|
|
761
|
+
});
|
|
677
762
|
},
|
|
678
763
|
|
|
679
764
|
toDetail({isCart,...prod}) {
|
|
@@ -683,16 +768,17 @@ export default {
|
|
|
683
768
|
|
|
684
769
|
|
|
685
770
|
handleTo(item) {
|
|
686
|
-
if(this.isPreview) return;
|
|
687
|
-
|
|
688
|
-
|
|
771
|
+
if (this.isPreview) return;
|
|
772
|
+
let temp = this.$xdUniHelper.cloneDeep(item);
|
|
773
|
+
temp.special_url = this.checkUrlIsValid(temp.special_url);
|
|
774
|
+
if(!temp.special_url) {
|
|
689
775
|
this.$xdAlert({
|
|
690
776
|
content:'专题地址配置错误!'
|
|
691
777
|
})
|
|
692
778
|
return
|
|
693
779
|
}
|
|
694
780
|
this.$xdUniHelper.navigateTo({
|
|
695
|
-
url: `${
|
|
781
|
+
url: `${temp.special_url}?special_id=${temp.special_id}`,
|
|
696
782
|
});
|
|
697
783
|
},
|
|
698
784
|
|