From a5fcf69e32f555ee4a16d49d7bc2758ef2bcb8f6 Mon Sep 17 00:00:00 2001 From: huliyong <2783385703@qq.com> Date: Mon, 4 Aug 2025 16:42:56 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=96=B0=E5=A2=9E=E8=AE=A2=E5=8D=95?= =?UTF-8?q?=E5=88=97=E8=A1=A8=E9=A1=B5=E9=9D=A2=E5=B9=B6=E4=BC=98=E5=8C=96?= =?UTF-8?q?=E6=B1=82=E8=81=8C=E6=8B=9B=E8=81=98=E6=B5=81=E7=A8=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit fix: 修复支付页面金额计算错误问题 refactor: 重构订单详情页面布局和交互逻辑 style: 统一日薪字段显示为"试工日薪" perf: 优化地址选择组件性能 docs: 更新页面注释和文案 --- App.vue | 2 +- common/config.js | 2 +- components/list/enterprise.vue | 12 +- config.js | 2 +- pages.json | 9 ++ pages_subpack/employ-progress/index.vue | 4 +- pages_subpack/enterprise/index.vue | 115 ++++++++++++---- pages_subpack/hire/index.vue | 27 ++-- pages_subpack/hire/order-list.vue | 176 +++++++++++++++++++++++++ pages_subpack/job-hunt/index.vue | 24 +++- pages_subpack/job-order-detail/index.vue | 12 +- pages_subpack/order-detail/boss.vue | 143 +++++++++++++++++--- pages_subpack/order-detail/index.vue | 6 - pages_subpack/pay/index.vue | 152 ++++++++++++++++----- pages_subpack/payment/index.vue | 6 +- pages_subpack/release/component/enterprise.vue | 6 +- pages_subpack/release/component/master.vue | 78 +++++++++-- pages_subpack/release/index.vue | 4 +- pages_subpack/work-detail/index.vue | 39 ++++-- store/modules/data.js | 31 +++++ 20 files changed, 708 insertions(+), 142 deletions(-) create mode 100644 pages_subpack/hire/order-list.vue diff --git a/App.vue b/App.vue index 8fc0564..4b0f72f 100644 --- a/App.vue +++ b/App.vue @@ -5,7 +5,7 @@ this.checkUpdate(); }, onShow: function() { - + this.$store.commit('initConfig') }, onHide: function() { diff --git a/common/config.js b/common/config.js index cefa564..441833e 100644 --- a/common/config.js +++ b/common/config.js @@ -3,7 +3,7 @@ module.exports = { // baseUrl:"https://employadmin.hhlm1688.com" // baseUrl:"http://h5.xzaiyp.top", //测试环境 // baseUrl:"http://youyi-test.natapp1.cc", - baseUrl:"http://127.0.0.1:8001", + baseUrl:"http://127.0.0.1:8002", // baseUrl:"https://admin.zhixuanlietou.com", // http://youyi-test.natapp1.cc diff --git a/components/list/enterprise.vue b/components/list/enterprise.vue index f7dcdba..a1c55ff 100644 --- a/components/list/enterprise.vue +++ b/components/list/enterprise.vue @@ -35,8 +35,11 @@ --> - - + + @@ -44,6 +47,7 @@ {{items.employResume.name?items.employResume.name:items.hanHaiMember.nickName}}日薪:{{items.dayMoney}} {{items.employResume.sex==1?"男":"女"}}-{{items.employResume.nation?items.employResume.nation:"未知"}}族-{{items.employResume.age}}岁 + {{items.categoryOne_dictText}} @@ -58,6 +62,8 @@ {{items.salaryMin}}-{{items.salaryMax}}元 + {{items.employResume.brief}} + 暂无个人介绍 {{items.createTime}} @@ -68,7 +74,7 @@ {{items.address}} - + 立即聘用 diff --git a/config.js b/config.js index 0fa37c4..0bad194 100644 --- a/config.js +++ b/config.js @@ -16,7 +16,7 @@ const config = { baseUrl : 'http://augcl.natapp1.cc/employ-api', }, prod : { - baseUrl : 'https://employadmin.augcl.com/employ-api', + baseUrl : 'https://admin.zhixuanlietou.com/employ-api', } } diff --git a/pages.json b/pages.json index e87b5b7..aea3fc8 100644 --- a/pages.json +++ b/pages.json @@ -77,6 +77,15 @@ "navigationBarTextStyle": "white" } }, + { + "path": "hire/order-list", + "style": { + "navigationBarTitleText": "订单列表", + "navigationStyle":"default", + "navigationBarBackgroundColor": "#FF7A31", + "navigationBarTextStyle": "white" + } + }, { "path": "job-hunt/index", "style": { diff --git a/pages_subpack/employ-progress/index.vue b/pages_subpack/employ-progress/index.vue index a731a49..4938732 100644 --- a/pages_subpack/employ-progress/index.vue +++ b/pages_subpack/employ-progress/index.vue @@ -40,8 +40,8 @@ methods:{ onOrderDetail(){ let that = this; - uni.navigateTo({ - url:"/pages_subpack/job-order-detail/index?orderId="+that.id + uni.redirectTo({ + url:`/pages_subpack/job-order-detail/index?orderId=${that.id}` }) }, onCancel(){ diff --git a/pages_subpack/enterprise/index.vue b/pages_subpack/enterprise/index.vue index d8e4499..47cad55 100644 --- a/pages_subpack/enterprise/index.vue +++ b/pages_subpack/enterprise/index.vue @@ -19,8 +19,8 @@ - - + + 地图 @@ -37,6 +37,20 @@ + + + + + + 企业logo上传 + + + + + + + @@ -92,6 +106,7 @@ industryId:'', industryName:'', status:'', + headImg:[], businessLicenseFile:[] }, rules: { @@ -140,6 +155,18 @@ message: '请选择行业', trigger: ['blur', 'change'] }], + headImg:[ + { + validator: (rule, value, callback) => { + if (value === null || value === undefined || value === '' || (Array.isArray(value) && value.length === 0)) { + callback(new Error('请上传企业logo')); + } else { + callback(); + } + }, + trigger: 'blur' + } + ], businessLicenseFile:[ { validator: (rule, value, callback) => { @@ -183,6 +210,7 @@ this.form.industryId = company.industry this.form.industryName = company.industryName this.form.status = company.status + this.form.headImg = this.stringToKeyValueArray(company.headImg) this.form.businessLicenseFile = this.stringToKeyValueArray(company.license) } }).catch(error=>{ @@ -235,6 +263,7 @@ address:that.form.address, industry:that.form.industryId, industryName:that.form.industryName, + headImg:that.form.headImg.map(item => item.url).join(','), license:that.form.businessLicenseFile.map(item => item.url).join(','), } // if(that.form.id){ @@ -272,6 +301,9 @@ deletePic(event) { this.form.businessLicenseFile.splice(event.index, 1) }, + deleteLogoImg(event) { + this.form.headImg.splice(event.index, 1) + }, async afterRead(e) { let self = this e.file.forEach(file => { @@ -283,38 +315,67 @@ }) }) }, - handleAreaChange(){ + async afterReadLogo(e) { + let self = this + self.$Oss.ossUpload(e.file.url).then(url => { + console.info(url) + self.form.headImg.push({ + url + }) + }) + }, + handleAreaChange(){ const that = this; wx.chooseLocation({ + type: 'gcj02', // type: 'wgs84', success: function (res) { - const qqmapsdk = new QQMapWX({ - key: 'BJKBZ-W46K3-6S43C-OFLJB-FW6FQ-RMBYP' // 必填 - }); - uni.showLoading({ - title:"获取中...." - }) - qqmapsdk.reverseGeocoder({ - location: { - latitude: res.latitude, - longitude: res.longitude - }, - success: function(response) { - console.log('逆地理编码结果:', response); - uni.hideLoading() - that.form.longitude = response.result.location.lng - that.form.latitude = response.result.location.lat - that.form.address = response.result.address - }, - fail: function(error) { - uni.hideLoading() - console.error('逆地理编码失败:', error); - } - }); + + that.form.latitude = res.latitude + that.form.longitude = res.longitude + + if (!res.address && res.name) { //用户直接选择城市的逻辑 + return that.form.address = res.name + } + if (res.address || res.name) { + return that.form.address = res.address + res.name + } + that.form.address = '' //用户啥都没选就点击勾选 } }) - // this.$refs.citySelectRef.open() }, + // handleAreaChange(){ + // const that = this; + // wx.chooseLocation({ + // // type: 'wgs84', + // success: function (res) { + // const qqmapsdk = new QQMapWX({ + // key: 'BJKBZ-W46K3-6S43C-OFLJB-FW6FQ-RMBYP' // 必填 + // }); + // uni.showLoading({ + // title:"获取中...." + // }) + // qqmapsdk.reverseGeocoder({ + // location: { + // latitude: res.latitude, + // longitude: res.longitude + // }, + // success: function(response) { + // console.log('逆地理编码结果:', response); + // uni.hideLoading() + // that.form.longitude = response.result.location.lng + // that.form.latitude = response.result.location.lat + // that.form.address = response.result.address + // }, + // fail: function(error) { + // uni.hideLoading() + // console.error('逆地理编码失败:', error); + // } + // }); + // } + // }) + // // this.$refs.citySelectRef.open() + // }, } } diff --git a/pages_subpack/hire/index.vue b/pages_subpack/hire/index.vue index 8792e05..bcc948c 100644 --- a/pages_subpack/hire/index.vue +++ b/pages_subpack/hire/index.vue @@ -31,17 +31,20 @@ {{items.createTime | formatTime}} - 修改 - 删除 - 已接单 + {{ items.employOrder.length }}人接单 @@ -54,9 +57,6 @@ queryJobListByUserId } from "@/common/api.js" - - - export default { data() { return { @@ -125,22 +125,23 @@ return (R * c).toFixed(2); // 返回保留两位小数的公里数 } }, - onLoad() { + onShow() { this.onQueryJobListByUserId(); }, methods: { onMasterDetail(event) { - - if(event.employOrder){ + // 如果有订单,跳转到订单列表页面 + if(event.employOrder && event.employOrder.length > 0){ + // 传递工作ID uni.navigateTo({ - url: "/pages_subpack/order-detail/boss?orderId=" + event.employOrder.id - }) + url: "/pages_subpack/hire/order-list?jobId=" + event.id + }); }else{ + // 没有订单,跳转到工作详情页面 uni.navigateTo({ url: "/pages_subpack/work-detail/index?id=" + event.id - }) + }); } - }, onQueryJobListByUserId() { console.log("进入了我发布的招聘页面") diff --git a/pages_subpack/hire/order-list.vue b/pages_subpack/hire/order-list.vue new file mode 100644 index 0000000..f5b946c --- /dev/null +++ b/pages_subpack/hire/order-list.vue @@ -0,0 +1,176 @@ + + + + + \ No newline at end of file diff --git a/pages_subpack/job-hunt/index.vue b/pages_subpack/job-hunt/index.vue index 79a6270..d6d2e0a 100644 --- a/pages_subpack/job-hunt/index.vue +++ b/pages_subpack/job-hunt/index.vue @@ -1,8 +1,9 @@ @@ -18,11 +18,13 @@ data() { return { status:0, + editId: null, } }, onLoad(options) { console.info(`options`,options) this.status = options.status + this.editId = options.editId || null }, watch: { diff --git a/pages_subpack/work-detail/index.vue b/pages_subpack/work-detail/index.vue index 42a724f..0fb0630 100644 --- a/pages_subpack/work-detail/index.vue +++ b/pages_subpack/work-detail/index.vue @@ -9,7 +9,7 @@ - 日薪: + 试工日薪: {{ items.salaryDay }}元 @@ -107,16 +107,7 @@ // 个人认证通过,继续检查简历状态 this.$store.dispatch('onResumeComplete', { success: (resume) => { - // 简历已完成,执行接单操作 - addOrderWork({id:this.id}).then(response=>{ - uni.hideLoading() - console.log("下单成功"); - uni.navigateTo({ - url:"/pages_subpack/payment/index?id="+response.result.id - }) - }).catch(error=>{ - uni.hideLoading() - }) + this.addOrderWork() }, fail: (resume) => { uni.hideLoading() @@ -156,6 +147,32 @@ } }) }, + addOrderWork(){ + // 简历已完成,执行接单操作 + addOrderWork({id:this.id}).then(response=>{ + uni.hideLoading() + console.log("下单成功"); + uni.navigateTo({ + url:"/pages_subpack/payment/index?id="+response.result.id + }) + }).catch(error=>{ + console.log(error); + setTimeout(()=>{ + if (error.result && error.result.id) { + if(error.result.orderStatusSeek == 'Y'){ + uni.navigateTo({ + url:"/pages_subpack/order-detail/index?orderId="+error.result.id + }) + }else{ + uni.navigateTo({ + url:"/pages_subpack/payment/index?id="+error.result.id + }) + } + } + }, 800); + uni.hideLoading() + }) + }, openAddress(){ let that = this console.info(that.items.latitude) diff --git a/store/modules/data.js b/store/modules/data.js index d32f521..0dc97a1 100644 --- a/store/modules/data.js +++ b/store/modules/data.js @@ -1,7 +1,10 @@ + + export default { state: { isTurntableShow:false, isShareShow:false, + configList : {}, }, mutations: { @@ -11,6 +14,34 @@ export default { mutationsShareShow(state,status) { state.isShareShow = status }, + initConfig(state){ + console.log('initConfig 开始执行') + + import('@/common/api.js').then(api=>{ + api.queryConfigList({}).then(res=>{ + console.log('getConfig 请求成功:', res) + uni.setStorageSync('configList', res.result) + + const configList = { + ...state.configList, + } + if (res.code == 200) { + res.result.forEach(n => { + configList[n.paramCode] = n.paramValueText || + n.paramValue || + n.paramValueImage + }); + } + state.configList = configList + uni.$emit('initConfig', state.configList) + console.log('配置初始化完成:', state.configList) + + }).catch(error=>{ + console.error('getConfig 请求失败:', error) + }) + }) + + }, }, actions: {}