Browse Source

验证码登录问题

zhengkaixin 3 years ago
parent
commit
aa73398952
4 changed files with 13 additions and 9 deletions
  1. 4 2
      apis/login.js
  2. 2 2
      components/job/ResumeAuth.vue
  3. 3 3
      pages/login/index.js
  4. 4 2
      pages/login/wxLogin/wxLogin.vue

+ 4 - 2
apis/login.js

@@ -44,11 +44,13 @@ export function validateCode(data) {
 	})
 } 
 
-export function getVerifyCode(data) {
+export function getVerifyCode(tel) {
 	 
 	return requestWhite({
 		method: 'post',
-		data:data ,
+		data:{
+			telephone:tel
+		} ,
 		url: '/mobile/jobUserApi/getVerifyCode'
 	})
 } 

+ 2 - 2
components/job/ResumeAuth.vue

@@ -114,12 +114,12 @@
 							icon:"none",
 							title:"请填写姓名"
 						})
-				  }else if (false&&!this.authData.positiveUrl) {
+				  }else if (!this.authData.positiveUrl) {
 						uni.showToast({
 							icon:"none",
 							title:"请上传身份证人脸面"
 						})
-				  }else if (false&&!this.authData.reverseUrl) {
+				  }else if (!this.authData.reverseUrl) {
 						uni.showToast({
 							icon:"none",
 							title:"请上传身份证国徽面"

+ 3 - 3
pages/login/index.js

@@ -15,7 +15,7 @@ export default {
 				error:"",
 				second:"",
 				password:"",
-				maxlength:4,
+				maxlength:6,
 				value:"",
 				show:"",
 				isSendMsgIng: false,
@@ -59,7 +59,7 @@ export default {
 			}
 		},
 		methods: {
-			finish(){
+			finish(e){
 				if(!this.carhelp.getOpenId()){
 					uni.showToast({
 						title:"请使用“微信”访问本系统登录"
@@ -70,7 +70,7 @@ export default {
 				   	title:"加载中"
 				   })
 				  API.validateCode({
-					verifyCode:  this.value,
+					verifyCode:  e,
 					telephone:this.tel,
 					openId:this.carhelp.getOpenId(),
 					form:this.form

+ 4 - 2
pages/login/wxLogin/wxLogin.vue

@@ -35,9 +35,11 @@
 					<u-message-input :focus="true" :value="value"   @finish="finish" mode="bottomLine" :maxlength="maxlength"></u-message-input>
 					<view class="captcha">
 						<text :class="{ noCaptcha: show }" @tap="noCaptcha">收不到验证码点这里</text>
-						<text :class="{ regain: !show }">{{ sendMsgSecond }}秒后重新获取验证码</text>
+						<text :class="{ regain: !show }">{{ sendMsgSecond==300?'0':sendMsgSecond }}秒后重新获取验证码</text>
 						<text :class="{ error: error }">验证码错误,请重新输入</text>
-						<u-button shape="circle"   size="medium"  @click="tab=0">返回</u-button>
+						<u-button shape="circle"   size="medium"  @click="login2" v-show="sendMsgSecond==300">返回</u-button>
+						
+						<u-button shape="circle"   size="medium"  @click="tab=1">返回</u-button>
 						
 					</view>