diff --git a/common/config.js b/common/config.js index 3dfc28a..e8f6127 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:8003", + // baseUrl:"http://127.0.0.1:8002", baseUrl:"https://admin.zhixuanlietou.com", // http://youyi-test.natapp1.cc diff --git a/pages_subpack/job-order-detail/index.vue b/pages_subpack/job-order-detail/index.vue index baabad6..e4a453e 100644 --- a/pages_subpack/job-order-detail/index.vue +++ b/pages_subpack/job-order-detail/index.vue @@ -285,9 +285,27 @@ this.type = options.type || '' }, onShow(){ - this.onOrderDetail() + this.checkOrderStatus() }, - methods: { + methods: { + // 检查订单状态并获取订单详情 + checkOrderStatus() { + let that = this + let params = { + orderId: that.orderId + } + orderDetail(params).then(response => { + that.obj = response.result + // 如果是求职者且orderStatusSeek没有值,跳转到保险页面 + if (that.type && that.obj && !that.obj.orderStatusSeek && that.obj.status > 0) { + uni.navigateTo({ + url: "/pages_subpack/payment/index?id=" + that.orderId + }) + } + }).catch(error => { + + }) + }, onOrderDetail() { let that = this let params = { @@ -330,7 +348,14 @@ title: '确认成功', icon: 'none' }) + 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/index.vue b/pages_subpack/order-detail/index.vue index 36b28b2..15708bc 100644 --- a/pages_subpack/order-detail/index.vue +++ b/pages_subpack/order-detail/index.vue @@ -30,7 +30,6 @@ - @@ -202,7 +201,25 @@ this.orderId = options.orderId }, onShow() { - this.onOrderDetail() + this.checkOrderStatus() + }, + // 检查订单状态并获取订单详情 + checkOrderStatus() { + let that = this + let params = { + orderId: that.orderId + } + orderDetail(params).then(response => { + that.obj = response.result + // 如果是求职者且orderStatusSeek没有值,跳转到保险页面 + if (that.obj && !that.obj.orderStatusSeek && that.obj.status > 0) { + uni.navigateTo({ + url: "/pages_subpack/payment/index?id=" + that.orderId + }) + } + }).catch(error => { + + }) }, methods: { onOrderDetail() { diff --git a/pages_subpack/pay/index.vue b/pages_subpack/pay/index.vue index 3f61e4f..692751b 100644 --- a/pages_subpack/pay/index.vue +++ b/pages_subpack/pay/index.vue @@ -31,7 +31,7 @@