Browse Source

上传修改

master
前端-胡立永 5 months ago
parent
commit
a292751008
15 changed files with 279 additions and 64 deletions
  1. +16
    -35
      api/api.js
  2. +2
    -3
      api/http.js
  3. +19
    -0
      api/model/company.js
  4. +25
    -0
      api/model/contact.js
  5. +11
    -2
      api/model/login.js
  6. +14
    -0
      api/model/vip.js
  7. +36
    -0
      api/model/work.js
  8. +12
    -1
      components/list/workList/index.vue
  9. +5
    -2
      config.js
  10. +1
    -1
      pages/index/center.vue
  11. +4
    -4
      pages_order/auth/wxUserInfo.vue
  12. +1
    -1
      pages_order/work/addResume.vue
  13. +103
    -7
      pages_order/work/jobPosting.vue
  14. +15
    -7
      store/store.js
  15. +15
    -1
      utils/utils.js

+ 16
- 35
api/api.js View File

@ -1,10 +1,11 @@
import http from './http.js' import http from './http.js'
import utils from '../utils/utils.js'
let limit = {} let limit = {}
let debounce = {} let debounce = {}
const models = ['score', 'boss', 'login']
const models = ['score', 'boss', 'login', 'vip', 'company', 'work']
const config = { const config = {
// 示例 // 示例
@ -119,15 +120,15 @@ const config = {
//获取工作信息列表 //获取工作信息列表
employeeQueryJobList: {
url: '/api/employee/queryJobListByAll',
method: 'GET',
},
// employeeQueryJobList: {
// url: '/api/employee/queryJobListByAll',
// method: 'GET',
// },
//根据Id查看工作详情 //根据Id查看工作详情
employeeQueryJobById: {
url: '/api/employee/queryJobById',
method: 'GET',
},
// employeeQueryJobById: {
// url: '/api/employee/queryJobById',
// method: 'GET',
// },
//我的收藏 //我的收藏
employeeQueryCollectionJobList: { employeeQueryCollectionJobList: {
url: '/api/employee/queryJobCollectionList', url: '/api/employee/queryJobCollectionList',
@ -146,12 +147,6 @@ const config = {
method: 'GET', method: 'GET',
auth: true, auth: true,
}, },
//联系记录-谁看过我
employeeQueryWatchMe: {
url: '/api/employee/queryWatchMe',
method: 'GET',
auth: true,
},
//电子合同-获取电子合同列表 //电子合同-获取电子合同列表
employeeQueryContractList: { employeeQueryContractList: {
url: '/api/employee/queryContractList', url: '/api/employee/queryContractList',
@ -185,23 +180,11 @@ const config = {
auth: true, auth: true,
}, },
//我的招工 //我的招工
bossQueryJobListByUserId: {
url: '/api/boss/queryJobListByUserId',
method: 'GET',
auth: true,
},
//会员中心-联系记录-我看过谁
bossQueryWatchWho: {
url: '/api/boss/queryWatchWho',
method: 'GET',
auth: true,
},
//会员中心-联系记录-谁看过我
bossQueryWatchMe: {
url: '/api/boss/queryWatchMe',
method: 'GET',
auth: true,
},
// bossQueryJobListByUserId: {
// url: '/api/boss/queryJobListByUserId',
// method: 'GET',
// auth: true,
// },
} }
export function api(key, data, callback, loadingTitle) { export function api(key, data, callback, loadingTitle) {
@ -234,9 +217,7 @@ export function api(key, data, callback, loadingTitle) {
//必须登录 //必须登录
if (req.auth) { if (req.auth) {
if (!uni.getStorageSync('token')) { if (!uni.getStorageSync('token')) {
uni.navigateTo({
url: '/pages_order/auth/wxLogin'
})
utils.toLogin()
console.error('需要登录') console.error('需要登录')
return return
} }


+ 2
- 3
api/http.js View File

@ -1,5 +1,6 @@
import Vue from 'vue' import Vue from 'vue'
import utils from '../utils/utils.js'
function http(uri, data, callback, method = 'GET', showLoading, title) { function http(uri, data, callback, method = 'GET', showLoading, title) {
@ -29,9 +30,7 @@ function http(uri, data, callback, method = 'GET', showLoading, title) {
res.data.message == '操作失败,用户不存在!'){ res.data.message == '操作失败,用户不存在!'){
uni.removeStorageSync('token') uni.removeStorageSync('token')
console.error('登录过期'); console.error('登录过期');
uni.navigateTo({
url: '/pages_order/auth/wxLogin'
})
utils.toLogin()
} }
if(res.statusCode == 200 && res.data.code != 200){ if(res.statusCode == 200 && res.data.code != 200){


+ 19
- 0
api/model/company.js View File

@ -0,0 +1,19 @@
// 企业相关接口
const api = {
// 查看企业信息
getCompany: {
url: '/company/updateUser',
method: 'GET',
},
// 修改企业信息
getCompany: {
url: '/company/updateUser',
method: 'POST',
auth : true,
limit : 1500,
},
}
export default api

+ 25
- 0
api/model/contact.js View File

@ -0,0 +1,25 @@
// 联系记录相关接口
const api = {
//联系记录-谁看过我(谁看过我的简历)
employeeQueryWatchMe: {
url: '/employ/check/queryWatchMeEmployee',
method: 'GET',
auth: true,
},
//会员中心-联系记录-谁看过我(谁看过我的招工)
bossQueryWatchMe: {
url: '/employ/check/queryWatchMeBoss',
method: 'GET',
auth: true,
},
//会员中心-联系记录-我看过谁
bossQueryWatchWho: {
url: '/api/boss/queryWatchWho',
method: 'GET',
auth: true,
},
}
export default api

+ 11
- 2
api/model/login.js View File

@ -12,7 +12,7 @@ const api = {
}, },
// 修改个人信息接口 // 修改个人信息接口
updateInfo: { updateInfo: {
url: '/info/updateInfo',
url: '/employ/user/updateUser',
method: 'POST', method: 'POST',
auth: true, auth: true,
limit : 500, limit : 500,
@ -30,9 +30,18 @@ const api = {
}, },
// 获取个人信息 // 获取个人信息
getInfo: { getInfo: {
url: '/employ/user/updateUser',
url: '/employ/user/queryUser',
method: 'GET', method: 'GET',
auth: true, auth: true,
limit : 500,
},
// 获取个人信息
bindPhone: {
url: '/api/login/bindPhone',
method: 'GET',
auth: true,
limit : 500,
showLoading : true,
}, },
} }

+ 14
- 0
api/model/vip.js View File

@ -0,0 +1,14 @@
// VIP相关接口
const api = {
// 开通VIP
addVIP: {
url: '/employ/vip/addVIP',
method: 'POST',
auth : true,
limit : 1500,
},
}
export default api

+ 36
- 0
api/model/work.js View File

@ -0,0 +1,36 @@
// 工作相关接口
const api = {
// 首页-添加工作信息
addJob: {
url: '/employ/job/addJob',
method: 'POST',
auth : true,
limit : 1500,
},
// 首页-根据Id查看工作详情
employeeQueryJobList: {
url: '/employ/job/queryJobById',
method: 'GET',
},
// 首页-查询工作信息列表
employeeQueryJobById: {
url: '/employ/job/queryJobList',
method: 'GET',
},
// 会员中心-我的招工
bossQueryJobListByUserId: {
url: '/employ/job/queryJobListByUserId',
method: 'GET',
auth : true,
},
// 首页-修改工作信息
updateJob: {
url: '/employ/job/updateJob',
method: 'GET',
auth : true,
},
}
export default api

+ 12
- 1
components/list/workList/index.vue View File

@ -40,11 +40,22 @@
} }
}, },
methods: { methods: {
getData(){
getData(params){
if(uni.getStorageSync('token')){ if(uni.getStorageSync('token')){
this.queryParams.token = uni.getStorageSync('token') this.queryParams.token = uni.getStorageSync('token')
} }
if(!params || params.length == 0){
this.queryParams = {
pageNo: this.queryParams.pageNo,
pageSize: this.queryParams.pageSize,
}
}else{
}
console.log(params);
this.$api(this.api, this.queryParams, res => { this.$api(this.api, this.queryParams, res => {
if(res.code == 200){ if(res.code == 200){
this.list = res.result.records this.list = res.result.records


+ 5
- 2
config.js View File

@ -7,7 +7,7 @@ import uvUI from '@/uni_modules/uv-ui-tools'
Vue.use(uvUI); Vue.use(uvUI);
// 当前环境 // 当前环境
const type = 'prod'
const type = 'dev2'
// 环境配置 // 环境配置
@ -15,9 +15,12 @@ const config = {
dev : { dev : {
baseUrl : 'http://augcl.natapp1.cc/employ-api', baseUrl : 'http://augcl.natapp1.cc/employ-api',
}, },
dev2 : {
baseUrl : 'http://h5.xzaiyp.top/employ-api',
},
prod : { prod : {
baseUrl : 'https://employadmin.augcl.com/employ-api', baseUrl : 'https://employadmin.augcl.com/employ-api',
}
},
} }


+ 1
- 1
pages/index/center.vue View File

@ -220,7 +220,7 @@
} }
}, },
onShow() { onShow() {
// this.$store.commit('getUserInfo')
this.$store.commit('getUserInfo')
}, },
methods: { methods: {


+ 4
- 4
pages_order/auth/wxUserInfo.vue View File

@ -1,10 +1,10 @@
<template> <template>
<view class="login"> <view class="login">
<view class="logo">
<!-- <view class="logo">
<image :src="configList.logo_image" mode=""></image> <image :src="configList.logo_image" mode=""></image>
</view>
</view> -->
<view class="title"> <view class="title">
{{ configList.logo_name }}
特易招
</view> </view>
<view class="title"> <view class="title">
申请获取你的头像昵称 申请获取你的头像昵称
@ -127,7 +127,7 @@
} }
self.$api('updateInfo', { self.$api('updateInfo', {
avatarUrl : self.userInfoForm.headImage,
headImage : self.userInfoForm.headImage,
nickName : self.userInfoForm.nickName, nickName : self.userInfoForm.nickName,
phone : self.userInfoForm.phone, phone : self.userInfoForm.phone,
}, res => { }, res => {


+ 1
- 1
pages_order/work/addResume.vue View File

@ -1,6 +1,6 @@
<template> <template>
<view class="page"> <view class="page">
<navbar title="发布找活"
<navbar title="在线简历"
leftClick leftClick
@leftClick="$utils.navigateBack"/> @leftClick="$utils.navigateBack"/>


+ 103
- 7
pages_order/work/jobPosting.vue View File

@ -22,7 +22,16 @@
<uv-cell <uv-cell
title="所属工种" title="所属工种"
rightIconStyle="fontSize: 30rpx;" rightIconStyle="fontSize: 30rpx;"
value="请选择所属工种"
:value="form.workYear || '请选择所属工种'"
@click="openPicker('workYear')"
isLink
></uv-cell>
<uv-cell
title="工龄要求"
rightIconStyle="fontSize: 30rpx;"
:value="form.workYear || '请选择工龄要求'"
@click="openPicker('workYear')"
isLink isLink
></uv-cell> ></uv-cell>
@ -96,7 +105,7 @@
<view class="price"> <view class="price">
<uv-radio <uv-radio
:customStyle="{margin: '8px'}" :customStyle="{margin: '8px'}"
v-for="(item, index) in radiolist"
v-for="(item, index) in priceList"
:key="index" :key="index"
iconSize="30rpx" iconSize="30rpx"
size="40rpx" size="40rpx"
@ -111,17 +120,17 @@
<view class="label"> <view class="label">
工作性质 工作性质
</view> </view>
<uv-radio-group v-model="radiovalue">
<uv-radio-group v-model="form.natureId">
<view class="price"> <view class="price">
<uv-radio <uv-radio
:customStyle="{margin: '8px'}" :customStyle="{margin: '8px'}"
v-for="(item, index) in radiolist"
v-for="(item, index) in natureList"
:key="index" :key="index"
iconSize="30rpx" iconSize="30rpx"
size="40rpx" size="40rpx"
labelSize="26rpx" labelSize="26rpx"
:label="item.name" :label="item.name"
:name="item.name">
:name="item.id">
</uv-radio> </uv-radio>
</view> </view>
</uv-radio-group> </uv-radio-group>
@ -141,6 +150,10 @@
placeholder="请输入详细介绍"></uv-textarea> placeholder="请输入详细介绍"></uv-textarea>
</view> </view>
<uv-picker ref="picker"
:columns="columns"
@confirm="pickerConfirm"></uv-picker>
<view class="uni-color-btn"> <view class="uni-color-btn">
发布 发布
</view> </view>
@ -149,14 +162,24 @@
</template> </template>
<script> <script>
import { mapState } from 'vuex'
export default { export default {
data() { data() {
return { return {
form : { form : {
// school : '',
// workYear : '',
// minPrice : '',
// maxPrice : '',
// address : '',
// addId : '',
// company : '',
// gsContext : '',
// jobContext : '',
natureId : 0,
}, },
radiovalue : '', radiovalue : '',
radiolist : [
priceList : [
{ {
name : '日结', name : '日结',
}, },
@ -164,9 +187,82 @@
name : '月结', name : '月结',
}, },
], ],
picker : {
workYear : [
'不限经验',
],
school : [
'不限',
'初中',
'高中',
'专科',
'本科',
'研究生',
'博士',
],
},
pickerKey : 'workYear',
}
},
onLoad() {
for (var i = 0; i < 30; i++) {
this.picker.workYear.push((i + 1) + '年经验')
} }
// this.form.addId = this.cityList[0].id
this.form.natureId = this.natureList[0].id
},
computed : {
columns(){
return [this.picker[this.pickerKey]]
},
...mapState(['natureList']),
}, },
methods: { methods: {
openPicker(key){
this.pickerKey = key
this.$refs.picker.open()
},
pickerConfirm(e){
this.form[this.pickerKey] = e.value[0]
},
//
submit(){
// if(this.fileList.length == 0){
// return uni.showToast({
// title: '',
// icon : 'none'
// })
// }
if (this.$utils.verificationAll(this.form, {
title: '请输入招工标题',
address : '请选择工作地点',
workYear : '请选择工龄要求',
company : '请输入招聘公司',
minPrice : '请输入薪资范围',
iconText: '请输入标签',
userName: '请输入联系人',
userPhone: '请输入联系电话',
jobContext : '请输入职位描述',
school : '请输入岗位要求',
jobDetails: '请输入岗位详细介绍',
gsContext : '请输入公司介绍',
})) {
return
}
this.$api('publishJob', this.form, res => {
if(res.code == 200){
uni.showToast({
title: '发布成功!',
icon: 'none'
})
setTimeout(uni.navigateBack, 1000, -1)
}
})
},
} }
} }


+ 15
- 7
store/store.js View File

@ -10,7 +10,7 @@ const store = new Vuex.Store({
state: { state: {
configList: [], //配置列表 configList: [], //配置列表
// 角色 true为老板 false为工人 // 角色 true为老板 false为工人
role : false,
role : true,
userInfo : {}, //用户信息 userInfo : {}, //用户信息
banner : [],//轮播图 banner : [],//轮播图
jobTypeList : [],//工种 jobTypeList : [],//工种
@ -60,13 +60,14 @@ const store = new Vuex.Store({
state.userInfo = res.result.userInfo state.userInfo = res.result.userInfo
uni.setStorageSync('token', res.result.token) uni.setStorageSync('token', res.result.token)
// if(!state.userInfo.nickName || !state.userInfo.headImage){
// uni.navigateTo({
// url: '/pages_order/auth/wxUserInfo'
// })
// }else{
if(!state.userInfo.nickName || !state.userInfo.headImage
|| !state.userInfo.phone){
uni.navigateTo({
url: '/pages_order/auth/wxUserInfo'
})
}else{
uni.navigateBack(-1) uni.navigateBack(-1)
// }
}
}) })
} }
}) })
@ -75,6 +76,13 @@ const store = new Vuex.Store({
api('getInfo', res => { api('getInfo', res => {
if(res.code == 200){ if(res.code == 200){
state.userInfo = res.result state.userInfo = res.result
if(!state.userInfo.nickName || !state.userInfo.headImage
|| !state.userInfo.phone){
uni.navigateTo({
url: '/pages_order/auth/wxUserInfo'
})
}
} }
}) })
}, },


+ 15
- 1
utils/utils.js View File

@ -152,6 +152,19 @@ export function redirectTo(...args){
uni.redirectTo(params(...args)) uni.redirectTo(params(...args))
} }
export const toLogin = function(){
let time = 0
return () => {
if(new Date().getTime() - time < 1000){
return
}
time = new Date().getTime()
uni.navigateTo({
url: '/pages_order/auth/wxLogin'
})
}
}()
export default { export default {
toArray, toArray,
generateUUID, generateUUID,
@ -165,5 +178,6 @@ export default {
navigateBack, navigateBack,
redirectTo, redirectTo,
copyText, copyText,
stringFormatHtml
stringFormatHtml,
toLogin,
} }

Loading…
Cancel
Save