From c601fde72b7c68f2ee23d7d0df06819dd185fdf8 Mon Sep 17 00:00:00 2001 From: taiwan Date: Thu, 10 Mar 2022 17:14:51 +0800 Subject: [PATCH] 联系客服修改 --- app.js | 25 +++++++++++++++++++++++-- app.wxss | 1 + components/com_servicer/com_servicer.wxml | 28 ++++++++++++++++++++++++++++ components/com_servicer/com_servicer.wxss | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++ packageA/pages/goodsInfo/goodsInfo.js | 12 ++++++++++-- packageA/pages/goodsInfo/goodsInfo.wxml | 27 ++------------------------- packageC/pages/luckyGo/luckyGo_goodsInfo/luckyGo_goodsInfo.js | 18 +----------------- packageC/pages/luckyGo/luckyGo_goodsInfo/luckyGo_goodsInfo.wxml | 27 +-------------------------- packageC/pages/luckyGo/luckyGo_goodsInfo/luckyGo_goodsInfo.wxss | 51 +-------------------------------------------------- packageC/pages/presell/goodsInfo/goodsInfo.js | 18 +----------------- packageC/pages/presell/goodsInfo/goodsInfo.wxml | 28 +--------------------------- pages/goods/goodsInfo/goodsInfo.js | 20 +++----------------- pages/goods/goodsInfo/goodsInfo.wxml | 27 +-------------------------- pages/user/index/index.js | 18 +----------------- pages/user/index/index.wxml | 2 +- pages/user/index/index.wxss | 40 ++-------------------------------------- 16 files changed, 127 insertions(+), 265 deletions(-) create mode 100644 components/com_servicer/com_servicer.wxml create mode 100644 components/com_servicer/com_servicer.wxss diff --git a/app.js b/app.js index 1d69084..4204aa6 100644 --- a/app.js +++ b/app.js @@ -876,8 +876,29 @@ App({ wx.makePhoneCall({ phoneNumber: t.store_tel, }) } }); - } - + }, + + com_call(self) { + self.getTel() + .then(() => { + if(self.data.store_tel) { + wx.showModal({ + title: '联系客服', + content: '客服热线:' + self.data.store_tel, + confirmText: '拨打', + success(res) { + if(res.confirm) { + getApp().globalData.no_clear = 1; + wx.makePhoneCall({ + phoneNumber: self.data.store_tel, + }) + }; + }, + }); + }; + }); + }, + }); diff --git a/app.wxss b/app.wxss index 779f442..974f1cf 100644 --- a/app.wxss +++ b/app.wxss @@ -1,5 +1,6 @@ @import './utils/weapp-icon.wxss'; @import "./utils/wxParse/wxParse.wxss"; +@import './components/com_servicer/com_servicer.wxss'; .pdt4 { padding-top: 4rpx; diff --git a/components/com_servicer/com_servicer.wxml b/components/com_servicer/com_servicer.wxml new file mode 100644 index 0000000..2fedc1f --- /dev/null +++ b/components/com_servicer/com_servicer.wxml @@ -0,0 +1,28 @@ + + + + + + \ No newline at end of file diff --git a/components/com_servicer/com_servicer.wxss b/components/com_servicer/com_servicer.wxss new file mode 100644 index 0000000..ea0dc42 --- /dev/null +++ b/components/com_servicer/com_servicer.wxss @@ -0,0 +1,50 @@ +/* 联系客服操作菜单 */ + .action { + position: fixed; + bottom: 100rpx; + z-index: 1; + width: 100%; + background-color: white; + border-radius: 20rpx 20rpx 0 0; + } + + .action .icon-guan { + position: absolute; + left: 20rpx !important; + right: auto !important; + } + + .action .iconfont { + color: #ff7295; + margin-right: 10rpx; + } + + .action button { + text-align: left; + line-height: normal; + } + + .action button::after { + border-width: 0; + } + + .action .btn2 { + box-sizing: border-box; + height: 100rpx; + display: flex; + align-items: center; + } + + .mask2 { + display: none; + position: fixed; + left: 0; + right: 0; + top: 0; + bottom: 0; + background-color: rgba(0,0,0,.5); + } + + .action.active ~ .mask2 { + display: block; + } \ No newline at end of file diff --git a/packageA/pages/goodsInfo/goodsInfo.js b/packageA/pages/goodsInfo/goodsInfo.js index 9022cbf..d330c48 100644 --- a/packageA/pages/goodsInfo/goodsInfo.js +++ b/packageA/pages/goodsInfo/goodsInfo.js @@ -838,6 +838,11 @@ Page({ //------------加入购物车-------------- addCart: function(t) { + if(this.data.goodsInputNum == 0) { + getApp().my_warnning('购买数量不能为0', 1, th, 450); + return false; + }; + var th = this; var ind = t.currentTarget.dataset.openSpecModal_ind; var action= t.currentTarget.dataset.action; @@ -854,6 +859,8 @@ Page({ + + //000000 //如果是秒杀的话,要看redis够不够 // if (this.data.prom_type == 1) { @@ -879,7 +886,7 @@ Page({ if(this.data.options.prom_type == 1 && !this.data.prom_act.is_shop_buy) { - var t = th.data.goodsInputNum + 1; + var t = th.data.goodsInputNum; th.data.sele_g.viplimited = th.data.sele_g.buy_limit; if (th.data.sele_g.viplimited > 0) { var gd_buy_num = th.data.sele_g.buy_num; @@ -1235,9 +1242,10 @@ Page({ confirmText: '拨打', success(res) { if(res.confirm) { + getApp().globalData.no_clear = 1; wx.makePhoneCall({ phoneNumber: self.data.store_tel, - }) + }); }; }, }); diff --git a/packageA/pages/goodsInfo/goodsInfo.wxml b/packageA/pages/goodsInfo/goodsInfo.wxml index 64b0378..917a93f 100644 --- a/packageA/pages/goodsInfo/goodsInfo.wxml +++ b/packageA/pages/goodsInfo/goodsInfo.wxml @@ -911,29 +911,6 @@ - - + + - diff --git a/packageC/pages/luckyGo/luckyGo_goodsInfo/luckyGo_goodsInfo.js b/packageC/pages/luckyGo/luckyGo_goodsInfo/luckyGo_goodsInfo.js index 06ea8fd..adc1268 100644 --- a/packageC/pages/luckyGo/luckyGo_goodsInfo/luckyGo_goodsInfo.js +++ b/packageC/pages/luckyGo/luckyGo_goodsInfo/luckyGo_goodsInfo.js @@ -2252,23 +2252,7 @@ Page({ //---------联系客服------------ contactService: function () { - this.getTel() - .then(() => { - if(self.data.store_tel) { - wx.showModal({ - title: '联系客服', - content: '客服热线:' + self.data.store_tel, - confirmText: '拨打', - success(res) { - if(res.confirm) { - wx.makePhoneCall({ - phoneNumber: self.data.store_tel, - }) - }; - }, - }); - }; - }); + getApp().com_call(this); }, // 获取客服电话 getTel() { diff --git a/packageC/pages/luckyGo/luckyGo_goodsInfo/luckyGo_goodsInfo.wxml b/packageC/pages/luckyGo/luckyGo_goodsInfo/luckyGo_goodsInfo.wxml index a2f8850..c34f037 100644 --- a/packageC/pages/luckyGo/luckyGo_goodsInfo/luckyGo_goodsInfo.wxml +++ b/packageC/pages/luckyGo/luckyGo_goodsInfo/luckyGo_goodsInfo.wxml @@ -1653,31 +1653,6 @@ - - - + - diff --git a/packageC/pages/luckyGo/luckyGo_goodsInfo/luckyGo_goodsInfo.wxss b/packageC/pages/luckyGo/luckyGo_goodsInfo/luckyGo_goodsInfo.wxss index 173547f..5529cb7 100644 --- a/packageC/pages/luckyGo/luckyGo_goodsInfo/luckyGo_goodsInfo.wxss +++ b/packageC/pages/luckyGo/luckyGo_goodsInfo/luckyGo_goodsInfo.wxss @@ -3118,53 +3118,4 @@ button.custom-service::after{ } - /* 联系客服操作菜单 */ - .action { - position: fixed; - bottom: 100rpx; - z-index: 1; - width: 100%; - background-color: white; - border-radius: 20rpx 20rpx 0 0; - } - - .action .icon-guan { - position: absolute; - left: 20rpx !important; - right: auto !important; - } - - .action .iconfont { - color: #ff7295; - margin-right: 10rpx; - } - - .action button { - text-align: left; - line-height: normal; - } - - .action button::after { - border-width: 0; - } - - .action .btn2 { - box-sizing: border-box; - height: 100rpx; - display: flex; - align-items: center; - } - - .mask2 { - display: none; - position: fixed; - left: 0; - right: 0; - top: 0; - bottom: 0; - background-color: rgba(0,0,0,.5); - } - - .action.active ~ .mask2 { - display: block; - } \ No newline at end of file + \ No newline at end of file diff --git a/packageC/pages/presell/goodsInfo/goodsInfo.js b/packageC/pages/presell/goodsInfo/goodsInfo.js index e260687..9563d73 100644 --- a/packageC/pages/presell/goodsInfo/goodsInfo.js +++ b/packageC/pages/presell/goodsInfo/goodsInfo.js @@ -1434,23 +1434,7 @@ Page({ //---------联系客服------------ contactService: function () { - this.getTel() - .then(() => { - if(self.data.store_tel) { - wx.showModal({ - title: '联系客服', - content: '客服热线:' + self.data.store_tel, - confirmText: '拨打', - success(res) { - if(res.confirm) { - wx.makePhoneCall({ - phoneNumber: self.data.store_tel, - }) - }; - }, - }); - }; - }); + getApp().com_call(this); }, // 获取客服电话 getTel() { diff --git a/packageC/pages/presell/goodsInfo/goodsInfo.wxml b/packageC/pages/presell/goodsInfo/goodsInfo.wxml index dbeb456..47c9564 100644 --- a/packageC/pages/presell/goodsInfo/goodsInfo.wxml +++ b/packageC/pages/presell/goodsInfo/goodsInfo.wxml @@ -957,31 +957,5 @@ - - - - - + diff --git a/pages/goods/goodsInfo/goodsInfo.js b/pages/goods/goodsInfo/goodsInfo.js index 6777d3c..32835b6 100644 --- a/pages/goods/goodsInfo/goodsInfo.js +++ b/pages/goods/goodsInfo/goodsInfo.js @@ -2290,24 +2290,9 @@ Page({ //---------联系客服------------ contactService: function () { - this.getTel() - .then(() => { - if(self.data.store_tel) { - wx.showModal({ - title: '联系客服', - content: '客服热线:' + self.data.store_tel, - confirmText: '拨打', - success(res) { - if(res.confirm) { - wx.makePhoneCall({ - phoneNumber: self.data.store_tel, - }) - }; - }, - }); - }; - }); + getApp().com_call(this); }, + // 获取客服电话 getTel() { return new Promise((resolve, reject) => { @@ -6534,6 +6519,7 @@ Page({ con_weixin: function () { getApp().con_wx(this); }, + get_normal(gid){ this.setData({ prom_type: 0, diff --git a/pages/goods/goodsInfo/goodsInfo.wxml b/pages/goods/goodsInfo/goodsInfo.wxml index cd9cd45..f8877f7 100644 --- a/pages/goods/goodsInfo/goodsInfo.wxml +++ b/pages/goods/goodsInfo/goodsInfo.wxml @@ -1713,29 +1713,4 @@ - - - - + diff --git a/pages/user/index/index.js b/pages/user/index/index.js index a3d072f..c8d4faa 100644 --- a/pages/user/index/index.js +++ b/pages/user/index/index.js @@ -705,23 +705,7 @@ Page({ //---------联系客服------------ contactService: function() { - this.getTel() - .then(() => { - if(self.data.store_tel) { - wx.showModal({ - title: '联系客服', - content: '客服热线:' + self.data.store_tel, - confirmText: '拨打', - success(res) { - if(res.confirm) { - wx.makePhoneCall({ - phoneNumber: self.data.store_tel, - }) - }; - }, - }); - }; - }); + getApp().com_call(this); }, // 获取客服热线 diff --git a/pages/user/index/index.wxml b/pages/user/index/index.wxml index 269b4c5..2798501 100644 --- a/pages/user/index/index.wxml +++ b/pages/user/index/index.wxml @@ -379,6 +379,6 @@ - + diff --git a/pages/user/index/index.wxss b/pages/user/index/index.wxss index 0575e7d..81a8aa9 100644 --- a/pages/user/index/index.wxss +++ b/pages/user/index/index.wxss @@ -741,48 +741,12 @@ button::after{ border: 0} color: #555; } -.action { - position: fixed; - bottom: 100rpx; - z-index: 1; - width: 100%; - background-color: white; - border-radius: 20rpx 20rpx 0 0; -} + .action .icon-guan { position: absolute; - right: 20rpx; + right: 20rpx !important; } -.action .iconfont { - color: #ff7295; - margin-right: 10rpx; -} -.action button { - text-align: left; - line-height: normal; -} - -.action .btn { - box-sizing: border-box; - height: 100rpx; - display: flex; - align-items: center; -} - -.mask { - display: none; - position: fixed; - left: 0; - right: 0; - top: 0; - bottom: 0; - background-color: rgba(0,0,0,.5); -} - -.action.active ~ .mask { - display: block; -} -- libgit2 0.21.4