Lou
2024-03-04 fb8db39ccdca6ca638b3e133d186cb3fe6a558bc
subPackage/article/detail.vue
@@ -67,7 +67,7 @@
               <view class="vote bgc-ff">
                  <view class="mb-20" v-for="(item,index) in voteTopicList" :key="index">
                     <view class="vote-title">
                        <!-- <text class="f-30 fw">{{item.discussContent}}</text> -->
                        <text class="f-30 fw">{{item.discussContent}}</text>
                        <text class="f-26 ml-10">{{item.optionRange == 0?"(单选)":"(多选)"}}</text>
                     </view>
                     <view class="" v-if="item.optionRange == 0">
@@ -153,6 +153,27 @@
            <u-icon name="thumb-up-fill" size="22"  color="#fff"></u-icon>
         </view>
      </view> -->
      <u-popup :show="isShowPopup" @close="isShowPopup = false" mode="center" :round="10" :closeable="true">
         <view class='login-mode'>
            <view class="f-30 fw">
               安全验证
            </view>
            <view class="f-30 mt-30">
               {{phone}}
            </view>
            <view class='flex a-i-c login-input'>
               <input class='f-30 c-33' type='number' placeholder='请输入验证码' v-model="validationCode"
                  placeholder-class='c-aa f-28'></input>
               <button class='login-input-btn f-24 c-33' @click='getValidationCode'>{{text}}</button>
            </view>
            <!--    <button class='login-btn c-ff f-30' :class='validationCode?"bgc-main":""'
               :disabled="validationCode?false:true">确定</button> -->
            <button class='login-btn c-ff f-30 bgc-main' @click="confirmValidationCode()">确定</button>
         </view>
      </u-popup>
   </view>
</template>
@@ -188,7 +209,11 @@
            isComplete: false, // 是否完成全部投票
            UParseStyle: {
               img: 'width: 100%; float: left;'
            }
            },
            isShowPopup: false,
            validationCode: "",
            phone: "",
            text: "获取验证码"
         }
      },
      onLoad(option) {
@@ -205,6 +230,10 @@
         uni.$on('refreshComment', () => {
            this.getAritcleComment()
         })
         let {
            phone
         } = uni.getStorageSync("userInfo")
         this.phone = `${phone.substr(0,4)}****${phone.substr(8)}`
      },
      computed: {
@@ -387,6 +416,12 @@
            return arr;
         },
         confirmValidationCode() {
            this.voteRequest()
         },
         //提交投票
         submitVote() {
            if (this.applyInfo.signatureFlag == 1) {
@@ -394,7 +429,8 @@
                  url: `signature?type=2`
               })
            } else {
               this.voteRequest()
               this.isShowPopup = true;
               // this.voteRequest()
            }
@@ -425,6 +461,7 @@
                  uni.showToast({
                     title: "操作成功"
                  })
                  this.isShowPopup = false;
                  this.$nextTick(() => {
                     this.getApplyDetail();
                     this.getVoteList();
@@ -438,7 +475,34 @@
            uni.navigateTo({
               url: `comment?id=${this.params.id}`
            })
         }
         },
         getValidationCode() {
            // let phone_reg = /^1(3|4|5|6|7|8|9)\d{9}$/;
            // if (!phone_reg.test(this.phone)) {
            //    this.$showTips("手机号码有误~");
            //    return false;
            // }
            // this.sendValidationCode();
            let second = 60;
            let time = setInterval(() => {
               second--
               this.text = `${second}秒后获取`
               if (second == 0 || this.data.isLogin) {
                  clearInterval(time);
                  this.text = "获取验证码";
               }
            }, 1000)
         },
         sendValidationCode() {
         },
      }
   }
</script>
@@ -599,4 +663,78 @@
   .mb-30 {
      margin-bottom: 30rpx;
   }
   .login-mode {
      padding: 20rpx;
   }
   .login-input {
      height: 90rpx;
      border-radius: 45rpx;
      background-color: #f0f0f0;
      padding: 0 30rpx 0 40rpx;
      margin-top: 20rpx;
      width: 550rpx;
      box-sizing: border-box;
   }
   .login-input text {
      flex: 1;
   }
   .login-input input {
      height: 90rpx;
      width: 100%;
      // flex: 3
   }
   .login-input-btn {
      width: 200rpx;
      height: 60rpx;
      line-height: 60rpx;
      border-radius: 30rpx;
      padding: 0;
      margin: 0;
      transition: all ease-out .3s;
      border: none;
   }
   .login-input-btn::after {
      border: none;
   }
   .login-input-btn[disabled] {
      background-color: #fff !important;
      color: #aaa !important;
   }
   .login-explain {
      margin-top: 10rpx;
   }
   .login-btn {
      width: 550rpx;
      height: 90rpx;
      line-height: 90rpx;
      border-radius: 45rpx;
      margin-top: 50rpx;
      transition: all ease-out .3s;
   }
   .login-btn[disabled] {
      background-color: #9DB9F7 !important;
      color: #fff !important;
   }
   .c-aa {
      color: #aaa;
   }
   .c-33 {
      color: #333;
   }
   .mt-30 {
      margin-top: 30rpx;
   }
</style>