jufubao-mall 2.0.20-beta6 → 2.0.21-beta21

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.
Files changed (49) hide show
  1. package/package.json +1 -1
  2. package/src/components/CusProduct/CusProduct.vue +1 -1
  3. package/src/components/JfbMallBrandHome/JfbMallBrandHome.vue +19 -15
  4. package/src/components/JfbMallBrandWall/Attr.js +449 -10
  5. package/src/components/JfbMallBrandWall/JfbMallBrandWall.vue +308 -778
  6. package/src/components/JfbMallHomeProductList/JfbMallHomeProductList.vue +2 -4
  7. package/src/components/JfbMallHomeProductList/cusAttr/content.js +2 -1
  8. package/src/components/JfbMallProductInfo/cusAttr/content.js +1 -1
  9. package/src/components/JfbMallProductInfoV2/Api.js +1 -1
  10. package/src/components/JfbMallProductInfoV2/Attr.js +41 -134
  11. package/src/components/JfbMallProductInfoV2/JfbMallProductInfoV2.vue +127 -136
  12. package/src/components/JfbMallProductInfoV2/Mock.js +10 -38
  13. package/src/components/JfbMallProductList/Api.js +4 -4
  14. package/src/components/JfbMallProductList/Attr.js +762 -7
  15. package/src/components/JfbMallProductList/JfbMallProductList.vue +790 -785
  16. package/src/components/JfbMallProductList/Mock.js +133 -165
  17. package/src/components/JfbMallProductList/PosterAttr.js +327 -0
  18. package/src/components/JfbMallProductList/ProductAttr.js +164 -0
  19. package/src/components/JfbMallProductList/XdCateV1.vue +122 -333
  20. package/src/components/JfbMallProductList/XdCateV2.vue +75 -129
  21. package/src/components/JfbMallProductList/XdQueryBrand.vue +150 -0
  22. package/src/components/JfbMallProductList/XdQueryFilter.vue +76 -94
  23. package/src/components/JfbMallProductList/XdQuerySort.vue +109 -100
  24. package/src/components/JfbMallProductList/{cusAttr/advanced.js → advanced.js} +4 -12
  25. package/src/components/JfbMallProductList/{cusAttr/style.js → style.js} +50 -15
  26. package/src/components/JfbMallRecommendProduct/Attr.js +366 -8
  27. package/src/components/JfbMallRecommendProduct/JfbMallRecommendProduct.vue +187 -218
  28. package/src/components/JfbMallRecommendProduct/Mock.js +693 -236
  29. package/src/components/JfbMallResourceShopList/Mock.js +6 -4
  30. package/src/components/JfbMallShop/JfbMallShop.vue +48 -50
  31. package/src/components/JfbMallTestNormal/JfbMallTestNormal.vue +2 -23
  32. package/src/mixins/componentsMixins.js +0 -1
  33. package/src/mixins/productCompMixins.js +19 -29
  34. package/src/components/JfbMallBrandWall/cusAttr/advanced.js +0 -61
  35. package/src/components/JfbMallBrandWall/cusAttr/brand.js +0 -341
  36. package/src/components/JfbMallBrandWall/cusAttr/content.js +0 -251
  37. package/src/components/JfbMallBrandWall/cusAttr/style.js +0 -252
  38. package/src/components/JfbMallBrandWall/cusAttr/tab.js +0 -471
  39. package/src/components/JfbMallProductList/ComFilterQuery.vue +0 -950
  40. package/src/components/JfbMallProductList/XdQueryCommon.vue +0 -189
  41. package/src/components/JfbMallProductList/cateMixins.js +0 -97
  42. package/src/components/JfbMallProductList/cusAttr/content.js +0 -465
  43. package/src/components/JfbMallProductList/cusAttr/filter.js +0 -333
  44. package/src/components/JfbMallProductList/cusAttr/font.js +0 -114
  45. package/src/components/JfbMallProductList/cusAttr/icon.js +0 -298
  46. package/src/components/JfbMallRecommendProduct/cusAttr/advanced.js +0 -79
  47. package/src/components/JfbMallRecommendProduct/cusAttr/content.js +0 -202
  48. package/src/components/JfbMallRecommendProduct/cusAttr/style.js +0 -594
  49. package/src/components/JfbMallTestNormal/data.js +0 -152
@@ -20,102 +20,90 @@
20
20
  <view
21
21
  class="showlist"
22
22
  v-if="isShow"
23
- :style="[contMarginComp]"
23
+ :style="{ margin: contMarginComp}"
24
24
  >
25
25
  <!--title-->
26
26
  <view
27
- v-if="isTitleStatus"
27
+ v-if="isShowTitle === 'Y'"
28
28
  class="title"
29
29
  :style="{
30
30
  backgroundColor:titleBgColor,
31
31
  borderRadius:titleRadius + 'rpx'
32
32
  }"
33
33
  >
34
- <xd-more :background="titleMoreBgColor"><text :style="[titleFontStyle]">{{isTitleStatus}}</text></xd-more>
34
+ <xd-more :background="titleMoreBgColor"><text :style="[titleFontStyle]">{{recommendTitle}}</text></xd-more>
35
35
  </view>
36
36
  <!--title-->
37
- <view class="list-product">
38
- <view
39
- v-if="prodList === null"
40
- class="products-ske"
41
- :class="{
37
+ <!--商品列表-->
38
+ <view
39
+ v-if="prodList === null"
40
+ class="products-ske"
41
+ :class="{
42
42
  skeOneBox: column_num === 1,
43
43
  skeTwoBox: column_num === 2,
44
44
  skeThreeBox: column_num === 3
45
45
  }"
46
- :style="[listMarginComp]"
46
+ :style="{padding:listMarginComp}"
47
+ >
48
+ <view
49
+ v-for="(column,index) in column_num"
50
+ :key="column"
51
+ :style="{marginRight:(column_num ===1 ? 0:(columnSpacing + 'rpx'))}"
47
52
  >
48
53
  <view
49
- v-for="(column) in column_num"
50
- :key="column"
51
- :style="{marginRight:(column_num ===1 ? 0:(columnSpacing + 'rpx'))}"
54
+ v-for="item in skeNumber"
55
+ :key="item"
56
+ :style="[skeletonStyle]"
52
57
  >
53
- <view
54
- v-for="item in skeNumber"
55
- :key="item"
56
- :style="[skeletonStyle]"
57
- >
58
- <ske-product
59
- :cell="column_num"
60
- :cell-spacing="columnSpacing"
61
- :row-spacing="rowSpacing"
62
- :product-config="productConfig"
63
- :height="skeletonImageHeight"
64
- ></ske-product>
65
- </view>
58
+ <ske-product
59
+ :cell="column_num"
60
+ :cell-spacing="columnSpacing"
61
+ :row-spacing="rowSpacing"
62
+ :product-config="productConfig"
63
+ :height="skeletonImageHeight"
64
+ ></ske-product>
66
65
  </view>
67
66
  </view>
68
- <view
69
- class="products-list"
70
- v-if="prodList && prodList.length > 0"
71
- :class="{
67
+ </view>
68
+ <view
69
+ class="products-list"
70
+ v-if="prodList && prodList.length > 0"
71
+ :class="{
72
72
  skeOneBox: column_num === 1,
73
73
  skeTwoBox: column_num === 2,
74
74
  skeThreeBox: column_num === 3,
75
+ isHiddenTitle: isShowTitle === 'N'
75
76
  }"
76
- :style="[listMarginComp]"
77
+ :style="{padding:listMarginComp}"
78
+ >
79
+ <view
80
+ v-for="(column,index) in column_num"
81
+ :key="column"
82
+ :style="{marginRight:(column_num ===1 ? 0:(columnSpacing + 'rpx'))}"
77
83
  >
78
84
  <view
79
- v-for="(column,index) in column_num"
80
- :key="column"
81
- :style="{marginRight:(column_num ===1 ? 0:(columnSpacing + 'rpx'))}"
85
+ v-for="(item,idx) in getItemData(index,prodList)"
86
+ :key="item.product_id"
87
+ :style="[contProductStyles]"
82
88
  >
83
-
84
- <template v-if="getItemData(index,prodList).length > 0">
85
- <view
86
- v-for="(item,idx) in getItemData(index,prodList)"
87
- :key="item.product_id"
88
- :style="[contProductStyles]"
89
- >
90
- <cus-product
91
- :column-one-layout="columnOneLayout"
92
- :image-radius="imageRadius"
93
- :brand-color="brandStyleComp"
94
- :height="contProductImageHeight"
95
- :cell="column_num"
96
- :name-font="itemFontStyle"
97
- :product-config="productConfig"
98
- :isPlus="isGVipSite"
99
- :item="item"
100
- :cell-spacing="contSpacing"
101
- :color="mainColor"
102
- @on-product-detail="toProductInfo"
103
- ></cus-product>
104
- </view>
105
- </template>
106
- <template v-else>
107
- <view :style="[contProductStyles, {visibility: 'hidden'}]"></view>
108
- </template>
89
+ <cus-product
90
+ :image-radius="imageRadius"
91
+ :brand-color="brandColor"
92
+ :height="contProductImageHeight"
93
+ :cell="column_num"
94
+ :name-font="itemFontStyle"
95
+ :product-config="productConfig"
96
+ :item="item"
97
+ :isPlus="is_plus_site"
98
+ :row-spacing="rowSpacing"
99
+ :cell-spacing="contSpacing"
100
+ @on-product-detail="toProductInfo"
101
+ ></cus-product>
109
102
  </view>
110
103
  </view>
111
104
  </view>
112
105
  <!--商品列表-->
113
- <xd-no-data :scale-size="2" type="product" v-if="prodList && prodList.length === 0"></xd-no-data>
114
- <xd-more
115
- v-if="(isPreview || !hasNext ) && isUserScrollData === 'Y' && prodList.length > 0"
116
- :color="footerColor"
117
- :background="footerColor"
118
- ><text>我是有底线的</text></xd-more>
106
+ <view class="hasNoData" v-if="hasDataComp">已经到底没有更多数据了</view>
119
107
  </view>
120
108
  <view
121
109
  class="notShow"
@@ -134,18 +122,17 @@
134
122
  <script>
135
123
  import XdFontIcon from "@/components/XdFontIcon/XdFontIcon";
136
124
  import XdMore from "@/components/XdMore/XdMore";
125
+ import XdUnit from "@/components/XdUnit/XdUnit"
137
126
  import { jfbRootExec } from "@/utils/xd.event";
138
127
  import JfbMallRecommendProductMixin from "./JfbMallRecommendProductMixin";
139
128
  import componentsMixins from "@/mixins/componentsMixins";
140
129
  import extsMixins from "@/mixins/extsMixins"
141
- import {getContainerPropsValue, toProductDetail,gCPVal} from "@/utils/xd.base";
130
+ import {getContainerPropsValue, toProductDetail} from "@/utils/xd.base";
142
131
  import getServiceUrl from "@/common/getServiceUrl"
143
132
  import { mapState } from "vuex"
144
133
  import Color from "color";
145
134
  import SkeProduct from "@/components/SkeProduct/SkeProduct.vue";
146
135
  import CusProduct from "@/components/CusProduct/CusProduct.vue";
147
- import productCompMixins from "@/mixins/productCompMixins";
148
- import XdNoData from "@/components/XdNoData/XdNoData.vue";
149
136
 
150
137
 
151
138
  export default {
@@ -155,51 +142,40 @@
155
142
  SkeProduct,
156
143
  XdFontIcon,
157
144
  XdMore,
158
- XdNoData
145
+ XdUnit
159
146
  },
160
- mixins: [componentsMixins,extsMixins,JfbMallRecommendProductMixin,productCompMixins],
147
+ mixins: [componentsMixins,extsMixins,JfbMallRecommendProductMixin],
161
148
  data() {
162
149
  return {
163
150
  closeMask: true,
164
151
  page_size: 20,
165
152
  page_token:'1',
166
- hasNext: true,
167
153
  prodList: null,
168
154
  isShow: true,
169
155
  noticeBackgroundColor: "",
170
156
  random_score_seed: parseInt(Math.random() * 10000000),
171
- isProductTop:true,
172
157
 
173
158
  //高级属性
174
159
  xnamespace: "",
175
160
  productInfoPath: "",
176
161
  isCityFilter: "N",
177
162
  isUserScrollData:'N',
178
-
179
- //商品设置
180
- productConfig:{},
181
- column_num: 2,
182
- columnOneLayout: 'H', //V=垂直 H=水平
183
- sort: "default",
184
- skeNumber:6,
163
+ isShowTitle:'Y',
185
164
 
186
165
 
187
166
  //基础属性
188
167
  columnSpacing: 20,
189
168
  rowSpacing: 20, //行间距
169
+ column_num: 2,
170
+ productConfig:{},
190
171
  marketTags: [],
191
- isPlatformTags:[],
192
- need_show_tags: [],
193
- footerColor:'',
172
+ skeNumber:6,
194
173
 
195
174
 
196
- //外边框
197
- bodyPadding:{},//外边距
198
- listPadding:{}, //列表填充
175
+ //contnet
176
+ contMargin:{},//外边距
177
+ contPadding:{}, //列表填充
199
178
  itemPadding:{}, //商品填充
200
- contentColor:'',
201
-
202
-
203
179
  contBgColor: '#f8f8f8',
204
180
  contRadius: '10',
205
181
  imageRadius: '10',
@@ -214,7 +190,6 @@
214
190
 
215
191
  //title
216
192
  titleFontStyle:{},
217
- isShowTitle:'Y',
218
193
  recommendTitle: "",
219
194
  titleBgColor:'#fff',
220
195
  titleRadius:0,
@@ -233,25 +208,41 @@
233
208
  }),
234
209
 
235
210
  contMarginComp(){
236
- return {
237
- margin: this.getMarginAndPadding(this.bodyPadding,0),
238
- backgroundColor: this.contentColor,
239
- minHeight: this.layoutInfo.bodyMinHeightRpx + 'rpx'
240
- }
211
+ return this.getMarginAndPadding(this.contMargin,0)
241
212
  },
242
213
 
243
214
  listMarginComp(){
215
+ return this.getMarginAndPadding(this.contPadding,{top:0, bottom:20, left:20, right:20})
216
+
217
+ },
218
+
219
+ hasDataComp(){
220
+ return this.isUserScrollData === 'Y'&& (this.prodList&& this.prodList.length > 0) && this.page_token === ''
221
+ },
222
+
223
+ //骨架
224
+ skeletonImageHeight(){
225
+ return parseInt(this.skeletonStyle.width);
226
+ },
227
+
228
+ skeletonStyle(){
229
+ return this.getContentStyle('ske');
230
+ },
231
+ //骨架
232
+
233
+ contProductImageHeight(){
234
+ return parseInt(this.contProductStyles.width);
235
+ },
236
+ contProductStyles(){
244
237
  return {
245
- padding: this.getMarginAndPadding(this.listPadding,0),
238
+ ...this.getContentStyle(),
239
+ boxShadow: this.contShadow,
240
+ border: this.contBorder,
241
+ backgroundColor: this.contBgColor,
246
242
  }
247
243
  },
248
244
 
249
245
 
250
- isTitleStatus(){
251
- if(this.isShowTitle === 'N') return '';
252
- else if(this.isShowTitle === 'D') return '为您推荐';
253
- else if(this.isShowTitle === 'Y') return this.recommendTitle||'为您推荐'
254
- },
255
246
  },
256
247
  watch: {
257
248
  container(value,oldValue) {
@@ -276,106 +267,112 @@
276
267
  * @param container {object} 业务组件对象自己
277
268
  */
278
269
  init(container) {
279
- this.isShowTitle = gCPVal(container, 'isShowTitle', 'Y');
280
- this.footerColor = gCPVal(container,'footerColor', '#ddd', {sKey:'footerColorStatus',fields:['footerColor']});
281
-
282
- //营销标签
283
- this.marketTags = gCPVal(container, "marketTags",[]);
270
+ this.marketTags = getContainerPropsValue(container, "content.marketTags",[]);
271
+ this.isShowTitle = getContainerPropsValue(container, 'content.isShowTitle', 'Y');
284
272
  if(typeof this.marketTags === 'string') this.marketTags = [this.marketTags];
285
- this.isPlatformTags = gCPVal(container, "isPlatformTags",[]);
286
273
 
287
- //基础属性
288
- this.xnamespace = gCPVal(container, 'xnamespace', this.projectAttr.business_code||this.xnamespace);
289
- this.sort = gCPVal(container, 'sort', "default");
290
- let column_num = gCPVal(container, 'row_num', 2);
291
- this.column_num = column_num;
292
- //一列垂直
293
- if(column_num === 4) {
294
- this.column_num = 1;
295
- this.columnOneLayout = 'V';
296
- this.skeNumber = 10;
297
- this.page_size = 20;
298
- }
299
- //一列水平
300
- if( column_num === 1) {
301
- this.skeNumber = 10;
302
- this.page_size = 20;
303
- this.columnOneLayout = 'H';
304
- }
305
- if( column_num === 2) {
306
- this.skeNumber = 5;
307
- this.page_size = 20;
308
- }
309
- if( column_num === 3) {
310
- this.skeNumber = 6;
311
- this.page_size = 21;
312
- }
274
+ this.column_num = getContainerPropsValue(container, 'content.column_num', 2);
275
+ if( this.column_num === 1) this.skeNumber = 10;
276
+ if( this.column_num === 2) this.skeNumber = 5;
277
+ if( this.column_num === 3) this.skeNumber = 6;
278
+ if(this.column_num === 3) this.page_size = 21;
279
+ else this.page_size = 20;
313
280
 
281
+ //商品设置
282
+ this.productConfig = this.getProductConfig(container);
314
283
 
315
284
  //title
316
- this.recommendTitle = gCPVal(container, "recommendTitle", "为您推荐");
317
- this.titleFontStyle = gCPVal(container,'titleStyle', [{
318
- fontSize: '32rpx',
319
- color: '#333',
320
- bgColor:'#fff',
321
- fontWeight: '500',
322
- }], {sKey:'titleStyleStatus',fields:['titleStyle']});
323
- this.titleBgColor = this.titleFontStyle.bgColor;
324
- if(Color(this.titleFontStyle.bgColor).isDark()) this.titleMoreBgColor = Color(this.titleBgColor).lighten(0.8).toString();
325
- else if(Color(this.titleFontStyle.bgColor).isLight()) this.titleMoreBgColor = Color(this.titleBgColor).darken(0.2).toString();
326
- this.titleRadius = gCPVal(container,'titleRadius', ['0'], {sKey:'titleRadiusStatus',fields:['titleRadius']})||0;
285
+ this.recommendTitle = getContainerPropsValue(container, "content.recommendTitle", "为您推荐");
286
+ let titleStyle = getContainerPropsValue(container, 'content.titleStyle', {});
287
+ if(titleStyle.bgColor) {
288
+ this.titleBgColor = titleStyle.bgColor;
289
+ this.titleMoreBgColor = Color(this.titleBgColor).lighten(0.25).toString();
290
+ }
291
+ else {
292
+ this.titleBgColor = '#fff';
293
+ this.titleMoreBgColor = '#eee'
294
+ }
295
+ this.titleFontStyle = {
296
+ color: titleStyle.color || '#333',
297
+ fontSize: titleStyle.fontSize|| '26rpx',
298
+ fontWeight:titleStyle.fontWeight || 500
299
+ };
300
+ this.titleRadius = getContainerPropsValue(container, "content.titleRadius", '0');
327
301
 
302
+ //列表样式
303
+ this.contPadding = getContainerPropsValue(container, "content.contPadding", {});
304
+ this.rowSpacing = Number(getContainerPropsValue(container, "content.rowSpacing", 20));
305
+ this.columnSpacing = Number(getContainerPropsValue(container, "content.columnSpacing", 20));
306
+
307
+ //content
308
+ this.contMargin = getContainerPropsValue(container, "content.contMargin", {});
309
+ this.itemPadding = getContainerPropsValue(container, "content.itemPadding", {});
310
+ this.imageRadius = getContainerPropsValue(container, "content.imageRadius", '10');
311
+ this.contRadius = getContainerPropsValue(container, "content.contRadius", '10');
312
+ this.contBgColor = getContainerPropsValue(container, "content.contBgColor", '#f8f8f8');
313
+ this.brandColor = getContainerPropsValue(container, "content.brandColor", '#999');
314
+ this.contShadow = this.getXdShadow({width:20, color:'rgba(0,0,0,0)'},getContainerPropsValue(container, 'content.contShadow', {}))
315
+ this.contBorder = this.getXdBorder({width:2,color:'rgba(0,0,0,0)'},getContainerPropsValue(container, 'content.contBorder', {}));
316
+ this.contSpacing = Number(getContainerPropsValue(container, "content.contSpacing", '20'));
317
+ this.contStyle = getContainerPropsValue(container, "content.contStyle", {});
318
+ let contStyle = getContainerPropsValue(container, 'content.contStyle', {});
319
+ this.itemFontStyle = {
320
+ color: contStyle.color || '#333',
321
+ fontSize: contStyle.fontSize|| '28rpx',
322
+ fontWeight:contStyle.fontWeight || 'normal'
323
+ };
324
+ this.contStyleBorder = getContainerPropsValue(container, 'content.contBorder', {})
328
325
 
329
- //品牌样式
330
- this.brandColor = gCPVal(container,'brandColor', '#999', {sKey:'brandStatus',fields:['brandColor','brandBgColor','brandBorColor']});
331
- this.brandBgColor = gCPVal(container,'brandBgColor', '', {sKey:'brandStatus',fields:['brandColor','brandBgColor','brandBorColor']});
332
- this.brandBorColor = gCPVal(container,'brandBorColor', '', {sKey:'brandStatus',fields:['brandColor','brandBgColor','brandBorColor']});
333
326
 
327
+ //高级属性
328
+ this.xnamespace = getContainerPropsValue(container, "content.xnamespace", this.projectAttr.business_code);
329
+ this.productInfoPath = getContainerPropsValue(container, "content.productInfoPath", {value: ""}).value;
330
+ this.isCityFilter = getContainerPropsValue(container, "content.isCityFilter", "N");
331
+ this.isUserScrollData = getContainerPropsValue(container, "content.isUserScrollData", "N");
332
+ },
334
333
 
335
- //列表样式
336
- this.bodyPadding = gCPVal(container,'contMargin', [0], {sKey:'contMarginStatus',fields:['contMargin'],isPMR: true});
337
- this.listPadding = gCPVal(container,'contPadding', [{top:0, bottom:16, left:16, right:16},{top:0, bottom:20, left:20, right:20}], {sKey:'contPaddingStatus',fields:['contPadding'],isPMR: true});
338
- this.contentColor = gCPVal(container,'contentColor', '#f8f8f8', {sKey:'contentColorStatus',fields:['contentColor']});
334
+ getContentStyle(type='cont') {
335
+ //总宽度
336
+ let maxW = uni.getSystemInfoSync().safeArea.width * this.$pxNum;
339
337
 
340
- //商品样式
341
- this.rowSpacing = Number(gCPVal(container,'rowSpacing', [16,20], {sKey:'columnRowStatus',fields:['rowSpacing','columnSpacing']}));
342
- this.columnSpacing = Number(gCPVal(container,'columnSpacing', [16,20], {sKey:'columnRowStatus',fields:['rowSpacing','columnSpacing']}));
343
- this.contRadius = gCPVal(container,'contRadius', [this.gStyleValue.radius,'10'], {sKey:'contRadiusStatus',fields:['contRadius']})||0;
344
- this.imageRadius = gCPVal(container,'imageRadius', [this.gStyleValue.radius/2,'0'], {sKey:'imageRadiusStatus',fields:['imageRadius']})||0;
345
- this.itemPadding = gCPVal(container,'itemPadding', [16,20], {sKey:'itemPaddingStatus',fields:['itemPadding'],isPMR: true});
346
- this.contShadow = gCPVal(container, 'contShadow', [this.gStyleValue.shadow,'none'], {isShadow:true, bsOld:['is_shadow','is_shadow_w','is_shadow_bg']});
347
- this.contSpacing = gCPVal(container,'contSpacing', [16,20], {sKey:'contStyleStatus',fields:['contSpacing','contStyle']});
348
- this.itemFontStyle = gCPVal(container, 'contStyle', {
349
- color:'#333',
350
- fontWeight:'normal'
351
- },{sKey:'contStyleStatus',fields:['contSpacing','contStyle']});
338
+ //外边距
339
+ let outMargin = this.getPMValue(this.contMargin,'LR',0) //(Number(this.checkValue(this.contMargin.left, 0)) + Number(this.checkValue(this.contMargin.right, 0)))
352
340
 
341
+ //列表填充
342
+ let outPadding = this.getPMValue(this.contPadding,'LR', 20);//(Number(this.checkValue(this.contPadding.left, 20)) + Number(this.checkValue(this.contPadding.right, 20)))
353
343
 
354
- //商品样式关联属性(背景与边框)
355
- //{ 'contBgColorStatus':['contBgColor'],'contBorder':['contBorder','bs']}
356
- const sValue = "{\"border\":0,\"backgroundColor\":\"#fff\"}";
357
- let itemBgcColoStyle = this.getRelationStatus(container,'productStyle',{ contBgColorStatus:['contBgColor'],contBorder:['contBorder', 'bs']},sValue);
358
- this.contBgColor = gCPVal(container, 'contBgColor', ['#fff'], {sKey: 'contBgColorStatus', cusFields: ['productStyle','backgroundColor',itemBgcColoStyle]});
359
- this.contBorder = gCPVal(container, 'contBorder', [{color: '#eee',width: '0',style: 'solid'}], {isBorder: true, cusFields: ['productStyle','border',itemBgcColoStyle]});
360
- this.contStyleBorder = gCPVal(container, 'contBorder', [{color: '#eee',width: '0',style: 'solid'}], {isBorder: true, isBsWidth: true, cusFields: ['productStyle','border',itemBgcColoStyle]});
344
+ //间距设置
345
+ if(this.$xdUniHelper.checkVarType(this.columnSpacing) === 'string') this.columnSpacing = Number(this.columnSpacing);
346
+ let columnSpacing = (this.columnSpacing * (this.column_num-1)); //公式:列数量 * 边距 + 边距
361
347
 
348
+ //item内容填充
349
+ let paddinRL = this.getPMValue(this.itemPadding,'LR',20)*this.column_num;//(Number(this.checkValue(this.itemPadding.left, 20)) + Number(this.checkValue(this.itemPadding.right, 20))) * this.column_num;
362
350
 
351
+ //预览模式有两个像素边距
352
+ let isPreview = 0;
363
353
 
354
+ //边框
355
+ let borderRL = 0;
356
+ if(this.contStyleBorder.type === 'Y') {
357
+ if(this.contStyleBorder.value && this.contStyleBorder.value.width !== undefined) {
358
+ borderRL = Number(this.contStyleBorder.value.width) * 2;
359
+ }
360
+ }
361
+ if(type === 'ske') borderRL = 0;
362
+ borderRL = borderRL * this.column_num;
364
363
 
365
- //商品设置
366
- let compConfig = gCPVal(container, "compConfig", null);
367
- let tagsKeys= this.getProductTagsKeys(compConfig,container)
368
- this.need_show_tags = this.getProductTagsParams(compConfig,tagsKeys);
364
+ let otherWidth = outMargin + outPadding + columnSpacing + isPreview + paddinRL + borderRL;
369
365
 
370
- //高级属性
371
- this.productConfig = this.getProductConfig(container,{cartStyle:'icongouwuche-01'});
372
- this.productInfoPath = gCPVal(container, "productInfoPath", {value: ""}).value;
373
- this.isCityFilter = gCPVal(container, "isCityFilter", "N");
374
- this.isUserScrollData = gCPVal(container, "isUserScrollData", "N");
375
- this.isInitLoaded = true;
366
+ return {
367
+ marginTop: this.rowSpacing + 'rpx',
368
+ width: (maxW - otherWidth)/this.column_num + 'rpx',
369
+ borderRadius: this.contRadius + 'rpx',
370
+ boxShadow: '0 0 10rpx rgba(0,0,0,.08)',
371
+ padding: this.getMarginAndPadding(this.itemPadding, 20),
372
+ backgroundColor: 'rgba(255,255,255,.8)'
373
+ };
376
374
  },
377
375
 
378
-
379
376
  getItemData(cellIndex,data){
380
377
  let list = this.$xdUniHelper.cloneDeep(data);
381
378
  return list.filter((it,index) => {
@@ -397,7 +394,6 @@
397
394
  market_tags: this.marketTags.join(','),
398
395
  city_code: this.isCityFilter === 'Y' ? this.stateCity.city_code : '',
399
396
  random_score_seed: this.random_score_seed,
400
- need_show_tags: this.need_show_tags.join(),
401
397
  }
402
398
  if(this.productConfig.isShowDiscount==='Y'){
403
399
  data.is_show_uprice=this.$xdUniHelper.multiplyFloatNumber(this.productConfig.differ,100)
@@ -405,51 +401,23 @@
405
401
  data.is_show_uprice=-1
406
402
  }
407
403
 
408
- //设置平台标签
409
- if(this.isPlatformTags.length > 0){
410
- data['partner_product_tags'] = this.isPlatformTags.join(',')
411
- }
412
-
413
404
  jfbRootExec('getRecommendMallProductList', {
414
405
  vm: this,
415
406
  data: data
416
407
  }).then(res => {
417
-
418
- let list = this.$xdUniHelper.cloneDeep(res.list||[]).map((item,index) => {
419
- item['thumb'] = item.thumb ? getServiceUrl(item['thumb'], "size3") : "";
420
- item['is_poster'] = 'N';
421
- return item;
422
- });
423
-
424
- //预览模式设置标签
425
- if(this.$configProject['isPreview']){
426
- this.prodList = list.map(item=>{
408
+ this.prodList = (this.prodList||[]).concat(res.list.map(item => {
409
+ if(this.$configProject['isPreview']){
427
410
  if(this.productConfig.isPrice==='N'){
428
411
  item.show_prices=[]
429
412
  }
430
-
431
413
  if(this.productConfig.isShowDiscount==='N'){
432
414
  item.show_prices=item.show_prices.filter(item=>item.t!=='U')
433
415
  }
434
-
435
- if(item.tags && item.tags.length>0){
436
- let fiterTags = this.$xdUniHelper.cloneDeep(this.need_show_tags);
437
- item.tags = item.tags.filter(tag=>{
438
- return fiterTags.includes(tag.type)
439
- })
440
- }
441
- return item;
442
- })
443
- }
444
-
445
- //正式环境
446
- else{
447
- if(this.page_token === '1') this.prodList = list;
448
- else this.prodList = (this.prodList||[]).concat(list);
449
- }
450
-
416
+ }
417
+ item['thumb'] = getServiceUrl(item.thumb, "size3");
418
+ return item;
419
+ }));
451
420
  this.page_token = res.next_page_token;
452
- this.hasNext = !!res.next_page_token;
453
421
  })
454
422
  },
455
423
 
@@ -481,9 +449,10 @@
481
449
  },
482
450
 
483
451
  onJfbReachBottom(){
484
- if (this.$configProject['isPreview'] || this.isUserScrollData === 'N') return;
452
+ if (this.$configProject['isPreview'] || this.isUserScrollData === 'N'
453
+ ) return;
485
454
 
486
- if(this.hasNext) {
455
+ if(this.page_token){
487
456
  this.getList();
488
457
  }
489
458
  },