注册超时计时器

This commit is contained in:
limqhz
2022-12-16 18:21:26 +08:00
parent eb5c301d00
commit 75f88a420f
4 changed files with 22 additions and 1 deletions

View File

@@ -1,6 +1,7 @@
Page({
data: {
nameConfirm: false,
timeOutConfirm: false,
checkedId: '',
checkedName: '',
userNameList: [
@@ -74,6 +75,14 @@ Page({
nameConfirm : true
})
this.changeCheckEasy();
},
callEnd(e){
this.setData({timeOutConfirm:true})
},
checkTimeout(e){
wx.redirectTo({url:"/pages/login/index"});
}
});

View File

@@ -5,6 +5,7 @@
"t-tag": "/components/tag/tag",
"t-steps": "/components/steps/steps",
"t-step-item": "/components/steps/step-item",
"t-dialog": "/components/dialog/dialog"
"t-dialog": "/components/dialog/dialog",
"t-countdown": "/components/countdown/index"
}
}

View File

@@ -5,6 +5,9 @@
<t-step-item title="成功" content="完成注册" />
</t-steps>
</view>
<view class="check-countdown">
请在90秒内选择您心仪的用户名还有<t-countdown bind:end="callEnd" time="{{10000}}" showDay="{{false}}" showHour="{{false}}" />
</view>
<t-grid class="five" column="{{4}}" align="center" border="{{border}}">
<t-grid-item wx:for="{{userNameList}}" wx:key="index" text="{{item.id}}">
<t-tag wx:if="{{item.checked}}" theme="success" bind:tap="handleCheckTagChange" id="{{item.id}}" data-name="{{item.userName}}" size="large">{{item.userName}}</t-tag>
@@ -20,3 +23,4 @@
bind:confirm="checkName"
bind:cancel="closeDialog"
/>
<t-dialog visible="{{timeOutConfirm}}" title="超时未选择,注册中止" confirm-btn="好的" bind:confirm="checkTimeout" />

View File

@@ -1,3 +1,10 @@
.custom-confirm-btn {
color: #ff4646 !important;
}
.check-countdown{
margin-top: 24rpx;
margin-bottom: 24rpx;
display: flex;
justify-content: center;
font-size: 24rpx;
}