Преглед на файлове

对接我的面试/修改职业下架

空白格 преди 3 години
родител
ревизия
2f017bc32f

+ 3 - 1
h5_web/common/apiurl.js

@@ -143,7 +143,9 @@ const apiurl = {
 	 */
 	interview: {
 		// 我的面试列表
-		getInterviewListUrl: '/delivery/myInterviewList'
+		getInterviewListUrl: '/delivery/myInterviewList',
+		// 修改面试状态
+		changeInterviewStateUrl: '/delivery/updateStatus'
 	},
 	/**
 	 * 我的简历

+ 1 - 0
h5_web/common/config.js

@@ -7,6 +7,7 @@ const config = {
 	uploadUrl: 'https://wx.hw.hongweisoft.com/veterans/file/upload/single/minio', // 上传地址
 	timChatUrl: 'https://veterhchat.hw.hongweisoft.com/#/pages/login/login', // 线上退役军人聊天TIM
 	// timChatUrl: 'http://172.16.90.126:8081/#/pages/login/login', // 本地聊天TIM
+	viewInterviewUrl: 'https://veterhwebchat.hw.hongweisoft.com/#/', // 视频聊天地址
 	version: '1.0.2'
 }
 export {

+ 2 - 1
h5_web/common/http.api.js

@@ -144,7 +144,8 @@ const install = (Vue, vm) => {
 
 	// 我的面试
 	let interview = {
-		getInterviewList: (params = {}) => vm.$u.get(apiurl.interview.getInterviewListUrl, params)
+		getInterviewList: (params = {}) => vm.$u.get(apiurl.interview.getInterviewListUrl, params),
+		changeInterviewStateApi: (params = {}) => vm.$u.put(apiurl.interview.changeInterviewStateUrl, params)
 	};
 
 	// 我的简历

+ 4 - 26
h5_web/common/http.interceptor.js

@@ -22,46 +22,24 @@ const install = (Vue, vm) => {
   });
   // 请求拦截,配置Token等参数
   Vue.prototype.$u.http.interceptor.request = (config) => {
-    // config.header.Token = 'xxxxxx';
-    // 方式一,存放在vuex的token,假设使用了uView封装的vuex方式,见:https://uviewui.com/components/globalVariable.html
-    // config.header.token = vm.vuex_token;
 
     if (vm.vuex_token) {
       config.header.Authorization = `Bearer ${vm.vuex_token}`;
     }
-
-    // 方式二,如果没有使用uView封装的vuex方法,那么需要使用$store.state获取
-    // config.header.token = vm.$store.state.token;
-
-    // 方式三,如果token放在了globalData,通过getApp().globalData获取
-    // config.header.token = getApp().globalData.username;
-
-    // 方式四,如果token放在了Storage本地存储中,拦截是每次请求都执行的,所以哪怕您重新登录修改了Storage,下一次的请求将会是最新值
-    // const token = uni.getStorageSync('token');
-    // config.header.token = token;
     // url加时间戳
     config.url = config.url + '?t=' + Date.now()
-    // 此url参数为this.$u.get(url)中的url值
     let noTokenList = ['/wechat/h5/user', '/client/auth/verifyCode'];
     if (noTokenList.includes(config.url)) config.header.noToken = true;
-    // console.log('noTokenList.includes(config.url)',noTokenList.includes(config.url));
-    // console.log('config.url',config.url);
     return config;
   }
   // 响应拦截,判断状态码是否通过
   Vue.prototype.$u.http.interceptor.response = (res) => {
-    // 如果把originalData设置为了true,这里得到将会是服务器返回的所有的原始数据
-    // 判断可能变成了res.statueCode,或者res.data.code之类的,请打印查看结果
-    // console.log('interceptor res',res);
     if (res.code == 200) {
-      // 如果把originalData设置为了true,这里return回什么,this.$u.post的then回调中就会得到什么
       return res;
     } else if (res.msg == "令牌不能为空" || res.code == 401) {
       const backUrl = location.href
       const loginUrl = 'phoneLogin'
-      if (backUrl.indexOf(loginUrl) > 0) {
-        // localStorage.clear()
-      } else {
+      if (backUrl.indexOf(loginUrl) > 0) {} else {
         localStorage.setItem('backUrl', location.href)
         store.state.vuex_hasLogin = false;
         alert('还未登录,即将跳转登录');
@@ -70,11 +48,11 @@ const install = (Vue, vm) => {
         });
         return;
       }
-
-    } else if (res.code == 400) {
+    } else {
 			uni.showToast({
 				title: res.msg,
-				icon: 'error'
+				icon: 'none',
+				duration: 2000
 			})
 		}
   }

+ 3 - 2
h5_web/pages/jobDetails/jobDetails.vue

@@ -18,7 +18,8 @@
 								</view>
 							</view>
 							<view class="right">
-								{{ `${recruitmentData.lowestSalary || ''}k - ${recruitmentData.highestSalary || ''}k` }}
+								<view class="salary">{{ `${recruitmentData.lowestSalary || ''}k - ${recruitmentData.highestSalary || ''}k` }}</view>
+								<view v-if="recruitmentData.postStatus == 0">职位已下架</view>
 							</view>
 						</view>
 					</view>
@@ -87,7 +88,7 @@
 			</u-card>
 		</view>
 
-		<view class="jobdetailsbtn" v-if="!isSubmit">
+		<view class="jobdetailsbtn" v-if="!isSubmit && recruitmentData.postStatus == 1">
 			<view class="jobdetailsbtn-container">
 				<view class="jobdetailsbtn-content">
 					<view>

+ 6 - 2
h5_web/pages/jobDetails/scss/jobDetails.scss

@@ -43,12 +43,16 @@ page{background-color: #f2f2f2;}
         
         .right{
           text-align: right;
-          font-size: 36rpx;
           font-family: PingFangSC-Regular, PingFang SC;
           font-weight: 400;
-          color: #EF651F;
           line-height: 50rpx;
           letter-spacing: 1px;
+					font-size: 26rpx;
+					.salary {
+						color: #EF651F;
+						font-size: 36rpx;
+						margin-bottom: 30rpx;
+					}
         }
       }
       

+ 9 - 6
h5_web/pages/myDelivery/myDelivery.scss

@@ -51,12 +51,15 @@
 					font-family: 'Microsoft YaHei';
 					color: #BCBCBC;
 					font-weight: 400;
-					&:first-child {
-						color: #EE5A10;
-						font-weight: 500;
-						// flex: 1;
-						margin-bottom: 20rpx;
-					}
+				}
+				.salary {
+					color: #EE5A10;
+					font-weight: 500;
+					margin-bottom: 40rpx;
+				}
+				.off-the-shelf {
+					color: #BCBCBC;
+					margin-bottom: 40rpx;
 				}
 			}
 		}

+ 4 - 3
h5_web/pages/myDelivery/myDelivery.vue

@@ -12,6 +12,7 @@
 					v-for="(item, index) in deliveryList"
 					:key="index"
 					@click="jumpPage('/pages/jobDetails/jobDetails', { id: item.id, isSubmit: true })"
+					:class="{ 'off': item.postStatus == 0 }"
 				>
 					<view class="delivery-list-item-left">
 						<view class="delivery-list-item-left-image">
@@ -21,13 +22,13 @@
 						</view>
 						<view class="delivery-list-item-left-info">
 							<view>{{ item.postName }}</view>
-							<!-- <view>{{ `${} | ${item.workYear}年 | ${}` }}</view> -->
-							<view>{{ `${item.provinceName} | 经验${item.workYear ? item.workYear + '年' : '不限'} | ${getEducationBg(item.educationBg)}` }}</view>
+							<view>{{ `${item.provinceName || ''} | 经验${item.workYear ? item.workYear + '年' : '不限'} | ${getEducationBg(item.educationBg)}` }}</view>
 							<view>{{ item.companyName }}</view>
 						</view>
 					</view>
 					<view class="delivery-list-item-right">
-						<view align="right">{{ `${item.lowestSalary || ''} ~ ${item.highestSalary || ''}k` }}</view>
+						<view align="right" class="off-the-shelf" v-if="item.postStatus == 0">职位已下架</view>
+						<view align="right" class="salary" v-else>{{ `${item.lowestSalary || ''}k ~ ${item.highestSalary || ''}k` }}</view>
 						<view>{{ item.createTime.split(' ')[0] }}</view>
 					</view>
 				</view>

+ 1 - 0
h5_web/pages/myInterview/myInterview.scss

@@ -18,6 +18,7 @@
 				color: #000;
 				display: flex;
 				align-items: center;
+				margin-bottom: 20rpx;
 				
 				image {
 					width: 24rpx;

+ 87 - 21
h5_web/pages/myInterview/myInterview.vue

@@ -1,17 +1,27 @@
 <!-- 我的面试 -->
+<!-- 
+	投递状态码 status
+	0      未查看
+	10     已查看
+	11     不合适
+	20     已邀请面试
+	30     已接受面试
+	40     已拒绝面试
+	50     面试通过
+	60     不合适
+	70     未参加面试
+	80     已拒绝入职
+	90     已入职
+-->
 <template>
 	<view class="interview">
-		<z-paging
-			ref="paging"
-			v-model="interviewList"
-			@query="queryList"
-		>
+		<z-paging ref="paging" v-model="interviewList" @query="queryList">
 			<view class="interview-list">
 				<view class="interview-list-item" v-for="(item, index) in interviewList" :key="index">
 					<view class="interview-list-item-title">
 						<view>{{ getDictLabel(item.status, 'deliveryStatusList') }}</view>
 						<view>
-							<image src="../../static/img/shijian.png"/>
+							<image src="../../static/img/shijian.png" />
 						</view>
 					</view>
 					<view class="interview-list-item-date">{{ item.interviewTime }}</view>
@@ -19,11 +29,13 @@
 					<view class="interview-list-item-position">
 						<view class="left">
 							<view style="margin-right: 20rpx;">
-								<u-image :src="item.companyLogoUrl" width="100" height="100" border-radius="10"/>
+								<u-image :src="item.companyLogoUrl" width="100" height="100" border-radius="10" />
 							</view>
 							<view class="info">
 								<view>{{ item.postName }}</view>
-								<view>{{ `${item.provinceName} | 经验${item.workYear}年 | ${getEducationBg(item.educationBg)}` }}</view>
+								<view>
+									{{ `${item.provinceName} | 经验${item.workYear}年 | ${getEducationBg(item.educationBg)}` }}
+								</view>
 								<view>{{ item.companyName }}</view>
 							</view>
 						</view>
@@ -33,17 +45,25 @@
 							<view v-else>{{ item.createTime.split(' ')[0] }}</view>
 						</view>
 					</view>
-					<view class="interview-list-item-button" v-if="Number(item.status) === 20 && new Date(item.interviewTime).valueOf() < new Date().valueOf()">
+					<!-- 当状态为20时,拒绝面试/接受面试 -->
+					<view class="interview-list-item-button double" v-if="Number(item.status) === 20">
+						<view class="btn" @click="changeInterviewState(item, 30)">接受</view>
+						<view class="btn" @click="changeInterviewState(item, 40)">拒绝</view>
+					</view>
+					<!-- 当状态为30时且面试时间大于当前时间 -->
+					<view class="interview-list-item-button"
+						v-if="Number(item.status) === 30 && new Date(item.interviewTime).valueOf() < new Date().valueOf()">
 						<view class="submit btn" @click="videoInterview(item)">发起视频面试</view>
 					</view>
-					
-					<view class="interview-list-item-button" v-else-if="Number(item.status) === 20 && new Date(item.interviewTime).valueOf() >= new Date().valueOf()">
+					<!-- 当状态为30时且面试时间小于当前时间 -->
+					<view class="interview-list-item-button"
+						v-else-if="Number(item.status) === 30 && new Date(item.interviewTime).valueOf() >= new Date().valueOf()">
 						<view class="not btn">未到视频面试</view>
 					</view>
-					
+					<!-- 当状态为50时,拒绝入职/接受入职 -->
 					<view class="interview-list-item-button double" v-else-if="Number(item.status) === 50">
-						<view class="btn">接受</view>
-						<view class="btn">拒绝</view>
+						<view class="btn" @click="changeInterviewState(item, 90)">接受</view>
+						<view class="btn" @click="changeInterviewState(item, 80)">拒绝</view>
 					</view>
 				</view>
 			</view>
@@ -60,7 +80,9 @@
 				interviewList: [],
 				// 面试状态
 				deliveryStatusList: [],
-				degrEducList: []
+				degrEducList: [],
+				pageNum: 1,
+				pageSize: 10
 			}
 		},
 		onLoad() {
@@ -99,8 +121,13 @@
 			 * @param { Number } pageSize
 			 */
 			getInterviewList(pageNum, pageSize) {
-				this.$u.api.interview.getInterviewList({ pageNum, pageSize }).then(res => {
+				this.$u.api.interview.getInterviewList({
+					pageNum,
+					pageSize
+				}).then(res => {
 					if (res.code === 200) {
+						this.pageNum = pageNum
+						this.pageSize = pageSize
 						this.$refs.paging.complete(res.rows)
 					} else {
 						this.$refs.paging.complete([])
@@ -129,9 +156,11 @@
 			 * @param { String } key
 			 */
 			getDict(key) {
-				this.$u.api.getDictdataUrl({ key }).then(res => {
+				this.$u.api.getDictdataUrl({
+					key
+				}).then(res => {
 					if (res.code === 200) {
-						switch(key) {
+						switch (key) {
 							case 'delivery_status':
 								this.deliveryStatusList = res.data;
 								break;
@@ -153,10 +182,47 @@
 				})
 				return label;
 			},
-			submit () {
+			/**
+			 * 修改面试状态
+			 * @param {Number} state
+			 */
+			changeInterviewState(item, state) {
+				this.$u.api.interview.changeInterviewStateApi({ status: state, id: item.id }).then(res => {
+					console.log(res)
+					if (res.code === 200) {
+						let msg;
+						switch(state) {
+							case 30:
+								msg = '已接受面试'
+								break;
+							case 40:
+								msg = '已拒绝面试'
+								break;
+							case 80:
+								msg = '已拒绝入职'
+								break;
+							case 90:
+								msg = '已接受入职'
+								break;
+							default:
+								msg = '更新成功'
+								break
+						}
+						this.$refs.uToast.show({
+							title: msg,
+							type: 'success'
+						})
+						this.getInterviewList(this.pageNum, this.pageSize);
+					}
+				})
 			},
+			/**
+			 * 视频面试
+			 * @param {Object} item
+			 */
 			videoInterview(item) {
-				let url = `https://veterhwebchat.hw.hongweisoft.com/#/?veteMemberId=${item.companyId}&inviterId=${this.vuex_user.userId}&from=veterans`
+				let url =
+					`${this.config.viewInterviewUrl}?veteMemberId=${item.companyId}&inviterId=${this.vuex_user.userId}&from=veterans`
 				this.$u.route({
 					url: '/pages/webView/webView',
 					params: {
@@ -169,5 +235,5 @@
 </script>
 
 <style lang="scss" scoped>
-@import './myInterview.scss';
+	@import './myInterview.scss';
 </style>

+ 1 - 1
h5_web/pages/policyInfo/policyInfo.vue

@@ -7,7 +7,7 @@
 	<view class="policyInfo">
 		<z-paging ref="policyInfoPaging" v-model="policyInfoList" @query="policyInfoQueryList">
 			<view class="policyInfo-banner" slot="top">
-				<u-swiper v-if="bannerList.length" :list="bannerList" name="bannerUrl" border-radius="0" mode="round" height="372"
+				<u-swiper :list="bannerList" name="bannerUrl" border-radius="0" mode="round" height="372"
 					img-mode="scaleToFill" @click="swiperClick" @change="swiperChange"></u-swiper>
 			</view>
 

+ 4 - 3
h5_web/pages/recruitment/recruitment.vue

@@ -12,8 +12,8 @@
 
 			<!-- ###################################-- 轮播图 -- ################################### -->
 			<view class="recruitment-banner" slot="top">
-				<u-swiper v-if="bannerList.length" :list="bannerList" name="bannerUrl" border-radius="0" mode="round"
-					height="440" img-mode="scaleToFill" @click="swiperClick"></u-swiper>
+				<u-swiper :list="bannerList" name="bannerUrl" border-radius="0" mode="round" height="440"
+					img-mode="scaleToFill" @click="swiperClick"></u-swiper>
 			</view>
 
 			<!-- ###################################-- 请输入您关键词 -- ################################### -->
@@ -83,7 +83,8 @@
 						<view class="dataarea-content-left">
 							<view>{{item.postName}}</view>
 							<view class="content">
-								{{ item.areaName }}|经验{{ item.workYear }}年|{{ getEducationBg(item.educationBg) }}</view>
+								{{ item.areaName }}|经验{{ item.workYear }}年|{{ getEducationBg(item.educationBg) }}
+							</view>
 							<view>{{item.companyName}}</view>
 						</view>
 						<view class="dataarea-content-right">