diff --git a/Laravel/app/Http/Controllers/API/H5/OrderController.php b/Laravel/app/Http/Controllers/API/H5/OrderController.php
index 507e8ab..c413b46 100644
--- a/Laravel/app/Http/Controllers/API/H5/OrderController.php
+++ b/Laravel/app/Http/Controllers/API/H5/OrderController.php
@@ -24,7 +24,7 @@ class OrderController extends Controller
$persons_sfz = DB::table('web_user_person')->where(['user_id' => $user->id, 'is_del' => 0])->pluck('id_number')->toArray();
$OrderList = DB::table('orders')
- ->select('id', 'title', 'status', 'name','appointment_date as date', 'appointment_time as time', 'order_number as order','appointment_number',
+ ->select('id', 'title','buy_info', 'checkup_type_id','hunjian_status','status', 'name','appointment_date as date', 'appointment_time as time', 'order_number as order','appointment_number',
DB::raw("CASE WHEN type = 1 THEN '个检' WHEN type = 2 THEN '团检' ELSE 'unknown' END as type"),
'price', 'true_price', 'pay_time', 'refund_time', 'created_at')
->where(['web_user_id' => $user->id])
@@ -42,6 +42,22 @@ class OrderController extends Controller
$list->status = 3;
}
}
+ if($list->checkup_type_id==4 and $list->status==2 and $list->hunjian_status==0 and !empty($list->appointment_number)){
+ //查询配偶是否预约
+ $buy_info=json_decode($list->buy_info,true);
+ if(isset($buy_info['peiou_info']['sfz'])){
+ $peiou_check= DB::select("select * from orders where id_number=?
+ and checkup_type_id = 4
+ and status in(2,4)
+ and appointment_number is not null
+ ", [$buy_info['peiou_info']['sfz']]);
+ if(count($peiou_check)==0){
+ $datetime = new DateTime($list->created_at);
+ $timestamp = $datetime->getTimestamp();
+ $list->end_time = $timestamp + (60 * config('app.globals.WaitingHunJianPeiOuTime'));
+ }
+ }
+ }
}
return \Yz::Return(true, '获取成功', [
diff --git a/Laravel/config/app.php b/Laravel/config/app.php
index 093a7d2..ac6cdf6 100644
--- a/Laravel/config/app.php
+++ b/Laravel/config/app.php
@@ -5,6 +5,7 @@ return [
'WxAppid' => 'wx526430047d34c85c', //岚科公众号
'WxAppSecret' => '975b8a8b627b1bde71bbe49149134549', //岚科公众号
'WaitingPaymentTime'=>20, //等待支付时间,单位分钟
+ 'WaitingHunJianPeiOuTime'=>15, //等待婚检配偶下单时间,单位分钟
'PayNotifyUrl' =>"http://124.225.137.54:39080/h5/#/pages/main/order/CheckPay",//支付完成后小程序跳转H5路径
// 'Env'=>'pro',
'Env'=>'dev',
diff --git a/h5/pages/main/order/src/order.vue b/h5/pages/main/order/src/order.vue
index cf7b772..be6ba70 100644
--- a/h5/pages/main/order/src/order.vue
+++ b/h5/pages/main/order/src/order.vue
@@ -37,7 +37,7 @@
const countdown = ref(null);
const checkStatus = () => {
- if (order_info.value.status === 1) {
+ if (order_info.value.status === 1 || (order_info.value.status===2 && order_info.value.checkup_type_id==4 && order_info.value.end_time)) {
countdown.value = setInterval(() => {
countdownRun();
}, 500);
@@ -51,8 +51,8 @@
let minutes = Math.floor(
(order_info.value.end_time - new Date() / 1000) / 60
);
- count_down_text.value = `${minutes}分${seconds}秒`;
- if (order_info.value.end_time <= new Date() / 1000) {
+ count_down_text.value =minutes>=0? `${minutes}分${seconds}秒`:"限制时间";
+ if (order_info.value.end_time <= new Date() / 1000 && order_info.value.status === 1) {
clearInterval(countdown.value);
order_info.value.status = 3;
}
@@ -284,6 +284,11 @@
{{ count_down_text }}
内完成支付
+
+ 请让您的配偶在
+ {{ count_down_text }}
+ 内完成婚检预约
+
支付时间
{{ order_info.pay_time }}
diff --git a/h5/pages/premarital/form/form.vue b/h5/pages/premarital/form/form.vue
index 529b2c8..9f67fd0 100644
--- a/h5/pages/premarital/form/form.vue
+++ b/h5/pages/premarital/form/form.vue
@@ -310,8 +310,8 @@
})
$response(response, () => {
uni.navigateTo({
- // url: '/pages/main/combo/combo',
- url: '/pages/main/selectDoctor/selectDoctor?month=all'
+ url: '/pages/main/combo/combo',
+ // url: '/pages/main/selectDoctor/selectDoctor?month=all'
})
})
}