瀏覽代碼

注册流程优化

wkw 7 月之前
父節點
當前提交
e83b31984f
共有 3 個文件被更改,包括 33 次插入27 次删除
  1. 3 1
      pages/public/forgetPwd.vue
  2. 11 9
      pages/public/loginphone.vue
  3. 19 17
      pages/public/register.vue

+ 3 - 1
pages/public/forgetPwd.vue

@@ -111,7 +111,9 @@
 					this.$queue.showToast("请输入手机号");
 				} else if (phone.length !== 11) {
 					this.$queue.showToast("请输入正确的手机号");
-				} else {
+				} else if(this.sendTime != '获取验证码'){
+					return;
+				}else {
 					this.$queue.showLoading("正在发送验证码...");
 					this.$Request.getT("/app/Login/sendMsg/" + phone + "/forget").then((res) => {
 						if (res.code === 0) {

+ 11 - 9
pages/public/loginphone.vue

@@ -101,7 +101,9 @@
 					this.$queue.showToast("请输入手机号");
 				} else if (phone.length !== 11) {
 					this.$queue.showToast("请输入正确的手机号");
-				} else {
+				} else if(this.sendTime != '获取验证码'){
+					return;
+				}else {
 					this.$queue.showLoading("正在发送验证码...");
 					this.$Request.getT("/app/Login/sendMsg/" + phone + "/forget").then((res) => {
 						if (res.code === 0) {
@@ -354,14 +356,14 @@
 		background-color: #ffffff;
 	}
 
-	.send-msg {
-		border-radius: 30px;
-		color: black;
-		background: white;
-		height: 30px;
-		font-size: 14px;
-		line-height: 30px;
-	}
+	// .send-msg {
+	// 	border-radius: 30px;
+	// 	color: black;
+	// 	background: white;
+	// 	height: 30px;
+	// 	font-size: 14px;
+	// 	line-height: 30px;
+	// }
 
 	.container {
 		top: 0;

+ 19 - 17
pages/public/register.vue

@@ -213,7 +213,9 @@ export default {
         this.$queue.showToast("请输入手机号");
       } else if (phone.length !== 11) {
         this.$queue.showToast("请输入正确的手机号");
-      } else {
+      } else if(this.sendTime != '获取验证码'){
+		  return;
+	  }else {
         this.$queue.showLoading("正在发送验证码...");
         this.$Request.getT("/app/Login/sendMsg/" + phone + "/1").then((res) => {
           if (res.code === 0) {
@@ -332,20 +334,20 @@ export default {
                 res.user.avatar ? res.user.avatar : "../../static/logo.png"
               );
               this.getUserInfo();
-              setTimeout(function () {
-                // 这里判断一下看是否是第一次登录如果是就跳到引导页,如果不是就正常跳
-                // let firstLogin = uni.getStorageSync("firstLogin") || false;
-				console.log("userType:",res.user.userType)
-                if (!res.user.userType) {
-                  uni.navigateTo({
-                    url: "/pages/my/jobApplicant/guidePage",
-                  });
-                } else {
-                  uni.switchTab({
-                    url: "/pages/index/index",
-                  });
-                }
-              }, 1000);
+    //           setTimeout(function () {
+    //             // 这里判断一下看是否是第一次登录如果是就跳到引导页,如果不是就正常跳
+    //             // let firstLogin = uni.getStorageSync("firstLogin") || false;
+				// console.log("userType:",res.user.userType)
+    //             if (!res.user.userType) {
+    //               uni.navigateTo({
+    //                 url: "/pages/my/jobApplicant/guidePage",
+    //               });
+    //             } else {
+    //               uni.switchTab({
+    //                 url: "/pages/index/index",
+    //               });
+    //             }
+    //           }, 1000);
             } else {
               uni.hideLoading();
               uni.showModal({
@@ -416,8 +418,8 @@ export default {
           this.invitationCode = res.data.invitationCode;
           uni.setStorageSync("invitationCode", res.data.invitationCode);
           setTimeout(function () {
-            uni.switchTab({
-              url: "pages/my/jobApplicant/registerSuccess",//pages/my/jobApplicant/registerSuccess
+            uni.reLaunch({
+              url: "/pages/my/jobApplicant/registerSuccess",//pages/my/jobApplicant/registerSuccess
             });
           }, 1000);
 		  return