From 81023488cca8385aecc044d2c2c03a58b4af3f9a Mon Sep 17 00:00:00 2001
From: zhao_js <349234519@qq.com>
Date: 星期二, 21 十一月 2023 15:23:30 +0800
Subject: [PATCH] no message

---
 H5/pages/sendsms/index.vue |  150 ++++++++++++++++++++++++++-----------------------
 1 files changed, 80 insertions(+), 70 deletions(-)

diff --git a/H5/pages/sendsms/index.vue b/H5/pages/sendsms/index.vue
index ccff5f2..1e17fce 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="492" 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,21 @@
 				smscount: 0,
 				smsSign: '',
 				tdTxt: '',
-				text:'璇峰嬁鍙戦�佹璇�/杈遍獋绛夎繚瑙勫唴瀹�,鍙戠幇涓�寰嬫姤璀﹀鐞�'
+				maxlength:500,
+				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 +108,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 +145,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 +213,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 +236,13 @@
 	}
 
 	/* #endif */
+	.chooseTemplateTxt {
+		float: left;
+		margin-left: 1rem;
+		color: rgb(245, 108, 108);
+		font-size: 15px;
+		font-weight: 600;
+	}
 
 	.changeTime {
 		width: 100%;
@@ -258,8 +269,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 +292,7 @@
 		width: 100%;
 		height: 15rem;
 		padding: 10px;
-		padding-bottom: 2rem;
+		padding-bottom: 2.5rem;
 		text-indent: 120rpx;
 	}
 

--
Gitblit v1.9.3