提交 c1e5d578 authored 作者: 赵世杰's avatar 赵世杰

1

上级 fd1f0a2b
......@@ -24,6 +24,7 @@
mounted() {
const that = this
uni.login({
scope: 'zhima.auth.workcert.verify',
success(e) {
that.$http.get('/public/ali/getopenId', {
code: e.code,
......@@ -59,7 +60,7 @@
},
login(){
uni.request({
url: 'http://192.168.0.6:8000/loginform',
url: 'https://jyzp.365jft.com/jfb-recruit/loginform',
method: 'POST',
data: {
account: this.openId,
......
// 基础配置
const baseConfig = {
baseUrl: 'http://192.168.0.6:8000',
baseUrl: 'https://jyzp.365jft.com/jfb-recruit',
timeout: 10000, // 10秒超时
header: {
'Content-Type': 'application/json'
......
......@@ -58,7 +58,12 @@
},
"mp-alipay" : {
"usingComponents" : true,
"appid" : "2021005184646262"
"appid" : "2021005184646262",
"permission": {
"zhima.auth.workcert.verify": {
"desc": "用于验证你的芝麻工作证信息"
}
}
},
"mp-baidu" : {
"usingComponents" : true
......
......@@ -48,6 +48,20 @@
{
"navigationBarTitleText" : "求职意向"
}
},
{
"path" : "pages/user/deliverLog",
"style" :
{
"navigationBarTitleText" : "投递记录"
}
},
{
"path" : "pages/user/collectLog",
"style" :
{
"navigationBarTitleText" : "收藏记录"
}
}
],
"globalStyle": {
......
......@@ -7,7 +7,19 @@
</view> -->
<u-search placeholder="搜索职位/公司" v-model="selTitle" @custom="load"/>
</view>
<u-tabs :list="tabList" @change="changeTabs"></u-tabs>
<u-tabs :list="tabList" @change="changeTabs">
<view
slot="right"
style="padding: 0 30rpx 0 10rpx"
@tap="addTab"
>
<u-icon
name="plus"
size="21"
bold
></u-icon>
</view>
</u-tabs>
<view class="list">
<view class="list-item" v-for="item in list" @click="toDetail(item)">
<view class="list-title f_b">
......@@ -24,8 +36,8 @@
<view class="company f_s">
<u--image
:src="item.org.logo"
width="80rpx"
height="80rpx"
width="60rpx"
height="60rpx"
radius="4"
/>
<text style="padding: 0 10px;">{{ item.orgName }}</text>
......@@ -42,6 +54,7 @@
:nomore-text="nomoreText"
/>
</view>
<LoginOpen v-if="loginShow" @close="loginSuccess"/>
</view>
</template>
......@@ -49,6 +62,7 @@
export default {
data() {
return {
loginShow: false,
list: [],
selTitle: '',
tabName: '推荐',
......@@ -62,22 +76,40 @@
}
},
onLoad() {
this.load()
},
onShow() {
if (uni.getStorageSync('jy-recruit-token')) {
this.$http.get('/person/person/details', {}).then(res => {
this.userInfo = res.data
this.$http.get('/objective/l', {personId: res.data.id}).then(res => {
this.tabList = [{name: '推荐'}]
for(const item of res.data.list) {
this.tabList.push({name:item.workType})
}
})
})
}
this.getDetail()
this.load()
},
methods: {
getDetail() {
if (uni.getStorageSync('jy-recruit-token')) {
this.$http.get('/person/person/details', {}).then(res => {
this.userInfo = res.data
this.$http.get('/objective/l', {personId: res.data.id}).then(res => {
this.tabList = [{name: '推荐'}]
for(const item of res.data.list) {
this.tabList.push({name:item.industryName})
}
})
})
}
},
addTab() {
if (uni.getStorageSync('jy-recruit-token')) {
uni.navigateTo({
url: `/pages/user/resume/addIntention?id=${this.userInfo.id}`
})
} else {
this.loginShow = true
}
},
loginSuccess(e) {
this.loginShow = false
if (e) {
this.getDetail()
}
},
changeTabs(e) {
this.tabName = e.name
this.load()
......
......@@ -30,14 +30,28 @@
<view class="f_s">
<u--image
:src="detail.org.logo"
width="80rpx"
height="80rpx"
width="60rpx"
height="60rpx"
radius="4"
/>
<text style="padding: 0 10px;">{{detail.orgName}}</text>
</view>
</view>
<view class="footer">
<view class="footer f_b">
<u-icon
size="30"
name="star-fill"
color="#f40"
v-if="collect"
@click="shoucang"
/>
<u-icon
size="30"
name="star"
@click="shoucang"
v-else
/>
<view style="width: 20px;"></view>
<u-button type="primary" text="已投递" v-if="signUp" disabled></u-button>
<u-button type="primary" text="投递简历" v-else @click="deliver"></u-button>
</view>
......@@ -50,8 +64,10 @@
return {
recruitId: '',
detail: {},
userInfo: [],
token: '',
signUp: false, // 是否已报名
collect: false, // 是否已收藏
loginShow: false, // 登录弹窗
}
},
......@@ -65,8 +81,34 @@
this.detail = res.data
this.getSignRecord()
})
this.getLoginInfo()
},
methods: {
getLoginInfo() {
if (uni.getStorageSync('jy-recruit-token')) {
this.$http.get('/person/person/details', {}).then(res => {
this.userInfo = res.data
this.$http.get('/objective/l', {personId: res.data.id}).then(res => {
this.userInfo.tabList = res.data.list || []
})
})
}
},
shoucang() {
if (this.token) {
this.$http.post('/collect/c', {
recruitId: this.recruitId,
}).then(res => {
this.collect = !this.collect
uni.showToast({
title: this.collect ? `收藏成功` : '取消成功',
icon: 'none',
})
})
} else { // 未登录 触发登录
this.loginShow = true
}
},
// 检查是否已报名
getSignRecord() {
if (this.token) {
......@@ -75,20 +117,35 @@
}).then(res => {
this.signUp = res.data == '1' ? true : false
})
this.$http.post('/collect/have', {
recruitId: this.recruitId,
}).then(res => {
this.collect = res.data == '1' ? true : false
})
}
},
// 投递简历
deliver() {
if (this.token) {
this.$http.post('/signRecord/c', {
recruitId: this.recruitId,
}).then(res => {
this.signUp = true
if (this.userInfo.name && this.userInfo.tabList.length > 0) {
this.$http.post('/signRecord/c', {
recruitId: this.recruitId,
}).then(res => {
this.signUp = true
uni.showToast({
title: `报名成功`,
icon: 'none',
})
})
} else {
uni.showToast({
title: `报名成功`,
icon: 'none',
title: '请先完善简历',
icon: 'none'
})
})
uni.navigateTo({
url: `/pages/user/resume/index`
})
}
} else { // 未登录 触发登录
this.loginShow = true
}
......@@ -98,6 +155,7 @@
if (e) {
this.token = e
this.getSignRecord()
this.getLoginInfo()
}
}
}
......
<template>
<view class="collectLog">
<view class="list">
<view class="list-item" v-for="item in list" @click="toDetail(item)">
<view class="list-title f_b">
<view class="f_s">
{{ item.name }}
</view>
<view class="money">{{item.salaryMin}}~{{item.salaryMax}}</view>
</view>
<view class="f_s">
<view class="tag">{{item.recruitType}}</view>
<view class="tag">{{ item.qualification }}</view>
<view class="tag">{{ item.experience }}</view>
</view>
<view class="company f_s">
<u--image
:src="item.org.logo"
width="80rpx"
height="80rpx"
radius="4"
/>
<text style="padding: 0 10px;">{{ item.orgName }}</text>
</view>
<view class="f_b occupational">
<view>{{item.industryName}}</view>
<view>{{item.address}}</view>
</view>
</view>
<u-loadmore
:status="status"
:loading-text="loadingText"
:loadmore-text="loadmoreText"
:nomore-text="nomoreText"
/>
</view>
</view>
</template>
<script>
export default {
data() {
return {
list: [],
status: 'nomore',
loadingText: '努力加载中',
loadmoreText: '轻轻上拉',
nomoreText: '实在没有了',
tabList: [
{name: '推荐'}
]
}
},
onLoad() {
this.load()
},
onShow() {
},
methods: {
load() {
this.$http.get('/collect/l', {}).then(res => {
this.list = res.data.list
})
},
toDetail(el = {}) {
uni.navigateTo({
url: `/pages/home/jobDetails?id=${el.id}`
})
}
}
}
</script>
<style lang="scss">
.collectLog{
height: 100%;
overflow: hidden;
.list{
height: calc(100%);
overflow: auto;
padding: 30rpx;
box-sizing: border-box;
.list-item{
background-color: #fff;
border-radius: 20rpx;
padding: 30rpx;
.list-title{
font-weight: bold;
font-size: 36rpx;
margin-bottom: 14rpx;
.t{
background-color: #EFF7FE;
color: #33A1CA;
margin-left: 20rpx;
font-weight: normal;
}
.money{
color: #647BEB;
}
}
.company{
margin: 14rpx 0;
color: #999;
font-size: 30rpx;
}
.occupational{
color: #999;
font-size: 26rpx;
}
}
.list-item + .list-item{
margin-top: 30rpx;
}
}
}
</style>
<template>
<view class="deliverLog">
<view class="list">
<view class="list-item" v-for="item in list" @click="toDetail(item)">
<view class="list-title f_b">
<view class="f_s">
{{ item.name }}
</view>
<view class="money">{{item.salaryMin}}~{{item.salaryMax}}</view>
</view>
<view class="f_s">
<view class="tag">{{item.recruitType}}</view>
<view class="tag">{{ item.qualification }}</view>
<view class="tag">{{ item.experience }}</view>
</view>
<view class="company f_s">
<u--image
:src="item.org.logo"
width="80rpx"
height="80rpx"
radius="4"
/>
<text style="padding: 0 10px;">{{ item.orgName }}</text>
</view>
<view class="f_b occupational">
<view>{{item.industryName}}</view>
<view>{{item.address}}</view>
</view>
</view>
<u-loadmore
:status="status"
:loading-text="loadingText"
:loadmore-text="loadmoreText"
:nomore-text="nomoreText"
/>
</view>
</view>
</template>
<script>
export default {
data() {
return {
list: [],
status: 'nomore',
loadingText: '努力加载中',
loadmoreText: '轻轻上拉',
nomoreText: '实在没有了',
tabList: [
{name: '推荐'}
]
}
},
onLoad() {
this.load()
},
onShow() {
},
methods: {
load() {
this.$http.get('/signRecord/l', {}).then(res => {
this.list = res.data.list
})
},
toDetail(el = {}) {
uni.navigateTo({
url: `/pages/home/jobDetails?id=${el.id}`
})
}
}
}
</script>
<style lang="scss">
.deliverLog{
height: 100%;
overflow: hidden;
.list{
height: calc(100%);
overflow: auto;
padding: 30rpx;
box-sizing: border-box;
.list-item{
background-color: #fff;
border-radius: 20rpx;
padding: 30rpx;
.list-title{
font-weight: bold;
font-size: 36rpx;
margin-bottom: 14rpx;
.t{
background-color: #EFF7FE;
color: #33A1CA;
margin-left: 20rpx;
font-weight: normal;
}
.money{
color: #647BEB;
}
}
.company{
margin: 14rpx 0;
color: #999;
font-size: 30rpx;
}
.occupational{
color: #999;
font-size: 26rpx;
}
}
.list-item + .list-item{
margin-top: 30rpx;
}
}
}
</style>
<template>
<div class="user">
<u-cell title="我的简历" isLink @click="toResume"/>
<u-cell title="投递记录" isLink @click="toDeliverLog"/>
<u-cell title="收藏记录" isLink @click="toCollectLog"/>
<u-cell title="清空缓存" isLink @click="clean"/>
<LoginOpen v-if="loginShow" @close="loginShow = false"/>
</div>
</template>
......@@ -21,6 +24,33 @@ export default {
} else {
this.loginShow = true
}
},
toDeliverLog() {
const token = uni.getStorageSync('jy-recruit-token');
if (token) {
uni.navigateTo({
url: '/pages/user/deliverLog'
})
} else {
this.loginShow = true
}
},
toCollectLog() {
const token = uni.getStorageSync('jy-recruit-token');
if (token) {
uni.navigateTo({
url: '/pages/user/collectLog'
})
} else {
this.loginShow = true
}
},
clean() {
uni.clearStorageSync()
uni.showToast({
title: '清理成功',
icon: 'none'
})
}
}
};
......
......@@ -7,24 +7,83 @@
ref="uForm"
labelWidth="120"
>
<u-form-item label="意向城市" prop="city" borderBottom>
<u-input v-model="userInfo.city" border="none" />
</u-form-item>
<u-form-item label="最低薪资" prop="salaryMin" borderBottom>
<u-input v-model="userInfo.salaryMin" border="none" />
<u-form-item label="期望职位" prop="workType">
<u-cell
size="large"
:title="userInfo.industryName || '选择期望职位'"
isLink
@click="industryShow = true"
/>
<u-picker
keyName="name"
:show="industryShow"
:columns="industryList"
@confirm="changeIndustry"
@cancel="industryShow = false"
></u-picker>
</u-form-item>
<u-form-item label="最高薪资" prop="salaryMax" borderBottom>
<u-input v-model="userInfo.salaryMax" border="none" />
<u-form-item label="工作城市" prop="city">
<u-cell
size="large"
:title="userInfo.city || '选择工作城市'"
isLink
@click="showArea = true"
/>
<u-picker
keyName="name"
:show="showArea"
@cancel="showArea=false"
ref="uPicker"
:columns="areaColumns"
@confirm="confirmArea"
@change="changeHandler"
/>
</u-form-item>
<u-form-item label="期望行业" prop="workType">
<u-cell size="large" :title="userInfo.workType || '选择期望行业'" isLink @click="workTypeShow = true"/>
<u-form-item label="薪资要求" prop="salaryMin">
<u-cell
size="large"
:title="userInfo.salaryMin && userInfo.salaryMax ? `${userInfo.salaryMin}-${userInfo.salaryMax}` : '选择薪资范围'"
isLink
@click="setSalary"
/>
<u-picker
:show="workTypeShow"
:columns="workTypeList"
@confirm="changeWorkType"
@cancel="workTypeShow = false"
:show="salaryShow"
:columns="salaryList"
@confirm="confirmSalary"
@cancel="salaryShow = false"
@change="changeSalary"
></u-picker>
</u-form-item>
<u-form-item label="工作性质" prop="workType">
<u-cell
size="large"
:title="workTypeList[0] && workTypeList.join('/') || '如:全职'"
isLink
@click="workTypeShow = true"
/>
<u-popup :show="workTypeShow" :round="10" mode="bottom">
<view class="work_type">
<view class="f_b">
<view class="">工作性质(可多选)</view>
<view class="btn" @click="workTypeShow=false">确认</view>
</view>
<view class="f_s">
<view
:class="workTypeList.includes('全职') ? 'it itActive' : 'it'"
@click="toggleWork('全职')"
>全职</view>
<view
:class="workTypeList.includes('兼职') ? 'it itActive' : 'it'"
@click="toggleWork('兼职')"
>兼职</view>
<view
:class="workTypeList.includes('实习') ? 'it itActive' : 'it'"
@click="toggleWork('实习')"
>实习</view>
</view>
</view>
</u-popup>
</u-form-item>
</u-form>
<view class="br"></view>
<view class="footer">
......@@ -35,21 +94,31 @@
</template>
<script>
import sheng from '../../../util/province.json'
import shi from '../../../util/city.json'
import qu from '../../../util/area.json'
export default {
data() {
return {
userInfo:{},
industryShow: false,
areaColumns: [sheng, shi['1'], qu['72']],
showArea: false,
industryList: [],
workTypeShow: false,
workTypeList: [],
salaryShow: false,
salaryList: [
['1000', '2000', '3000', '4000', '5000', '6000', '7000', '8000', '9000', '10000', '11000', '12000', '13000', '14000', '15000', '16000', '17000', '18000', '19000', '20000', '21000', '22000', '23000', '24000', '25000', '26000', '27000', '28000', '29000', '30000'],
['1000', '2000', '3000', '4000', '5000', '6000', '7000', '8000', '9000', '10000', '11000', '12000', '13000', '14000', '15000', '16000', '17000', '18000', '19000', '20000', '21000', '22000', '23000', '24000', '25000', '26000', '27000', '28000', '29000', '30000'],
]
}
},
onLoad(o) {
console.log(sheng)
this.userInfo.personId = o.id
this.$http.get('/public/industry/l/all', {}).then(res => {
this.workTypeList = [res.data.map(item => {
return item.name
})]
console.log(this.workTypeList)
this.industryList = [res.data]
})
// 编辑
if (o.objectiveId) {
......@@ -61,19 +130,82 @@
salaryMin:res.data.salaryMin,
salaryMax:res.data.salaryMax,
workType:res.data.workType,
industryName: res.data.industryName,
industryId: res.data.industryId,
}
this.workTypeList = res.data.workType.split('/')
})
}
},
methods: {
changeWorkType(e) {
this.workTypeShow = false
this.userInfo.workType = e.value[0]
changeHandler(e) { //监听联动的操作
const {
columnIndex,
value,
values, // values为当前变化列的数组内容
indexs,
picker = this.$refs.uPicker
} = e
if (columnIndex === 0) {
picker.setColumnValues(1, shi[value[0].id])
picker.setColumnValues(2, qu[shi[value[0].id][0].id])
}
if (columnIndex === 1) {
console.log(qu[shi[value[0].id][0].id])
picker.setColumnValues(2,qu[shi[value[0].id][indexs[1]].id])
}
},
confirmArea(e) {
this.userInfo.city = `${e.value[0].name}-${e.value[1].name}-${e.value[2].name}`
this.showArea = false
},
toggleWork(e) {
if (this.workTypeList.includes(e)) {
this.workTypeList = this.workTypeList.filter(item => item != e)
} else {
this.workTypeList.push(e)
}
this.userInfo.workType = this.workTypeList.join('/')
},
setSalary() {
this.salaryShow = true
},
changeSalary(e) {
const {
columnIndex,
value,
values, // values为当前变化列的数组内容
index,
// 微信小程序无法将picker实例传出来,只能通过ref操作
picker = this.$refs.uPicker
} = e
if (columnIndex === 0) {
// picker为选择器this实例,变化第二列对应的选项
picker.setColumnValues(1, values[0].slice(index))
}
},
confirmSalary(e) {
if (e.value.length == 2) {
this.userInfo.salaryMin = e.value[0]
this.userInfo.salaryMax = e.value[1]
}
this.salaryShow = false
},
changeIndustry(e) {
this.industryShow = false
this.userInfo.industryName = e.value[0].name
this.userInfo.industryId = e.value[0].id
},
submit(){
if (!this.userInfo.industryId) {
return uni.showToast({
title: '请选择期望职位',
icon: 'none'
})
}
if (!this.userInfo.city) {
return uni.showToast({
title: '请输入意向城市',
title: '请输入工作城市',
icon: 'none'
})
}
......@@ -85,7 +217,7 @@
}
if (!this.userInfo.workType) {
return uni.showToast({
title: '请选择期望行业',
title: '请选择工作性质',
icon: 'none'
})
}
......@@ -112,6 +244,29 @@
.br{
height: calc(200rpx + env(safe-area-inset-bottom));
}
.work_type{
padding: 30rpx 30rpx calc(env(safe-area-inset-bottom) + 150rpx);
.btn{
color: $uni-color-primary;
padding: 10rpx;
}
.it{
width: 150rpx;
height: 60rpx;
font-size: 32rpx;
text-align: center;
line-height: 60rpx;
margin-right: 30rpx;
margin-top: 40rpx;
color: #333;
background: #eee;
border-radius: 6rpx;
}
.itActive{
color: $uni-color-primary;
background-color: rgba($uni-color-primary, .1);
}
}
.footer{
position: fixed;
bottom: calc(env(safe-area-inset-bottom) + 40rpx);
......
......@@ -2,15 +2,15 @@
<view class="resume">
<view class="module">
<view class="f_b">
<view class="name">{{ userInfo.name }}</view>
<view class="name">{{ userInfo.name || '' }}</view>
<u-icon name="edit-pen" size="22" color="#3686DC" @click="toPersonal"/>
</view>
<view class="f_s">
{{ userInfo.age }}
{{ userInfo.age || 0 }}
<!-- <view style="margin: 0 20rpx;">|</view>
工作6年 -->
<view style="margin: 0 20rpx;">|</view>
{{ userInfo.nation }}
{{ userInfo.sex ? '男' : '女' }}
</view>
<view class="f_s">
<u-icon name="phone-fill" size="20"/>
......@@ -28,13 +28,13 @@
<view class="module">
<view class="f_b">
<view class="name">求职意向</view>
<view class="f_s">
<view class="f_s" @click="toIntention">
<u-icon
name="setting"
size="22"
color="#3686DC"
/>
<view style="margin-left: 16rpx;color: #3686DC;" @click="toIntention">管理</view>
<view style="margin-left: 16rpx;color: #3686DC;">管理</view>
</view>
</view>
<!-- <view class="f_s">
......@@ -46,7 +46,7 @@
<view class="f_s" v-for="item in intentionList">
<u-icon name="file-text-fill" size="20"/>
<view style="margin-left: 16rpx;">
{{item.workType}}
{{item.industryName}}
</view>
</view>
</view>
......
......@@ -5,7 +5,7 @@
<!-- <u-cell title="求职状态" value="在职-看看机会" :border="false" isLink/> -->
<view class="module" v-for="(item,index) in list">
<view class="f_b">
<view class="name">{{ item.workType }}</view>
<view class="name">{{ item.industryName }}</view>
<u-icon name="edit-pen" size="22" color="#3686DC" @click="edit(item)"/>
</view>
<view class="f_s">
......
......@@ -19,12 +19,12 @@
<u-form-item label="年龄" prop="age" borderBottom>
<u-input v-model="userInfo.age" border="none" />
</u-form-item>
<u-form-item label="民族" prop="nation" borderBottom>
<u-input v-model="userInfo.nation" border="none" />
</u-form-item>
<u-form-item label="手机号码" prop="phoneNumber" borderBottom>
<u-input v-model="userInfo.phoneNumber" border="none" />
</u-form-item>
<u-form-item label="身份证号" prop="idNo" borderBottom>
<u-input v-model="userInfo.idNo" border="none" />
</u-form-item>
</u-form>
<view class="br"></view>
<view class="footer">
......@@ -72,6 +72,26 @@
icon: 'none'
})
}
const reg = /^1[3-9]\d{9}$/;
if (!reg.test(this.userInfo.phoneNumber)) {
return uni.showToast({
title: '请输入正确的手机号',
icon: 'none'
})
}
if (!this.userInfo.idNo) {
return uni.showToast({
title: '请输入身份证号',
icon: 'none'
})
}
const reg2 = /^[1-9]\d{5}(19|20)\d{2}((0[1-9])|(1[0-2]))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/;
if (!reg2.test(this.userInfo.idNo)) {
return uni.showToast({
title: '请输入正确的身份证号',
icon: 'none'
})
}
this.$http.post('/person/u', this.userInfo).then(res => {
uni.showToast({
title: `修改成功`,
......
......@@ -6,7 +6,9 @@
"pages/user/index",
"pages/user/resume/index",
"pages/user/resume/personalInfo",
"pages/user/resume/addIntention"
"pages/user/resume/addIntention",
"pages/user/deliverLog",
"pages/user/collectLog"
],
"subPackages": [],
"window": {
......
This source diff could not be displayed because it is too large. You can view the blob instead.
差异被折叠。
差异被折叠。
差异被折叠。
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论