| | |
| | | </view> |
| | | |
| | | <view class="explain-row "> |
| | | <text class="f-28 c-main" v-if="!isEnd && !isComplete">投票进行中</text> |
| | | <text class="f-28 c-main" v-if="!isEnd && !isComplete && isStart">投票进行中</text> |
| | | <text class="f-28 c-main" v-if="isComplete && !isEnd">投票已提交</text> |
| | | <text class="f-28 c-main" v-if="isEnd">投票已结束</text> |
| | | <text class="f-28 c-main" v-if="!isStart">投票未开始</text> |
| | | <text class="ml-20 f-26 " v-if="applyInfo.voteRestrictions == 1">(该议题为一户一票)</text> |
| | | </view> |
| | | |
| | |
| | | <view class="" v-if="item.optionRange == 0"> |
| | | <u-radio-group size="22" iconPlacement="right" activeColor="#017BFC" placement="column" |
| | | v-model="item.selected" @change="selectOption($event,index)" |
| | | :disabled="item.isSubmit || isEnd || isComplete"> |
| | | :disabled="item.isSubmit || isEnd || isComplete || !isStart"> |
| | | <view class="mb-30" v-for="(i,k) in item.children"> |
| | | <u-radio :label="i.optionContent" :name="i.id"></u-radio> |
| | | <view class="flex j-c-s-b a-i-c mt-10"> |
| | |
| | | </u-checkbox-group> |
| | | </view> |
| | | </view> |
| | | <button class="apply-btn bgc-main c-ff" v-if="!isEnd && !isComplete" |
| | | <button class="apply-btn bgc-main c-ff" v-if="!isEnd && !isComplete && isStart" |
| | | @click="submitVote()">提交</button> |
| | | <button class="apply-btn bgc-gray c-dd" v-if="isComplete && !isEnd">已提交</button> |
| | | <button class="apply-btn bgc-gray c-dd" v-if="isEnd">已结束</button> |
| | | <button class="apply-btn bgc-gray c-dd" v-if="!isStart">未开始</button> |
| | | </view> |
| | | </view> |
| | | </view> |
| | |
| | | isShowPopup: false, |
| | | validationCode: "", |
| | | phone: "", |
| | | text: "获取验证码" |
| | | text: "获取验证码", |
| | | isSendCode: false, |
| | | isStart: false //投票是否开始 |
| | | } |
| | | }, |
| | | onLoad(option) { |
| | |
| | | this.setOptionDisable() //时间结束,所有多项按钮禁用 |
| | | } |
| | | return Number(endTimestamp) - Number(curTimestamp) |
| | | }, |
| | | computeStartTime() { |
| | | let curTimestamp = new Date().getTime(); |
| | | let startTimestamp = new Date(this.applyInfo.startTime).getTime(); |
| | | if (Number(curTimestamp) - Number(startTimestamp) >= 0) { |
| | | this.isStart = true; |
| | | } else { |
| | | this.setOptionDisable() |
| | | this.isStart = false; |
| | | //时间没到,所有多项按钮禁用 |
| | | } |
| | | // return Number(endTimestamp) - Number(curTimestamp) |
| | | } |
| | | }, |
| | | |
| | |
| | | // return false; |
| | | // } |
| | | // this.sendValidationCode(); |
| | | if (this.isSendCode) return; |
| | | let second = 60; |
| | | |
| | | this.isSendCode = true; |
| | | sendCode({ |
| | | phone: uni.getStorageSync("userInfo").phone, |
| | | }).then(res => { |
| | |
| | | let time = setInterval(() => { |
| | | second-- |
| | | this.text = `${second}秒后获取` |
| | | if (second == 0 || this.data.isLogin) { |
| | | if (second == 0 || this.isLogin) { |
| | | clearInterval(time); |
| | | this.isSendCode = false |
| | | this.text = "获取验证码"; |
| | | } |
| | | }, 1000) |
| | | } else { |
| | | this.isSendCode = false; |
| | | } |
| | | }) |
| | | }, |