diff --git a/pages/goods/details/components/buy-bar/index.wxml b/pages/goods/details/components/buy-bar/index.wxml
index 37538c6..0f022d4 100644
--- a/pages/goods/details/components/buy-bar/index.wxml
+++ b/pages/goods/details/components/buy-bar/index.wxml
@@ -17,7 +17,7 @@
{{shopCartNum > 99 ? '99+' : shopCartNum}}
-
+
{{item.title}}
diff --git a/pages/goods/details/index.js b/pages/goods/details/index.js
index 7a57523..52a9555 100644
--- a/pages/goods/details/index.js
+++ b/pages/goods/details/index.js
@@ -18,6 +18,9 @@ import {
getGoodsDetailsCommentList,
getGoodsDetailsCommentsCount,
} from '~/services/good/fetchGoodsDetailsComments';
+import {
+ getCustomerServiceList
+} from '~/services/usercenter/getCustomerServiceList';
import {
cdnBase
@@ -63,11 +66,10 @@ Page({
],
storeLogo: `${imgPrefix}common/store-logo.png`,
storeName: '云mall标准版旗舰店',
- jumpArray: [
- {
+ jumpArray: [{
title: '客服',
url: '',
- iconName: 'user_list',
+ iconName: 'user-list',
},
{
title: '收藏',
@@ -112,6 +114,8 @@ Page({
duration: 500,
interval: 5000,
soldNum: 0, // 已售数量
+ showCustomerService: false, //客服
+ CustomerService: {}, //客服数据
},
handlePopupHide() {
@@ -136,15 +140,40 @@ Page({
this.showSkuSelectPopup(2);
},
+ // 获取客服列表
+ onGetCustomerServiceList() {
+ getCustomerServiceList().then((res) => {
+ if (res.code == 200) {
+ this.setData({
+ CustomerService: res.data[0]
+ })
+ }
+ })
+ },
+
+ closeCustomerService() {
+ this.setData({
+ showCustomerService: false
+ });
+ },
+
toNav(e) {
const {
url,
title
} = e.detail;
+ if (title == "客服") {
+ this.setData({
+ showCustomerService: true,
+ });
+ }
+
if (title == "收藏") {
- if(this.data.details.isCollect){
- CancelGoodsCollection({goodsGuid: this.data.details.spuId}).then(() => {
+ if (this.data.details.isCollect) {
+ CancelGoodsCollection({
+ goodsGuid: this.data.details.spuId
+ }).then(() => {
Toast({
context: this,
selector: '#t-toast',
@@ -153,9 +182,10 @@ Page({
duration: 1000,
});
})
- }
- else{
- addOrUpdateGoodsCollection({goodsGuid: this.data.details.spuId}).then(() => {
+ } else {
+ addOrUpdateGoodsCollection({
+ goodsGuid: this.data.details.spuId
+ }).then(() => {
Toast({
context: this,
selector: '#t-toast',
@@ -477,12 +507,11 @@ Page({
// details.desc = details.desc.replace(/
]*style\s*=\s*(['"])[^'"]*\1[^>]*>/gi, '
]*>/gi, '
');
if (details.isCollect === true) {
- this.data.jumpArray[1].iconName = 'star_filled';
+ this.data.jumpArray[1].iconName = 'star-filled';
this.setData({
jumpArray: this.data.jumpArray
})
- }
- else{
+ } else {
this.data.jumpArray[1].iconName = 'star';
this.setData({
jumpArray: this.data.jumpArray
@@ -617,5 +646,6 @@ Page({
this.getDetail(spuId);
this.getCommentsList(spuId);
this.getCommentsStatistics(spuId);
+ this.onGetCustomerServiceList()
},
});
\ No newline at end of file
diff --git a/pages/goods/details/index.wxml b/pages/goods/details/index.wxml
index e751166..35ee1a3 100644
--- a/pages/goods/details/index.wxml
+++ b/pages/goods/details/index.wxml
@@ -13,27 +13,21 @@
> -->
-
-
-
-
+
+
+
+
-
-
-
-
+
+
+
+
-
+
起
@@ -51,7 +45,7 @@
-->
-
+
{{details.title}}
@@ -90,13 +84,7 @@
@@ -137,62 +125,25 @@
-
+
-