注册超时计时器
This commit is contained in:
@@ -1,6 +1,7 @@
|
|||||||
Page({
|
Page({
|
||||||
data: {
|
data: {
|
||||||
nameConfirm: false,
|
nameConfirm: false,
|
||||||
|
timeOutConfirm: false,
|
||||||
checkedId: '',
|
checkedId: '',
|
||||||
checkedName: '',
|
checkedName: '',
|
||||||
userNameList: [
|
userNameList: [
|
||||||
@@ -74,6 +75,14 @@ Page({
|
|||||||
nameConfirm : true
|
nameConfirm : true
|
||||||
})
|
})
|
||||||
this.changeCheckEasy();
|
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-tag": "/components/tag/tag",
|
||||||
"t-steps": "/components/steps/steps",
|
"t-steps": "/components/steps/steps",
|
||||||
"t-step-item": "/components/steps/step-item",
|
"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-step-item title="成功" content="完成注册" />
|
||||||
</t-steps>
|
</t-steps>
|
||||||
</view>
|
</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 class="five" column="{{4}}" align="center" border="{{border}}">
|
||||||
<t-grid-item wx:for="{{userNameList}}" wx:key="index" text="{{item.id}}">
|
<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>
|
<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:confirm="checkName"
|
||||||
bind:cancel="closeDialog"
|
bind:cancel="closeDialog"
|
||||||
/>
|
/>
|
||||||
|
<t-dialog visible="{{timeOutConfirm}}" title="超时未选择,注册中止" confirm-btn="好的" bind:confirm="checkTimeout" />
|
||||||
|
|||||||
@@ -1,3 +1,10 @@
|
|||||||
.custom-confirm-btn {
|
.custom-confirm-btn {
|
||||||
color: #ff4646 !important;
|
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