he2802 4 éve
szülő
commit
3beb5bdb7a
4 módosított fájl, 65 hozzáadás és 55 törlés
  1. 3 1
      components/recruitment.vue
  2. 11 5
      pages/index/index.vue
  3. 1 0
      pages2/wd/avatar.vue
  4. 50 49
      pages2/wd/info.vue

+ 3 - 1
components/recruitment.vue

@@ -27,8 +27,9 @@
 		<u-popup v-model="show">
 			<view style="width: 600rpx"><view class="popup_t1">选择你需要的</view></view>
 		</u-popup>
-	<view style="position: relative;">
+	<view class="u-config-item">
 			<u-subsection :list="tab_list1" :current="current2" button-color="rgba(47,67,121,0.6)" @change="sectionChange"></u-subsection>
+
 	</view>
 		
 	</view>
@@ -58,6 +59,7 @@ export default {
 	},
 	mounted() {
 		this.windowHeight = uni.getSystemInfoSync().windowHeight - 120;
+		this.init();
 		console.log(this.windowHeight);
 	},
 	methods: {

+ 11 - 5
pages/index/index.vue

@@ -1,10 +1,12 @@
 <template>
 	<view>
 		<home v-show="current == 0" ref="home"></home>
-		<recruitment v-show="current == 1" ref="recruitment"></recruitment>
+		<view v-if="isClick1">
+			<recruitment v-show="current == 1" ref="recruitment"></recruitment>
+		</view>
 		<my v-show="current == 2" ref="refMy"></my>
 
-		<u-tabbar v-model="current" :list="list" active-color="#2F4379" :before-switch="beforeSwitch"></u-tabbar>
+		<u-tabbar v-model="current" :list="list" active-color="#2F4379" :before-switch="beforeSwitch" ></u-tabbar>
 	</view>
 </template>
 
@@ -41,12 +43,13 @@ export default {
 					customIcon: false
 				}
 			],
-			current: 0
+			current: 0,
+			isClick1:false
 		};
 	},
 	onLoad(option) {
 		this.$refs.home.init();
-		this.$refs.recruitment.init();
+		
 	},
 	onShow() {
 		
@@ -64,7 +67,10 @@ export default {
 		},
 		beforeSwitch(index) {
 			let that = this;
-			if (index == this.current) {
+			if(index==1){
+				this.isClick1= true
+			}
+			if (index == this.current) {	
 				return false;
 			}
 			if (!this.$method.isLogin()) {

+ 1 - 0
pages2/wd/avatar.vue

@@ -16,6 +16,7 @@
 				
 				<button  @click="exit" class="exit_btn">退出登录</button>
 			</view>
+			
 	</view>
 </template>
 

+ 50 - 49
pages2/wd/info.vue

@@ -64,7 +64,7 @@
 						@on-list-change="changePhotoListHeader"
 					>
 						<template v-slot:addBtn>
-							<image :src="form.oneInchPhotos ? $method.splitImgHost(form.oneInchPhotos) : '/static/info_1.png'" style="width: 120rpx; height: 169rpx;"></image>
+							<image :src="form.oneInchPhotos ? $method.splitImgHost( form.oneInchPhotos) : '/static/info_1.png'" style="width: 120rpx; height: 169rpx;"></image>
 						</template>
 					</u-upload>
 				</u-form-item>
@@ -104,12 +104,12 @@
 				</u-form-item> -->
 			</u-form>
 		</view>
-		<button @click="resultForm" class="submit_btn">提交</button>
+		<button  @click="resultForm" class="submit_btn">提交</button>
 	</view>
 </template>
 
 <script>
-import { mapGetters } from 'vuex';
+	import {mapGetters} from 'vuex';
 export default {
 	data() {
 		return {
@@ -159,54 +159,54 @@ export default {
 					}
 				],
 				width: 0,
-				height: 0
+				height: 0,
 			}
 		};
 	},
 	onReady() {
 		this.$refs.uForm.setRules(this.rules);
-		this.form = this.userInfo;
-		if (this.form.houseProvince === '' || this.form.houseProvince == null) {
-			this.form.houseProvince = '广东省';
+		this.form = this.userInfo
+		if(this.form.houseProvince === ''||this.form.houseProvince == null){
+			this.form.houseProvince = '广东省'
 		}
-		if (this.form.houseCity === '' || this.form.houseCity == null) {
-			this.form.houseCity = '广州市';
+		if(this.form.houseCity === ''||this.form.houseCity == null){
+			this.form.houseCity = '广州市'
 		}
-		if (this.form.houseDistrict === '' || this.form.houseDistrict == null) {
-			this.form.houseDistrict = '天河区';
+		if(this.form.houseDistrict === ''||this.form.houseDistrict == null){
+			this.form.houseDistrict = '天河区'
 		}
-		if (this.form.province === '' || this.form.province == null) {
-			this.form.province = '广东省';
+		if(this.form.province === ''||this.form.province == null){
+			this.form.province = '广东省'
 		}
-		if (this.form.city === '' || this.form.city == null) {
-			this.form.city = '广州市';
+		if(this.form.city === ''||this.form.city == null){
+			this.form.city = '广州市'
 		}
-		if (this.form.district === '' || this.form.district == null) {
-			this.form.district = '天河区';
+		if(this.form.district === ''||this.form.district == null){
+			this.form.district = '天河区'
 		}
-		if (this.form.marry !== null && this.form.marry != 'undefined' && this.form.marry !== '') {
-			this.index_marry = this.array_marry.indexOf(this.form.marry);
+		if(this.form.marry !== null && this.form.marry != 'undefined' && this.form.marry !== ''){
+			this.index_marry = this.array_marry.indexOf(this.form.marry)
 		}
-		if (this.form.politic !== null && this.form.politic != 'undefined' && this.form.politic !== '') {
-			this.index_politic = this.array_politic.indexOf(this.form.politic);
+		if(this.form.politic !== null && this.form.politic != 'undefined' && this.form.politic !== ''){
+			this.index_politic = this.array_politic.indexOf(this.form.politic)
 		}
 	},
 	onLoad(option) {
-		this.getUserInfos();
+		this.getUserInfos()
 		const Verify = require('@/wxcomponents/verify_mpsdk/main.js');
 		Verify.init();
-		this.array_marry = this.$store.state.dictObj['marry_status'];
-		this.array_politic = this.$store.state.dictObj['politic_status'];
+		this.array_marry = this.$store.state.dictObj['marry_status']
+		this.array_politic = this.$store.state.dictObj['politic_status']
 	},
 	methods: {
-		getUserInfos() {
-			var self = this;
+		getUserInfos(){
+			var self = this
 			this.$api.getInfo().then(res => {
-				this.form = res.data.data;
+				this.form = res.data.data
 				if (this.form.HeadImageUrl !== null) {
 					self.fileList = [{ url: self.$method.splitImgHost(self.form.oneInchPhotos) }];
 				}
-			});
+			})
 		},
 		changePhotoListHeader(lists, name) {
 			this.fileList = lists;
@@ -233,7 +233,7 @@ export default {
 					setTimeout(() => {
 						self.$api.facecertification(self.BizToken).then(faceRec => {
 							//刷新用户信息
-							self.getUserInfos();
+							self.getUserInfos() 
 						});
 					}, 500);
 				},
@@ -249,7 +249,7 @@ export default {
 			});
 		},
 		imageInfos() {
-			var self = this;
+			var self = this
 			return new Promise((resolve, reject) => {
 				uni.getImageInfo({
 					src: self.fileList[0].url,
@@ -264,13 +264,13 @@ export default {
 								height: '50%',
 								success: async rest => {
 									const waitUpload = await self.uploadFile(rest.tempFilePath, 0);
-									resolve();
-								}
+									resolve()
+								} 
 							});
 						} else {
 							console.log('无需压缩');
 							const waitUpload = await self.uploadFile(self.fileList[0].url, 0);
-							resolve();
+							resolve()
 						}
 					}
 				});
@@ -305,7 +305,7 @@ export default {
 						title: '提交成功',
 						icon: 'none'
 					});
-					self.$api.refreshUserInfo();
+					self.$api.refreshUserInfo() 
 				}
 			});
 		},
@@ -364,7 +364,7 @@ export default {
 			this.form.politic = e.detail.value;
 		},
 		bindPickerChangeMarry(e) {
-			console.log(e);
+			console.log(e)
 			this.form.marry = e.detail.value;
 		},
 		//城市
@@ -375,7 +375,7 @@ export default {
 		},
 		// 籍贯获取选择的地区
 		handleGetRegion(region) {
-			console.log(region);
+			console.log(region)
 			this.form.houseProvince = region[0].name;
 			this.form.houseCity = region[1].name;
 			this.form.houseDistrict = region[2].name;
@@ -387,30 +387,31 @@ export default {
 			// var month = this.userBirth.substr(5, 2);
 			// var day = this.userBirth.substr(8, 2);
 		},
-
+		
 		actionSheetCallback(index) {
 			uni.hideKeyboard();
 			this.form.sex_text = this.actionSheetList[index].text;
 		}
 	},
-	computed: { ...mapGetters(['userInfo']) },
-	watch: {
-		userInfo(val, oldVal) {
-			this.form = val;
-			console.log(this.form, 66);
+	computed: {...mapGetters(['userInfo'])},
+	watch:{
+		userInfo(val, oldVal){
+			this.form = val
+			console.log(this.form,66)
 		}
 	}
 };
 </script>
 
+
 <style scope>
-.submit_btn {
-	background-color: #32467b !important;
-	border-color: #32467b !important;
-	color: #ffffff;
-	font-size: 30rpx;
-	padding: 5rpx;
-}
+	.submit_btn{
+		background-color: #32467B !important;
+		border-color: #32467B !important;
+		color: #FFFFFF;
+		font-size: 30rpx;
+		padding: 5rpx;
+	}
 .u-form-item__message.data-v-5e7216f1 {
 	padding: 0px !important;
 }