diff --git a/components/order-status/index.vue b/components/order-status/index.vue index 1d8b135..b5a6885 100644 --- a/components/order-status/index.vue +++ b/components/order-status/index.vue @@ -53,7 +53,7 @@ const statusTextMap = { '0' : {//先付后用 'job-order': { - 0: '待待师傅确认',//师傅操作 + 0: '待师傅确认',//师傅操作 1: '企业待支付',//企业操作 2: '订单进行中',//师傅操作 3: '试工完成',//企业操作 @@ -73,7 +73,7 @@ }, '1' : {//试用以后支付 'job-order': { - 0: '待待师傅确认', + 0: '待师傅确认', 1: '订单进行中', 2: '试工完成', 3: '企业待支付', @@ -82,7 +82,7 @@ 6: '订单已取消' }, default: { - 0: '等待企业确认', + 0: '待企业确认', 1: '订单进行中', 2: '试工完成', 3: '企业待支付', diff --git a/pages_subpack/job-order-detail/index.vue b/pages_subpack/job-order-detail/index.vue index 7527680..9bd5256 100644 --- a/pages_subpack/job-order-detail/index.vue +++ b/pages_subpack/job-order-detail/index.vue @@ -133,7 +133,7 @@ - + @@ -290,12 +290,29 @@ methods: { checkStatus(){ let that = this - if (that.type && that.obj && !that.obj.orderStatusSeek && that.obj.status > 0 && that.obj.status < 4) { - uni.navigateTo({ - url: "/pages_subpack/payment/index?id=" + that.orderId - }) + // 根据订单类型和用户视角判断跳转逻辑 + // type == 1: 个人发布求职企业进行招聘,企业接受后师傅跳转保险页面 + // type != 1: 企业招聘师傅,师傅接受后企业跳转保险页面 + if (that.obj && !that.obj.orderStatusSeek && that.obj.status > 0 && that.obj.status < 4) { + // 如果是个人发布求职(type == 0),师傅视角(type存在)才跳转 + if (that.obj.type == 0 && that.type) { + uni.navigateTo({ + url: "/pages_subpack/payment/index?id=" + that.orderId + }) + } + // 如果是企业招聘师傅(type != 0),企业视角(!type)才跳转 + else if (that.obj.type != 0 && !that.type) { + uni.navigateTo({ + url: "/pages_subpack/payment/index?id=" + that.orderId + }) + } } - }, + }, + toPayment(){ + uni.navigateTo({ + url: "/pages_subpack/payment/index?id=" + this.orderId + }) + }, onOrderDetail() { let that = this let params = { @@ -341,12 +358,6 @@ }) this.onOrderDetail() - - if (that.type && that.obj && !that.obj.orderStatusSeek && that.obj.status > 0) { - uni.navigateTo({ - url: "/pages_subpack/payment/index?id=" + that.orderId - }) - } } }) }, diff --git a/pages_subpack/order-detail/boss.vue b/pages_subpack/order-detail/boss.vue index e414835..2b7acc8 100644 --- a/pages_subpack/order-detail/boss.vue +++ b/pages_subpack/order-detail/boss.vue @@ -354,6 +354,18 @@ this.onOrderDetail() }, methods: { + checkStatus(){ + let that = this + // 企业招聘师傅,师傅接受之后,企业进入订单详情会跳转到支付保险的页面 + // 判断条件:是企业视角(type存在)且orderStatusSeek没有值且订单状态在合适范围内 + if (that.type && that.obj && !that.obj.orderStatusSeek + && that.obj.type == 1 + && that.obj.status > 0 && that.obj.status < 4) { + uni.navigateTo({ + url: "/pages_subpack/payment/index?id=" + that.orderId + }) + } + }, onOrderDetail() { let that = this let params = { @@ -361,6 +373,7 @@ } orderDetail(params).then(response => { that.obj = response.result + this.checkStatus() }).catch(error => { }) diff --git a/pages_subpack/order-detail/index.vue b/pages_subpack/order-detail/index.vue index df6d116..d9edc8d 100644 --- a/pages_subpack/order-detail/index.vue +++ b/pages_subpack/order-detail/index.vue @@ -207,7 +207,9 @@ checkStatus(){ let that = this // 如果是求职者且orderStatusSeek没有值,跳转到保险页面 - if (that.obj && !that.obj.orderStatusSeek && that.obj.status > 0 && that.obj.status < 4) { + if (that.obj && !that.obj.orderStatusSeek && + that.obj.type == 0 && + that.obj.status > 0 && that.obj.status < 4) { uni.navigateTo({ url: "/pages_subpack/payment/index?id=" + that.orderId }) diff --git a/pages_subpack/pay/index.vue b/pages_subpack/pay/index.vue index 9cef422..4245580 100644 --- a/pages_subpack/pay/index.vue +++ b/pages_subpack/pay/index.vue @@ -163,7 +163,7 @@ if (this.detail.type == 1) { // 个人发布求职,企业承担保险费、交通费用 - return basePrice + premiumFee + return basePrice + trafficFee } else { // 企业发布招聘,企业不需要支付保险、交通费,由个人承担 return basePrice; diff --git a/pages_subpack/payment/index.vue b/pages_subpack/payment/index.vue index 7a7d3bd..3f9909c 100644 --- a/pages_subpack/payment/index.vue +++ b/pages_subpack/payment/index.vue @@ -126,7 +126,7 @@ computed: { // 计算总金额(只显示保险费用,因为这是保险支付页面) totalAmount() { - return this.insuranceChecked.includes('true') ? (this.items.premium || 0) : 0; + return this.items.premium; } }, onLoad(options) { @@ -168,7 +168,8 @@ }, onPay(){ // 根据用户的保险选择来决定是否购买保险 - const buyInsurance = this.insuranceChecked.includes('true'); + const buyInsurance = true + // const buyInsurance = this.insuranceChecked.includes('true'); this.payWithInsurance(buyInsurance); }, onReject(){