瀏覽代碼

身份证验证

wkyy 3 年之前
父節點
當前提交
0ca2e09504
共有 4 個文件被更改,包括 33 次插入37 次删除
  1. 2 2
      pagesA/pages/login/change.vue
  2. 2 2
      pagesA/pages/login/index.vue
  3. 2 5
      pagesA/pages/login/register.vue
  4. 27 28
      pagesA/pages/login/search.vue

+ 2 - 2
pagesA/pages/login/change.vue

@@ -131,14 +131,14 @@
 					})
 					return
 				}
-				if (false && checkOldPhoneResult !== true) {
+				if (!this.form.newPhone || checkOldPhoneResult != true) {
 					uni.showToast({
 						title: "原手机号输入错误," + checkOldPhoneResult,
 						icon: "none"
 					})
 					return;
 				}
-				if (false && checkNewPhoneResult !== true) {
+				if (!this.form.newPhone || checkNewPhoneResult != true) {
 					uni.showToast({
 						title: "新手机号输入错误," + checkNewPhoneResult,
 						icon: "none"

+ 2 - 2
pagesA/pages/login/index.vue

@@ -162,14 +162,14 @@
 					})
 					return
 				}
-				if (false && checkIdCardResult !== true) {
+				if (!this.form.idCard || checkIdCardResult != true) {
 					uni.showToast({
 						title: checkIdCardResult,
 						icon: "none"
 					})
 					return;
 				}
-				if (false && checkPhoneResult !== true) {
+				if (!this.form.telephone || checkPhoneResult != true) {
 					uni.showToast({
 						title: checkPhoneResult,
 						icon: "none"

+ 2 - 5
pagesA/pages/login/register.vue

@@ -221,7 +221,7 @@
 					})
 					return
 				}
-				if (false && checkIdCardResult !== true) {
+				if (!this.form.idCard || checkIdCardResult != true) {
 					uni.showToast({
 						title: checkIdCardResult,
 						icon: "none"
@@ -235,7 +235,7 @@
 					})
 					return
 				}
-				if (false && checkPhoneResult !== true) {
+				if (!this.form.telephone || checkPhoneResult != true) {
 					uni.showToast({
 						title: checkPhoneResult,
 						icon: "none"
@@ -261,8 +261,6 @@
 					title: "加载中",
 					mask: true,
 				})
-
-
 				loginApi.register({
 					realName: this.form.realName,
 					idCard: this.form.idCard,
@@ -276,7 +274,6 @@
 					this.carhelp.setToken(token);
 					this.carhelp.setPersonInfo(response.data.memberInfo);
 					this.carhelp.setPersonInfoPlus(response.data.data);
-					debugger
 					this.gotoUrl("pagesB/pages/login/step1")
 					// uni.switchTab({
 					// 	url: '/pages/index/index'

+ 27 - 28
pagesA/pages/login/search.vue

@@ -29,7 +29,7 @@
 			return {
 				keyword: '',
 				pageIndex: 1,
-				pageSize: 100,
+				recordsTotal: 0,
 				orgResult: [],
 				actionStyle: {
 					background: '#FF5E5E',
@@ -40,6 +40,14 @@
 				},
 			}
 		},
+		onShow() {
+			this.getList(true);
+		},
+		onReachBottom() {
+			if (this.likeList.length < this.recordsTotal) {			
+				this.myLoadmore();
+			}
+		},
 		methods: {
 			getRegister(item) {
 				this.carhelp.set("searchOrgItem",item)
@@ -47,19 +55,25 @@
 					url: '/pagesA/pages/login/register'
 				})
 			},
-			getList() {
+			getList(bl) {
 				uni.showLoading({
 					title: "加载中",
 					mask: true,
 				})
+				if(bl) {
+					this.orgResult = [];
+					this.pageIndex = 1;
+				}
 				loginApi.orgList({
 					pageIndex: this.pageIndex,
-					pageSize: this.pageSize,
+					pageSize: 10,
 					orgName: this.keyword
-				}).then((response) => {
-					var jsonData = response.data.data;
-					console.log(jsonData);
-					this.orgResult = jsonData;
+				}).then((res) => {
+					this.orgResult = [
+						...this.orgResult,
+						...res.data.data
+					];
+					this.recordsTotal = res.data.recordsTotal
 					uni.hideLoading()
 				})
 				.catch((error) => {
@@ -68,28 +82,13 @@
 					})
 				})
 			},
-			searchQrg() {			
-				uni.showLoading({
-					title: "加载中",
-					mask: true,
-				})
-				loginApi.orgList({
-					pageIndex: this.pageIndex,
-					pageSize: this.pageSize,
-					orgName: this.keyword
-				}).then((response) => {
-					var jsonData = response.data.data;
-					this.orgResult = jsonData;
-					uni.hideLoading();			
-				})
-				.catch((error) => {
-					uni.showToast({
-						title: error,icon: "none"
-					})
-				})
+			myLoadmore() {
+				this.pageIndex += 1;
+				this.getList()
 			},
-			onReady() {
-				this.getList();
+			searchQrg() {
+				console.log(this.keyword);
+				this.getList(true);
 			}
 		}
 	}