Browse Source

上传修改

master
前端-胡立永 2 months ago
parent
commit
76c57b14ea
11 changed files with 179 additions and 80 deletions
  1. +1
    -1
      api/model/login.js
  2. +2
    -2
      api/model/work.js
  3. +1
    -1
      components/checkinScore.vue
  4. +9
    -9
      components/list/workList/index.vue
  5. +18
    -1
      components/list/workList/workItem.vue
  6. +26
    -18
      components/screen/screenWork.vue
  7. +1
    -1
      config.js
  8. +8
    -2
      pages/index/index.vue
  9. +111
    -41
      pages_order/work/jobPosting.vue
  10. +1
    -1
      store/store.js
  11. +1
    -3
      utils/position.js

+ 1
- 1
api/model/login.js View File

@ -6,7 +6,7 @@ const api = {
// 微信登录接口 // 微信登录接口
wxLogin: { wxLogin: {
url: '/api/login/login', url: '/api/login/login',
method: 'GET',
method: 'GET',
limit : 500, limit : 500,
showLoading : true, showLoading : true,
}, },


+ 2
- 2
api/model/work.js View File

@ -11,12 +11,12 @@ const api = {
}, },
// 首页-根据Id查看工作详情 // 首页-根据Id查看工作详情
employeeQueryJobList: { employeeQueryJobList: {
url: '/employ/job/queryJobById',
url: '/employ/job/queryJobList',
method: 'GET', method: 'GET',
}, },
// 首页-查询工作信息列表 // 首页-查询工作信息列表
employeeQueryJobById: { employeeQueryJobById: {
url: '/employ/job/queryJobList',
url: '/employ/job/queryJobById',
method: 'GET', method: 'GET',
}, },
// 会员中心-我的招工 // 会员中心-我的招工


+ 1
- 1
components/checkinScore.vue View File

@ -36,7 +36,7 @@
}, },
checkin(){ checkin(){
this.$api('addScoreBySign', res => { this.$api('addScoreBySign', res => {
if(re.code == 200){
if(res.code == 200){
uni.showToast({ uni.showToast({
title: '签到成功' title: '签到成功'
}) })


+ 9
- 9
components/list/workList/index.vue View File

@ -45,18 +45,18 @@
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{
let queryParams = {
pageNo: this.queryParams.pageNo,
pageSize: this.queryParams.pageSize,
} }
console.log(params);
if(params && params.length > 0){
params.forEach(n => {
queryParams[n.name] = n.value
})
}
this.$api(this.api, this.queryParams, res => {
this.$api(this.api, queryParams, res => {
if(res.code == 200){ if(res.code == 200){
this.list = res.result.records this.list = res.result.records
this.total = res.result.total this.total = res.result.total


+ 18
- 1
components/list/workList/workItem.vue View File

@ -23,7 +23,7 @@
</view> </view>
<view class="tag-list"> <view class="tag-list">
<view <view
v-for="(t, i) in item.tab && item.tab.split('、')"
v-for="(t, i) in lableText"
:key="i"> :key="i">
{{ t }} {{ t }}
</view> </view>
@ -53,6 +53,23 @@
default : {} default : {}
} }
}, },
computed : {
lableText(){
let arr =
this.item.tab ?
this.item.tab.split('、')
: []
if(this.item.workAge){
arr.unshift(this.item.workAge)
}
if(this.item.qulification){
arr.unshift(this.item.qulification)
}
return arr
},
},
data() { data() {
return { return {


+ 26
- 18
components/screen/screenWork.vue View File

@ -9,21 +9,21 @@
:custom-style="{padding: '0 30rpx'}" :custom-style="{padding: '0 30rpx'}"
@click="selectMenu"> @click="selectMenu">
<uv-drop-down-item name="area" type="2"
:label="dropItem('area').label"
:value="dropItem('area').value">
<uv-drop-down-item name="areaId" type="2"
:label="dropItem('areaId').label"
:value="dropItem('areaId').value">
</uv-drop-down-item> </uv-drop-down-item>
<uv-drop-down-item <uv-drop-down-item
name="craft" type="2"
:label="dropItem('craft').label"
:value="dropItem('craft').value">
name="typeId" type="2"
:label="dropItem('typeId').label"
:value="dropItem('typeId').value">
</uv-drop-down-item> </uv-drop-down-item>
<uv-drop-down-item <uv-drop-down-item
name="nature" type="2"
:label="dropItem('nature').label"
:value="dropItem('nature').value">
name="natureId" type="2"
:label="dropItem('natureId').label"
:value="dropItem('natureId').value">
</uv-drop-down-item> </uv-drop-down-item>
<uv-drop-down-item <uv-drop-down-item
@ -83,8 +83,8 @@
defaultValue: [0, 'all', 'all'], defaultValue: [0, 'all', 'all'],
// //
result: [], result: [],
activeName: 'area',
area: {
activeName: 'areaId',
areaId: {
label: '全国', label: '全国',
value: 0, value: 0,
activeIndex: 0, activeIndex: 0,
@ -97,7 +97,7 @@
}, },
] ]
}, },
craft: {
typeId: {
label: '工种', label: '工种',
value: 'all', value: 'all',
activeIndex: 0, activeIndex: 0,
@ -110,7 +110,7 @@
}, },
] ]
}, },
nature: {
natureId: {
label: '性质', label: '性质',
value: 'all', value: 'all',
activeIndex: 0, activeIndex: 0,
@ -166,25 +166,33 @@
mounted() { mounted() {
// //
this.jobTypeList.forEach(n => { this.jobTypeList.forEach(n => {
this.craft.child.push({
this.typeId.child.push({
label: n.name, label: n.name,
value: n.id, value: n.id,
}) })
}) })
this.list[0].tag = this.craft.child
this.list[0].tag = this.typeId.child
// //
this.natureList.forEach(n => { this.natureList.forEach(n => {
this.nature.child.push({
this.natureId.child.push({
label: n.name, label: n.name,
value: n.id, value: n.id,
}) })
}) })
this.list[1].tag = this.nature.child
this.list[1].tag = this.natureId.child
// if(this.addressList[0]){
// this.areaId.value = this.addressList[0].id
// this.areaId.label = this.addressList[0].name
// this.defaultValue[0] = this.addressList[0].id
// this.$forceUpdate()
// }
// //
this.addressList.forEach(n => { this.addressList.forEach(n => {
this.area.child.push({
this.areaId.child.push({
label: n.adress, label: n.adress,
value: n.id, value: n.id,
}) })


+ 1
- 1
config.js View File

@ -7,7 +7,7 @@ import uvUI from '@/uni_modules/uv-ui-tools'
Vue.use(uvUI); Vue.use(uvUI);
// 当前环境 // 当前环境
const type = 'lzx'
const type = 'dev'
// 环境配置 // 环境配置


+ 8
- 2
pages/index/index.vue View File

@ -3,7 +3,7 @@
<view class="banner"> <view class="banner">
<uv-swiper <uv-swiper
:list="banner"
:list="bannerList"
indicator indicator
height="620rpx" height="620rpx"
keyName="image"></uv-swiper> keyName="image"></uv-swiper>
@ -39,7 +39,7 @@
</view> </view>
<!-- 筛选器 --> <!-- 筛选器 -->
<screenWork @clickItem="clickItem"/>
<screenWork ref="screenWork" @clickItem="clickItem"/>
<!-- 老板看到的 --> <!-- 老板看到的 -->
<userList ref="workList" v-if="role"/> <userList ref="workList" v-if="role"/>
@ -93,6 +93,9 @@
'banner', 'banner',
'jobTypeList' 'jobTypeList'
]), ]),
bannerList(){
return this.banner.filter(n => n.type == 0)
},
}, },
data() { data() {
return { return {
@ -126,6 +129,9 @@
this.$utils.navigateTo('/pages_order/work/addResume') this.$utils.navigateTo('/pages_order/work/addResume')
} }
}, },
search(){
},
} }
} }
</script> </script>


+ 111
- 41
pages_order/work/jobPosting.vue View File

@ -9,9 +9,18 @@
<text style="color: #BD3624;">*</text> <text style="color: #BD3624;">*</text>
</view> </view>
<view class="form-sheet-cell"> <view class="form-sheet-cell">
<input type="text" class="title-input"/>
<input type="text" class="title-input"
v-model="form.title"/>
</view> </view>
<uv-cell
title="所在城市"
rightIconStyle="fontSize: 30rpx;"
:value="form.areaId_dictText || '请选择所在城市'"
@click="openPicker('areaId',$refs.addressListPicker)"
isLink
></uv-cell>
<uv-cell <uv-cell
title="工作地点" title="工作地点"
rightIconStyle="fontSize: 30rpx;" rightIconStyle="fontSize: 30rpx;"
@ -22,16 +31,24 @@
<uv-cell <uv-cell
title="所属工种" title="所属工种"
rightIconStyle="fontSize: 30rpx;" rightIconStyle="fontSize: 30rpx;"
:value="form.workYear || '请选择所属工种'"
@click="openPicker('workYear')"
:value="form.typeId_dictText || '请选择所属工种'"
@click="openPicker('typeId',$refs.jobTypeListPicker)"
isLink isLink
></uv-cell> ></uv-cell>
<uv-cell <uv-cell
title="工龄要求" title="工龄要求"
rightIconStyle="fontSize: 30rpx;" rightIconStyle="fontSize: 30rpx;"
:value="form.workYear || '请选择工龄要求'"
@click="openPicker('workYear')"
:value="form.workAge || '请选择工龄要求'"
@click="openPicker('workAge')"
isLink
></uv-cell>
<uv-cell
title="学历要求"
rightIconStyle="fontSize: 30rpx;"
:value="form.qulification || '请选择学历要求'"
@click="openPicker('qulification')"
isLink isLink
></uv-cell> ></uv-cell>
@ -92,12 +109,12 @@
薪资范围 薪资范围
</view> </view>
<view class="price"> <view class="price">
<input placeholder="最小值" v-model="form.min" />
<input placeholder="最小值" v-model="form.salaryLow" />
~ ~
<input placeholder="最大值" v-model="form.max" />
<input placeholder="最大值" v-model="form.salaryUp" />
</view> </view>
</view> </view>
<view class="form-sheet-cell">
<!-- <view class="form-sheet-cell">
<view class="label"> <view class="label">
结算方式 结算方式
</view> </view>
@ -115,7 +132,7 @@
</uv-radio> </uv-radio>
</view> </view>
</uv-radio-group> </uv-radio-group>
</view>
</view> -->
<view class="form-sheet-cell"> <view class="form-sheet-cell">
<view class="label"> <view class="label">
工作性质 工作性质
@ -143,18 +160,29 @@
</view> </view>
<view class=""> <view class="">
<uv-textarea <uv-textarea
v-model="form.content"
v-model="form.workDetail"
count count
:maxlength="300" :maxlength="300"
autoHeight autoHeight
placeholder="请输入详细介绍"></uv-textarea>
placeholder="请输入职位详情"></uv-textarea>
</view> </view>
<uv-picker ref="picker" <uv-picker ref="picker"
:columns="columns" :columns="columns"
@confirm="pickerConfirm"></uv-picker> @confirm="pickerConfirm"></uv-picker>
<view class="uni-color-btn">
<uv-picker ref="jobTypeListPicker"
:columns="[jobTypeList]"
keyName="name"
@confirm="pickerConfirm"></uv-picker>
<uv-picker ref="addressListPicker"
:columns="[addressList]"
keyName="adress"
@confirm="pickerConfirm"></uv-picker>
<view class="uni-color-btn"
@click="submit">
发布 发布
</view> </view>
</view> </view>
@ -167,16 +195,14 @@
data() { data() {
return { return {
form : { form : {
// school : '',
// workYear : '',
// minPrice : '',
// maxPrice : '',
// address : '',
// addId : '',
// company : '',
// gsContext : '',
// jobContext : '', // jobContext : '',
phone : '',
title : '',
workAge : '',
natureId : 0, natureId : 0,
areaId_dictText : '',
typeId_dictText : '',
qulification : '',
}, },
radiovalue : '', radiovalue : '',
priceList : [ priceList : [
@ -188,11 +214,11 @@
}, },
], ],
picker : { picker : {
workYear : [
workAge : [
'不限经验', '不限经验',
], ],
school : [
'不限',
qulification : [
'不限学历',
'初中', '初中',
'高中', '高中',
'专科', '专科',
@ -200,13 +226,14 @@
'研究生', '研究生',
'博士', '博士',
], ],
jobTypeList : [],
}, },
pickerKey : 'workYear',
pickerKey : 'workAge',
} }
}, },
onLoad() { onLoad() {
for (var i = 0; i < 30; i++) { for (var i = 0; i < 30; i++) {
this.picker.workYear.push((i + 1) + '年经验')
this.picker.workAge.push((i + 1) + '年经验')
} }
// this.form.addId = this.cityList[0].id // this.form.addId = this.cityList[0].id
this.form.natureId = this.natureList[0].id this.form.natureId = this.natureList[0].id
@ -215,15 +242,25 @@
columns(){ columns(){
return [this.picker[this.pickerKey]] return [this.picker[this.pickerKey]]
}, },
...mapState(['natureList']),
...mapState(['natureList', 'jobTypeList', 'addressList']),
}, },
methods: { methods: {
openPicker(key){
openPicker(key, picker){
this.pickerKey = key this.pickerKey = key
this.$refs.picker.open()
if(picker){
picker.open()
}else{
this.$refs.picker.open()
}
}, },
pickerConfirm(e){ pickerConfirm(e){
this.form[this.pickerKey] = e.value[0]
let data = e.value[0]
if(data && data.id){
this.form[this.pickerKey] = data.id
this.form[this.pickerKey + '_dictText'] = data.name || data.adress
}else{
this.form[this.pickerKey] = data
}
}, },
// //
submit(){ submit(){
@ -237,22 +274,23 @@
if (this.$utils.verificationAll(this.form, { if (this.$utils.verificationAll(this.form, {
title: '请输入招工标题', title: '请输入招工标题',
address : '请选择工作地点',
workYear : '请选择工龄要求',
company : '请输入招聘公司',
minPrice : '请输入薪资范围',
iconText: '请输入标签',
userName: '请输入联系人',
userPhone: '请输入联系电话',
jobContext : '请输入职位描述',
school : '请输入岗位要求',
jobDetails: '请输入岗位详细介绍',
gsContext : '请输入公司介绍',
// address : '',
workAge : '请选择工龄要求',
// company : '',
salaryLow : '请输入薪资范围',
salaryUp : '请输入薪资范围',
// iconText: '',
// userName: '',
phone: '请输入联系电话',
// jobContext : '',
qulification : '请选择学历要求',
workDetail: '请输入职位详情',
// gsContext : '',
})) { })) {
return return
} }
this.$api('publishJob', this.form, res => {
this.$api('addJob', this.form, res => {
if(res.code == 200){ if(res.code == 200){
uni.showToast({ uni.showToast({
title: '发布成功!', title: '发布成功!',
@ -264,6 +302,33 @@
}) })
}, },
//
selectAddr() {
uni.chooseLocation({
success: (res) => {
this.setAddress(res)
}
});
},
//
setAddress(res) {
//
this.form.latitude = res.latitude
this.form.longitude = res.longitude
// if (res.name) { //
if (!res.address && res.name) { //
return this.form.address = res.name
}
if (res.address || res.name) {
return this.form.address = res.address + res.name
}
this.form.address = '' //
this.form.latitude = ''
this.form.longitude = ''
},
} }
} }
</script> </script>
@ -313,5 +378,10 @@
} }
} }
} }
/deep/ .uv-textarea{
background-color: rgba($uni-color, 0.1) !important;
min-height: 400rpx;
}
} }
</style> </style>

+ 1
- 1
store/store.js View File

@ -10,7 +10,7 @@ const store = new Vuex.Store({
state: { state: {
configList: [], //配置列表 configList: [], //配置列表
// 角色 true为老板 false为工人 // 角色 true为老板 false为工人
role : true,
role : false,
userInfo : {}, //用户信息 userInfo : {}, //用户信息
banner : [],//轮播图 banner : [],//轮播图
jobTypeList : [],//工种 jobTypeList : [],//工种


+ 1
- 3
utils/position.js View File

@ -142,10 +142,8 @@ function getUserAddressByIp(key) { //根据IP获取当前用户位置
} }
//打开地图让用户选择位置 //打开地图让用户选择位置
function selectAddress(longitude, latitude, successCallback) {
function selectAddress(successCallback) {
uni.chooseLocation({ uni.chooseLocation({
longitude, //经度
latitude, //纬度
success: function(res) { success: function(res) {
successCallback && successCallback(res) successCallback && successCallback(res)
} }


Loading…
Cancel
Save