zhaojs
2023-09-27 74098f1401afe40f961d1d167bb18dd0a71c4d59
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>
@@ -84,15 +87,13 @@
         if (option.mobile) {
            this.mobile = option.mobile;
         }
         if(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,8 +107,7 @@
         }
      },
      methods: {
         getSmsSet()
         {
         getSmsSet() {
            this.$http.post('/smsapi/SmsBusiness/GetSmsSet', {}).then(e => {
               this.smsSign="【"+e.result.smsname+"】";
               this.tdTxt=e.result.suffix;
@@ -177,9 +177,7 @@
                     }).catch(function(err) {
                        console.log(err);
                     })
                  }
                  else
                  {
                     } else {
                     uni.showModal({
                        title: '提示',
                        content: '当前短信余额为0,请充值后发送!',
@@ -215,6 +213,11 @@
            var smsCount = Math.ceil(count / 70)
            this.smscount = smsCount
         },
         choosetemplate() {
            uni.navigateTo({
               url: '/pages/smstemplate/index'
            })
         },
         checkIsNull(value) {
            if (value == undefined || value == '') {
               return true
@@ -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;
   }