wkyy 3 years ago
parent
commit
8bf62a3e3b
4 changed files with 28 additions and 17 deletions
  1. 10 4
      pages/friend/index.vue
  2. 1 1
      pages/login/index.vue
  3. 14 9
      pages/login/register.vue
  4. 3 3
      pages/login/search.vue

+ 10 - 4
pages/friend/index.vue

@@ -116,7 +116,7 @@
 			},
 			refreshClick() {
 				var data = {
-					type: 'type',
+					type: 'typedssdf',
 					memberId: 'memberId',
 					oppositeSex: 'oppositeSex',
 					ageStart: 'ageStart',
@@ -128,11 +128,17 @@
 					hyqk: 'hyqk',
 					znqk: 'znqk'
 				};
-				var list = [];
-				console.log(data.type)
+				let list = [];
+				for(var item in data) {
+					var sgd = {};
+					sgd[item] = data[item]
+					list.push(sgd);
+				}
+				console.log(list)
 				
 				for(var i = 0; i < 3; i++) {
-					var num=Math.floor(Math.random()*11+1);
+					var num=Math.floor(Math.random()*10+0);
+					console.log(list[num])
 				}
 			},
 			getFriendList() {

+ 1 - 1
pages/login/index.vue

@@ -81,7 +81,7 @@
 		},
 		methods: {
 			radioChange() {
-				//this.value = true;
+				this.value = true;
 			},
 			getRegister() {
 				uni.navigateTo({

+ 14 - 9
pages/login/register.vue

@@ -99,7 +99,7 @@
 			}
 		},
 		onShow() {
-			var item=	this.carhelp.get("selectitem")
+			var item=	this.carhelp.get("searchOrgItem")
 			if(item){
 				console.log(item)
 				this.form.orgName = item.name;
@@ -111,7 +111,7 @@
 		},
 		methods: {
 			radioChange() {
-				//this.value = true;
+				this.value = true;
 			},
 			getSearch() {
 				uni.navigateTo({
@@ -119,12 +119,12 @@
 				})
 			},
 			getLogin() {
-				uni.redirectTo({
+				uni.navigateBack({
 					url: '/pages/login/index'
 				});
 			},
 			goAgreement() {
-				uni.redirectTo({
+				uni.navigateTo({
 					url: '/pages/login/agreement'
 				});
 			},
@@ -200,31 +200,36 @@
 				}
 				if (!this.form.idCard) {
 					uni.showToast({
-						title: "请输入身份证"
+						title: "请输入身份证",
+						icon: "none"
 					})
 					return
 				}
 				if (!this.form.orgName) {
 					uni.showToast({
-						title: "请选择工会"
+						title: "请选择工会",
+						icon: "none"
 					})
 					return
 				}
 				if (!this.form.telephone) {
 					uni.showToast({
-						title: "请输入手机号"
+						title: "请输入手机号",
+						icon: "none"
 					})
 					return
 				}
 				if (!this.form.verifyCode) {
 					uni.showToast({
-						title: "请输入验证码"
+						title: "请输入验证码",
+						icon: "none"
 					})
 					return
 				}
 				if (this.value == '0') {
 					uni.showToast({
-						title: "请勾选协议"
+						title: "请勾选协议",
+						icon: "none"
 					})
 					return
 				}

+ 3 - 3
pages/login/search.vue

@@ -7,8 +7,8 @@
 		<view class="searchList" v-if="orgResult.length > 0">		
 			<list>
 				<cell v-for="(item, index) in orgResult" :key="item.id">
-					<view class="searchList-item">
-						<text @click="getRegister(item)">{{item.name}}</text>
+					<view class="searchList-item"  @click="getRegister(item)">
+						<text>{{item.name}}</text>
 					</view>
 				</cell>
 			</list>		
@@ -42,7 +42,7 @@
 		},
 		methods: {
 			getRegister(item) {
-				this.carhelp.set("selectitem",item)
+				this.carhelp.set("searchOrgItem",item)
 				uni.navigateBack({
 					url: '/pages/login/register'
 				})