jufubao-mall 2.0.21 → 2.0.23-beta1

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 (60) hide show
  1. package/package.json +1 -1
  2. package/src/components/CusProduct/CusProduct.vue +1 -1
  3. package/src/components/JfbMallBrandWall/Attr.js +10 -449
  4. package/src/components/JfbMallBrandWall/JfbMallBrandWall.vue +783 -308
  5. package/src/components/JfbMallBrandWall/cusAttr/advanced.js +61 -0
  6. package/src/components/JfbMallBrandWall/cusAttr/brand.js +341 -0
  7. package/src/components/JfbMallBrandWall/cusAttr/content.js +251 -0
  8. package/src/components/JfbMallBrandWall/cusAttr/style.js +252 -0
  9. package/src/components/JfbMallBrandWall/cusAttr/tab.js +471 -0
  10. package/src/components/JfbMallHomeProductList/JfbMallHomeProductList.vue +3 -1
  11. package/src/components/JfbMallHomeProductList/cusAttr/content.js +1 -2
  12. package/src/components/JfbMallNetworkMedia/Api.js +58 -0
  13. package/src/components/JfbMallNetworkMedia/Attr.js +20 -0
  14. package/src/components/JfbMallNetworkMedia/JfbMallNetworkMedia.vue +84 -0
  15. package/src/components/JfbMallNetworkMedia/JfbMallNetworkMediaLess.less +80 -0
  16. package/src/components/JfbMallNetworkMedia/JfbMallNetworkMediaMixin.js +30 -0
  17. package/src/components/JfbMallNetworkMedia/Mock.js +13 -0
  18. package/src/components/JfbMallNetworkMedia/cusAttr/advanced.js +60 -0
  19. package/src/components/JfbMallNetworkMedia/cusAttr/content.js +125 -0
  20. package/src/components/JfbMallNetworkMedia/cusAttr/filter.js +333 -0
  21. package/src/components/JfbMallNetworkMedia/cusAttr/font.js +114 -0
  22. package/src/components/JfbMallNetworkMedia/cusAttr/icon.js +298 -0
  23. package/src/components/{JfbMallProductList → JfbMallNetworkMedia/cusAttr}/style.js +15 -50
  24. package/src/components/JfbMallProductInfo/JfbMallProductInfo.vue +27 -23
  25. package/src/components/JfbMallProductInfo/cusAttr/content.js +1 -1
  26. package/src/components/JfbMallProductInfoV2/Api.js +1 -1
  27. package/src/components/JfbMallProductInfoV2/Attr.js +134 -41
  28. package/src/components/JfbMallProductInfoV2/JfbMallProductInfoV2.vue +136 -127
  29. package/src/components/JfbMallProductInfoV2/Mock.js +38 -10
  30. package/src/components/JfbMallProductList/Api.js +7 -7
  31. package/src/components/JfbMallProductList/Attr.js +7 -762
  32. package/src/components/JfbMallProductList/ComFilterQuery.vue +950 -0
  33. package/src/components/JfbMallProductList/JfbMallProductList.vue +807 -792
  34. package/src/components/JfbMallProductList/Mock.js +168 -255
  35. package/src/components/JfbMallProductList/XdCateV1.vue +335 -122
  36. package/src/components/JfbMallProductList/XdCateV2.vue +144 -76
  37. package/src/components/JfbMallProductList/XdQueryCommon.vue +189 -0
  38. package/src/components/JfbMallProductList/XdQueryFilter.vue +94 -76
  39. package/src/components/JfbMallProductList/XdQuerySort.vue +100 -109
  40. package/src/components/JfbMallProductList/cateMixins.js +103 -0
  41. package/src/components/JfbMallProductList/{advanced.js → cusAttr/advanced.js} +12 -4
  42. package/src/components/JfbMallProductList/cusAttr/content.js +465 -0
  43. package/src/components/JfbMallProductList/cusAttr/filter.js +333 -0
  44. package/src/components/JfbMallProductList/cusAttr/font.js +114 -0
  45. package/src/components/JfbMallProductList/cusAttr/icon.js +298 -0
  46. package/src/components/JfbMallProductList/cusAttr/style.js +91 -0
  47. package/src/components/JfbMallRecommendProduct/Attr.js +8 -366
  48. package/src/components/JfbMallRecommendProduct/JfbMallRecommendProduct.vue +218 -187
  49. package/src/components/JfbMallRecommendProduct/Mock.js +236 -693
  50. package/src/components/JfbMallRecommendProduct/cusAttr/advanced.js +79 -0
  51. package/src/components/JfbMallRecommendProduct/cusAttr/content.js +202 -0
  52. package/src/components/JfbMallRecommendProduct/cusAttr/style.js +594 -0
  53. package/src/components/JfbMallResourceShopList/Mock.js +4 -6
  54. package/src/components/JfbMallTestNormal/JfbMallTestNormal.vue +23 -2
  55. package/src/components/JfbMallTestNormal/data.js +152 -0
  56. package/src/mixins/componentsMixins.js +1 -0
  57. package/src/mixins/productCompMixins.js +29 -19
  58. package/src/components/JfbMallProductList/PosterAttr.js +0 -327
  59. package/src/components/JfbMallProductList/ProductAttr.js +0 -164
  60. package/src/components/JfbMallProductList/XdQueryBrand.vue +0 -150
@@ -0,0 +1,79 @@
1
+ 'use strict';
2
+
3
+ export default (data, gValue, gColor, oldData={})=>{
4
+ let isCityFilter = 'N',isUserScrollData = 'N', productInfoPath =null;
5
+ if(['Y','N'].includes(data['isCityFilter'])) {
6
+ isCityFilter = data['isCityFilter']
7
+ }
8
+ if(['Y','N'].includes(data['isUserScrollData'])) {
9
+ isUserScrollData = data['isUserScrollData']
10
+ }
11
+ if(data['productInfoPath'] !== undefined) {
12
+ productInfoPath = data['productInfoPath']
13
+ }
14
+ return [
15
+ {
16
+ label: '城市筛选',
17
+ ele: 'xd-radio',
18
+ valueKey: 'isCityFilter',
19
+ value: isCityFilter,
20
+ groupKey:'advanced',
21
+ multiple: false,
22
+ labelInline:true,
23
+ list: [
24
+ {label: '开启', value: 'Y'},
25
+ {label: '禁用', value: 'N'},
26
+ ]
27
+ },
28
+ {
29
+ label: '商品详情',
30
+ ele: 'xd-select-pages-path',
31
+ valueKey: 'productInfoPath',
32
+ placeholder: '请选择商品详情跳转页面',
33
+ value: productInfoPath,
34
+ groupKey:'advanced',
35
+ className: 'input100',
36
+ labelInline:true,
37
+ setting: {
38
+ mode:'new',
39
+ router: XdBus.getParentApi('getPagesTree'),
40
+ },
41
+ },
42
+ {
43
+ label: '滚动加载',
44
+ ele: 'xd-radio',
45
+ valueKey: 'isUserScrollData',
46
+ value: isUserScrollData,
47
+ placeholder: '请选择滚动加载',
48
+ groupKey:'advanced',
49
+ multiple: false,
50
+ labelInline:true,
51
+ className: 'input100',
52
+ inline:false,
53
+ notice:'是否滚动加载数据',
54
+ list: [
55
+ {label: '开启', value: 'Y'},
56
+ {label: '禁用', value: 'N'},
57
+ ]
58
+ },
59
+ {
60
+ label: '版本号:',
61
+ ele: 'el-input',
62
+ type: 'text',
63
+ groupKey: 'advanced',
64
+ valueKey: 'version',
65
+ value: 'v2.0',
66
+ hidden: true,
67
+ },
68
+ {
69
+ label: '引用过滤字段设置:',
70
+ ele: 'el-input',
71
+ type: 'text',
72
+ groupKey: 'content',
73
+ valueKey: 'refFilterContent',
74
+ value: '["productStyle"]',
75
+ hidden: true,
76
+ },
77
+ ].filter(i=>i);
78
+ }
79
+
@@ -0,0 +1,202 @@
1
+ 'use strict';
2
+
3
+ import {customVal, dataVal, statusDataVal, statusShow} from "@/utils/AttrTools";
4
+ import PosterAttr from "@/utils/Attr/PosterAttr";
5
+ import ProductAttr from "@/utils/Attr/ProductAttr";
6
+
7
+ export default (data, gValue, gColor, oldData={})=>{
8
+ let isShowTitle = 'Y';
9
+ if(gValue.isAdd && gValue.isFirst) isShowTitle = 'D';
10
+ if(data['isShowTitle'] !== undefined) isShowTitle = data['isShowTitle'];
11
+ return [
12
+ {
13
+ ele: 'title',
14
+ label: '基础',
15
+ size: 'small',
16
+ groupKey:'content',
17
+ },
18
+ {
19
+ label: '组件标题',
20
+ ele: 'xd-radio',
21
+ valueKey: 'isShowTitle',
22
+ value: isShowTitle,
23
+ groupKey:'content',
24
+ labelInline: true,
25
+ multiple: false,
26
+ list: [
27
+ {label: '默认标题', value: 'D'},
28
+ {label: '隐藏', value: 'N'},
29
+ {label: '自定义标题', value: 'Y'},
30
+ ]
31
+ },
32
+
33
+ {ele: 'group_start'},
34
+ {
35
+ label: '',
36
+ ele: "el-input",
37
+ valueKey: 'recommendTitle',
38
+ groupKey:'content',
39
+ className: 'input100',
40
+ value: dataVal({data, key:'recommendTitle', dValue:'', gValue}),
41
+ hidden: !(isShowTitle === 'Y'),
42
+ placeholder: '默认“为您推荐”',
43
+ },
44
+ {ele: 'group_end'},
45
+ {
46
+ label: "业务线",
47
+ ele: "xd-choose-namespace",
48
+ valueKey: "xnamespace",
49
+ value: dataVal({data, key:'xnamespace', dValue:null, gValue}),
50
+ className: 'input100',
51
+ placeholder: '请选择业务线',
52
+ labelInline:true,
53
+ groupKey:'content',
54
+ notice:'空继承上级业务线',
55
+ inline: false,
56
+ handleCustom: (cb) => {
57
+ XdBus.getParentApi('getOptionsNamespaces')()
58
+ .then(res => {
59
+ cb(res.list)
60
+ })
61
+ .catch();
62
+ }
63
+ },
64
+
65
+ {
66
+ label: "商品排序",
67
+ ele: "xd-select-list",
68
+ valueKey: "sort",
69
+ value:dataVal({data, key:'sort', dValue:'default', gValue}),
70
+ groupKey:'content',
71
+ labelInline:true,
72
+ className: 'input100',
73
+ list: [
74
+ {label: "综合排序",notice:'默认排序,多维度综合计算后的排序', value: "default"},
75
+ {label: "销量由高到低", value: "sale_num_desc"},
76
+ {label: "销量由低到高", value: "sale_num_asc"},
77
+ {label: "价格由高到低", value: "price_desc"},
78
+ {label: "价格由低到高", value: "price_asc"},
79
+ ]
80
+ },
81
+ {
82
+ label: '营销标签',
83
+ ele: 'xd-site-select-list',
84
+ valueKey: 'marketTags',
85
+ value: dataVal({data, key:'marketTags', dValue:['rec'], gValue}),
86
+ placeholder: '请选择商品营销标签,支持多个',
87
+ groupKey:'content',
88
+ labelInline: true,
89
+ className: 'input100',
90
+ setting:{multiple: true},
91
+ handleCustom({action, data}) {
92
+ /////product-public/v1/product/options
93
+ XdBus.getParentApi('getBoardOptions')(
94
+ {server:'product-public',fn:'product',path:'p1'},
95
+ {key: Date.now(),market_tag:1}
96
+ )
97
+ .then(res => {
98
+ data.cb(res.market_tag || [])
99
+ })
100
+ .catch(error => {
101
+ data.cb([])
102
+ console.error(error);
103
+ });
104
+ },
105
+ },
106
+ {
107
+ label: '平台标签',
108
+ ele: 'xd-site-select-list',
109
+ labelInline: true,
110
+ valueKey: 'isPlatformTags',
111
+ value: dataVal({data, key:'isPlatformTags', dValue:[], gValue}),
112
+ placeholder: '选择需要查询的平台标签',
113
+ className: 'input100',
114
+ groupKey:'content',
115
+ setting:{
116
+ multiple: true,
117
+ },
118
+ handleCustom({action, data}) {
119
+ //product-partner/v1/xsiteid}/product/options
120
+ XdBus.getParentApi('getBoardOptions')(
121
+ {server:'product-partner',fn:'product',path:'p2'},
122
+ {key: Date.now(),partner_product_tag: 1}
123
+ )
124
+ .then(res => {
125
+ data.cb(res['partner_product_tag'] || [])
126
+ })
127
+ .catch(error => {
128
+ data.cb([])
129
+ console.error(error);
130
+ });
131
+ },
132
+ },
133
+ {
134
+ ele: 'title',
135
+ label: '组件样式',
136
+ size: 'small',
137
+ groupKey:'content',
138
+ },
139
+ {
140
+ label: "商品布局",
141
+ ele: "xd-style-image",
142
+ groupKey: 'content',
143
+ valueKey: "row_num",
144
+ value: dataVal({data, key:'row_num', dValue:2, gValue}),
145
+ labelInline:true,
146
+ className: 'input100',
147
+ handleCustom(cusRes) {
148
+ XdBus.getParentApi('getCompStylesOptions')({
149
+ layout_ids: 'FzCwxOH7MQpT5ISYs8Xm6',
150
+ key: Date.now()
151
+ })
152
+ .then(res => {
153
+ res.list.map(item=>{
154
+ item.value = Number(item.value)
155
+ return item;
156
+ })
157
+ cusRes.data.cb(res)
158
+ })
159
+ .catch(error => {
160
+ console.error(error);
161
+ });
162
+ },
163
+ },
164
+ {
165
+ label: "商品样式",
166
+ ele: "xd-style-image",
167
+ groupKey: 'content',
168
+ valueKey: "productStyle",
169
+ cusStyle:{marginBottom: '5px'},
170
+ value: customVal({
171
+ data,
172
+ key: 'productStyle',
173
+ fields: { 'itemBgcColorStatus':['itemBgcColor'],'bgBorder':['contBorder','bs']},
174
+ gValue,
175
+ sValue:"{\"border\":0,\"backgroundColor\":\"#fff\"}",
176
+ }),
177
+ labelInline:true,
178
+ isTplRef:true,
179
+ className: 'input100',
180
+ handleCustom(cusRes) {
181
+ XdBus.getParentApi('getCompStylesOptions')({
182
+ layout_ids: 'Y4oxNuIUOgVMaTD1LeWxp',
183
+ key: Date.now()
184
+ })
185
+ .then(res => {
186
+ cusRes.data.cb(res)
187
+ })
188
+ .catch(error => {
189
+ console.error(error);
190
+ });
191
+ },
192
+ },
193
+ {
194
+ ele: 'title',
195
+ label: '展示内容',
196
+ size: 'small',
197
+ groupKey:'content',
198
+ },
199
+ ...ProductAttr(data,gValue,gColor,oldData),
200
+ //...cusPoster,
201
+ ].filter(i=>i);
202
+ }