ソースを参照

优化个人中心页面

wkw 7 ヶ月 前
コミット
19d51c5aaf

+ 71 - 49
src/components/header/header.vue

@@ -395,6 +395,24 @@
 
 								</div>
 							</div>
+							<div class="myInfo-item flex align-center justify-between" v-if="userType == 2">
+								<div class="myInfo-item-l">
+									邮箱
+								</div>
+								<div class="myInfo-item-r removeInputStyle">
+									<el-input :input-style="inputStyles" v-model="hrEmail" placeholder="请输入邮箱" />
+
+								</div>
+							</div>
+							<div class="myInfo-item flex align-center justify-between" v-if="userType == 2">
+								<div class="myInfo-item-l">
+									我的职务
+								</div>
+								<div class="myInfo-item-r removeInputStyle">
+									<el-input :input-style="inputStyles" v-model="hrPosition" placeholder="请输入职务" />
+
+								</div>
+							</div>
 							<div class="myInfo-item flex align-center justify-between" style="border: none;">
 								<div class="myInfo-item-l">
 									性别
@@ -769,6 +787,8 @@
 				annual: [],
 				remainingDays: 0, // 剩余天数
 				vipName: "",
+				hrEmail:'',
+				hrPosition:''
 			}
 		},
 		created() {
@@ -817,6 +837,8 @@
 			this.getUserInfoVipList();
 			this.selectVipDetails();
 			this.getVipdetile();
+			// 获取HRD信息
+			this.getUserHrInfo()
 		},
 		computed: {
 			userType() {
@@ -837,6 +859,16 @@
 			},
 		},
 		methods: {
+			// 获取HRD信息
+			getUserHrInfo() {
+				this.$Request.get("/app/HrFirst/getUserHr").then((res) => {
+					if (res.code == 0) {
+						this.hrInfo = res.data.HrEntity
+						this.hrPosition = res.data.HrEntity.hrPosition
+						this.hrEmail = res.data?.HrEntity?.hrEmail
+					}
+				});
+			},
 			//获取vip个人信息
 			getUserInfoVipList() {
 				this.$Request.get("/app/user/vipData").then((res) => {
@@ -853,27 +885,27 @@
 				});
 			},
 			//vip 套餐
-		selectVipDetails() {
-			this.$Request.get("/app/VipDetails/selectVipDetails").then((res) => {
-				if (res.code == 0) {
-					this.viplist = res.data
-					if (res.data && res.data.length > 0) {
-						this.selectPlan(res.data[0]);
-					}
-					if (res.data) {
-						this.trialVersion = res.data[0];
-						this.monthlyPayment = res.data[1];
-						this.annual = res.data[2];
+			selectVipDetails() {
+				this.$Request.get("/app/VipDetails/selectVipDetails").then((res) => {
+					if (res.code == 0) {
+						this.viplist = res.data
+						if (res.data && res.data.length > 0) {
+							this.selectPlan(res.data[0]);
+						}
+						if (res.data) {
+							this.trialVersion = res.data[0];
+							this.monthlyPayment = res.data[1];
+							this.annual = res.data[2];
+						}
+						
+					} else {
+						uni.showToast({
+							title: '暂无VIP套餐',
+							icon: 'none'
+						})
 					}
-					
-				} else {
-					uni.showToast({
-						title: '暂无VIP套餐',
-						icon: 'none'
-					})
-				}
-			});
-		},
+				});
+			},
 			// 获取会员到期天数
 			getVipdetile() {
 				this.$Request.get("/app/UserVip/selectUserVip").then((res) => {
@@ -1494,11 +1526,6 @@
 			},
 			//去设置中心
 			goSetting() {
-				ElMessage({
-					message: '请前往首页扫码下载app去使用',
-					type: 'warning',
-				})
-				return;
 				if (localStorage.getItem('token')) {
 					this.$router.push({
 						name: 'setting'
@@ -1570,21 +1597,7 @@
 								type: 'json'
 							}).then(res => {
 								if (res.code == 0) {
-									ElMessage({
-										message: '保存成功',
-										type: 'success',
-										duration: 1500,
-										offset: this.screenHeight / 2
-									})
-									this.getUserInfo()
-									this.visible = false
-								} else {
-									ElMessage({
-										message: res.meg,
-										type: 'error',
-										duration: 1500,
-										offset: this.screenHeight / 2
-									})
+									this.saveHrInfo();
 								}
 							})
 						}).catch(() => {
@@ -1592,15 +1605,24 @@
 						})
 				}
 			},
-			//去个人中心
-			goInfo() {
-				if (localStorage.getItem('token')) {
-					this.$router.push({
-						name: 'addResume'
-					})
-				} else {
-					this.goLogin()
-				}
+			// 保存hr的信息
+			saveHrInfo() {
+				this.$Request.post("/app/HrFirst/addHr", {
+					hrPosition: this.hrPosition,
+					hrEmail: this.hrEmail,
+					avatar: this.avatars
+				},{type: 'json'}).then(res => {
+					if (res.code === 0) {
+						ElMessage({
+							message: '保存成功',
+							type: 'success',
+							duration: 1500,
+							offset: this.screenHeight / 2
+						})
+						this.getUserInfo()
+						this.visible = false
+					}
+				})
 			},
 			//获取个人信息
 			async getUserInfo() {

+ 1 - 1
src/router.js

@@ -65,7 +65,7 @@ const routes = [{
 		name: 'setting',
 		component: () => import("./views/setting/index.vue"), //引入设置页面
 		redirect: {
-			name: 'help'
+			name: 'agreement'
 		},
 		children: [{
 			path: '/setting/myReams',

+ 1 - 1
src/views/jilu/jilu.vue

@@ -272,7 +272,7 @@
 					// 	}
 
 					// })
-					this.jobDataList = res.records
+					this.jobDataList = res.data.records
 					if (this.jobDataList.length > 0) {
 						this.isNoList = false
 					} else {

+ 2 - 2
src/views/myPostPush/myPostPush.vue

@@ -16,9 +16,9 @@
 					<div class="list-box-l-item" v-for="(item,index) in postPushList" :key="index">
 						<div class="list-box-l-item-top flex align-center justify-between">
 							<div class="list-box-l-item-top-l flex align-center">
-								<img :src="item.company.companyLogo?item.company.companyLogo:'/logo.png'" alt="" />
+								<img :src="item.company?.companyLogo?item.company.companyLogo:'/logo.png'" alt="" />
 								<span style="font-weight: 500;margin-left: 20px;">
-									{{ item.company.companyName || item.company.companyAllName }}
+									{{ item.company?.companyName || item.company?.companyAllName }}
 								</span>
 							</div>
 							<div class="list-box-l-item-top-r flex align-center justify-center "

+ 1 - 1
src/views/setting/agreement.vue

@@ -23,7 +23,7 @@
 		},
 		methods: {
 			selectAgree() {
-				this.type = Number(this.$route.query.type)
+				this.type = Number(this.$route.query.type || 1)
 				console.log(this.type, '走了')
 				switch (this.type) {
 					case 1:

+ 68 - 60
src/views/setting/index.vue

@@ -21,7 +21,7 @@
 					<div class="content-right-con-title flex align-center justify-between">
 						{{linkList[linkIndex].name}}
 						<div class="content-right-con-title-line"></div>
-						<el-button @click="show = true" icon="edit" plain>意见反馈</el-button>
+						<!-- <el-button @click="show = true" icon="edit" plain>意见反馈</el-button> -->
 					</div>
 					<div ref="conBoxRef" class="content-right-con-router">
 						<router-view></router-view>
@@ -89,13 +89,16 @@
 				loading: false,
 				show: false,
 				linkIndex: 0,
-				linkList: [{
-					name: '帮助中心',
-					path: 'help',
-					isse: false,
-					src1: '/images/setting/help.png',
-					src2: '/images/setting/help_.png'
-				}, ], //左侧路由列表
+				linkList: [
+					{
+						name: '隐私协议',
+						path: 'agreement',
+						isse: false,
+						type: 1,
+						src1: '/images/setting/privacy.png',
+						src2: '/images/setting/privacy_.png'
+					},
+			], //左侧路由列表
 			}
 		},
 		computed: {
@@ -109,21 +112,22 @@
 		mounted() {
 			this.screenHeight = window.innerHeight
 			if (this.userType == 1) { //用户
-				this.linkList = [...this.linkList, ...[{
-						name: '屏蔽公司',
-						path: 'shield',
-						isse: false,
-						src1: '/images/setting/shield.png',
-						src2: '/images/setting/shield_.png'
-					},
-					{
-						name: '隐私协议',
-						path: 'agreement',
-						isse: false,
-						type: 1,
-						src1: '/images/setting/privacy.png',
-						src2: '/images/setting/privacy_.png'
-					},
+				this.linkList = [...this.linkList, ...[
+					// {
+					// 	name: '屏蔽公司',
+					// 	path: 'shield',
+					// 	isse: false,
+					// 	src1: '/images/setting/shield.png',
+					// 	src2: '/images/setting/shield_.png'
+					// },
+					// {
+					// 	name: '隐私协议',
+					// 	path: 'agreement',
+					// 	isse: false,
+					// 	type: 1,
+					// 	src1: '/images/setting/privacy.png',
+					// 	src2: '/images/setting/privacy_.png'
+					// },
 					{
 						name: '用户协议',
 						path: 'agreementU',
@@ -132,14 +136,15 @@
 						src1: '/images/setting/useragr.png',
 						src2: '/images/setting/useragr_.png'
 					},
+					// {
+					// 	name: '关于我们',
+					// 	path: 'agreementG',
+					// 	isse: false,
+					// 	type: 3,
+					// 	src1: '/images/setting/about.png',
+					// 	src2: '/images/setting/about_.png'
+					// }, 
 					{
-						name: '关于我们',
-						path: 'agreementG',
-						isse: false,
-						type: 3,
-						src1: '/images/setting/about.png',
-						src2: '/images/setting/about_.png'
-					}, {
 						name: '修改密码',
 						path: 'upDataPassWord',
 						isse: false,
@@ -165,28 +170,29 @@
 					}
 				]]
 			} else { //企业
-				this.linkList = [...this.linkList, ...[{
-						name: '黑名单',
-						path: 'blacklist',
-						isse: false,
-						src1: '/images/setting/shield.png',
-						src2: '/images/setting/shield_.png'
-					},
-					{
-						name: '转让企业',
-						path: 'transference',
-						isse: false,
-						src1: '/images/setting/zr.png',
-						src2: '/images/setting/zr_.png'
-					},
-					{
-						name: '隐私协议',
-						path: 'agreement',
-						isse: false,
-						type: 1,
-						src1: '/images/setting/privacy.png',
-						src2: '/images/setting/privacy_.png'
-					},
+				this.linkList = [...this.linkList, ...[
+					// {
+					// 	name: '黑名单',
+					// 	path: 'blacklist',
+					// 	isse: false,
+					// 	src1: '/images/setting/shield.png',
+					// 	src2: '/images/setting/shield_.png'
+					// },
+					// {
+					// 	name: '转让企业',
+					// 	path: 'transference',
+					// 	isse: false,
+					// 	src1: '/images/setting/zr.png',
+					// 	src2: '/images/setting/zr_.png'
+					// },
+					// {
+					// 	name: '隐私协议',
+					// 	path: 'agreement',
+					// 	isse: false,
+					// 	type: 1,
+					// 	src1: '/images/setting/privacy.png',
+					// 	src2: '/images/setting/privacy_.png'
+					// },
 					{
 						name: '用户协议',
 						path: 'agreementU',
@@ -195,21 +201,23 @@
 						src1: '/images/setting/useragr.png',
 						src2: '/images/setting/useragr_.png'
 					},
+					// {
+					// 	name: '关于我们',
+					// 	path: 'agreementG',
+					// 	isse: false,
+					// 	type: 3,
+					// 	src1: '/images/setting/about.png',
+					// 	src2: '/images/setting/about_.png'
+					// }, 
 					{
-						name: '关于我们',
-						path: 'agreementG',
-						isse: false,
-						type: 3,
-						src1: '/images/setting/about.png',
-						src2: '/images/setting/about_.png'
-					}, {
 						name: '修改密码',
 						path: 'upDataPassWord',
 						isse: false,
 						type: 3,
 						src1: '/images/setting/account.png',
 						src2: '/images/setting/account_.png'
-					}, {
+					}, 
+					{
 						name: '注销账号',
 						path: 'logoff',
 						isse: false,