| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110 |
- <template>
- <view class="reset-container">
- <!-- 顶部导航栏 -->
- <!-- 标题 "设置新密码" -->
- <view class="content">
- <view class="tip-text">请输入新密码,并重新登录验证</view>
- <view class="input-form">
- <view class="input-row">
- <input
- class="pwd-input"
- type="text"
- password
- placeholder="限12-20位字母和数字组合"
- placeholder-style="color:#ccc"
- v-model="pwd1"
- />
- </view>
- <view class="divider"></view>
- <view class="input-row">
- <input
- class="pwd-input"
- type="text"
- password
- placeholder="限12-20位字母和数字组合"
- placeholder-style="color:#ccc"
- v-model="pwd2"
- />
- </view>
- <view class="divider"></view>
- </view>
-
- <button class="confirm-btn" @click="confirmReset">确定</button>
- </view>
- </view>
- </template>
- <script>
- export default {
- data() {
- return {
- pwd1: '',
- pwd2: ''
- }
- },
- methods: {
- confirmReset() {
- if (!this.pwd1 || !this.pwd2) {
- uni.showToast({ title: '请输入密码', icon: 'none' });
- return;
- }
- if (this.pwd1 !== this.pwd2) {
- uni.showToast({ title: '两次密码不一致', icon: 'none' });
- return;
- }
-
- uni.showToast({ title: '重置成功', icon: 'success' });
-
- // 延迟跳转回登录页
- setTimeout(() => {
- uni.navigateBack({
- delta: 2 // 返回到登录页
- });
- }, 1500);
- }
- }
- }
- </script>
- <style>
- page {
- background-color: #fff;
- }
- .reset-container {
- padding: 40rpx;
- }
- .tip-text {
- font-size: 28rpx;
- color: #666;
- margin-bottom: 60rpx;
- }
- .input-form {
- margin-bottom: 80rpx;
- }
- .input-row {
- padding: 30rpx 0;
- }
- .pwd-input {
- font-size: 30rpx;
- width: 100%;
- color: #333;
- }
- .divider {
- height: 1px;
- background-color: #eee;
- }
- .confirm-btn {
- background: linear-gradient(90deg, #FF6F00 0%, #FF5722 100%);
- color: #fff;
- font-size: 32rpx;
- font-weight: bold;
- border-radius: 8rpx;
- height: 88rpx;
- line-height: 88rpx;
- }
- .confirm-btn::after {
- border: none;
- }
- </style>
|