Browse Source

工会查找

wkyy 3 years ago
parent
commit
01065c2b4a
5 changed files with 37 additions and 76 deletions
  1. 0 1
      pages/login/change.vue
  2. 8 8
      pages/login/index.vue
  3. 10 2
      pages/login/register.vue
  4. 19 9
      pages/login/search.vue
  5. 0 56
      pages/login/searchNone.vue

File diff suppressed because it is too large
+ 0 - 1
pages/login/change.vue


+ 8 - 8
pages/login/index.vue

@@ -38,13 +38,13 @@
 				<u-button type="error" shape="circle" :custom-style="customStyle" @click="finish">登录</u-button>
 			</view>
 			<view class="jpLogin-radio">
-				<u-checkbox -group v-model="value" @change="checkboxChange">
-					<u-checkbox  activeColor="#ff5e5e">
+				<u-radio-group v-model="value">
+					<u-radio activeColor="#ff5e5e" @change="radioChange">
 						<view class="u-flex">
 							<p>已阅读并同意</p><span @click="getAgreement">《会员服务协议》</span>
 						</view>
-					</u-checkbox >
-				</u-checkbox -group>
+					</u-radio>
+				</u-radio-group>
 			</view>
 			<u-verification-code :seconds="sendMsgSecond" ref="uCode" @change="codeChange" @end="end" @start="start">
 			</u-verification-code>
@@ -75,8 +75,8 @@
 			}
 		},
 		methods: {
-			checkboxChange() {
-				console.log(this.value)
+			radioChange() {
+				this.value = true;
 			},
 			getRegister() {
 				uni.redirectTo({
@@ -169,9 +169,9 @@
 					})
 					return
 				}
-				if (!this.value) {
+				if (this.value == '0') {
 					uni.showToast({
-						title: "请勾选会员服务协议"
+						title: "请勾选协议"
 					})
 					return
 				}

File diff suppressed because it is too large
+ 10 - 2
pages/login/register.vue


+ 19 - 9
pages/login/search.vue

@@ -3,7 +3,7 @@
 		<view class="search">
 			<u-search placeholder="输入关键字查询工会" v-model="keyword" :action-style="actionStyle" @custom="searchQrg" @search="searchQrg"></u-search>
 		</view>
-		<view class="searchList">		
+		<view class="searchList" v-if="orgResult.length > 0">		
 			<list>
 				<cell v-for="(item, index) in orgResult" :key="item.id">
 					<view class="searchList-item">
@@ -13,6 +13,10 @@
 			</list>		
 			<u-divider color="#B6BDC3" style="margin-top:20px;">已经到底了</u-divider>
 		</view>
+		<view class="jpDefault" v-else>
+			<u-image width="179px" height="126px" src="/static/img/default1.png"></u-image>
+			<p>没有匹配的搜索结果</p>
+		</view>
 	</view>
 </template>
 
@@ -74,14 +78,8 @@
 					orgName: this.keyword
 				}).then((response) => {
 					var jsonData = response.data.data;
-					if(jsonData.length == 0) {
-						uni.redirectTo({
-							url: '/pages/login/searchNone'
-						});
-					} else {
-						this.orgResult = jsonData;
-						uni.hideLoading()
-					}				
+					this.orgResult = jsonData;
+					uni.hideLoading();			
 				})
 				.catch((error) => {
 					uni.showToast({
@@ -109,4 +107,16 @@
 			padding: 15px 0;
 		}
 	}
+	
+	.jpDefault{
+		padding-top:150px;
+		display: flex;
+		flex-direction: column;
+		align-items: center;
+		p{
+			color: #A69F9F;
+			font-size: 16px;
+			margin-top: 12px;
+		}
+	}
 </style>

+ 0 - 56
pages/login/searchNone.vue

@@ -1,56 +0,0 @@
-<template>
-	<view>
-		<view class="search">
-			<u-search placeholder="输入关键字查询工会" v-model="keyword" :action-style="actionStyle"></u-search>
-		</view>
-		<view class="jpDefault">
-			<u-image width="179px" height="126px" src="/static/img/default1.png"></u-image>
-			<p>没有匹配的搜索结果</p>
-		</view>
-	</view>
-</template>
-
-<script>
-	export default {
-		data() {
-			return {
-				keyword: '',
-				actionStyle:{
-					background: '#FF5E5E',
-					color:'#ffffff',
-					padding:'5px 0',
-					width:'60px',
-					borderRadius:'15px',
-				},
-			}
-			methods: {
-
-			}
-
-		}
-	}
-</script>
-
-<style lang="scss" scoped>
-	.search{
-		padding:10px 15px;
-	}
-	.searchList{
-		padding:0 15px;
-		.searchList-item{
-			border-bottom: 1px solid #E5E7EA;
-			padding:15px 0; 
-		}
-	}
-	.jpDefault{
-		padding-top:150px;
-		display: flex;
-		flex-direction: column;
-		align-items: center;
-		p{
-			color: #A69F9F;
-			font-size: 16px;
-			margin-top: 12px;
-		}
-	}
-</style>

Some files were not shown because too many files changed in this diff