diff --git a/App.vue b/App.vue index 7321de3..8bf4d65 100644 --- a/App.vue +++ b/App.vue @@ -3,7 +3,7 @@ onLaunch: function() { }, onShow: function() { - // this.$store.commit('initConfig') + this.$store.commit('initConfig') this.$store.commit('getJobTypeList') this.$store.commit('getAddressList') this.$store.commit('getNatureList') diff --git a/api/api.js b/api/api.js index 1d2782e..5a9c814 100644 --- a/api/api.js +++ b/api/api.js @@ -5,7 +5,10 @@ let limit = {} 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 = { // 示例 @@ -14,7 +17,7 @@ const config = { // limit : 1000 // }, - getConfig : {url : '/api/getConfig', method : 'GET', limit : 500}, + // getConfig : {url : '/api/getConfig', method : 'GET', limit : 500}, diff --git a/api/model/config.js b/api/model/config.js new file mode 100644 index 0000000..fac5102 --- /dev/null +++ b/api/model/config.js @@ -0,0 +1,12 @@ + +// 配置相关接口 + +const api = { + // 查看配置信息 + getConfig: { + url: '/employ/config/queryConfigList', + method: 'GET', + }, +} + +export default api \ No newline at end of file diff --git a/api/model/resume.js b/api/model/resume.js new file mode 100644 index 0000000..2d9bb01 --- /dev/null +++ b/api/model/resume.js @@ -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 \ No newline at end of file diff --git a/config.js b/config.js index 290aa53..195406f 100644 --- a/config.js +++ b/config.js @@ -7,7 +7,7 @@ import uvUI from '@/uni_modules/uv-ui-tools' Vue.use(uvUI); // 当前环境 -const type = 'lzx' +const type = 'dev' // 环境配置 diff --git a/pages_order/auth/wxLogin.vue b/pages_order/auth/wxLogin.vue index 76bd635..df48be2 100644 --- a/pages_order/auth/wxLogin.vue +++ b/pages_order/auth/wxLogin.vue @@ -35,10 +35,10 @@ activeColor="#3796F8" :name="1" > - 阅读并同意我们的“服务协议与隐私条款” + 阅读并同意我们的“隐私协议” - 以及个人信息保护指引 + 以及服务条款 @@ -70,11 +70,6 @@ this.$store.commit('login') }, - //打开应用配置 - openConfigDetail(key){ - this.$refs.popup.open(key) - } - } } diff --git a/pages_order/mine/redeemCode.vue b/pages_order/mine/redeemCode.vue index f53be9f..f8d4c41 100644 --- a/pages_order/mine/redeemCode.vue +++ b/pages_order/mine/redeemCode.vue @@ -6,6 +6,27 @@ @leftClick="$utils.navigateBack" /> + + + + 兑换 + + + + + + + 1.用户是否能通过兑换码 + + + 答:兑换码仅能够 + + + + @@ -13,15 +34,54 @@ export default { data() { return { - + form : { + code : '', + }, } }, methods: { - } + }, } diff --git a/pages_order/work/addResume.vue b/pages_order/work/addResume.vue index 3ce8e85..ca004ae 100644 --- a/pages_order/work/addResume.vue +++ b/pages_order/work/addResume.vue @@ -37,7 +37,7 @@ 您的性别 - + + :name="item.name"> + + + 您的民族 + + + + + + + 期望薪资 + + + + ~ + + + + + + + 您的学历 + + + + + placeholder="请输入个人介绍"> - + 发布 + @@ -78,20 +111,25 @@ title: '您希望从事的工种', tag: [], index: 0, + type : 'typeId', + }, { - title: '您希望从事的工作区域', + title: '您希望从事工作的地区', tag: [], index: 0, + type : 'areaId', }, { - title: '您希望从事的工作性质', + title: '您希望从事工作的性质', tag: [], index: 0, + type : 'natureId', }, ], form : { sex : '男', + qulification : '', }, sexList : [ { @@ -101,20 +139,103 @@ name : '女', }, ], + picker : { + qulification : [ + '初中', + '高中', + '专科', + '本科', + '研究生', + '博士', + ], + }, + pickerKey : 'workAge', } }, computed : { ...mapState(['natureList', 'jobTypeList', 'addressList']), + columns(){ + return [this.picker[this.pickerKey]] + }, }, onLoad() { this.list[0].tag = this.jobTypeList this.list[1].tag = this.addressList this.list[2].tag = this.natureList + + this.queryResumeByUserId() }, methods: { clickTag(item, 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 : '', + } + } + }) + }, }, } @@ -162,6 +283,16 @@ align-items: center; .label{ width: 160rpx; + font-weight: 900; + } + .price{ + display: flex; + text-align: center; + input{ + width: 150rpx; + border: 1px solid $uni-color; + margin: 0 10rpx; + } } input{ flex: 1; diff --git a/pages_order/work/jobPosting.vue b/pages_order/work/jobPosting.vue index ecfaf62..4692c83 100644 --- a/pages_order/work/jobPosting.vue +++ b/pages_order/work/jobPosting.vue @@ -373,6 +373,12 @@ margin: 0 10rpx; } } + input{ + flex: 1; + background-color: rgba($uni-color, 0.1); + padding: 10rpx 20rpx; + border-radius: 10rpx; + } .right-icon{ margin-left: auto; } diff --git a/store/store.js b/store/store.js index 5c93817..80eedec 100644 --- a/store/store.js +++ b/store/store.js @@ -8,7 +8,7 @@ import api from '@/api/api.js' //Vuex.Store 构造器选项 const store = new Vuex.Store({ state: { - configList: [], //配置列表 + configList: {}, //配置列表 // 角色 true为老板 false为工人 role : false, userInfo : {}, //用户信息 @@ -22,20 +22,25 @@ const store = new Vuex.Store({ mutations: { // 初始化配置 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){ uni.showLoading({