jufubao-mall 2.0.86 → 2.0.88
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/Api.js +13 -0
- package/src/components/JfbMallProductInfo/JfbMallProductInfo.vue +40 -0
- package/src/components/JfbMallProductInfo/cusAttr/content.js +33 -0
- package/src/components/JfbMallProductList/JfbMallProductList.vue +3 -0
- package/src/components/JfbMallSearch/JfbMallSearch.vue +5 -1
package/package.json
CHANGED
|
@@ -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',
|
|
@@ -510,6 +510,9 @@
|
|
|
510
510
|
if(options.startPrice) this.startPrice = options.startPrice;
|
|
511
511
|
if( options.endPrice) this.endPrice = options.endPrice;
|
|
512
512
|
if( options.keyword) this.keyword = options.keyword;
|
|
513
|
+
// #ifdef H5
|
|
514
|
+
if( options.keyword) this.keyword = decodeURIComponent(options.keyword);
|
|
515
|
+
// #endif
|
|
513
516
|
if( options.pid) this.pid = Number(options.pid);
|
|
514
517
|
if( options.cateId || options.cateid) this.cateId = Number(options.cateId||options.cateid);
|
|
515
518
|
if( options.brand_id) {
|
|
@@ -302,8 +302,12 @@
|
|
|
302
302
|
console.log(err);
|
|
303
303
|
})
|
|
304
304
|
}else{
|
|
305
|
+
let uKey = this.keyword;
|
|
306
|
+
// #ifdef H5
|
|
307
|
+
uKey = encodeURIComponent(this.keyword);
|
|
308
|
+
// #endif
|
|
305
309
|
this.$xdUniHelper.navigateTo({
|
|
306
|
-
url: this.productListPath + `?keyword=${
|
|
310
|
+
url: this.productListPath + `?keyword=${uKey}&search_focus_back=Y`
|
|
307
311
|
})
|
|
308
312
|
}
|
|
309
313
|
},
|