Commit eeec174b1e331d253abbcd7ab49bb139bd7aeae4
1 parent
0542df7a
预售、商品、个人中心、幸运购、服务卡客服修改
Showing
12 changed files
with
247 additions
and
53 deletions
app.wxss
@@ -744,11 +744,20 @@ background: #ffe3e2; | @@ -744,11 +744,20 @@ background: #ffe3e2; | ||
744 | /* 图标字体(ty) */ | 744 | /* 图标字体(ty) */ |
745 | @font-face { | 745 | @font-face { |
746 | font-family: 'iconfont'; /* Project id 2054717 */ | 746 | font-family: 'iconfont'; /* Project id 2054717 */ |
747 | - src: url('//at.alicdn.com/t/font_2054717_o34jrbrtxpk.woff2?t=1645781927179') format('woff2'), | ||
748 | - url('//at.alicdn.com/t/font_2054717_o34jrbrtxpk.woff?t=1645781927179') format('woff'), | ||
749 | - url('//at.alicdn.com/t/font_2054717_o34jrbrtxpk.ttf?t=1645781927179') format('truetype'); | 747 | + src: url('//at.alicdn.com/t/font_2054717_qbvqi1zioy.woff2?t=1646731629521') format('woff2'), |
748 | + url('//at.alicdn.com/t/font_2054717_qbvqi1zioy.woff?t=1646731629521') format('woff'), | ||
749 | + url('//at.alicdn.com/t/font_2054717_qbvqi1zioy.ttf?t=1646731629521') format('truetype'); | ||
750 | } | 750 | } |
751 | 751 | ||
752 | +.icon-kefu1:before { | ||
753 | + content: "\e666"; | ||
754 | +} | ||
755 | + | ||
756 | +.icon-dianhua:before { | ||
757 | + content: "\e623"; | ||
758 | +} | ||
759 | + | ||
760 | + | ||
752 | .icon-infofill:before { | 761 | .icon-infofill:before { |
753 | content: "\e6e6"; | 762 | content: "\e6e6"; |
754 | } | 763 | } |
packageA/pages/goodsInfo/goodsInfo.js
@@ -208,6 +208,8 @@ Page({ | @@ -208,6 +208,8 @@ Page({ | ||
208 | // 秒杀 | 208 | // 秒杀 |
209 | prom_st: 1, | 209 | prom_st: 1, |
210 | prom_r_null: 0, | 210 | prom_r_null: 0, |
211 | + | ||
212 | + hiddenCS: true, | ||
211 | }, | 213 | }, |
212 | 214 | ||
213 | //------初始化加载---------- | 215 | //------初始化加载---------- |
@@ -1105,29 +1107,13 @@ Page({ | @@ -1105,29 +1107,13 @@ Page({ | ||
1105 | }); | 1107 | }); |
1106 | } | 1108 | } |
1107 | } | 1109 | } |
1108 | -<<<<<<< HEAD | ||
1109 | }, | 1110 | }, |
1111 | + | ||
1110 | //---------联系客服------------ | 1112 | //---------联系客服------------ |
1111 | contactService: function () { | 1113 | contactService: function () { |
1112 | - this.getTel() | ||
1113 | - .then(() => { | ||
1114 | - if(self.data.store_tel) { | ||
1115 | - wx.showModal({ | ||
1116 | - title: '联系客服', | ||
1117 | - content: '客服热线:' + self.data.store_tel, | ||
1118 | - confirmText: '拨打', | ||
1119 | - success(res) { | ||
1120 | - if(res.confirm) { | ||
1121 | - getApp().globalData.no_clear = 1; | ||
1122 | - wx.makePhoneCall({ | ||
1123 | - phoneNumber: self.data.store_tel, | ||
1124 | - }); | ||
1125 | - }; | ||
1126 | - }, | ||
1127 | - }); | ||
1128 | - }; | ||
1129 | - }); | 1114 | + getApp().com_call(this); |
1130 | }, | 1115 | }, |
1116 | + | ||
1131 | // 获取客服电话 | 1117 | // 获取客服电话 |
1132 | getTel() { | 1118 | getTel() { |
1133 | return new Promise((resolve, reject) => { | 1119 | return new Promise((resolve, reject) => { |
@@ -1158,14 +1144,8 @@ Page({ | @@ -1158,14 +1144,8 @@ Page({ | ||
1158 | }); | 1144 | }); |
1159 | }); | 1145 | }); |
1160 | }, | 1146 | }, |
1161 | -======= | ||
1162 | - }, | ||
1163 | 1147 | ||
1164 | - //---------联系客服------------ | ||
1165 | - contactService: function() { | ||
1166 | - getApp().con_Service(); | ||
1167 | - }, | ||
1168 | ->>>>>>> 6cc9871992b5529c4963f34338001ebc04f1af34 | 1148 | + |
1169 | //-------获取购物车数量---------- | 1149 | //-------获取购物车数量---------- |
1170 | requestCardNum: function() { | 1150 | requestCardNum: function() { |
1171 | var t = this; | 1151 | var t = this; |
@@ -3224,7 +3204,35 @@ Page({ | @@ -3224,7 +3204,35 @@ Page({ | ||
3224 | 3204 | ||
3225 | click_contact:function () { | 3205 | click_contact:function () { |
3226 | getApp().globalData.no_clear=1; | 3206 | getApp().globalData.no_clear=1; |
3227 | - } | 3207 | + }, |
3208 | + | ||
3209 | + //打开客服操作菜单 | ||
3210 | + openCS() { | ||
3211 | + // csType/在线客服设置: | ||
3212 | + // 0关闭(如果有设置热线电话,则显示拨打热线电话)、 | ||
3213 | + // 1小程序客服、 | ||
3214 | + // 2企业微信客服 | ||
3215 | + let csType = this.data.sys_switch.weapp_customertype; | ||
3216 | + if(csType == 0) { | ||
3217 | + // 获取电话号码 | ||
3218 | + this.contactService(); | ||
3219 | + } else { | ||
3220 | + this.getTel() | ||
3221 | + .then(() => { | ||
3222 | + self.setData({ | ||
3223 | + hiddenCS: false, | ||
3224 | + }); | ||
3225 | + }); | ||
3226 | + | ||
3227 | + }; | ||
3228 | + }, | ||
3229 | + | ||
3230 | + //关闭客服操作菜单 | ||
3231 | + closeCS() { | ||
3232 | + this.setData({ | ||
3233 | + hiddenCS: true, | ||
3234 | + }); | ||
3235 | + }, | ||
3228 | 3236 | ||
3229 | 3237 | ||
3230 | 3238 |
packageA/pages/goodsInfo/goodsInfo.wxml
@@ -506,7 +506,7 @@ | @@ -506,7 +506,7 @@ | ||
506 | <view class="join-cart jc_sb ai_c"> | 506 | <view class="join-cart jc_sb ai_c"> |
507 | 507 | ||
508 | <view class="flex"> | 508 | <view class="flex"> |
509 | - <button wx:if="{{sys_switch.weapp_customertype==1}}" class="custom-service cart-ico new_split pdh20" open-type="contact" bindtap="click_contact" | 509 | + <!-- <button wx:if="{{sys_switch.weapp_customertype==1}}" class="custom-service cart-ico new_split pdh20" open-type="contact" bindtap="click_contact" |
510 | session-from="wechat|{{userInfo.user_id}}|{{userInfo.nickname}}|{{userInfo.head_pic}}"> | 510 | session-from="wechat|{{userInfo.user_id}}|{{userInfo.nickname}}|{{userInfo.head_pic}}"> |
511 | <image class="cs-img" src="{{iurl}}/miniapp/images/custom-service.png"></image> | 511 | <image class="cs-img" src="{{iurl}}/miniapp/images/custom-service.png"></image> |
512 | <view>客服</view> | 512 | <view>客服</view> |
@@ -521,6 +521,11 @@ | @@ -521,6 +521,11 @@ | ||
521 | <view wx:else class="custom-service cart-ico new_split pdh20" bindtap="contactService" style="text-align: center"> | 521 | <view wx:else class="custom-service cart-ico new_split pdh20" bindtap="contactService" style="text-align: center"> |
522 | <image class="cs-img" src="{{iurl}}/miniapp/images/custom-service.png"></image> | 522 | <image class="cs-img" src="{{iurl}}/miniapp/images/custom-service.png"></image> |
523 | <view>客服</view> | 523 | <view>客服</view> |
524 | + </view> --> | ||
525 | + | ||
526 | + <view class="custom-service cart-ico new_split pdh20" bindtap="openCS" style="text-align: center"> | ||
527 | + <image class="cs-img" src="{{iurl}}/miniapp/images/custom-service.png"></image> | ||
528 | + <view>客服</view> | ||
524 | </view> | 529 | </view> |
525 | 530 | ||
526 | <view bindtap="collectGoods" class="custom-service cart-ico new_split t-c pdh20"> | 531 | <view bindtap="collectGoods" class="custom-service cart-ico new_split t-c pdh20"> |
@@ -902,7 +907,7 @@ | @@ -902,7 +907,7 @@ | ||
902 | </view> | 907 | </view> |
903 | </view> | 908 | </view> |
904 | </view> | 909 | </view> |
905 | -<<<<<<< HEAD | 910 | + |
906 | 911 | ||
907 | <!-- 弹起来,购买预热商品的普通购买 --> | 912 | <!-- 弹起来,购买预热商品的普通购买 --> |
908 | <view hidden="{{!openSpecModal_flash_normal}}"> | 913 | <view hidden="{{!openSpecModal_flash_normal}}"> |
@@ -913,5 +918,4 @@ | @@ -913,5 +918,4 @@ | ||
913 | <include src="../../../components/com_servicer/com_servicer.wxml"/> | 918 | <include src="../../../components/com_servicer/com_servicer.wxml"/> |
914 | 919 | ||
915 | 920 | ||
916 | -======= | ||
917 | ->>>>>>> 6cc9871992b5529c4963f34338001ebc04f1af34 | 921 | + |
packageC/pages/luckyGo/luckyGo_goodsInfo/luckyGo_goodsInfo.js
@@ -8,6 +8,7 @@ var t = require("../../../../utils/util.js"), | @@ -8,6 +8,7 @@ var t = require("../../../../utils/util.js"), | ||
8 | oo = s.globalData, | 8 | oo = s.globalData, |
9 | o = s.globalData.setting, | 9 | o = s.globalData.setting, |
10 | os = o; | 10 | os = o; |
11 | +let self = null; | ||
11 | 12 | ||
12 | //评价加载更多 | 13 | //评价加载更多 |
13 | var more = function (e) { | 14 | var more = function (e) { |
@@ -281,11 +282,13 @@ Page({ | @@ -281,11 +282,13 @@ Page({ | ||
281 | surplus: 0, | 282 | surplus: 0, |
282 | canBuy: false, | 283 | canBuy: false, |
283 | btnHidden: false, | 284 | btnHidden: false, |
285 | + | ||
286 | + hiddenCS: true, | ||
284 | }, | 287 | }, |
285 | 288 | ||
286 | //------初始化加载---------- | 289 | //------初始化加载---------- |
287 | onLoad: function (t) { | 290 | onLoad: function (t) { |
288 | - | 291 | + self = this; |
289 | // console.log('onload'); | 292 | // console.log('onload'); |
290 | if (t && t.group_id) { | 293 | if (t && t.group_id) { |
291 | this.data.group_id = t.group_id; | 294 | this.data.group_id = t.group_id; |
@@ -6491,7 +6494,35 @@ Page({ | @@ -6491,7 +6494,35 @@ Page({ | ||
6491 | 6494 | ||
6492 | click_contact:function () { | 6495 | click_contact:function () { |
6493 | getApp().globalData.no_clear=1; | 6496 | getApp().globalData.no_clear=1; |
6494 | - } | 6497 | + }, |
6498 | + | ||
6499 | + //打开客服操作菜单 | ||
6500 | + openCS() { | ||
6501 | + // csType/在线客服设置: | ||
6502 | + // 0关闭(如果有设置热线电话,则显示拨打热线电话)、 | ||
6503 | + // 1小程序客服、 | ||
6504 | + // 2企业微信客服 | ||
6505 | + let csType = this.data.sys_switch.weapp_customertype; | ||
6506 | + if(csType == 0) { | ||
6507 | + // 获取电话号码 | ||
6508 | + this.contactService(); | ||
6509 | + } else { | ||
6510 | + this.getTel() | ||
6511 | + .then(() => { | ||
6512 | + self.setData({ | ||
6513 | + hiddenCS: false, | ||
6514 | + }); | ||
6515 | + }); | ||
6516 | + | ||
6517 | + }; | ||
6518 | + }, | ||
6519 | + | ||
6520 | + //关闭客服操作菜单 | ||
6521 | + closeCS() { | ||
6522 | + this.setData({ | ||
6523 | + hiddenCS: true, | ||
6524 | + }); | ||
6525 | + }, | ||
6495 | 6526 | ||
6496 | 6527 | ||
6497 | }); | 6528 | }); |
packageC/pages/luckyGo/luckyGo_goodsInfo/luckyGo_goodsInfo.wxml
@@ -871,7 +871,7 @@ | @@ -871,7 +871,7 @@ | ||
871 | <!-- -----------------底部按钮------------------ --> | 871 | <!-- -----------------底部按钮------------------ --> |
872 | <view class="join-cart"> | 872 | <view class="join-cart"> |
873 | <!-- bindtap="contactService" --> | 873 | <!-- bindtap="contactService" --> |
874 | - <button wx:if="{{sys_switch.weapp_customertype==1}}" class="custom-service cart-ico new_split" bindtap="click_contact" open-type="contact" session-from="wechat|{{userInfo.user_id}}|{{userInfo.nickname}}|{{userInfo.head_pic}}"> | 874 | + <!-- <button wx:if="{{sys_switch.weapp_customertype==1}}" class="custom-service cart-ico new_split" bindtap="click_contact" open-type="contact" session-from="wechat|{{userInfo.user_id}}|{{userInfo.nickname}}|{{userInfo.head_pic}}"> |
875 | <image class="cs-img" src="{{iurl}}/miniapp/images/custom-service.png"></image> | 875 | <image class="cs-img" src="{{iurl}}/miniapp/images/custom-service.png"></image> |
876 | <view>客服</view> | 876 | <view>客服</view> |
877 | </button> | 877 | </button> |
@@ -884,7 +884,12 @@ | @@ -884,7 +884,12 @@ | ||
884 | <view wx:else class="custom-service cart-ico new_split" bindtap="contactService"> | 884 | <view wx:else class="custom-service cart-ico new_split" bindtap="contactService"> |
885 | <image class="cs-img" src="{{iurl}}/miniapp/images/custom-service.png"></image> | 885 | <image class="cs-img" src="{{iurl}}/miniapp/images/custom-service.png"></image> |
886 | <view>客服</view> | 886 | <view>客服</view> |
887 | - </view> | 887 | + </view> --> |
888 | + | ||
889 | + <view class="custom-service cart-ico new_split" bindtap="openCS"> | ||
890 | + <image class="cs-img" src="{{iurl}}/miniapp/images/custom-service.png"></image> | ||
891 | + <view>客服</view> | ||
892 | + </view> | ||
888 | 893 | ||
889 | <view bindtap="collectGoods" class="custom-service cart-ico new_split"> | 894 | <view bindtap="collectGoods" class="custom-service cart-ico new_split"> |
890 | <image hidden="{{is_collect}}" class="cs-img" src="{{iurl}}/miniapp/images/heart.png"></image> | 895 | <image hidden="{{is_collect}}" class="cs-img" src="{{iurl}}/miniapp/images/heart.png"></image> |
packageC/pages/presell/goodsInfo/goodsInfo.js
@@ -17,6 +17,8 @@ var more = function (e) { | @@ -17,6 +17,8 @@ var more = function (e) { | ||
17 | var utils = require('../../../../utils/util.js'); | 17 | var utils = require('../../../../utils/util.js'); |
18 | var regeneratorRuntime = require('../../../../utils/runtime.js'); | 18 | var regeneratorRuntime = require('../../../../utils/runtime.js'); |
19 | 19 | ||
20 | +let self = null; | ||
21 | + | ||
20 | Page({ | 22 | Page({ |
21 | data: { | 23 | data: { |
22 | start_stop: 2, //秒杀开始 结束 的控制(1正在进行,2即将开始) | 24 | start_stop: 2, //秒杀开始 结束 的控制(1正在进行,2即将开始) |
@@ -248,10 +250,13 @@ Page({ | @@ -248,10 +250,13 @@ Page({ | ||
248 | 250 | ||
249 | share_hidden: false, | 251 | share_hidden: false, |
250 | pre_arr: null, | 252 | pre_arr: null, |
253 | + | ||
254 | + hiddenCS: true, | ||
251 | }, | 255 | }, |
252 | 256 | ||
253 | //------初始化加载---------- | 257 | //------初始化加载---------- |
254 | onLoad: function (t) { | 258 | onLoad: function (t) { |
259 | + self = this; | ||
255 | var ee = this, that = ee, th = ee, | 260 | var ee = this, that = ee, th = ee, |
256 | pre_id = t.pre_id, | 261 | pre_id = t.pre_id, |
257 | gid = t.goods_id, | 262 | gid = t.goods_id, |
@@ -1432,6 +1437,38 @@ Page({ | @@ -1432,6 +1437,38 @@ Page({ | ||
1432 | contactService: function () { | 1437 | contactService: function () { |
1433 | getApp().com_call(this); | 1438 | getApp().com_call(this); |
1434 | }, | 1439 | }, |
1440 | + | ||
1441 | + // 获取客服电话 | ||
1442 | + getTel() { | ||
1443 | + return new Promise((resolve, reject) => { | ||
1444 | + s.getConfig(function (t) { | ||
1445 | + if (t.store_tel == undefined) { | ||
1446 | + getApp().request.get("/api/weshop/store/get/" + os.stoid, { | ||
1447 | + isShowLoading: 1, | ||
1448 | + data: {}, | ||
1449 | + success: function (rs) { | ||
1450 | + getApp().globalData.config = rs.data.data; | ||
1451 | + if (rs.data.data.store_tel == null && rs.data.data.store_tel == undefined) { | ||
1452 | + getApp().my_warnning("商家未设置电话", 0, th); | ||
1453 | + return false; | ||
1454 | + } | ||
1455 | + self.setData({ | ||
1456 | + store_tel: rs.data.data.store_tel, | ||
1457 | + }); | ||
1458 | + // s.confirmBox("请联系客服:" + rs.data.data.store_tel); | ||
1459 | + } | ||
1460 | + }) | ||
1461 | + } else { | ||
1462 | + self.setData({ | ||
1463 | + store_tel: t.store_tel, | ||
1464 | + }); | ||
1465 | + // s.confirmBox("请联系客服:" + t.store_tel); | ||
1466 | + }; | ||
1467 | + resolve(); | ||
1468 | + }); | ||
1469 | + }); | ||
1470 | + }, | ||
1471 | + | ||
1435 | //-------获取购物车数量---------- | 1472 | //-------获取购物车数量---------- |
1436 | requestCardNum: function () { | 1473 | requestCardNum: function () { |
1437 | var t = this; | 1474 | var t = this; |
@@ -3999,6 +4036,34 @@ Page({ | @@ -3999,6 +4036,34 @@ Page({ | ||
3999 | 4036 | ||
4000 | click_contact:function () { | 4037 | click_contact:function () { |
4001 | getApp().globalData.no_clear=1; | 4038 | getApp().globalData.no_clear=1; |
4002 | - } | 4039 | + }, |
4040 | + | ||
4041 | + //打开客服操作菜单 | ||
4042 | + openCS() { | ||
4043 | + // csType/在线客服设置: | ||
4044 | + // 0关闭(如果有设置热线电话,则显示拨打热线电话)、 | ||
4045 | + // 1小程序客服、 | ||
4046 | + // 2企业微信客服 | ||
4047 | + let csType = this.data.sys_switch.weapp_customertype; | ||
4048 | + if(csType == 0) { | ||
4049 | + // 获取电话号码 | ||
4050 | + this.contactService(); | ||
4051 | + } else { | ||
4052 | + this.getTel() | ||
4053 | + .then(() => { | ||
4054 | + self.setData({ | ||
4055 | + hiddenCS: false, | ||
4056 | + }); | ||
4057 | + }); | ||
4058 | + | ||
4059 | + }; | ||
4060 | + }, | ||
4061 | + | ||
4062 | + //关闭客服操作菜单 | ||
4063 | + closeCS() { | ||
4064 | + this.setData({ | ||
4065 | + hiddenCS: true, | ||
4066 | + }); | ||
4067 | + }, | ||
4003 | 4068 | ||
4004 | }); | 4069 | }); |
packageC/pages/presell/goodsInfo/goodsInfo.wxml
@@ -495,7 +495,7 @@ | @@ -495,7 +495,7 @@ | ||
495 | <!-- -----------------底部按钮------------------ --> | 495 | <!-- -----------------底部按钮------------------ --> |
496 | <view class="join-cart"> | 496 | <view class="join-cart"> |
497 | <!-- bindtap="contactService" --> | 497 | <!-- bindtap="contactService" --> |
498 | - <button wx:if="{{sys_switch.weapp_customertype==1}}" class="custom-service cart-ico new_split" bindtap="click_contact" open-type="contact" session-from="wechat|{{userInfo.user_id}}|{{userInfo.nickname}}|{{userInfo.head_pic}}"> | 498 | + <!-- <button wx:if="{{sys_switch.weapp_customertype==1}}" class="custom-service cart-ico new_split" bindtap="click_contact" open-type="contact" session-from="wechat|{{userInfo.user_id}}|{{userInfo.nickname}}|{{userInfo.head_pic}}"> |
499 | <image class="cs-img" src="{{iurl}}/miniapp/images/custom-service.png"></image> | 499 | <image class="cs-img" src="{{iurl}}/miniapp/images/custom-service.png"></image> |
500 | <view>客服</view> | 500 | <view>客服</view> |
501 | </button> | 501 | </button> |
@@ -508,7 +508,13 @@ | @@ -508,7 +508,13 @@ | ||
508 | <view wx:else class="custom-service cart-ico new_split" bindtap="contactService"> | 508 | <view wx:else class="custom-service cart-ico new_split" bindtap="contactService"> |
509 | <image class="cs-img" src="{{iurl}}/miniapp/images/custom-service.png"></image> | 509 | <image class="cs-img" src="{{iurl}}/miniapp/images/custom-service.png"></image> |
510 | <view>客服</view> | 510 | <view>客服</view> |
511 | - </view> | 511 | + </view> --> |
512 | + | ||
513 | + <view class="custom-service cart-ico new_split" bindtap="openCS"> | ||
514 | + <image class="cs-img" src="{{iurl}}/miniapp/images/custom-service.png"></image> | ||
515 | + <view>客服</view> | ||
516 | + </view> | ||
517 | + | ||
512 | <view bindtap="collectGoods" class="custom-service cart-ico new_split"> | 518 | <view bindtap="collectGoods" class="custom-service cart-ico new_split"> |
513 | <image hidden="{{is_collect}}" class="cs-img" src="{{iurl}}/miniapp/images/heart.png"></image> | 519 | <image hidden="{{is_collect}}" class="cs-img" src="{{iurl}}/miniapp/images/heart.png"></image> |
514 | <image hidden="{{!is_collect}}" class="cs-img" src="{{iurl}}/miniapp/images/heart-h.png"></image> | 520 | <image hidden="{{!is_collect}}" class="cs-img" src="{{iurl}}/miniapp/images/heart-h.png"></image> |
@@ -949,9 +955,6 @@ | @@ -949,9 +955,6 @@ | ||
949 | </view> | 955 | </view> |
950 | </view> | 956 | </view> |
951 | 957 | ||
952 | - | ||
953 | - | ||
954 | - | ||
955 | <include src="../../../../components/com_servicer/com_servicer.wxml"/> | 958 | <include src="../../../../components/com_servicer/com_servicer.wxml"/> |
956 | 959 | ||
957 | 960 |
pages/goods/goodsInfo/goodsInfo.js
@@ -255,6 +255,7 @@ Page({ | @@ -255,6 +255,7 @@ Page({ | ||
255 | share_hidden: false, | 255 | share_hidden: false, |
256 | all_activity_list: null, //所有活动的列表 | 256 | all_activity_list: null, //所有活动的列表 |
257 | 257 | ||
258 | + hiddenCS: true, | ||
258 | }, | 259 | }, |
259 | 260 | ||
260 | //------初始化加载---------- | 261 | //------初始化加载---------- |
@@ -6643,7 +6644,35 @@ Page({ | @@ -6643,7 +6644,35 @@ Page({ | ||
6643 | 6644 | ||
6644 | click_contact:function () { | 6645 | click_contact:function () { |
6645 | getApp().globalData.no_clear=1; | 6646 | getApp().globalData.no_clear=1; |
6646 | - } | 6647 | + }, |
6648 | + | ||
6649 | + //打开客服操作菜单 | ||
6650 | + openCS() { | ||
6651 | + // csType/在线客服设置: | ||
6652 | + // 0关闭(如果有设置热线电话,则显示拨打热线电话)、 | ||
6653 | + // 1小程序客服、 | ||
6654 | + // 2企业微信客服 | ||
6655 | + let csType = this.data.sys_switch.weapp_customertype; | ||
6656 | + if(csType == 0) { | ||
6657 | + // 获取电话号码 | ||
6658 | + this.contactService(); | ||
6659 | + } else { | ||
6660 | + this.getTel() | ||
6661 | + .then(() => { | ||
6662 | + self.setData({ | ||
6663 | + hiddenCS: false, | ||
6664 | + }); | ||
6665 | + }); | ||
6666 | + | ||
6667 | + }; | ||
6668 | + }, | ||
6669 | + | ||
6670 | + //关闭客服操作菜单 | ||
6671 | + closeCS() { | ||
6672 | + this.setData({ | ||
6673 | + hiddenCS: true, | ||
6674 | + }); | ||
6675 | + }, | ||
6647 | 6676 | ||
6648 | 6677 | ||
6649 | 6678 |
pages/goods/goodsInfo/goodsInfo.wxml
@@ -1011,7 +1011,7 @@ | @@ -1011,7 +1011,7 @@ | ||
1011 | <!-- -----------------底部按钮------------------ --> | 1011 | <!-- -----------------底部按钮------------------ --> |
1012 | <view class="join-cart"> | 1012 | <view class="join-cart"> |
1013 | <!-- bindtap="contactService" --> | 1013 | <!-- bindtap="contactService" --> |
1014 | - <button wx:if="{{sys_switch.weapp_customertype==1}}" class="custom-service cart-ico new_split" bindtap="click_contact" open-type="contact" session-from="wechat|{{userInfo.user_id}}|{{userInfo.nickname}}|{{userInfo.head_pic}}"> | 1014 | + <!-- <button wx:if="{{sys_switch.weapp_customertype==1}}" class="custom-service cart-ico new_split" bindtap="click_contact" open-type="contact" session-from="wechat|{{userInfo.user_id}}|{{userInfo.nickname}}|{{userInfo.head_pic}}"> |
1015 | <image class="cs-img" src="{{iurl}}/miniapp/images/custom-service.png"></image> | 1015 | <image class="cs-img" src="{{iurl}}/miniapp/images/custom-service.png"></image> |
1016 | <view>客服</view> | 1016 | <view>客服</view> |
1017 | </button> | 1017 | </button> |
@@ -1024,7 +1024,12 @@ | @@ -1024,7 +1024,12 @@ | ||
1024 | <view wx:else class="custom-service cart-ico new_split" bindtap="contactService"> | 1024 | <view wx:else class="custom-service cart-ico new_split" bindtap="contactService"> |
1025 | <image class="cs-img" src="{{iurl}}/miniapp/images/custom-service.png"></image> | 1025 | <image class="cs-img" src="{{iurl}}/miniapp/images/custom-service.png"></image> |
1026 | <view>客服</view> | 1026 | <view>客服</view> |
1027 | - </view> | 1027 | + </view> --> |
1028 | + | ||
1029 | + <view class="custom-service cart-ico new_split" bindtap="openCS"> | ||
1030 | + <image class="cs-img" src="{{iurl}}/miniapp/images/custom-service.png"></image> | ||
1031 | + <view>客服</view> | ||
1032 | + </view> | ||
1028 | 1033 | ||
1029 | <view bindtap="collectGoods" class="custom-service cart-ico new_split"> | 1034 | <view bindtap="collectGoods" class="custom-service cart-ico new_split"> |
1030 | <image hidden="{{is_collect}}" class="cs-img" src="{{iurl}}/miniapp/images/heart.png"></image> | 1035 | <image hidden="{{is_collect}}" class="cs-img" src="{{iurl}}/miniapp/images/heart.png"></image> |
pages/user/index/index.js
@@ -11,6 +11,7 @@ const { | @@ -11,6 +11,7 @@ const { | ||
11 | qrcode | 11 | qrcode |
12 | } = require('../../../utils/index.js'); | 12 | } = require('../../../utils/index.js'); |
13 | var ut = require("../../../utils/util.js"); | 13 | var ut = require("../../../utils/util.js"); |
14 | +let self = null; | ||
14 | 15 | ||
15 | Page({ | 16 | Page({ |
16 | /** | 17 | /** |
@@ -44,7 +45,7 @@ Page({ | @@ -44,7 +45,7 @@ Page({ | ||
44 | ad_img:"", | 45 | ad_img:"", |
45 | add_card_data:'', //等级卡的内容 | 46 | add_card_data:'', //等级卡的内容 |
46 | 47 | ||
47 | - | 48 | + hiddenCS: true, |
48 | }, | 49 | }, |
49 | goto_nav: function(e) { | 50 | goto_nav: function(e) { |
50 | var th = this; | 51 | var th = this; |
@@ -60,7 +61,8 @@ Page({ | @@ -60,7 +61,8 @@ Page({ | ||
60 | /** | 61 | /** |
61 | * 生命周期函数--监听页面加载 | 62 | * 生命周期函数--监听页面加载 |
62 | */ | 63 | */ |
63 | - onLoad: function(options) { | 64 | + onLoad: function(options) { |
65 | + self = this; | ||
64 | var th=this; | 66 | var th=this; |
65 | getApp().request.get("/api/weshop/ad/page?pid=401&store_id=" + os.stoid, { | 67 | getApp().request.get("/api/weshop/ad/page?pid=401&store_id=" + os.stoid, { |
66 | data: { | 68 | data: { |
@@ -919,7 +921,35 @@ Page({ | @@ -919,7 +921,35 @@ Page({ | ||
919 | 921 | ||
920 | click_contact:function () { | 922 | click_contact:function () { |
921 | getApp().globalData.no_clear=1; | 923 | getApp().globalData.no_clear=1; |
922 | - } | 924 | + }, |
925 | + | ||
926 | + //打开客服操作菜单 | ||
927 | + openCS() { | ||
928 | + // csType/在线客服设置: | ||
929 | + // 0关闭(如果有设置热线电话,则显示拨打热线电话)、 | ||
930 | + // 1小程序客服、 | ||
931 | + // 2企业微信客服 | ||
932 | + let csType = this.data.sys_switch.weapp_customertype; | ||
933 | + if(csType == 0) { | ||
934 | + // 获取电话号码 | ||
935 | + this.contactService(); | ||
936 | + } else { | ||
937 | + this.getTel() | ||
938 | + .then(() => { | ||
939 | + self.setData({ | ||
940 | + hiddenCS: false, | ||
941 | + }); | ||
942 | + }); | ||
943 | + | ||
944 | + }; | ||
945 | + }, | ||
946 | + | ||
947 | + //关闭客服操作菜单 | ||
948 | + closeCS() { | ||
949 | + this.setData({ | ||
950 | + hiddenCS: true, | ||
951 | + }); | ||
952 | + }, | ||
923 | 953 | ||
924 | 954 | ||
925 | 955 |
pages/user/index/index.wxml
@@ -261,7 +261,7 @@ | @@ -261,7 +261,7 @@ | ||
261 | <!-- 没有链接地址的时候 --> | 261 | <!-- 没有链接地址的时候 --> |
262 | <block wx:else> | 262 | <block wx:else> |
263 | <block wx:if="{{item.name=='联系客服'}}"> | 263 | <block wx:if="{{item.name=='联系客服'}}"> |
264 | - <button class="item t-c" wx:if="{{sys_switch.weapp_customertype==1}}" bindtap="click_contact" open-type="contact" session-from="wechat|{{userInfo.user_id}}|{{userInfo.nickname}}|{{userInfo.head_pic}}"> | 264 | + <!-- <button class="item t-c" wx:if="{{sys_switch.weapp_customertype==1}}" bindtap="click_contact" open-type="contact" session-from="wechat|{{userInfo.user_id}}|{{userInfo.nickname}}|{{userInfo.head_pic}}"> |
265 | <image class="xc-center-img " src="{{iurl+item.icoimg}}"></image> | 265 | <image class="xc-center-img " src="{{iurl+item.icoimg}}"></image> |
266 | <view class="fs26">联系客服</view> | 266 | <view class="fs26">联系客服</view> |
267 | </button> | 267 | </button> |
@@ -274,7 +274,12 @@ | @@ -274,7 +274,12 @@ | ||
274 | <view class="item t-c" bindtap="contactService" wx:else> | 274 | <view class="item t-c" bindtap="contactService" wx:else> |
275 | <image class="xc-center-img " src="{{iurl+item.icoimg}}"></image> | 275 | <image class="xc-center-img " src="{{iurl+item.icoimg}}"></image> |
276 | <view class="fs26">联系客服</view> | 276 | <view class="fs26">联系客服</view> |
277 | - </view> | 277 | + </view> --> |
278 | + | ||
279 | + <view class="item t-c" bindtap="openCS"> | ||
280 | + <image class="xc-center-img " src="{{iurl+item.icoimg}}"></image> | ||
281 | + <view class="fs26">联系客服</view> | ||
282 | + </view> | ||
278 | 283 | ||
279 | </block> | 284 | </block> |
280 | <block wx:elif="{{item.name=='收入卡包'}}"> | 285 | <block wx:elif="{{item.name=='收入卡包'}}"> |
pages/user/index/index.wxss