Browse Source

上传修改

master
前端-胡立永 2 months ago
parent
commit
42cfddf129
10 changed files with 267 additions and 35 deletions
  1. +1
    -1
      App.vue
  2. +5
    -2
      api/api.js
  3. +12
    -0
      api/model/config.js
  4. +20
    -0
      api/model/resume.js
  5. +1
    -1
      config.js
  6. +2
    -7
      pages_order/auth/wxLogin.vue
  7. +63
    -3
      pages_order/mine/redeemCode.vue
  8. +138
    -7
      pages_order/work/addResume.vue
  9. +6
    -0
      pages_order/work/jobPosting.vue
  10. +19
    -14
      store/store.js

+ 1
- 1
App.vue View File

@ -3,7 +3,7 @@
onLaunch: function() { onLaunch: function() {
}, },
onShow: function() { onShow: function() {
// this.$store.commit('initConfig')
this.$store.commit('initConfig')
this.$store.commit('getJobTypeList') this.$store.commit('getJobTypeList')
this.$store.commit('getAddressList') this.$store.commit('getAddressList')
this.$store.commit('getNatureList') this.$store.commit('getNatureList')


+ 5
- 2
api/api.js View File

@ -5,7 +5,10 @@ let limit = {}
let debounce = {} let debounce = {}
const models = ['score', 'boss', 'login', 'vip', 'company', 'work','index-lzx']
const models = [
'score', 'boss', 'login', 'vip', 'company', 'work','index-lzx', 'resume',
'config'
]
const config = { const config = {
// 示例 // 示例
@ -14,7 +17,7 @@ const config = {
// limit : 1000 // limit : 1000
// }, // },
getConfig : {url : '/api/getConfig', method : 'GET', limit : 500},
// getConfig : {url : '/api/getConfig', method : 'GET', limit : 500},


+ 12
- 0
api/model/config.js View File

@ -0,0 +1,12 @@
// 配置相关接口
const api = {
// 查看配置信息
getConfig: {
url: '/employ/config/queryConfigList',
method: 'GET',
},
}
export default api

+ 20
- 0
api/model/resume.js View File

@ -0,0 +1,20 @@
// 工作相关接口
const api = {
// 首页-添加工作信息
addResume: {
url: '/employ/resume/addResume',
method: 'POST',
auth : true,
limit : 1500,
},
// 我的简历
queryResumeByUserId: {
url: '/employ/resume/queryResumeByUserId',
method: 'GET',
auth : true,
},
}
export default api

+ 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'
// 环境配置 // 环境配置


+ 2
- 7
pages_order/auth/wxLogin.vue View File

@ -35,10 +35,10 @@
activeColor="#3796F8" activeColor="#3796F8"
:name="1" :name="1"
></uv-checkbox> ></uv-checkbox>
阅读并同意我们的<text @click="openConfigDetail('getPrivacyPolicy')">服务协议与隐私条款</text>
阅读并同意我们的<text @click="$refs.popup.open('config_privacy')">隐私协议</text>
</view> </view>
<view class=""> <view class="">
以及<text @click="openConfigDetail('getUserAgreement')">个人信息保护指引</text>
以及<text @click="$refs.popup.open('config_service')">服务条款</text>
</view> </view>
</view> </view>
</uv-checkbox-group> </uv-checkbox-group>
@ -70,11 +70,6 @@
this.$store.commit('login') this.$store.commit('login')
}, },
//
openConfigDetail(key){
this.$refs.popup.open(key)
}
} }
} }
</script> </script>


+ 63
- 3
pages_order/mine/redeemCode.vue View File

@ -6,6 +6,27 @@
@leftClick="$utils.navigateBack" @leftClick="$utils.navigateBack"
/> />
<view class="input">
<input type="text" v-model="form.title"
placeholder="请输入兑换码"/>
<view class="btn">
兑换
</view>
</view>
<view class="list">
<view class="item"
v-for="(item, index) in 10"
:key="index">
<view class="title">
1.用户是否能通过兑换码
</view>
<view class="info">
兑换码仅能够
</view>
</view>
</view>
</view> </view>
</template> </template>
@ -13,15 +34,54 @@
export default { export default {
data() { data() {
return { return {
form : {
code : '',
},
} }
}, },
methods: { methods: {
}
},
} }
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
.page{
.input{
display: flex;
width: 690rpx;
margin: 30rpx;
margin-top: 80rpx;
input{
height: 50rpx;
padding: 10rpx 20rpx;
flex: 1;
border: 1px solid $uni-color;
border-radius: 15rpx;
margin-right: 20rpx;
background-color: #fff;
}
.btn{
width: 100rpx;
height: 70rpx;
text-align: center;
line-height: 70rpx;
background-color: $uni-color;
color: #fff;
border-radius: 15rpx;
}
}
.list{
margin: 30rpx;
.item{
margin: 30rpx 0;
.title{
margin-bottom: 10rpx;
}
.info{
color: #f40;
}
}
}
}
</style> </style>

+ 138
- 7
pages_order/work/addResume.vue View File

@ -37,7 +37,7 @@
您的性别 您的性别
</view> </view>
<uv-radio-group v-model="form.sex"> <uv-radio-group v-model="form.sex">
<view class="price">
<view style="display: flex;justify-content: center;">
<uv-radio <uv-radio
:customStyle="{margin: '8px'}" :customStyle="{margin: '8px'}"
v-for="(item, index) in sexList" v-for="(item, index) in sexList"
@ -46,25 +46,58 @@
size="40rpx" size="40rpx"
labelSize="26rpx" labelSize="26rpx"
:label="item.name" :label="item.name"
:name="item.id">
:name="item.name">
</uv-radio> </uv-radio>
</view> </view>
</uv-radio-group> </uv-radio-group>
</view> </view>
<view class="form-sheet-cell">
<view class="label">
您的民族
</view>
<input placeholder="请输入民族"
v-model="form.nation" />
</view>
<view class="form-sheet-cell">
<view class="label">
期望薪资
</view>
<view class="price">
<input placeholder="下限" v-model="form.salaryLow" />
~
<input placeholder="上限" v-model="form.salaryUp" />
</view>
</view>
<view class="form-sheet-cell"
@click="openPicker('qulification')">
<view class="label">
您的学历
</view>
<input placeholder="请选择学历"
disabled
v-model="form.qulification" />
</view>
<uv-textarea <uv-textarea
v-model="form.content"
v-model="form.brief"
count count
:maxlength="300" :maxlength="300"
autoHeight autoHeight
placeholder="请输入详细介绍"></uv-textarea>
placeholder="请输入个人介绍"></uv-textarea>
<view class="uni-color-btn">
<view class="uni-color-btn"
@click="submit">
发布 发布
</view> </view>
</view> </view>
<uv-picker ref="picker"
:columns="columns"
@confirm="pickerConfirm"></uv-picker>
</view> </view>
</template> </template>
@ -78,20 +111,25 @@
title: '您希望从事的工种', title: '您希望从事的工种',
tag: [], tag: [],
index: 0, index: 0,
type : 'typeId',
}, },
{ {
title: '您希望从事工作区',
title: '您希望从事工作的地区',
tag: [], tag: [],
index: 0, index: 0,
type : 'areaId',
}, },
{ {
title: '您希望从事工作性质',
title: '您希望从事工作性质',
tag: [], tag: [],
index: 0, index: 0,
type : 'natureId',
}, },
], ],
form : { form : {
sex : '男', sex : '男',
qulification : '',
}, },
sexList : [ sexList : [
{ {
@ -101,20 +139,103 @@
name : '女', name : '女',
}, },
], ],
picker : {
qulification : [
'初中',
'高中',
'专科',
'本科',
'研究生',
'博士',
],
},
pickerKey : 'workAge',
} }
}, },
computed : { computed : {
...mapState(['natureList', 'jobTypeList', 'addressList']), ...mapState(['natureList', 'jobTypeList', 'addressList']),
columns(){
return [this.picker[this.pickerKey]]
},
}, },
onLoad() { onLoad() {
this.list[0].tag = this.jobTypeList this.list[0].tag = this.jobTypeList
this.list[1].tag = this.addressList this.list[1].tag = this.addressList
this.list[2].tag = this.natureList this.list[2].tag = this.natureList
this.queryResumeByUserId()
}, },
methods: { methods: {
clickTag(item, index){ clickTag(item, index){
item.index = index item.index = index
}, },
openPicker(key, picker){
this.pickerKey = key
if(picker){
picker.open()
}else{
this.$refs.picker.open()
}
},
pickerConfirm(e){
console.log(e);
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(){
// if(this.fileList.length == 0){
// return uni.showToast({
// title: '',
// icon : 'none'
// })
// }
this.list.forEach(n => {
this.form[n.type] = n.tag[n.index].id
})
if (this.$utils.verificationAll(this.form, {
typeId : '请选择工种',
areaId : '请选择工作的地区',
natureId : '请选择工作的性质',
age : '请输入您的年龄',
nation : '请输入您的民族',
salaryLow : '请输入期望薪资下限',
salaryUp : '请输入期望薪资上限',
qulification : '请选择您的学历',
brief: '请输入个人介绍',
})) {
return
}
this.$api('addResume', this.form, res => {
if(res.code == 200){
uni.showToast({
title: '发布成功!',
icon: 'none'
})
setTimeout(uni.navigateBack, 1000, -1)
}
})
},
queryResumeByUserId(){
this.$api('queryResumeByUserId', res => {
if(res.code == 200){
this.form = res.result.records[0] || {
sex : '男',
qulification : '',
}
}
})
},
}, },
} }
</script> </script>
@ -162,6 +283,16 @@
align-items: center; align-items: center;
.label{ .label{
width: 160rpx; width: 160rpx;
font-weight: 900;
}
.price{
display: flex;
text-align: center;
input{
width: 150rpx;
border: 1px solid $uni-color;
margin: 0 10rpx;
}
} }
input{ input{
flex: 1; flex: 1;


+ 6
- 0
pages_order/work/jobPosting.vue View File

@ -373,6 +373,12 @@
margin: 0 10rpx; margin: 0 10rpx;
} }
} }
input{
flex: 1;
background-color: rgba($uni-color, 0.1);
padding: 10rpx 20rpx;
border-radius: 10rpx;
}
.right-icon{ .right-icon{
margin-left: auto; margin-left: auto;
} }


+ 19
- 14
store/store.js View File

@ -8,7 +8,7 @@ import api from '@/api/api.js'
//Vuex.Store 构造器选项 //Vuex.Store 构造器选项
const store = new Vuex.Store({ const store = new Vuex.Store({
state: { state: {
configList: [], //配置列表
configList: {}, //配置列表
// 角色 true为老板 false为工人 // 角色 true为老板 false为工人
role : false, role : false,
userInfo : {}, //用户信息 userInfo : {}, //用户信息
@ -22,20 +22,25 @@ const store = new Vuex.Store({
mutations: { mutations: {
// 初始化配置 // 初始化配置
initConfig(state){ initConfig(state){
// api('getConfig', res => {
// if(res.code == 200){
// state.configList = res.result
// }
// })
let config = ['getPrivacyPolicy', 'getUserAgreement']
config.forEach(k => {
api(k, res => {
if (res.code == 200) {
state.configList[k] = res.result
}
})
api('getConfig', res => {
if(res.code == 200){
res.result.forEach(n => {
state.configList[n.paramCode] = n.paramValueText ||
n.paramValue ||
n.paramValueImage
// state.configList[n.keyName + '_keyValue'] = n.keyValue
})
}
}) })
// let config = ['getPrivacyPolicy', 'getUserAgreement']
// config.forEach(k => {
// api(k, res => {
// if (res.code == 200) {
// state.configList[k] = res.result
// }
// })
// })
}, },
login(state){ login(state){
uni.showLoading({ uni.showLoading({


Loading…
Cancel
Save