jufubao-mall 2.0.86-beta6 → 2.0.87

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 (25) hide show
  1. package/get.package.path.js +22 -0
  2. package/package.json +1 -1
  3. package/src/components/JfbMallProductInfo/Api.js +13 -0
  4. package/src/components/JfbMallProductInfo/JfbMallProductInfo.vue +40 -0
  5. package/src/components/JfbMallProductInfo/cusAttr/content.js +33 -0
  6. package/.claude/settings.local.json +0 -12
  7. package/src/components/JfbMallCategoryAll/Api.js +0 -40
  8. package/src/components/JfbMallCategoryAll/Attr.js +0 -20
  9. package/src/components/JfbMallCategoryAll/JfbMallCategoryAll.vue +0 -383
  10. package/src/components/JfbMallCategoryAll/JfbMallCategoryAllLess.less +0 -80
  11. package/src/components/JfbMallCategoryAll/JfbMallCategoryAllMixin.js +0 -30
  12. package/src/components/JfbMallCategoryAll/Mock.js +0 -1333
  13. package/src/components/JfbMallCategoryAll/XdStoreProductType.vue +0 -548
  14. package/src/components/JfbMallCategoryAll/cusAttr/advanced.js +0 -28
  15. package/src/components/JfbMallCategoryAll/cusAttr/content.js +0 -158
  16. package/src/components/JfbMallCategoryAll/cusAttr/style.js +0 -527
  17. package/src/components/JfbMallCategoryProduct/Api.js +0 -71
  18. package/src/components/JfbMallCategoryProduct/Attr.js +0 -20
  19. package/src/components/JfbMallCategoryProduct/JfbMallCategoryProduct.vue +0 -1284
  20. package/src/components/JfbMallCategoryProduct/JfbMallCategoryProductLess.less +0 -80
  21. package/src/components/JfbMallCategoryProduct/JfbMallCategoryProductMixin.js +0 -30
  22. package/src/components/JfbMallCategoryProduct/Mock.js +0 -1897
  23. package/src/components/JfbMallCategoryProduct/cusAttr/advanced.js +0 -40
  24. package/src/components/JfbMallCategoryProduct/cusAttr/content.js +0 -298
  25. package/src/components/JfbMallCategoryProduct/cusAttr/style.js +0 -388
@@ -0,0 +1,22 @@
1
+ 'use strict';
2
+
3
+ /**
4
+ * @description 第三方库
5
+ * @param threePackagePath {String} 第三方库所在项目路径存放路径路
6
+ * @param packname {String} 包名字
7
+ * @returns {string|*}
8
+ */
9
+ const getPackagePath = (threePackagePath, packname = 'gxd-commands-bussiness')=>{
10
+ if(packname === 'gxd-commands-bussiness') {
11
+ return `/Users/shiyonggao/home/root/Base-Jufubao/xd-commands-bussiness/${threePackagePath}`;
12
+ }
13
+
14
+ if (packname === 'gxd-uni-library-editx') {
15
+ return `/Users/shiyonggao/home/root/Base-Jufubao/xd-uni-library-editx/${threePackagePath}`;
16
+ }
17
+
18
+ };
19
+
20
+ module.exports = {
21
+ getPackagePath
22
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jufubao-mall",
3
- "version": "2.0.86-beta6",
3
+ "version": "2.0.87",
4
4
  "private": false,
5
5
  "description": "聚福宝商城业务组件插件包",
6
6
  "main": "index.js",
@@ -116,4 +116,17 @@ module.exports = [
116
116
  isConsole: true,
117
117
  disabled: true,
118
118
  },
119
+ {
120
+ title: "根据供应商ID更新在线客服内容",
121
+ path: "/aftersale/v1/online-customer-service/update",
122
+ mapFnName: "updateCustomerService",
123
+ isRule: false,
124
+ data: {
125
+ supplier_id: ['供应商ID', 'Number', true],
126
+ content: ['在线客服内容', 'String', true],
127
+ namespace: ['业务线', 'String', true],
128
+ },
129
+ isConsole: true,
130
+ disabled: true,
131
+ }
119
132
  ];
@@ -222,6 +222,12 @@
222
222
  <xd-font-icon :icon="indexIcon" :color="iconColor"></xd-font-icon>
223
223
  <view v-if="showIconText === 'Y'" :style="{color: iconColor}">首页</view>
224
224
  </view>
225
+ <view v-if="showService === 'Y'" class="icon_tab"
226
+ :style="{width: iconWidth + 'rpx'}"
227
+ @click="toService">
228
+ <xd-font-icon :icon="serviceIcon" :color="iconColor"></xd-font-icon>
229
+ <view v-if="showIconText === 'Y'" :style="{color: iconColor}">客服</view>
230
+ </view>
225
231
  <view v-if="showCart === 'Y'" class="icon_tab"
226
232
  :style="{width: iconWidth + 'rpx'}"
227
233
  @click="toCart">
@@ -431,6 +437,7 @@
431
437
  showCart: "Y", //是否展示购物车
432
438
  showBuyNow: "Y",
433
439
  showAddCart: "Y",
440
+ showService: "Y",
434
441
  shopPath: "",
435
442
  cartPath: "",
436
443
  vipPath: "",
@@ -448,6 +455,7 @@
448
455
  //icon
449
456
  indexIcon: '',
450
457
  cartIcon: '',
458
+ serviceIcon: '',
451
459
  iconColor: '',
452
460
  noticeBackgroundColor: "",
453
461
  detailBackground: "",
@@ -759,6 +767,8 @@
759
767
  this.showCart = gCPVal(value, 'showCart', "Y");
760
768
  this.showBuyNow = gCPVal(value, 'showBuyNow', "Y");
761
769
  this.showAddCart = gCPVal(value, 'showAddCart', "Y");
770
+ this.showService = gCPVal(value, 'showService', "");
771
+ this.serviceIcon = gCPVal(value, 'serviceIcon', 'iconkefu');
762
772
  this.showIndexIcon = gCPVal(value, 'showIndexIcon', "Y");
763
773
  this.indexIcon = gCPVal(value, 'indexIcon', 'iconbhhome');
764
774
  this.cartIcon = gCPVal(value, 'cartIcon', 'icongouwuche');
@@ -1330,6 +1340,36 @@
1330
1340
  url: this.cartPath
1331
1341
  })
1332
1342
  },
1343
+ toService() {
1344
+ if(this.$configProject['isPreview']) return;
1345
+ const product = this.base_info;
1346
+ const price = this.choseSkuPrice.sale_price || (product.prices && product.prices.sale_price) || 0;
1347
+ const content = {
1348
+ title: product ? product.product_name : '',
1349
+ desc: this.choseSkuName || '',
1350
+ picture: product && product.thumb ? getServiceUrl(product.thumb, 'size4') : '',
1351
+ url: location.href,
1352
+ goodsId: product ? product.product_id + '' : 0,
1353
+ note: "¥" + price/100,
1354
+ };
1355
+ jfbRootExec("updateCustomerService", {
1356
+ vm: this,
1357
+ data: {
1358
+ namespace: this.xnamespace,
1359
+ supplier_id: this.brand_info.supplier_id,
1360
+ content: JSON.stringify(content)
1361
+ }
1362
+ }).then(res => {
1363
+ this.doOpenCustomerService(res);
1364
+ })
1365
+ },
1366
+ doOpenCustomerService(data) {
1367
+ const isSandbox = this.projectAttr.api_host && this.projectAttr.api_host.includes('sandbox');
1368
+ let host = isSandbox ? 'sandbox-misc.jufubao.cn' : location.host;
1369
+ let query = `from=product&sdk_key=${data.app_key}&data_key=${data.redis_key}&api=${this.projectAttr.api_host}`;
1370
+ let url = `http://${host}/cm/index.html?${query}`;
1371
+ this.$xdUniHelper.redirectTo({ url });
1372
+ },
1333
1373
  handleConfirmJdSku({ number, type }){
1334
1374
  this.jdSkuShow = false;
1335
1375
  this.curSku = {number};
@@ -245,6 +245,39 @@ export default (data, gValue, gColor, oldData) => {
245
245
  ele: 'xd-line',
246
246
  groupKey: 'content',
247
247
  },
248
+ {
249
+ label: '底部客服',
250
+ ele: 'xd-cus-switch',
251
+ valueKey: 'showService',
252
+ value: dataVal({ data, key: 'showService', dValue: gValue.isAdd && gValue.isFirst ? 'Y' : "N", gValue }),
253
+ className: 'input100',
254
+ groupKey: 'content',
255
+ labelInline: true,
256
+ cusStyle: { marginBottom: '10px' },
257
+ hidden: data.showBuyNow !== 'Y',
258
+ setting: {
259
+ tips: ['显示', '不显示'],
260
+ isBackType: 'string'
261
+ },
262
+ },
263
+ { ele: 'group_start' },
264
+ {
265
+ label: '图标样式',
266
+ ele: 'xd-select-list',
267
+ valueKey: 'serviceIcon',
268
+ labelInline: true,
269
+ value: dataVal({ data, key: 'serviceIcon', dValue: '', gValue }),
270
+ placeholder: '请输入客服ICON',
271
+ className: 'input60',
272
+ groupKey: 'content',
273
+ list: ICONS,
274
+ hidden: data.showService !== 'Y'
275
+ },
276
+ { ele: 'group_end' },
277
+ {
278
+ ele: 'xd-line',
279
+ groupKey: 'content',
280
+ },
248
281
  {
249
282
  label: '自定义内容',
250
283
  ele: 'xd-cus-switch',
@@ -1,12 +0,0 @@
1
- {
2
- "permissions": {
3
- "allow": [
4
- "Bash(git checkout *)",
5
- "Bash(npx lessc *)",
6
- "Bash(python3 *)",
7
- "Bash(sips -g pixelWidth -g pixelHeight \"/Users/zxd/Workspaces/jufubao-mall/temp_screenshot.jpg\")",
8
- "Bash(identify \"/Users/zxd/Workspaces/jufubao-mall/temp_screenshot.jpg\")",
9
- "Bash(sips *)"
10
- ]
11
- }
12
- }
@@ -1,40 +0,0 @@
1
- 'use strict';
2
-
3
- /**
4
- * @description API模型
5
- * 建议:Ffff=>模块 Xxxx=>自定义名字
6
- * 获取单记录(getByIdFfffXxxx)
7
- * 获取列表记录(getByListFfffXxxx)
8
- * 添加列表记录(addFfffXxxxx)
9
- * 删除列表记录(removeFfffXxxxx|deleteFfffXxxx)
10
- * 更新列表记录(updateFfffXxxxx)
11
- * @type {*[]}
12
- */
13
- module.exports = [
14
- {
15
- mapFnName: 'getMallCategoryTree',
16
- title: '分类 - 树列表',
17
- path: '/product/v1/:xnamespace/category/index',
18
- isRule: false,
19
- params: {
20
- xnamespace: ['xnamespace', 'String', '必选'],
21
- group_id: ['分组ID', 'Number', '必选'],
22
- need_tag: ['分类', 'Number', '必选'],
23
- },
24
- isConsole: true,
25
- disabled: true,
26
- },
27
- {
28
- mapFnName: 'getMallCategoryChildren',
29
- title: '分类 - 获取子级',
30
- path: '/product/v1/:xnamespace/category/children',
31
- isRule: false,
32
- params: {
33
- xnamespace: ['xnamespace', 'String', '必选'],
34
- group_id: ['分组ID', 'Number', '必选'],
35
- parent_id: ['父级ID 0时只获取第一级', 'Number', '必选'],
36
- },
37
- isConsole: true,
38
- disabled: true,
39
- },
40
- ];
@@ -1,20 +0,0 @@
1
- 'use strict';
2
- import style from "./cusAttr/style";
3
- import advanced from "./cusAttr/advanced";
4
- import content from "./cusAttr/content";
5
-
6
- /**
7
- * @description 当表单组件中有联动操作时候,使用方法进行返回
8
- */
9
- export default {
10
- style: [],
11
- advanced: [],
12
- content: (data, gValue, gColor, oldData={})=>{
13
-
14
- return [
15
- ...content(data, gValue,gColor,oldData),
16
- ...style(data, gValue,gColor,oldData),
17
- ...advanced(data),
18
- ].filter(i=>i)
19
- },
20
- };
@@ -1,383 +0,0 @@
1
- <template>
2
- <view
3
- class="jfb-mall-category-all"
4
- @click="handleEditxSelect"
5
- :class="{ editx : isEditx && active }"
6
- >
7
- <!--#ifdef H5-->
8
- <view
9
- class="jfb-mall-category-all__edit"
10
- :class="{ editx : isEditx && active }"
11
- v-if="isEditx && active"
12
- >
13
- <view class="jfb-mall-category-all__edit-icon" @click.stop="delEdit">
14
- <xd-font-icon icon="iconshanchu-01" color="#fff" size="30"></xd-font-icon>
15
- </view>
16
- </view>
17
- <!-- #endif -->
18
- <view class="jfb-mall-category-all__body">
19
- <view v-if="loadingList" class="skeleton-wrap">
20
- <view class="type-left">
21
- <view v-for="i in 10" :key="i">
22
- <view class="cate-item"></view>
23
- </view>
24
- </view>
25
- <view class="type-right">
26
- <view v-for="i in 10" :key="i">
27
- <view class="type_title"><view></view></view>
28
- <view class="type_list">
29
- <view v-for="ii in 3" :key="ii" class="type_item">
30
- <view></view>
31
- <view></view>
32
- </view>
33
- </view>
34
- </view>
35
- </view>
36
- </view>
37
- <xd-store-product-type
38
- :key="navKey"
39
- v-if="onLoadStatus"
40
- :layout-info="layoutInfo"
41
- :color="mainColor"
42
- :default-index="0"
43
- :style-config="styleConfig"
44
- :layout-style="layoutStyle"
45
- @onNavList="handleNavList"
46
- @onToDetail="handleToDetail"
47
- ></xd-store-product-type>
48
- </view>
49
- </view>
50
- </template>
51
-
52
- <script>
53
- import XdFontIcon from "@/components/XdFontIcon/XdFontIcon";
54
- import XdStoreProductType from "./XdStoreProductType";
55
- import {jfbRootExec} from "@/utils/xd.event";
56
- import JfbMallCategoryAllMixin from "./JfbMallCategoryAllMixin";
57
- import componentsMixins from "@/mixins/componentsMixins";
58
- import extsMixins from "@/mixins/extsMixins";
59
- import { getContainerPropsValue, gCPVal } from "@/utils/xd.base";
60
- import getServiceUrl from "@/common/getServiceUrl";
61
- import Color from "color";
62
-
63
- export default {
64
- name: "JfbMallCategoryAll",
65
- components: {
66
- XdFontIcon,
67
- XdStoreProductType
68
- },
69
- mixins: [componentsMixins, extsMixins, JfbMallCategoryAllMixin],
70
- data() {
71
- return {
72
- closeMask: true,
73
- isPreview: false,
74
- allNavList: [],
75
- loadingList: true,
76
- xnamespace: "",
77
- listPath: "",
78
- selfMask: true,
79
- onLoadStatus: false,
80
- need_tag: null,
81
- navKey: "navKey",
82
-
83
- // content 属性
84
- showRecommend: 'Y',
85
- categoryParentType: 'root',
86
- categoryParent: '',
87
- recommendName: '',
88
- layoutStyle: '1',
89
-
90
- // 左侧导航样式
91
- leftNavName: {},
92
- leftNavItemSpacing: 0,
93
- leftNavBgColor: '#F7F7F7',
94
- leftNavBorder: '',
95
- leftNavRadius: '0',
96
- leftNavShadow: '',
97
- leftNavPadding: {top:0, bottom:0, left:0, right:0},
98
- // 右侧导航样式
99
- rightNavMargin: [0],
100
- rightNavPadding: {top:0, bottom:0, left:0, right:0},
101
- rightNavBgColor: '#fff',
102
- rightNavIconSize: 120,
103
- rightNavIconPadding: 0,
104
- rightNavIconTextColor: '#666',
105
- rightNavIconTextSize: '12',
106
- rightNavIconRadius: 'small',
107
- rightNavIconBorder: '',
108
- rightNavIconShadow: '',
109
- rightNavIconBgColor: '',
110
- rightNavIconTextGap: 0,
111
- }
112
- },
113
- computed: {
114
- styleConfig() {
115
- return {
116
- // content
117
- xnamespace: this.xnamespace,
118
- showRecommend: this.showRecommend,
119
- need_tag: this.need_tag,
120
- categoryParentType: this.categoryParentType,
121
- categoryParent: this.categoryParent,
122
- recommendName: this.recommendName,
123
- layoutStyle: this.layoutStyle,
124
- listPath: this.listPath,
125
- // 左侧导航
126
- leftNavName: this.leftNavName,
127
- leftNavItemSpacing: this.leftNavItemSpacing,
128
- leftNavBgColor: this.leftNavBgColor,
129
- leftNavBorder: this.leftNavBorder,
130
- leftNavRadius: this.leftNavRadius,
131
- leftNavShadow: this.leftNavShadow,
132
- leftNavPadding: this.getMarginAndPadding(this.leftNavPadding, 0),
133
- // 右侧导航
134
- rightNavMargin: this.getMarginAndPadding(this.rightNavMargin, 0),
135
- rightNavPadding: this.getMarginAndPadding(this.rightNavPadding, 0),
136
- rightNavBgColor: this.rightNavBgColor,
137
- rightNavIconSize: this.rightNavIconSize,
138
- rightNavIconPadding: this.rightNavIconPadding,
139
- rightNavIconTextColor: this.rightNavIconTextColor,
140
- rightNavIconTextSize: this.rightNavIconTextSize,
141
- rightNavIconRadius: this.rightNavIconRadius,
142
- rightNavIconBorder: this.rightNavIconBorder,
143
- rightNavIconShadow: this.rightNavIconShadow,
144
- rightNavIconBgColor: this.rightNavIconBgColor,
145
- rightNavIconTextGap: this.rightNavIconTextGap,
146
- }
147
- }
148
- },
149
- watch: {
150
- container(value, oldValue) {
151
- if (JSON.stringify(value) === JSON.stringify(oldValue)) return;
152
- if (this.$configProject['isPreview']) this.init(value)
153
- },
154
- need_tag: {
155
- deep: true,
156
- handler(n, o) {
157
- this.navKey = new Date().getTime()
158
- }
159
- },
160
- recommendName: {
161
- handler(n) {
162
- if(this.isPreview && n && this.allNavList.length > 0) {
163
- this.allNavList[0].category_name = n
164
- }
165
- }
166
- },
167
- },
168
- created() {
169
- this.init(this.container);
170
- this.isPreview = this.$configProject.isPreview;
171
- },
172
- methods: {
173
- onJfbLoad(options) {
174
- this.setNameSpace(options);
175
- this.onLoadStatus = true;
176
- },
177
- init(container) {
178
- this.listPath = getContainerPropsValue(container, 'content.listPath', {value: ""}).value;
179
- this.xnamespace = getContainerPropsValue(container, 'content.xnamespace', this.projectAttr.business_code);
180
- this.showRecommend = gCPVal(container, 'showRecommend', 'Y');
181
- this.need_tag = getContainerPropsValue(container, 'content.need_tag', null);
182
- this.categoryParentType = gCPVal(container, 'categoryParentType', 'root');
183
- this.categoryParent = gCPVal(container, 'categoryParent', '');
184
- this.recommendName = gCPVal(container, 'recommendName', '推荐');
185
- this.layoutStyle = gCPVal(container, 'layoutStyle', '1');
186
-
187
- // ===== 左侧导航样式 =====
188
- this.leftNavName = gCPVal(container, 'leftNavName', {
189
- color: '#333',
190
- actColor: this.mainColor,
191
- fontSize: '24rpx',
192
- actFontSize: '24rpx',
193
- fontWeight: 'normal',
194
- bgColor: '',
195
- borderStyle: 'solid'
196
- }, {sKey:'leftNavNameStatus', fields:['leftNavName']});
197
- this.leftNavItemSpacing = gCPVal(container, 'leftNavItemSpacing', 0, {sKey:'leftNavItemSpacingStatus', fields:['leftNavItemSpacing']});
198
- this.leftNavBgColor = gCPVal(container, 'leftNavBgColor', '#FFFFFF', {sKey:'leftNavBgStatus', fields:['leftNavBgColor']});
199
- this.leftNavBorder = gCPVal(container, 'leftNavBorder', 'none', {isBorder: true});
200
- this.leftNavRadius = gCPVal(container, 'leftNavRadius', '0', {sKey:'leftNavRadiusStatus', fields:['leftNavRadius']}) || 0;
201
- this.leftNavShadow = gCPVal(container, 'leftNavShadow', {width:20, color:'rgba(0,0,0,0)'}, {isShadow: true});
202
- this.leftNavPadding = gCPVal(container, 'leftNavPadding', {top:0, bottom:0, left:0, right:0}, {sKey:'leftNavPaddingStatus', fields:['leftNavPadding'], isPMR: true});
203
-
204
- // ===== 右侧导航样式 =====
205
- this.rightNavMargin = gCPVal(container, 'rightNavMargin', {top:24, bottom:24, left:24, right:24}, {sKey:'rightNavMarginStatus', fields:['rightNavMargin'], isPMR: true});
206
- this.rightNavPadding = gCPVal(container, 'rightNavPadding', {top:0, bottom:0, left:0, right:0}, {sKey:'rightNavPaddingStatus', fields:['rightNavPadding'], isPMR: true});
207
- this.rightNavBgColor = gCPVal(container, 'rightNavBgColor', '#f8f8f8', {sKey:'rightNavBgStatus', fields:['rightNavBgColor']});
208
- this.rightNavIconSize = gCPVal(container, 'rightNavIconSize', 120, {sKey:'rightNavIconSizeStatus', fields:['rightNavIconSize']});
209
- this.rightNavIconPadding = gCPVal(container, 'rightNavIconPadding', [12], {sKey:'rightNavIconPaddingStatus', fields:['rightNavIconPadding']});
210
- this.rightNavIconTextColor = gCPVal(container, 'rightNavIconTextColor', '#666', {sKey:'rightNavIconTextStatus', fields:['rightNavIconTextColor','rightNavIconTextSize']});
211
- this.rightNavIconTextSize = gCPVal(container, 'rightNavIconTextSize', '24', {sKey:'rightNavIconTextStatus', fields:['rightNavIconTextColor','rightNavIconTextSize']});
212
- this.rightNavIconRadius = gCPVal(container, 'rightNavIconRadius', '16', {sKey:'rightNavIconRadiusStatus', fields:['rightNavIconRadius']});
213
- this.rightNavIconBorder = gCPVal(container, 'rightNavIconBorder', {}, {isBorder: true});
214
- this.rightNavIconShadow = gCPVal(container, 'rightNavIconShadow', [{color: 'rgba(0,0,0,.15)', width: '10'},'none'], { isShadow: true});
215
- this.rightNavIconBgColor = gCPVal(container, 'rightNavIconBgColor', '', {sKey:'rightNavIconBgStatus', fields:['rightNavIconBgColor']});
216
- this.rightNavIconTextGap = gCPVal(container, 'rightNavIconTextGap', 10, {sKey:'rightNavIconTextGapStatus', fields:['rightNavIconTextGap']});
217
- console.log('rightNavIconShadow', this.rightNavIconShadow)
218
- },
219
- handleNavList(resolve) {
220
- try {
221
- jfbRootExec("getMallCategoryTree", {
222
- vm: this,
223
- data: {
224
- xnamespace: this.xnamespace,
225
- need_tag: this.need_tag,
226
- group_id: 'default',
227
- root_category_id: this.categoryParent || 0,
228
- }
229
- }).then(res => {
230
- this.loadingList = false;
231
- if(this.isPreview && !this.need_tag) {
232
- this.allNavList = this.allNavList.filter(item => {
233
- return item.category_id !== 5555
234
- })
235
- }
236
- if(this.isPreview && this.need_tag) {
237
- res.items.unshift({
238
- category_name: this.recommendName,
239
- category_id: 5555,
240
- category_icon: 'https://jfb-public-images.oss-cn-qingdao.aliyuncs.com/uploads/20230317/43cc2cb3c71edb6415ec8cb662693471.webp.jpg',
241
- parent_id: 2,
242
- tag: 'rec',
243
- children: [
244
- {
245
- category_name: '儿童车安全椅',
246
- category_id: 4337,
247
- category_icon: 'https://jfb-public-images.oss-cn-qingdao.aliyuncs.com/uploads/20230317/7a93387dedfc29f61745da6fc51517f4.jpg',
248
- parent_id: 4360,
249
- tag: 'rec',
250
- children: []
251
- },
252
- {
253
- category_name: '纸尿裤拉拉裤',
254
- category_id: 4338,
255
- category_icon: 'https://jfb-public-images.oss-cn-qingdao.aliyuncs.com/uploads/20230317/e3dc107d6c5fe5cce55a36f3631386da.png',
256
- parent_id: 4360,
257
- tag: '',
258
- children: []
259
- },
260
- {
261
- category_name: '营养辅食奶粉',
262
- category_id: 4339,
263
- category_icon: 'https://jfb-public-images.oss-cn-qingdao.aliyuncs.com/uploads/20230317/6a2edc1bf28f44671bdac27b73a0e0a5.jpg',
264
- parent_id: 4360,
265
- tag: '',
266
- children: []
267
- },
268
- {
269
- category_name: '孕产妇用品',
270
- category_id: 4340,
271
- category_icon: 'https://jfb-public-images.oss-cn-qingdao.aliyuncs.com/uploads/20230317/20c4d05eff9cb34757b42de770536c26.webp.jpg',
272
- parent_id: 4360,
273
- tag: '',
274
- children: []
275
- },
276
- {
277
- category_name: '婴童用品',
278
- category_id: 4342,
279
- category_icon: 'https://jfb-public-images.oss-cn-qingdao.aliyuncs.com/uploads/20230317/b8ec88d8b68a2cb50537a792820c6960.webp.jpg',
280
- parent_id: 4360,
281
- tag: '',
282
- children: []
283
- }
284
- ]
285
- })
286
- }
287
- let items = res.items.map(item => {
288
- //category_id === 0 时,认为是推荐分类
289
- if(item.category_id === 0) item.category_name = this.recommendName;
290
- item['category_icon'] = getServiceUrl(item['category_icon'], 'size3');
291
- item.children = item.children.map(child => {
292
- child['category_icon'] = getServiceUrl(child['category_icon'], 'size3');
293
- return child;
294
- });
295
- return item;
296
- });
297
- this.allNavList = items;
298
- resolve(items)
299
- }).catch(err => {
300
- this.$xdLog.catch(err);
301
- resolve([])
302
- })
303
- } catch (error) {
304
- this.$xdLog.catch(error);
305
- }
306
- },
307
- handleToDetail(item) {
308
- let params = `pid=${item.pid}&need_tag=${this.need_tag}`;
309
- if (item.cateId) {
310
- params += `&cateId=${item.cateId}`;
311
- }
312
- this.$xdUniHelper.navigateTo({
313
- url: `${this.listPath}?${params}`
314
- })
315
- },
316
- onJfbBack(options) {
317
- this.$xdUniHelper.navigateBack()
318
- },
319
- }
320
- }
321
- </script>
322
-
323
- <style scoped lang="less">
324
- @import "./JfbMallCategoryAllLess.less";
325
-
326
- .jfb-mall-category-all {
327
- &__body {
328
- position: relative;
329
- overflow: hidden;
330
- z-index: 2;
331
-
332
- .skeleton-wrap {
333
- display: flex;
334
- .type-left {
335
- width: 200rpx;
336
- display: flex;
337
- flex-direction: column;
338
- align-items: center;
339
-
340
- & > view {
341
- height: 110rpx;
342
- display: flex;
343
- align-items: center;
344
- }
345
- .cate-item {
346
- .skeleton-item(100rpx);
347
- }
348
- }
349
- .type-right {
350
- flex: 1;
351
- width: 100%;
352
- padding: 20rpx;
353
- .type_title {
354
- height: 100rpx;
355
- display: flex;
356
- align-items: center;
357
- & > view {
358
- .skeleton-item(150rpx);
359
- }
360
- margin-bottom: 20rpx;
361
- }
362
- .type_list {
363
- display: flex;
364
- justify-content: space-around;
365
- margin-bottom: 60rpx;
366
- .type_item {
367
- display: flex;
368
- flex-direction: column;
369
- align-items: center;
370
- & > view:first-child {
371
- .skeleton-item(120rpx, 120rpx, 50%);
372
- }
373
- & > view:last-child {
374
- .skeleton-item(100rpx, 24rpx);
375
- margin-top: 10rpx;
376
- }
377
- }
378
- }
379
- }
380
- }
381
- }
382
- }
383
- </style>