注册超时计时器
This commit is contained in:
@@ -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"});
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
@@ -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"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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" />
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user