调整阅读显示,增加 团检思信预约时间调整接口

main
yanzai 2 years ago
parent 2ac0754aea
commit 6a55798279

@ -274,6 +274,7 @@ class AppointmentController extends Controller
->where('status', 1)
->where('del', 2)
->orderBy('date')
->orderBy('start_time')
->get();
$list = [];
foreach ($appointments as $appointment) {

@ -42,6 +42,7 @@ class PEISApiController extends Controller
$api['套餐查询'] = "{$url}/PEISCommon/QueryCombos/{$code}";
$api['个检预约锁定'] = "{$url}/PEISCommon/LockPersonAppointment/{$code}";
$api['个检预约解锁'] = "{$url}/PEISCommon/UnlockPersonAppointment/{$code}";
$api['预约时段修改'] = "{$url}/PEISCommon/ModifyAppointmentDTRange/{$code}";
return $api["{$url_code}"] ?? $url_code;
}

@ -16,6 +16,7 @@ use Yo;
use Login;
use Lu;
use Illuminate\Support\Str;
use Illuminate\Support\Facades\DB;
class UserOrderController extends Controller
{
@ -611,6 +612,17 @@ class UserOrderController extends Controller
]);
$order_info->appointment_info = json_encode($appointment_info['data'][0], JSON_UNESCAPED_UNICODE);
$order_info->save();
if($order_info->type == 2){
$appointment=DB::table('appointments')->where(['id'=>$order_info->appointment])->get();
$data=[
"预约Id"=> $order_info->appointment_number,
"预约开始时间"=>$appointment[0]->date . ' '.$appointment[0]->start_time,
"预约截止时间"=>$appointment[0]->date . ' '.$appointment[0]->end_time
];
$peis = new PEISApiController();
$url_code ='预约时段修改';
$info = $peis::Post($url_code, $order_info->hospital, $data);
}
return $order_info;
}

@ -88,6 +88,7 @@
buy_info.value.items.splice(key, 1)
BuyInfo()
}
let time_end=false
const next_text = ref('下一步')
const nextClick = (next = true, auto = false) => {
if (user_info.value.dev === 1) {
@ -97,19 +98,32 @@
if (tab_active.value !== 1 && next_text.value !== '下一步' && !auto) return
if (readme_config.value.time <= 0) {
next_text.value = '下一步'
if (next) toNext()
if (time_end==true) toNext()
return
}
tab_active.value=1
if (tab_active.value !== 1) {
uni.$lu.toast("请先阅读体检须知")
} else {
start_jishi()
next_text.value = `${readme_config.value.time}`
setTimeout(() => {
}
}
const start_jishi=()=>{
if(next_text.value.indexOf('秒') != -1) return
var tt1=setInterval(() => {
readme_config.value.time--
if (tab_active.value === 1) nextClick(next, true)
next_text.value = `${readme_config.value.time}`
console.log(readme_config.value.time)
}, 1000)
setTimeout(function() {
clearInterval(tt1);
console.log('setInterval 已清除');
next_text.value = '下一步'
time_end=true
}, 5000);
}
}
const toNext = () => {
uni.navigateTo({
url: '/pages/buy/check/check'

Loading…
Cancel
Save