From afb05754bf1f7b6aee63e85ed6e9eecf5b5d5b29 Mon Sep 17 00:00:00 2001 From: zhaojs <349234519@qq.com> Date: 星期五, 20 十月 2023 09:38:19 +0800 Subject: [PATCH] no message --- H5/pages/sendsms/index.vue | 149 ++++++++++++++++++++++++++----------------------- 1 files changed, 79 insertions(+), 70 deletions(-) diff --git a/H5/pages/sendsms/index.vue b/H5/pages/sendsms/index.vue index ccff5f2..faa6ee8 100644 --- a/H5/pages/sendsms/index.vue +++ b/H5/pages/sendsms/index.vue @@ -14,15 +14,18 @@ <view style="position: absolute; top: 0.4rem;"> {{smsSign}} </view> - <textarea maxlength="500" v-model="smscontent" @input="CountSms" class="smstxt" - placeholder="璇疯緭鍏ュ彂淇″唴瀹�" + <textarea maxlength="500" v-model="smscontent" @input="CountSms" class="smstxt" placeholder="璇疯緭鍏ュ彂淇″唴瀹�" placeholder-class="text-color-assist font-size-base"></textarea> <view class="smsbottom"> <view v-if="tdTxt!=''" style="color: #000;"> {{tdTxt}} </view> - 鎸夌収70涓瓧/鏉¤绠楋紝褰撳墠 <span class="smsword">{{wordcount}}</span>瀛楋紝<span - class="smsword">{{smscount}}</span>鏉$煭淇� + <span @click="choosetemplate()" class="chooseTemplateTxt"> + 鍐呯疆妯℃澘 + </span> + <span>鎸夌収70涓瓧/鏉¤绠楋紝褰撳墠 <span class="smsword">{{wordcount}}</span>瀛楋紝<span + class="smsword">{{smscount}}</span>鏉$煭淇�</span> + </view> </view> </view> @@ -77,22 +80,20 @@ smscount: 0, smsSign: '', tdTxt: '', - text:'璇峰嬁鍙戦�佹璇�/杈遍獋绛夎繚瑙勫唴瀹�,鍙戠幇涓�寰嬫姤璀﹀鐞�' + text: '璇峰嬁鍙戦�佹璇�/杈遍獋绛夎繚瑙勫唴瀹�,鍙戠幇涓�寰嬫姤璀﹀鐞�' } }, onLoad(option) { if (option.mobile) { this.mobile = option.mobile; } - if(option.templateTxt) - { - this.smscontent=option.templateTxt; + if (option.templateTxt) { + this.smscontent = option.templateTxt; } this.getSmsSet(); - + let memberinfo = uni.getStorageSync('smsmemberinfo'); - if(memberinfo==null||memberinfo.smscount==0) - {//鏈敞鍐屾垨娌℃湁鐭俊浣欓 + if (memberinfo == null || memberinfo.smscount == 0) { //鏈敞鍐屾垨娌℃湁鐭俊浣欓 uni.showModal({ title: '鎻愮ず', content: '褰撳墠鐭俊浣欓涓�0锛岃鍏呭�煎悗鍙戦��!', @@ -106,11 +107,10 @@ } }, methods: { - getSmsSet() - { + getSmsSet() { this.$http.post('/smsapi/SmsBusiness/GetSmsSet', {}).then(e => { - this.smsSign="銆�"+e.result.smsname+"銆�"; - this.tdTxt=e.result.suffix; + this.smsSign = "銆�" + e.result.smsname + "銆�"; + this.tdTxt = e.result.suffix; this.CountSms(); }).catch(function(err) { console.log(err); @@ -144,60 +144,58 @@ OpenId: this.openId } this.$http.post('/smsapi/SmsBusiness/GetMemberInfo', data).then(e => { - if (e.result != null) { - if (e.result.smscount >= that.smscount) { - //鎻愪氦鐭俊浠诲姟 - let Wantsendtype = that.sendtime == "" ? 1 : 2; - var sendTime = that.sendtime == "" ? new Date().toLocaleString() : that.sendtime; - let sendData = { - Mobile: that.mobile, - Smscontent: that.smscontent, - Memberid: e.result.id, - Wantsendtype: Wantsendtype, - Wantsendtime: sendTime + if (e.result != null) { + if (e.result.smscount >= that.smscount) { + //鎻愪氦鐭俊浠诲姟 + let Wantsendtype = that.sendtime == "" ? 1 : 2; + var sendTime = that.sendtime == "" ? new Date().toLocaleString() : that.sendtime; + let sendData = { + Mobile: that.mobile, + Smscontent: that.smscontent, + Memberid: e.result.id, + Wantsendtype: Wantsendtype, + Wantsendtime: sendTime + } + that.$http.post('/smsapi/SmsBusiness/AddSmsSend', sendData).then(e => { + if (e.result == true) { //鎻愪氦鎴愬姛 + uni.showModal({ + title: '鎻愮ず', + content: '浠诲姟鎻愪氦鎴愬姛!', + showCancel: false, + success: function(bac) { + uni.switchTab({ + url: '/pages/charthistory/index' + }) + } + }) + } else { + uni.showToast({ + title: '浠诲姟鎻愪氦澶辫触锛岃鑱旂郴瀹㈡湇锛�', + icon: 'none' + }); + } + }).catch(function(err) { + console.log(err); + }) + } else { + uni.showModal({ + title: '鎻愮ず', + content: '褰撳墠鐭俊浣欓涓�0锛岃鍏呭�煎悗鍙戦��!', + showCancel: false, + success: function(bac) { + uni.switchTab({ + url: '/pages/mine/mine' + }) + } + }) } - that.$http.post('/smsapi/SmsBusiness/AddSmsSend', sendData).then(e => { - if (e.result == true) { //鎻愪氦鎴愬姛 - uni.showModal({ - title: '鎻愮ず', - content: '浠诲姟鎻愪氦鎴愬姛!', - showCancel: false, - success: function(bac) { - uni.switchTab({ - url: '/pages/charthistory/index' - }) - } - }) - } else { - uni.showToast({ - title: '浠诲姟鎻愪氦澶辫触锛岃鑱旂郴瀹㈡湇锛�', - icon: 'none' - }); - } - }).catch(function(err) { - console.log(err); - }) } - else - { - uni.showModal({ - title: '鎻愮ず', - content: '褰撳墠鐭俊浣欓涓�0锛岃鍏呭�煎悗鍙戦��!', - showCancel: false, - success: function(bac) { - uni.switchTab({ - url: '/pages/mine/mine' - }) - } - }) - } - } - uni.hideLoading() - }) - .catch(function(err) { - uni.hideLoading() - console.log(err); - }) + uni.hideLoading() + }) + .catch(function(err) { + uni.hideLoading() + console.log(err); + }) }, changeTime(timestr, timespan) { this.sendtime = timestr; @@ -214,6 +212,11 @@ this.wordcount = count var smsCount = Math.ceil(count / 70) this.smscount = smsCount + }, + choosetemplate() { + uni.navigateTo({ + url: '/pages/smstemplate/index' + }) }, checkIsNull(value) { if (value == undefined || value == '') { @@ -232,6 +235,13 @@ } /* #endif */ + .chooseTemplateTxt { + float: left; + margin-left: 1rem; + color: rgb(245, 108, 108); + font-size: 15px; + font-weight: 600; + } .changeTime { width: 100%; @@ -258,8 +268,7 @@ } .sendtip { - margin: 0.5rem 0 0.5rem 0; - background: #fff; + margin: 0.5rem 0 0 0; padding: 0.8rem; font-size: 14px; font-weight: 600; @@ -282,7 +291,7 @@ width: 100%; height: 15rem; padding: 10px; - padding-bottom: 2rem; + padding-bottom: 2.5rem; text-indent: 120rpx; } -- Gitblit v1.9.3