Pārlūkot izejas kodu

Merge branch 'test' of git.echepei.com:sailun/sailun-tbr-web into test

caojunjie 4 gadi atpakaļ
vecāks
revīzija
c69ed2c52e
3 mainītis faili ar 52 papildinājumiem un 49 dzēšanām
  1. 25 25
      pages/login/index.vue
  2. 24 24
      pages/login/register_2.vue
  3. 3 0
      pages/login/register_3.vue

+ 25 - 25
pages/login/index.vue

@@ -183,31 +183,31 @@
 				this.codeText = text;
 			},
 			getCode() {
-				if (this.tel) {
-					this.codeLoading = true
-					request({
-						url: '/sailun/appStoreBasicInfo/sendCode',
-						method: 'post',
-						data: {
-							"phoneNumber": this.tel,
-							"opreaType": "1"
-						},
-					}).then(res => {
-						if (res.data.code == 0) {
-							if (this.$refs.uCode.canGetCode) {
-								this.$refs.uCode.start();
-							} else {
-								this.$u.toast('倒计时结束后再发送');
-							}
-						}
-						if (res.data.code == 500) {
-							this.$u.toast(res.data.msg);
-						}
-					}).catch(err => {
-						console.log(err)
-					}).finally(() => {
-						this.codeLoading = false
-					})
+				if (this.$u.test.mobile(this.tel)) {
+					if (this.$refs.uCode.canGetCode) {
+						this.codeLoading = true
+						request({
+								url: '/sailun/appStoreBasicInfo/sendCode',
+								method: 'post',
+								data: {
+									"phoneNumber": this.tel,
+									"opreaType": "1"
+								},
+							}).then(res => {
+								if (res.data.code == 0) {
+									this.$refs.uCode.start();
+								}
+								if (res.data.code == 500) {
+									this.$u.toast(res.data.msg);
+								}
+							}).catch(err => {
+								console.log(err)
+							}).finally(() => {
+								this.codeLoading = false
+							})
+					} else {
+						this.$u.toast('倒计时结束后再发送');
+					}
 				} else {
 					this.$u.toast('请输入手机号');
 				}

+ 24 - 24
pages/login/register_2.vue

@@ -279,32 +279,32 @@
 				this.codeText = text;
 			},
 			getCode() {
-				if (this.form.phone) {
-					this.codeLoading = true
-					request({
-						url: '/sailun/appStoreBasicInfo/sendCode',
-						method: 'post',
-						data: {
-							"phoneNumber": parseInt(this.form.phone),
-							"opreaType": "0"
-						},
-					}).then(res => {
-						if (res.data.code == 0) {
-							if (this.$refs.uCode.canGetCode) {
+				if (this.$u.test.mobile(this.form.phone)) {
+					if (this.$refs.uCode.canGetCode) {
+						this.codeLoading = true
+						request({
+							url: '/sailun/appStoreBasicInfo/sendCode',
+							method: 'post',
+							data: {
+								"phoneNumber": parseInt(this.form.phone),
+								"opreaType": "0"
+							},
+						}).then(res => {
+							if (res.data.code == 0) {
 								this.$refs.uCode.start();
-							} else {
-								this.$u.toast('倒计时结束后再发送');
 							}
-						}
-						if (res.data.code == 500) {
-							this.$u.toast(res.data.msg);
-						}
-					}).catch(err => {
-						console.log(err)
-					}).finally(() => {
-						this.codeLoading = false
-						// 通知验证码组件内部开始倒计时
-					})
+							if (res.data.code == 500) {
+								this.$u.toast(res.data.msg);
+							}
+						}).catch(err => {
+							console.log(err)
+						}).finally(() => {
+							this.codeLoading = false
+							// 通知验证码组件内部开始倒计时
+						})
+					} else {
+						this.$u.toast('倒计时结束后再发送');
+					}
 				} else {
 					this.$u.toast('请输入手机号');
 				}

+ 3 - 0
pages/login/register_3.vue

@@ -320,6 +320,9 @@
 						res.push(item.brand)
 						return res;
 					}, []);
+					this.checkedAgentlist.sort((a, b) => {
+						return a['brand'].localeCompare(b['brand'])
+					})
 					this.getQuerybrand()
 					this.brandShow = false
 				} else {