lilei 3 年 前
コミット
ab6d5ee418
3 ファイル変更55 行追加32 行削除
  1. 6 0
      pages.json
  2. 48 31
      pages/login/forget-pass.vue
  3. 1 1
      pages/login/login.vue

+ 6 - 0
pages.json

@@ -15,6 +15,12 @@
 				"navigationBarTitleText": "注意事项及服务协议"
 				"navigationBarTitleText": "注意事项及服务协议"
 			}
 			}
 		},
 		},
+		{
+			"path": "pages/login/forget-pass",
+			"style": {
+				"navigationBarTitleText": "忘记密码"
+			}
+		},
 		{
 		{
 			"path": "pages/cleared/index", // 扫码记录
 			"path": "pages/cleared/index", // 扫码记录
 			"style": {
 			"style": {

+ 48 - 31
pages/login/forget-pass.vue

@@ -1,34 +1,37 @@
 <template>
 <template>
 	<view class="forget-wrap">
 	<view class="forget-wrap">
-		<form class="login-form" @submit="formSubmit">
-			<view v-show="state == 0">
-				<view class="form-item">
-					<input v-model="form.phone" class="item-inp" name="phone" type="number" maxlength="11" placeholder="请输入登录手机号" />
+		<view class="login-body">
+			<form class="login-form" @submit="formSubmit">
+				<view class="login-title">{{state == 1 ? '修改密码':'找回密码'}}</view>
+				<view v-show="state == 0">
+					<view class="form-item">
+						<u-input v-model="form.phone" :custom-style="{fontSize:'34upx'}" height="110" type="number" clearable maxlength="11" placeholder="请输入登录手机号" />
+					</view>
+					<view class="form-item flex-box justify_between">
+						<view><u-input v-model="form.verifyCode" :custom-style="{fontSize:'34upx'}" height="110" type="number" clearable maxlength="6" placeholder="请输入短信验证码" /></view>
+						<button class="getcode-btn" :style="{background:$config('fixedButtonColors')}" :disabled="isDisable" @click="getCodeValidate">{{nowVal}}</button>
+					</view>
+					<view class="form-btn-con">
+						<button class="form-btn" :disabled="isDisabled" :style="{'background':isDisabled?'#e5e5e5':$config('buttonColors')}" @click="goStep">下一步</button>
+					</view>
 				</view>
 				</view>
-				<view class="form-item">
-					<input v-model="form.verifyCode" class="item-inp" name="verifyCode" type="number" maxlength="6" placeholder="请输入短信验证码" />
-					<button class="getcode-btn" :disabled="isDisable" @click="getCodeValidate">{{nowVal}}</button>
+				<view v-show="state == 1">
+					<view class="form-item">
+						<u-input v-model="form.password" :custom-style="{fontSize:'34upx'}" height="110" type="password" :password-icon="true" maxlength="12" placeholder="请输入新密码"/>
+					</view>
+					<view class="form-item">
+						<u-input v-model="form.passwords" :custom-style="{fontSize:'34upx'}" height="110" type="password" :password-icon="true" maxlength="12" placeholder="请再次输入新密码"/>
+					</view>
+					<view class="form-btn-con">
+						<button class="form-btn" :disabled="isDisabledTwo" :style="{'background':isDisabledTwo?'#e5e5e5':$config('buttonColors')}" form-type="submit">提交</button>
+					</view>
 				</view>
 				</view>
-				<view class="form-btn-con">
-					<button class="form-btn" @click="goStep">下一步</button>
-				</view>
-			</view>
-			<view v-show="state == 1">
-				<view class="form-item">
-					<input v-model="form.password" class="item-inp" name="password" password type="text" maxlength="12" placeholder="请输入新密码" />
-				</view>
-				<view class="form-item">
-					<input v-model="form.passwords" class="item-inp" name="passwords" password type="text" maxlength="12" placeholder="请再次输入新密码" />
-				</view>
-				<view class="form-btn-con">
-					<button class="form-btn" form-type="submit">提交</button>
-				</view>
-			</view>
-		</form>
-		<!-- 图文验证码 -->
-		<uni-popup ref="imageTxtPopup" type="center">
-			<popup-con type="forgetImageTxt" title="图文验证码" :popBtn="popBtn" :changeImg="changeImg" @captchaImg="captchaImg"></popup-con>
-		</uni-popup>
+			</form>
+			<!-- 图文验证码 -->
+			<uni-popup ref="imageTxtPopup" type="center">
+				<popup-con type="forgetImageTxt" title="图文验证码" :popBtn="popBtn" :changeImg="changeImg" @captchaImg="captchaImg"></popup-con>
+			</uni-popup>
+		</view>
 	</view>
 	</view>
 </template>
 </template>
 
 
@@ -61,6 +64,14 @@
 				randomCode: '',  //  图片验证码随机码
 				randomCode: '',  //  图片验证码随机码
 			}
 			}
 		},
 		},
+		computed: {
+			isDisabled() {
+				return this.form.phone == '' || this.form.verifyCode == ''
+			},
+			isDisabledTwo(){
+				return this.form.password == '' || this.form.passwords == ''
+			}
+		},
 		onLoad(opts) {
 		onLoad(opts) {
 			if(opts.username){
 			if(opts.username){
 				this.form.phone = opts.username
 				this.form.phone = opts.username
@@ -133,7 +144,7 @@
 							success: function (ret) {
 							success: function (ret) {
 						        if (ret.confirm||ret.index==0) {
 						        if (ret.confirm||ret.index==0) {
 									uni.reLaunch({
 									uni.reLaunch({
-										url: '/pages/login/pwLogin'
+										url: '/pages/login/login'
 									})
 									})
 						        }
 						        }
 						    }
 						    }
@@ -218,12 +229,18 @@
 </script>
 </script>
 <style scoped lang="scss">
 <style scoped lang="scss">
 	@import './login.scss';
 	@import './login.scss';
+	.forget-wrap .login-body{
+		justify-content: space-between;
+	}
 	.forget-wrap .login-form{
 	.forget-wrap .login-form{
-		padding-top: 300upx;
+		margin-top: 15%;
 	}
 	}
 	.getcode-btn {
 	.getcode-btn {
-		background-color: #298bf2 !important;
-		color: #fff !important;
+		color: #0485F6 !important;
 		border: none !important;
 		border: none !important;
+		background: none !important;
+		&:after{
+			border: none !important;
+		}
 	}
 	}
 </style>
 </style>

+ 1 - 1
pages/login/login.vue

@@ -27,7 +27,7 @@
 				</view>
 				</view>
 			</form>
 			</form>
 		</view>
 		</view>
-		
+		<!-- 隐私协议 -->
 		<view class="authUserYs">
 		<view class="authUserYs">
 			<u-checkbox-group width="45rpx" @change="authuserChange">
 			<u-checkbox-group width="45rpx" @change="authuserChange">
 				<u-checkbox v-model="isAuthuserYs" :label-disabled="false" shape="circle">
 				<u-checkbox v-model="isAuthuserYs" :label-disabled="false" shape="circle">