Tang 4 anni fa
parent
commit
52bb144fe7
7 ha cambiato i file con 212 aggiunte e 60 eliminazioni
  1. 2 2
      common/request.js
  2. 1 1
      components/home.vue
  3. 103 0
      components/recruitment.vue
  4. 16 1
      pages.json
  5. 19 6
      pages/index/index.vue
  6. 22 0
      pages/recruitment/index.vue
  7. 49 50
      pages2/wd/info.vue

+ 2 - 2
common/request.js

@@ -1,6 +1,6 @@
-//const BASE_URL = 'http://192.168.1.222:8088'
+const BASE_URL = 'http://192.168.1.222:8088'
 //const BASE_URL = 'http://127.0.0.1:8088' 
-const BASE_URL = 'https://api.xyyxt.net' 
+// const BASE_URL = 'https://api.xyyxt.net' 
 import store from '@/store/index.js'
 import api from './api.js'
 var num = 1

+ 1 - 1
components/home.vue

@@ -190,7 +190,7 @@ export default {
 	},
 	onLoad() {},
 	mounted() {
-		this.windowHeight = uni.getSystemInfoSync().windowHeight;
+		this.windowHeight = uni.getSystemInfoSync().windowHeight -100;
 		this.initList();
 		this.advertisingList();
 		

+ 103 - 0
components/recruitment.vue

@@ -0,0 +1,103 @@
+<template>
+	<view>
+		<view style="z-index: 999;">
+			<u-navbar title="求职中心" :is-back="false">
+				<view class="slot-wrap"><image src="/static/search.png" class="search"></image></view>
+			</u-navbar>
+		</view>
+		<scroll-view scroll-y="true" @scroll="scroll" style="padding-top: 20rpx;" :style="'height: ' + windowHeight + 'px;'" @scrolltolower="scrollTolower">
+			<swiper class="swiper" :autoplay="true" previous-margin="15px" next-margin="15px" :circular="true">
+				<swiper-item v-for="(item, index) in 4" :key="index" style="padding: 0px 5px;box-sizing: border-box;">
+					<view style="height: 100%;border-radius: 8px;overflow: hidden;"><image src="../static/rank_bg.png" mode="" style="width: 100%;height: 100%;"></image></view>
+				</swiper-item>
+			</swiper>
+			<view style="margin-top: 20rpx;">
+				<u-row gutter="16">
+					<u-col span="1">
+						<view style="padding: 5rpx;"><image src="/static/select.png" class="arr-icon" @click="show = false"></image></view>
+					</u-col>
+					<u-col span="11">
+						<view>
+							
+						</view>
+					</u-col>
+				</u-row>
+			</view>
+		</scroll-view>
+		<u-popup v-model="show">
+			<view style="width: 600rpx"><view class="popup_t1">选择你需要的</view></view>
+		</u-popup>
+	<view style="position: relative;">
+			<u-subsection :list="tab_list1" :current="current2" button-color="rgba(47,67,121,0.6)" @change="sectionChange"></u-subsection>
+	</view>
+		
+	</view>
+</template>
+
+<script>
+export default {
+	name: 'recruitment',
+	data() {
+		return {
+			colorBgc: 'red',
+			windowHeight: 0,
+			show: false,
+			tab_list1: [
+				{
+					name: '课程A'
+				},
+				{
+					name: '刷题'
+				},
+				{
+					name: '重点考点'
+				}
+			],
+			current2: 0
+		};
+	},
+	mounted() {
+		this.windowHeight = uni.getSystemInfoSync().windowHeight - 120;
+		console.log(this.windowHeight);
+	},
+	methods: {
+		init() {},
+		scroll(e) {},
+		scrollTolower() {},
+		sectionChange(index) {
+			this.current2 = index;
+		},
+	}
+};
+</script>
+
+<style scoped>
+.search {
+	width: 40rpx;
+	height: 40rpx;
+	margin-left: 30rpx;
+}
+.slot-wrap {
+	display: flex;
+	align-items: center;
+}
+.tests {
+	background-color: #00ffff;
+	margin-bottom: 20rpx;
+}
+.swiper {
+	height: 329rpx;
+}
+.arr-icon {
+	width: 40rpx;
+	height: 40rpx;
+}
+.popup_t1 {
+	height: 29rpx;
+	font-size: 30rpx;
+	font-family: PingFang SC;
+	font-weight: bold;
+	color: #131b31;
+	margin: 100rpx;
+}
+</style>

+ 16 - 1
pages.json

@@ -31,8 +31,17 @@
 					"bounce": "none"
 				}
 			}
+		}, {
+			"path": "pages/recruitment/index",
+			"style": {
+				"navigationBarTitleText": "求职中心",
+				"app-plus": {
+					"titleNView": false //禁用原生导航栏  
+				}
+			}
+
 		}
-	],
+    ],
 	"subPackages": [{
 		"root": "pages2",
 		"pages": [{
@@ -306,6 +315,12 @@
 				"selectedIconPath": "static/nav1_on.png",
 				"text": "学习中心"
 			},
+			{
+				"pagePath": "pages/recruitment/index",
+				"iconPath": "static/nav1.png",
+				"selectedIconPath": "static/nav1_on.png",
+				"text": "求职"
+			},
 			{
 				"pagePath": "pages/wd/index",
 				"iconPath": "static/nav4.png",

+ 19 - 6
pages/index/index.vue

@@ -1,7 +1,8 @@
 <template>
 	<view>
 		<home v-show="current == 0" ref="home"></home>
-		<my v-show="current == 1" ref="refMy"></my>
+		<recruitment v-show="current == 1" ref="recruitment"></recruitment>
+		<my v-show="current == 2" ref="refMy"></my>
 
 		<u-tabbar v-model="current" :list="list" active-color="#2F4379" :before-switch="beforeSwitch"></u-tabbar>
 	</view>
@@ -10,11 +11,13 @@
 <script>
 import home from '@/components/home.vue';
 import my from '@/components/my.vue';
+import recruitment from '@/components/recruitment.vue';
 	import {mapGetters} from 'vuex';
 export default {
 	components: {
 		home,
-		my
+		my,
+		recruitment
 	},
 	data() {
 		return {
@@ -25,6 +28,12 @@ export default {
 					text: '学习中心',
 					customIcon: false
 				},
+				{
+					iconPath: '/static/nav4.png',
+					selectedIconPath: '/static/nav4_on.png',
+					text: '求职',
+					customIcon: false
+				},
 				{
 					iconPath: '/static/nav4.png',
 					selectedIconPath: '/static/nav4_on.png',
@@ -37,6 +46,7 @@ export default {
 	},
 	onLoad(option) {
 		this.$refs.home.init();
+		this.$refs.recruitment.init();
 	},
 	onShow() {
 		
@@ -50,7 +60,6 @@ export default {
 	},
 	methods: {
 		updateHomePlan(){
-			console.log(3434)
 			this.$refs.home.init();
 		},
 		beforeSwitch(index) {
@@ -59,10 +68,14 @@ export default {
 				return false;
 			}
 			if (!this.$method.isLogin()) {
-				this.$navTo.togo('/pages/login/login');
-				return false;
+				if(index == 0 || index == 1){
+					return true
+				}else{
+					this.$navTo.togo('/pages/login/login');
+					return false;
+				}
 			} else {
-				if (index == 1) {
+				if (index == 2) {
 					this.$refs.refMy.init();
 				}
 				return true;

+ 22 - 0
pages/recruitment/index.vue

@@ -0,0 +1,22 @@
+<template>
+	<view>
+		求遏制
+	</view>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+				
+			}
+		},
+		methods: {
+			
+		}
+	}
+</script>
+
+<style>
+
+</style>

+ 49 - 50
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,31 +387,30 @@ 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;
 }