jufubao-mall 2.0.45 → 2.0.46-beta10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jufubao-mall",
3
- "version": "2.0.45",
3
+ "version": "2.0.46-beta10",
4
4
  "private": false,
5
5
  "description": "聚福宝商城业务组件插件包",
6
6
  "main": "index.js",
@@ -92,11 +92,16 @@
92
92
  :style="[{
93
93
  height: product.category.imgHeight + 'px',
94
94
  },categoryCompStyle]"
95
- v-if="product.category.category_img && product.category['imgStatus'] === 'ok'"
95
+ v-if="product.category.category_img && product.category['imgStatus'] === 'ok'&&product.category.show_method==='picture'"
96
96
  >
97
97
  <image :src="product.category.category_img" mode="widthFix"></image>
98
- </view>
98
+ </view>
99
99
  <!--分类图片-->
100
+ <!--分类文字+背景-->
101
+ <view v-if="product.category.show_method==='text'&&product.category.show_config">
102
+ <view :style="[fontStyle(product.category.show_config)]">{{product.category.category_name}}</view>
103
+ </view>
104
+ <!--分类文字+背景-->
100
105
  <!--商品显示-->
101
106
  <view
102
107
  class="productsBox"
@@ -467,6 +472,24 @@ export default {
467
472
  bgColor: this.contBrandBgColor,
468
473
  }
469
474
  },
475
+ fontStyle(){
476
+ return(config)=>{
477
+ let copyConfig = JSON.parse(config)
478
+ console.log(config,config['contBorder'],'config')
479
+ return {
480
+ height:'80rpx',
481
+ lineHeight:'80rpx',
482
+ textAlign:'center',
483
+ // width:'100%',
484
+ fontSize:copyConfig.fontSize+'rpx',
485
+ color:copyConfig.fontColorStatus==='custom' ? copyConfig.fontColor : this.mainColor,
486
+ backgroundColor:copyConfig.backgroundColorStatus==='custom' ? copyConfig.backgroundColor : this.mainColor,
487
+ borderRadius:copyConfig.backgroundRadius?copyConfig.backgroundRadius+'rpx':0,
488
+ border:copyConfig.contBorder.type==='Y'?`${copyConfig.contBorder.value.width}rpx ${copyConfig.contBorder.value.style} ${copyConfig.contBorder.value.color}`:'none',
489
+ boxShadow: copyConfig.contShadow.type==='Y' ? `${copyConfig.contShadow.value.color} 0 0 ${copyConfig.contShadow.value.width}rpx`:''
490
+ }
491
+ }
492
+ },
470
493
  },
471
494
  created() {
472
495
  this.nodataSp = getServiceUrl('/component/sp_nodata.png')
@@ -817,6 +840,11 @@ export default {
817
840
  return prod;
818
841
  })
819
842
  }
843
+ if(item.category.show_method==='text'){
844
+ if(item.category.show_config){
845
+ item.category.show_config = JSON.parse(item.category.show_config);
846
+ }
847
+ }
820
848
  this.$set(this.prdductsOrgFitler,key, this.$xdUniHelper.cloneDeep(item.items));
821
849
  this.getPaginationData(item);
822
850
  return item;