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

main
yanzai 2 years ago
parent 2ac0754aea
commit 6a55798279

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

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

@ -16,6 +16,7 @@ use Yo;
use Login; use Login;
use Lu; use Lu;
use Illuminate\Support\Str; use Illuminate\Support\Str;
use Illuminate\Support\Facades\DB;
class UserOrderController extends Controller 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->appointment_info = json_encode($appointment_info['data'][0], JSON_UNESCAPED_UNICODE);
$order_info->save(); $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; return $order_info;
} }

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

Loading…
Cancel
Save