diff --git a/common/config.js b/common/config.js
index 25503b0..cefa564 100644
--- a/common/config.js
+++ b/common/config.js
@@ -3,7 +3,8 @@ module.exports = {
// baseUrl:"https://employadmin.hhlm1688.com"
// baseUrl:"http://h5.xzaiyp.top", //测试环境
// baseUrl:"http://youyi-test.natapp1.cc",
- baseUrl:"https://admin.zhixuanlietou.com",
+ baseUrl:"http://127.0.0.1:8001",
+ // baseUrl:"https://admin.zhixuanlietou.com",
// http://youyi-test.natapp1.cc
diff --git a/pages/home/component/enterprise.vue b/components/list/enterprise.vue
similarity index 99%
rename from pages/home/component/enterprise.vue
rename to components/list/enterprise.vue
index 8bacb39..f7dcdba 100644
--- a/pages/home/component/enterprise.vue
+++ b/components/list/enterprise.vue
@@ -70,7 +70,7 @@
- 联系他
+ 立即聘用
diff --git a/pages/home/component/master.vue b/components/list/master.vue
similarity index 98%
rename from pages/home/component/master.vue
rename to components/list/master.vue
index a323ec5..2359097 100644
--- a/pages/home/component/master.vue
+++ b/components/list/master.vue
@@ -27,7 +27,7 @@
{{items.createTime | formatTime}}
- 立即接单
+ 立即应聘
diff --git a/config.js b/config.js
index 60c2eab..0fa37c4 100644
--- a/config.js
+++ b/config.js
@@ -9,6 +9,9 @@ const type = 'prod'
// 环境配置
const config = {
+ local : {
+ baseUrl : 'http://127.0.0.1:8001/employ-api',
+ },
dev : {
baseUrl : 'http://augcl.natapp1.cc/employ-api',
},
diff --git a/pages/auth/index.vue b/pages/auth/index.vue
index 41ebc37..0cb39d5 100644
--- a/pages/auth/index.vue
+++ b/pages/auth/index.vue
@@ -151,12 +151,16 @@
url:"/pages/login/index"
})
}else{
- uni.navigateTo({
- url:"/pages/identity/index"
- })
+ // 检查个人和企业认证状态
+ that.checkAuthStatus()
}
}).catch((error) =>{
-
+ uni.hideLoading()
+ uni.showToast({
+ title: '登录失败,请重试',
+ icon: 'none',
+ duration: 2000
+ })
})
}
})
@@ -166,6 +170,44 @@
url:"/pages/home/index"
})
},
+ checkAuthStatus() {
+ let that = this
+ // 显示认证状态检查加载提示
+ uni.showLoading({
+ title: '检查认证状态...',
+ mask: true
+ })
+
+ // 检查个人认证状态
+ this.$store.dispatch('onPersonalAuth', {
+ success: (person) => {
+ // 个人认证通过,直接跳转到首页
+ uni.hideLoading()
+ uni.switchTab({
+ url: "/pages/home/index"
+ })
+ },
+ fail: (person) => {
+ // 个人认证未通过,检查企业认证
+ that.$store.dispatch('onEnterpriseAuth', {
+ success: (company) => {
+ // 企业认证通过,直接跳转到首页
+ uni.hideLoading()
+ uni.switchTab({
+ url: "/pages/home/index"
+ })
+ },
+ fail: (company) => {
+ // 个人和企业都未认证,跳转到身份选择页面
+ uni.hideLoading()
+ uni.navigateTo({
+ url: "/pages/identity/index"
+ })
+ }
+ })
+ }
+ })
+ },
handleOpenPrivacyContract() {
// 打开隐私协议页面
wx.openPrivacyContract({
diff --git a/pages/home/index.vue b/pages/home/index.vue
index 9e5981d..d91702f 100644
--- a/pages/home/index.vue
+++ b/pages/home/index.vue
@@ -80,8 +80,8 @@
noticeList,
queryConfigList
} from "@/common/api.js"
- import enterpriseBox from "./component/enterprise.vue"
- import masterBox from "./component/master.vue"
+ import enterpriseBox from "@/components/list/enterprise.vue"
+ import masterBox from "@/components/list/master.vue"
import QQMapWX from "@/util/qqmap-wx-jssdk.min.js"
export default{
components:{
diff --git a/pages/order/component/enterprise.vue b/pages/order/component/enterprise.vue
index 76ba9f7..535c0c4 100644
--- a/pages/order/component/enterprise.vue
+++ b/pages/order/component/enterprise.vue
@@ -34,15 +34,18 @@
- 总价格:
+ 试工日薪:
¥{{items.payMoney}}
+ class="se-fs-24">¥
+ {{items.employJob && items.employJob.salaryDay || 0}}
+
-
+ style="background: transparent; border: none; padding: 0; margin: 0; line-height: 50rpx;">
联系客服
-
+
@@ -144,17 +147,7 @@
url: "/pages_subpack/order-detail/index?orderId=" + event.id
})
},
- callPhone(event) {
- uni.makePhoneCall({
- phoneNumber: event.phone,
- success: () => {
- console.log("拨打成功");
- },
- fail: (err) => {
- console.error("拨打失败", err);
- },
- })
- }
+
}
}
diff --git a/pages/order/component/master.vue b/pages/order/component/master.vue
index 8579859..9cfa7bd 100644
--- a/pages/order/component/master.vue
+++ b/pages/order/component/master.vue
@@ -37,13 +37,17 @@
- 总价格:
- ¥{{ item.jobMoney }}
+ 试工日薪:
+ ¥
+ {{ item.employSeek && item.employSeek.dayMoney || 0 }}
+
-
+
+
@@ -145,17 +149,7 @@
url: "/pages_subpack/job-order-detail/index?orderId=" + event.id
})
},
- callPhone(event) {
- uni.makePhoneCall({
- phoneNumber: event.phone,
- success: () => {
- console.log("拨打成功");
- },
- fail: (err) => {
- console.error("拨打失败", err);
- },
- })
- }
+
}
}
diff --git a/pages/order/index.vue b/pages/order/index.vue
index 8fad492..cd9fe26 100644
--- a/pages/order/index.vue
+++ b/pages/order/index.vue
@@ -41,6 +41,11 @@
},
onShow() {
this.isLogin = !!uni.getStorageSync('token')
+ if(this.current==0){
+ this.$refs.enterpriseBoxRef.onRefresh();
+ }else if(this.current==1){
+ this.$refs.masterBoxRef.onRefresh();
+ }
},
onReachBottom() {
if(this.current==0){
diff --git a/pages_subpack/category/index.vue b/pages_subpack/category/index.vue
index 0b1f673..71dccfc 100644
--- a/pages_subpack/category/index.vue
+++ b/pages_subpack/category/index.vue
@@ -17,97 +17,13 @@
}" itemStyle="padding-left: 15px; padding-right: 15px; height: 34px;" :list="navList" @click="navClick($event)">
-
-
-
-
- {{items.title}}
-
- 日薪:{{items.salaryDay}}
-
-
- {{items.salaryMin}}-{{items.salaryMax}}k
-
-
-
- {{items.categoryOne_dictText}}
- {{items.categoryTwo_dictText}}
- {{items.payType_dictText}}
-
-
-
-
- {{items.latitude,items.longitude | getDistance}}km
- {{items.address}}
-
-
- {{items.createTime | formatTime}}
-
-
- 立即接单
-
-
-
-
-
+
+
-
-
-
-
-
-
-
-
- {{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}}
-
-
-
-
-
- {{items.salaryMin}}-{{items.salaryMax}}元
-
-
-
- {{items.createTime}}
-
-
-
- {{items.categoryTwo_dictText}}
-
-
-
- {{items.address}}
-
-
-
-
- 联系他
-
-
-
-
+
+
+
+
@@ -122,7 +38,14 @@
querySeekList,
getSysText
} from "@/common/api.js"
+ import master from "@/components/list/master.vue"
+ import enterprise from "@/components/list/enterprise.vue"
+
export default {
+ components: {
+ master,
+ enterprise
+ },
data() {
return {
tpageNo: 1,
diff --git a/pages_subpack/employ-progress/index.vue b/pages_subpack/employ-progress/index.vue
index f23a0ba..a731a49 100644
--- a/pages_subpack/employ-progress/index.vue
+++ b/pages_subpack/employ-progress/index.vue
@@ -25,6 +25,8 @@
diff --git a/pages_subpack/release/component/enterprise.vue b/pages_subpack/release/component/enterprise.vue
index cd27fcf..5deb911 100644
--- a/pages_subpack/release/component/enterprise.vue
+++ b/pages_subpack/release/component/enterprise.vue
@@ -342,31 +342,44 @@
handleAreaChange(){
const that = this;
wx.chooseLocation({
+ type: 'gcj02',
// type: 'wgs84',
success: function (res) {
- const qqmapsdk = new QQMapWX({
- key: 'TT7BZ-Z3LW4-KOAUB-KWHOA-SBJJ6-Y5B6R' // 必填
- });
- 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.area = 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.area = res.name
+ }
+ if (res.address || res.name) {
+ return that.form.area = res.address + res.name
+ }
+ that.form.area = '' //用户啥都没选就点击勾选
+
+ // const qqmapsdk = new QQMapWX({
+ // key: 'TT7BZ-Z3LW4-KOAUB-KWHOA-SBJJ6-Y5B6R' // 必填
+ // });
+ // 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.area = response.result.address
+ // },
+ // fail: function(error) {
+ // uni.hideLoading()
+ // console.error('逆地理编码失败:', error);
+ // }
+ // });
}
})
// this.showPicker = true
diff --git a/pages_subpack/release/component/master.vue b/pages_subpack/release/component/master.vue
index 99b63f3..11304c6 100644
--- a/pages_subpack/release/component/master.vue
+++ b/pages_subpack/release/component/master.vue
@@ -295,31 +295,20 @@
handleAreaChange(){
const that = this;
wx.chooseLocation({
+ type: 'gcj02',
// type: 'wgs84',
success: function (res) {
- const qqmapsdk = new QQMapWX({
- key: 'TT7BZ-Z3LW4-KOAUB-KWHOA-SBJJ6-Y5B6R' // 必填
- });
- 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.area = 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.area = res.name
+ }
+ if (res.address || res.name) {
+ return that.form.area = res.address + res.name
+ }
+ that.form.area = '' //用户啥都没选就点击勾选
}
})
},
diff --git a/pages_subpack/work-detail/index.vue b/pages_subpack/work-detail/index.vue
index 803a51e..42a724f 100644
--- a/pages_subpack/work-detail/index.vue
+++ b/pages_subpack/work-detail/index.vue
@@ -3,8 +3,19 @@
{{items.title}}
-
- {{items.salaryMin}} - {{items.salaryMax}}
+
+
+
+
+ 日薪:
+ {{ items.salaryDay }}元
+
+
+ 月薪:
+ {{items.salaryMin}} - {{items.salaryMax}}元
+
@@ -54,7 +65,7 @@
- 立即接单
+ 立即应聘
@@ -87,14 +98,62 @@
})
},
onPayment(){
- addOrderWork({id:this.id}).then(response=>{
-
- console.log("下单成功");
- uni.navigateTo({
- url:"/pages_subpack/payment/index?id="+response.result.id
- })
- }).catch(error=>{
-
+ uni.showLoading({
+ title: '加载中'
+ })
+ // 检查个人认证状态
+ this.$store.dispatch('onPersonalAuth', {
+ success: (person) => {
+ // 个人认证通过,继续检查简历状态
+ 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()
+ })
+ },
+ fail: (resume) => {
+ uni.hideLoading()
+ // 简历未完成
+ uni.showModal({
+ title: '提示',
+ content: '请先完成简历信息,才能接单',
+ showCancel: false,
+ confirmText: '去完善',
+ success: (res) => {
+ if (res.confirm) {
+ uni.navigateTo({
+ url: '/pages_subpack/resume/index'
+ })
+ }
+ }
+ })
+ }
+ })
+ },
+ fail: (person) => {
+ uni.hideLoading()
+ // 个人认证未通过
+ uni.showModal({
+ title: '提示',
+ content: '请先完成个人认证,审核通过后才能接单',
+ showCancel: false,
+ confirmText: '去认证',
+ success: (res) => {
+ if (res.confirm) {
+ uni.navigateTo({
+ url: '/pages_subpack/person/index'
+ })
+ }
+ }
+ })
+ }
})
},
openAddress(){
diff --git a/store/modules/user.js b/store/modules/user.js
index 35bce30..e90679f 100644
--- a/store/modules/user.js
+++ b/store/modules/user.js
@@ -7,9 +7,8 @@ export default {
mutations: {
onAuth(state){
-
},
-
+
setUserInfo(state,obj){
state.userInfo = obj.userInfo
state.token = obj.token
@@ -31,5 +30,74 @@ export default {
},
},
- actions: {}
+ actions: {
+ // 企业身份认证检查
+ async onEnterpriseAuth({ commit }, config = {
+ success: () => {},
+ fail: () => {},
+ }) {
+ try {
+ const { getAuthenticationCompany } = await import('@/common/api.js')
+ const response = await getAuthenticationCompany({})
+ const company = response.result
+
+ if (company && company.status == 1) {
+ // 认证审核通过
+ config.success(company)
+ } else {
+ // 认证未通过或未认证
+ config.fail(company)
+ }
+ } catch (error) {
+ console.error('企业认证检查失败:', error)
+ config.fail(null)
+ }
+ },
+
+ // 个人身份认证检查
+ async onPersonalAuth({ commit }, config = {
+ success: () => {},
+ fail: () => {},
+ }) {
+ try {
+ const { getAuthenticationPerson } = await import('@/common/api.js')
+ const response = await getAuthenticationPerson({})
+ const person = response.result
+
+ if (person && person.status == 1) {
+ // 认证审核通过
+ config.success(person)
+ } else {
+ // 认证未通过或未认证
+ config.fail(person)
+ }
+ } catch (error) {
+ console.error('个人认证检查失败:', error)
+ config.fail(null)
+ }
+ },
+
+ // 简历完成状态检查
+ async onResumeComplete({ commit }, config = {
+ success: () => {},
+ fail: () => {},
+ }) {
+ try {
+ const { queryResumeById } = await import('@/common/api.js')
+ const response = await queryResumeById({})
+ const resume = response.result
+
+ if (resume && resume.id) {
+ // 简历已完成
+ config.success(resume)
+ } else {
+ // 简历未完成
+ config.fail(resume)
+ }
+ } catch (error) {
+ console.error('简历状态检查失败:', error)
+ config.fail(null)
+ }
+ }
+ }
}
\ No newline at end of file