Commit 127cc34741baec5a96cd99de192c5c4e62f7c333

Authored by 后端研发-苏泰源
1 parent a6163eaa

预售、幸运购联系客服修改

packageC/pages/luckyGo/luckyGo_goodsInfo/luckyGo_goodsInfo.js
@@ -19,6 +19,7 @@ var more = function (e) { @@ -19,6 +19,7 @@ var more = function (e) {
19 var utils = require('../../../../utils/util.js'); 19 var utils = require('../../../../utils/util.js');
20 var regeneratorRuntime = require('../../../../utils/runtime.js'); 20 var regeneratorRuntime = require('../../../../utils/runtime.js');
21 const { app } = require("../../../../utils/common.js"); 21 const { app } = require("../../../../utils/common.js");
  22 +let self = null;
22 23
23 Page({ 24 Page({
24 data: { 25 data: {
@@ -281,11 +282,14 @@ Page({ @@ -281,11 +282,14 @@ 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;
  292 +
289 // console.log('onload'); 293 // console.log('onload');
290 if (t && t.group_id) { 294 if (t && t.group_id) {
291 this.data.group_id = t.group_id; 295 this.data.group_id = t.group_id;
@@ -2248,24 +2252,53 @@ Page({ @@ -2248,24 +2252,53 @@ Page({
2248 2252
2249 //---------联系客服------------ 2253 //---------联系客服------------
2250 contactService: function () { 2254 contactService: function () {
2251 - s.getConfig(function (t) {  
2252 - if (t.store_tel == undefined) {  
2253 - getApp().request.get("/api/weshop/store/get/" + os.stoid, {  
2254 - isShowLoading: 1,  
2255 - data: {},  
2256 - success: function (rs) {  
2257 - getApp().globalData.config = rs.data.data;  
2258 - if (rs.data.data.store_tel == null && rs.data.data.store_tel == undefined) {  
2259 - getApp().my_warnning("商家未设置电话", 0, th);  
2260 - return false;  
2261 - }  
2262 - s.confirmBox("请联系客服:" + rs.data.data.store_tel);  
2263 - }  
2264 - })  
2265 - } else {  
2266 - s.confirmBox("请联系客服:" + t.store_tel);  
2267 - }  
2268 - }); 2255 + this.getTel()
  2256 + .then(() => {
  2257 + if(self.data.store_tel) {
  2258 + wx.showModal({
  2259 + title: '联系客服',
  2260 + content: '客服热线:' + self.data.store_tel,
  2261 + confirmText: '拨打',
  2262 + success(res) {
  2263 + if(res.confirm) {
  2264 + wx.makePhoneCall({
  2265 + phoneNumber: self.data.store_tel,
  2266 + })
  2267 + };
  2268 + },
  2269 + });
  2270 + };
  2271 + });
  2272 + },
  2273 + // 获取客服电话
  2274 + getTel() {
  2275 + return new Promise((resolve, reject) => {
  2276 + s.getConfig(function (t) {
  2277 + if (t.store_tel == undefined) {
  2278 + getApp().request.get("/api/weshop/store/get/" + os.stoid, {
  2279 + isShowLoading: 1,
  2280 + data: {},
  2281 + success: function (rs) {
  2282 + getApp().globalData.config = rs.data.data;
  2283 + if (rs.data.data.store_tel == null && rs.data.data.store_tel == undefined) {
  2284 + getApp().my_warnning("商家未设置电话", 0, th);
  2285 + return false;
  2286 + }
  2287 + self.setData({
  2288 + store_tel: rs.data.data.store_tel,
  2289 + });
  2290 + // s.confirmBox("请联系客服:" + rs.data.data.store_tel);
  2291 + }
  2292 + })
  2293 + } else {
  2294 + self.setData({
  2295 + store_tel: t.store_tel,
  2296 + });
  2297 + // s.confirmBox("请联系客服:" + t.store_tel);
  2298 + };
  2299 + resolve();
  2300 + });
  2301 + });
2269 }, 2302 },
2270 //-------获取购物车数量---------- 2303 //-------获取购物车数量----------
2271 requestCardNum: function () { 2304 requestCardNum: function () {
@@ -2306,11 +2339,7 @@ Page({ @@ -2306,11 +2339,7 @@ Page({
2306 b[i] = this.data.iurl + e[i]; 2339 b[i] = this.data.iurl + e[i];
2307 } 2340 }
2308 this.data.show_prew_img = 1; 2341 this.data.show_prew_img = 1;
2309 -  
2310 - wx.previewImage({  
2311 - current: b[t.currentTarget.dataset.id],  
2312 - urls: b  
2313 - }); 2342 + getApp().pre_img2(b,t);
2314 }, 2343 },
2315 2344
2316 previewCommentImgs_w: function (t) { 2345 previewCommentImgs_w: function (t) {
@@ -2320,21 +2349,16 @@ Page({ @@ -2320,21 +2349,16 @@ Page({
2320 b[i] = this.data.iurl + e[i]; 2349 b[i] = this.data.iurl + e[i];
2321 } 2350 }
2322 this.data.show_prew_img = 1; 2351 this.data.show_prew_img = 1;
2323 - wx.previewImage({  
2324 - current: b[t.currentTarget.dataset.id],  
2325 - urls: b  
2326 - }); 2352 + getApp().pre_img2(b,t);
2327 }, 2353 },
2328 2354
2329 previewGoodsCommentImgs: function (t) { 2355 previewGoodsCommentImgs: function (t) {
2330 var e = this, 2356 var e = this,
2331 a = this.data.data.comment[t.currentTarget.dataset.cidx].img; 2357 a = this.data.data.comment[t.currentTarget.dataset.cidx].img;
  2358 + getApp().globalData.no_clear=1;
2332 a = a.map(function (t) { 2359 a = a.map(function (t) {
2333 return e.data.url + t; 2360 return e.data.url + t;
2334 - }), wx.previewImage({  
2335 - current: a[t.currentTarget.dataset.id],  
2336 - urls: a  
2337 - }); 2361 + }), getApp().pre_img2(a,t);
2338 this.data.show_prew_img = 1; 2362 this.data.show_prew_img = 1;
2339 }, 2363 },
2340 closePromModal: function () { 2364 closePromModal: function () {
@@ -2349,7 +2373,7 @@ Page({ @@ -2349,7 +2373,7 @@ Page({
2349 }, 2373 },
2350 2374
2351 //--点击分享事件--- 2375 //--点击分享事件---
2352 - onShareAppMessage: function (t) { 2376 + onShareAppMessage: function (t) { getApp().globalData.no_clear=1;
2353 2377
2354 // var th = this; 2378 // var th = this;
2355 // var price = th.data.sele_g.shop_price; 2379 // var price = th.data.sele_g.shop_price;
@@ -6095,11 +6119,8 @@ Page({ @@ -6095,11 +6119,8 @@ Page({
6095 }, 6119 },
6096 6120
6097 previewImage() { 6121 previewImage() {
6098 - this.data.show_prew_img = 1;  
6099 - wx.previewImage({  
6100 - //将图片预览出来  
6101 - urls: [this.data.sele_g.original_img]  
6102 - }); 6122 + this.data.show_prew_img = 1;
  6123 + getApp().pre_img(this.data.sele_g.original_img);
6103 }, 6124 },
6104 6125
6105 is_show_more_buy: function () { 6126 is_show_more_buy: function () {
@@ -6327,13 +6348,7 @@ Page({ @@ -6327,13 +6348,7 @@ Page({
6327 }, 6348 },
6328 6349
6329 con_weixin: function () { 6350 con_weixin: function () {
6330 - var url = this.data.sys_switch.weapp_customertype_url;  
6331 - var id = this.data.sys_switch.weapp_customertype_appid;  
6332 - wx.openCustomerServiceChat({  
6333 - extInfo: { url: url },  
6334 - corpId: id,  
6335 - success(res) { }  
6336 - }) 6351 + getApp().con_wx(this);
6337 }, 6352 },
6338 6353
6339 6354
@@ -6486,6 +6501,7 @@ Page({ @@ -6486,6 +6501,7 @@ Page({
6486 6501
6487 // 预览海报 6502 // 预览海报
6488 previewPoster() { 6503 previewPoster() {
  6504 + getApp().globalData.no_clear=1;
6489 wx.previewImage({ 6505 wx.previewImage({
6490 current: this.data.shareImgPath, // 当前显示图片的http链接 6506 current: this.data.shareImgPath, // 当前显示图片的http链接
6491 urls: [this.data.shareImgPath],// 需要预览的图片http链接列表 6507 urls: [this.data.shareImgPath],// 需要预览的图片http链接列表
@@ -6493,4 +6509,38 @@ Page({ @@ -6493,4 +6509,38 @@ Page({
6493 }, 6509 },
6494 6510
6495 6511
  6512 + click_contact:function () {
  6513 + getApp().globalData.no_clear=1;
  6514 + },
  6515 +
  6516 +
  6517 + //打开客服操作菜单
  6518 + openCS() {
  6519 + // csType/在线客服设置:
  6520 + // 0关闭(如果有设置热线电话,则显示拨打热线电话)、
  6521 + // 1小程序客服、
  6522 + // 2企业微信客服
  6523 + let csType = this.data.sys_switch.weapp_customertype;
  6524 + if(csType == 0) {
  6525 + // 获取电话号码
  6526 + this.contactService();
  6527 + } else {
  6528 + this.getTel()
  6529 + .then(() => {
  6530 + self.setData({
  6531 + hiddenCS: false,
  6532 + });
  6533 + });
  6534 +
  6535 + };
  6536 + },
  6537 +
  6538 + //关闭客服操作菜单
  6539 + closeCS() {
  6540 + this.setData({
  6541 + hiddenCS: true,
  6542 + });
  6543 + },
  6544 +
  6545 +
6496 }); 6546 });
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" 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>
@@ -1647,4 +1652,32 @@ @@ -1647,4 +1652,32 @@
1647 1652
1648 <!-- 制作一个圆球导航 --> 1653 <!-- 制作一个圆球导航 -->
1649 <nav_box></nav_box> 1654 <nav_box></nav_box>
  1655 +
  1656 +
  1657 +<!-- 联系客服操作菜单 -->
  1658 +<view class="action {{!hiddenCS ? 'active':''}}" hidden="{{hiddenCS}}">
  1659 + <view class="pd20 t-c pr">
  1660 + <text class="bold">联系客服</text>
  1661 + <text class="iconfont icon-guan" bindtap="closeCS"></text>
  1662 + </view>
  1663 + <!-- 客服热线 -->
  1664 + <view class="pd20 bdt fs30 btn2" bindtap="contactService">
  1665 + <text class="iconfont icon-dianhua"></text>客服热线:
  1666 + <text class="c-red">{{store_tel}}</text>
  1667 + </view>
  1668 + <!-- 小程序客服 -->
  1669 + <block wx:if="{{sys_switch.weapp_customertype == 1}}">
  1670 + <button class="pd20 bdt fs30 btn2" open-type="contact" session-from="wechat|{{userInfo.user_id}}|{{userInfo.nickname}}|{{userInfo.head_pic}}">
  1671 + <text class="iconfont icon-kefu1"></text>在线客服
  1672 + </button>
  1673 + </block>
  1674 + <!-- 微信客服 -->
  1675 + <block wx:elif="{{sys_switch.weapp_customertype == 2}}">
  1676 + <view class="pd20 bdt fs30 btn2" bindtap="con_weixin">
  1677 + <text class="iconfont icon-kefu1"></text>在线客服
  1678 + </view>
  1679 + </block>
  1680 +</view>
  1681 +
  1682 +<view class="mask2" bindtap="closeCS"></view>
1650 1683
packageC/pages/luckyGo/luckyGo_goodsInfo/luckyGo_goodsInfo.wxss
@@ -3115,4 +3115,56 @@ button.custom-service::after{ @@ -3115,4 +3115,56 @@ button.custom-service::after{
3115 .popup-content { 3115 .popup-content {
3116 max-height: 600rpx; 3116 max-height: 600rpx;
3117 overflow-y: auto; 3117 overflow-y: auto;
  3118 + }
  3119 +
  3120 +
  3121 + /* 联系客服操作菜单 */
  3122 + .action {
  3123 + position: fixed;
  3124 + bottom: 100rpx;
  3125 + z-index: 1;
  3126 + width: 100%;
  3127 + background-color: white;
  3128 + border-radius: 20rpx 20rpx 0 0;
  3129 + }
  3130 +
  3131 + .action .icon-guan {
  3132 + position: absolute;
  3133 + left: 20rpx !important;
  3134 + right: auto !important;
  3135 + }
  3136 +
  3137 + .action .iconfont {
  3138 + color: #ff7295;
  3139 + margin-right: 10rpx;
  3140 + }
  3141 +
  3142 + .action button {
  3143 + text-align: left;
  3144 + line-height: normal;
  3145 + }
  3146 +
  3147 + .action button::after {
  3148 + border-width: 0;
  3149 + }
  3150 +
  3151 + .action .btn2 {
  3152 + box-sizing: border-box;
  3153 + height: 100rpx;
  3154 + display: flex;
  3155 + align-items: center;
  3156 + }
  3157 +
  3158 + .mask2 {
  3159 + display: none;
  3160 + position: fixed;
  3161 + left: 0;
  3162 + right: 0;
  3163 + top: 0;
  3164 + bottom: 0;
  3165 + background-color: rgba(0,0,0,.5);
  3166 + }
  3167 +
  3168 + .action.active ~ .mask2 {
  3169 + display: block;
3118 } 3170 }
3119 \ No newline at end of file 3171 \ No newline at end of file
packageC/pages/presell/goodsInfo/goodsInfo.js
@@ -16,6 +16,7 @@ var more = function (e) { @@ -16,6 +16,7 @@ var more = function (e) {
16 n = new more.default(); 16 n = new more.default();
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 +let self = null;
19 20
20 Page({ 21 Page({
21 data: { 22 data: {
@@ -248,10 +249,13 @@ Page({ @@ -248,10 +249,13 @@ Page({
248 249
249 share_hidden: false, 250 share_hidden: false,
250 pre_arr: null, 251 pre_arr: null,
  252 +
  253 + hiddenCS: true,
251 }, 254 },
252 255
253 //------初始化加载---------- 256 //------初始化加载----------
254 onLoad: function (t) { 257 onLoad: function (t) {
  258 + self = this;
255 var ee = this, that = ee, th = ee, 259 var ee = this, that = ee, th = ee,
256 pre_id = t.pre_id, 260 pre_id = t.pre_id,
257 gid = t.goods_id, 261 gid = t.goods_id,
@@ -1430,25 +1434,55 @@ Page({ @@ -1430,25 +1434,55 @@ Page({
1430 1434
1431 //---------联系客服------------ 1435 //---------联系客服------------
1432 contactService: function () { 1436 contactService: function () {
1433 - s.getConfig(function (t) {  
1434 - if (t.store_tel == undefined) {  
1435 - getApp().request.get("/api/weshop/store/get/" + os.stoid, {  
1436 - isShowLoading: 1,  
1437 - data: {},  
1438 - success: function (rs) {  
1439 - getApp().globalData.config = rs.data.data;  
1440 - if (rs.data.data.store_tel == null && rs.data.data.store_tel == undefined) {  
1441 - getApp().my_warnning("商家未设置电话", 0, th);  
1442 - return false;  
1443 - }  
1444 - s.confirmBox("请联系客服:" + rs.data.data.store_tel);  
1445 - }  
1446 - })  
1447 - } else {  
1448 - s.confirmBox("请联系客服:" + t.store_tel);  
1449 - }  
1450 - }); 1437 + this.getTel()
  1438 + .then(() => {
  1439 + if(self.data.store_tel) {
  1440 + wx.showModal({
  1441 + title: '联系客服',
  1442 + content: '客服热线:' + self.data.store_tel,
  1443 + confirmText: '拨打',
  1444 + success(res) {
  1445 + if(res.confirm) {
  1446 + wx.makePhoneCall({
  1447 + phoneNumber: self.data.store_tel,
  1448 + })
  1449 + };
  1450 + },
  1451 + });
  1452 + };
  1453 + });
  1454 + },
  1455 + // 获取客服电话
  1456 + getTel() {
  1457 + return new Promise((resolve, reject) => {
  1458 + s.getConfig(function (t) {
  1459 + if (t.store_tel == undefined) {
  1460 + getApp().request.get("/api/weshop/store/get/" + os.stoid, {
  1461 + isShowLoading: 1,
  1462 + data: {},
  1463 + success: function (rs) {
  1464 + getApp().globalData.config = rs.data.data;
  1465 + if (rs.data.data.store_tel == null && rs.data.data.store_tel == undefined) {
  1466 + getApp().my_warnning("商家未设置电话", 0, th);
  1467 + return false;
  1468 + }
  1469 + self.setData({
  1470 + store_tel: rs.data.data.store_tel,
  1471 + });
  1472 + // s.confirmBox("请联系客服:" + rs.data.data.store_tel);
  1473 + }
  1474 + })
  1475 + } else {
  1476 + self.setData({
  1477 + store_tel: t.store_tel,
  1478 + });
  1479 + // s.confirmBox("请联系客服:" + t.store_tel);
  1480 + };
  1481 + resolve();
  1482 + });
  1483 + });
1451 }, 1484 },
  1485 +
1452 //-------获取购物车数量---------- 1486 //-------获取购物车数量----------
1453 requestCardNum: function () { 1487 requestCardNum: function () {
1454 var t = this; 1488 var t = this;
@@ -1488,11 +1522,8 @@ Page({ @@ -1488,11 +1522,8 @@ Page({
1488 b[i] = this.data.iurl + e[i]; 1522 b[i] = this.data.iurl + e[i];
1489 } 1523 }
1490 this.data.show_prew_img = 1; 1524 this.data.show_prew_img = 1;
  1525 + getApp().pre_img2(b,t)
1491 1526
1492 - wx.previewImage({  
1493 - current: b[t.currentTarget.dataset.id],  
1494 - urls: b  
1495 - });  
1496 }, 1527 },
1497 1528
1498 previewCommentImgs_w: function (t) { 1529 previewCommentImgs_w: function (t) {
@@ -1502,21 +1533,16 @@ Page({ @@ -1502,21 +1533,16 @@ Page({
1502 b[i] = this.data.iurl + e[i]; 1533 b[i] = this.data.iurl + e[i];
1503 } 1534 }
1504 this.data.show_prew_img = 1; 1535 this.data.show_prew_img = 1;
1505 - wx.previewImage({  
1506 - current: b[t.currentTarget.dataset.id],  
1507 - urls: b  
1508 - }); 1536 + getApp().pre_img2(b,t)
1509 }, 1537 },
1510 1538
1511 previewGoodsCommentImgs: function (t) { 1539 previewGoodsCommentImgs: function (t) {
1512 var e = this, 1540 var e = this,
1513 a = this.data.data.comment[t.currentTarget.dataset.cidx].img; 1541 a = this.data.data.comment[t.currentTarget.dataset.cidx].img;
  1542 + getApp().globalData.no_clear=1;
1514 a = a.map(function (t) { 1543 a = a.map(function (t) {
1515 return e.data.url + t; 1544 return e.data.url + t;
1516 - }), wx.previewImage({  
1517 - current: a[t.currentTarget.dataset.id],  
1518 - urls: a  
1519 - }); 1545 + }), getApp().pre_img2(a,t);
1520 this.data.show_prew_img = 1; 1546 this.data.show_prew_img = 1;
1521 }, 1547 },
1522 closePromModal: function () { 1548 closePromModal: function () {
@@ -1531,7 +1557,7 @@ Page({ @@ -1531,7 +1557,7 @@ Page({
1531 }, 1557 },
1532 1558
1533 //--点击分享事件--- 1559 //--点击分享事件---
1534 - onShareAppMessage: function (t) { 1560 + onShareAppMessage: function (t) { getApp().globalData.no_clear=1;
1535 1561
1536 var th = this; 1562 var th = this;
1537 var price = th.data.pre_arr.presell_price; 1563 var price = th.data.pre_arr.presell_price;
@@ -3813,10 +3839,7 @@ Page({ @@ -3813,10 +3839,7 @@ Page({
3813 3839
3814 previewImage() { 3840 previewImage() {
3815 this.data.show_prew_img = 1; 3841 this.data.show_prew_img = 1;
3816 - wx.previewImage({  
3817 - //将图片预览出来  
3818 - urls: [this.data.shareImgPath]  
3819 - }); 3842 + getApp().pre_img(this.data.shareImgPath);
3820 }, 3843 },
3821 3844
3822 3845
@@ -4012,21 +4035,50 @@ Page({ @@ -4012,21 +4035,50 @@ Page({
4012 }, 4035 },
4013 4036
4014 con_weixin:function () { 4037 con_weixin:function () {
4015 - var url=this.data.sys_switch.weapp_customertype_url;  
4016 - var id=this.data.sys_switch.weapp_customertype_appid;  
4017 - wx.openCustomerServiceChat({  
4018 - extInfo: {url: url},  
4019 - corpId: id,  
4020 - success(res) {}  
4021 - }) 4038 + getApp().con_wx(this);
4022 }, 4039 },
4023 4040
4024 // 预览海报 4041 // 预览海报
4025 previewPoster() { 4042 previewPoster() {
  4043 + getApp().globalData.no_clear=1;
4026 wx.previewImage({ 4044 wx.previewImage({
4027 current: this.data.shareImgPath, // 当前显示图片的http链接 4045 current: this.data.shareImgPath, // 当前显示图片的http链接
4028 urls: [this.data.shareImgPath] ,// 需要预览的图片http链接列表 4046 urls: [this.data.shareImgPath] ,// 需要预览的图片http链接列表
4029 }); 4047 });
4030 }, 4048 },
4031 4049
  4050 +
  4051 + click_contact:function () {
  4052 + getApp().globalData.no_clear=1;
  4053 + },
  4054 +
  4055 +
  4056 + //打开客服操作菜单
  4057 + openCS() {
  4058 + // csType/在线客服设置:
  4059 + // 0关闭(如果有设置热线电话,则显示拨打热线电话)、
  4060 + // 1小程序客服、
  4061 + // 2企业微信客服
  4062 + let csType = this.data.sys_switch.weapp_customertype;
  4063 + if(csType == 0) {
  4064 + // 获取电话号码
  4065 + this.contactService();
  4066 + } else {
  4067 + this.getTel()
  4068 + .then(() => {
  4069 + self.setData({
  4070 + hiddenCS: false,
  4071 + });
  4072 + });
  4073 +
  4074 + };
  4075 + },
  4076 +
  4077 + //关闭客服操作菜单
  4078 + closeCS() {
  4079 + this.setData({
  4080 + hiddenCS: true,
  4081 + });
  4082 + },
  4083 +
4032 }); 4084 });
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" 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 pdh20" 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,3 +955,33 @@ @@ -949,3 +955,33 @@
949 </view> 955 </view>
950 </view> 956 </view>
951 957
  958 +
  959 +
  960 +
  961 +<!-- 联系客服操作菜单 -->
  962 +<view class="action {{!hiddenCS ? 'active':''}}" hidden="{{hiddenCS}}">
  963 + <view class="pd20 t-c pr">
  964 + <text class="bold">联系客服</text>
  965 + <text class="iconfont icon-guan" bindtap="closeCS"></text>
  966 + </view>
  967 + <!-- 客服热线 -->
  968 + <view class="pd20 bdt fs30 btn2" bindtap="contactService">
  969 + <text class="iconfont icon-dianhua"></text>客服热线:
  970 + <text class="c-red">{{store_tel}}</text>
  971 + </view>
  972 + <!-- 小程序客服 -->
  973 + <block wx:if="{{sys_switch.weapp_customertype == 1}}">
  974 + <button class="pd20 bdt fs30 btn2" open-type="contact" session-from="wechat|{{userInfo.user_id}}|{{userInfo.nickname}}|{{userInfo.head_pic}}">
  975 + <text class="iconfont icon-kefu1"></text>在线客服
  976 + </button>
  977 + </block>
  978 + <!-- 微信客服 -->
  979 + <block wx:elif="{{sys_switch.weapp_customertype == 2}}">
  980 + <view class="pd20 bdt fs30 btn2" bindtap="con_weixin">
  981 + <text class="iconfont icon-kefu1"></text>在线客服
  982 + </view>
  983 + </block>
  984 +</view>
  985 +
  986 +<view class="mask2" bindtap="closeCS"></view>
  987 +
packageC/pages/presell/goodsInfo/goodsInfo.wxss
@@ -1614,6 +1614,7 @@ left:31rpx;} @@ -1614,6 +1614,7 @@ left:31rpx;}
1614 .icon-share { 1614 .icon-share {
1615 font-size: 46rpx; 1615 font-size: 46rpx;
1616 color: #d60021; 1616 color: #d60021;
  1617 + line-height: 1;
1617 } 1618 }
1618 .xc-share-frame{ 1619 .xc-share-frame{
1619 /* width: 129rpx; 1620 /* width: 129rpx;
@@ -2832,7 +2833,7 @@ button.custom-service::after{ @@ -2832,7 +2833,7 @@ button.custom-service::after{
2832 } 2833 }
2833 2834
2834 .icon-close { 2835 .icon-close {
2835 - font-size: 48rpx; 2836 + font-size: 42rpx;
2836 } 2837 }
2837 .quan_price{ 2838 .quan_price{
2838 background-color: #ff4700; color: #fff; padding: 10rpx 25rpx; margin-left: 10rpx; border-radius: 30rpx; 2839 background-color: #ff4700; color: #fff; padding: 10rpx 25rpx; margin-left: 10rpx; border-radius: 30rpx;
@@ -2915,3 +2916,56 @@ button.custom-service::after{ @@ -2915,3 +2916,56 @@ button.custom-service::after{
2915 margin-right: 10rpx; 2916 margin-right: 10rpx;
2916 } 2917 }
2917 2918
  2919 +
  2920 +
  2921 +/* 联系客服操作菜单 */
  2922 +.action {
  2923 + position: fixed;
  2924 + bottom: 100rpx;
  2925 + z-index: 1;
  2926 + width: 100%;
  2927 + background-color: white;
  2928 + border-radius: 20rpx 20rpx 0 0;
  2929 +}
  2930 +
  2931 +.action .icon-guan {
  2932 + position: absolute;
  2933 + left: 20rpx !important;
  2934 + right: auto !important;
  2935 +}
  2936 +
  2937 +.action .iconfont {
  2938 + color: #ff7295;
  2939 + margin-right: 10rpx;
  2940 +}
  2941 +
  2942 +.action button {
  2943 + text-align: left;
  2944 + line-height: normal;
  2945 +}
  2946 +
  2947 +.action button::after {
  2948 + border-width: 0;
  2949 +}
  2950 +
  2951 +.action .btn2 {
  2952 + box-sizing: border-box;
  2953 + height: 100rpx;
  2954 + display: flex;
  2955 + align-items: center;
  2956 +}
  2957 +
  2958 +.mask2 {
  2959 + display: none;
  2960 + position: fixed;
  2961 + left: 0;
  2962 + right: 0;
  2963 + top: 0;
  2964 + bottom: 0;
  2965 + background-color: rgba(0,0,0,.5);
  2966 +}
  2967 +
  2968 +.action.active ~ .mask2 {
  2969 + display: block;
  2970 +}
  2971 +