main
yanzai 10 months ago
parent 479f848de6
commit d5c9ee5f79

@ -93,11 +93,16 @@ class PayController extends Controller
'status' => 2, 'status' => 2,
'pay_time' => date('Y-m-d H:i:s'), 'pay_time' => date('Y-m-d H:i:s'),
]); ]);
$Finish = new OrderController();//预约体检 $is_yuyue=false;//是否已经勾选号源
$Finish->Finish($order_number); if(!!$order->plan_id){
$is_yuyue=true;
$Finish = new OrderController();//预约体检
$Finish->Finish($order_number);
}
} }
return \Yz::Return(true, "支付成功", ['id' => $order->id]); return \Yz::Return(true, "支付成功", ['id' => $order->id,'is_yuyue'=>$is_yuyue]);
} else { } else {
return \Yz::echoError1("支付失败" . $res['data']['trade_state']); return \Yz::echoError1("支付失败" . $res['data']['trade_state']);
} }

@ -140,7 +140,7 @@
</view> </view>
</view> --> </view> -->
<view class="order_info_yuyue"> <view class="order_info_yuyue" @click="toOrderList()">
查看预约记录 查看预约记录
</view> </view>
</view> </view>

@ -30,9 +30,16 @@
uni.showToast({ uni.showToast({
title: '支付成功' title: '支付成功'
}); });
uni.redirectTo({ if(response.data.is_yuyue){
url: '/pages/buy/done/done?id='+response.data.id uni.redirectTo({
}); url: '/pages/buy/done/yuyue_done?id='+response.data.id
});
}else{
uni.redirectTo({
url: '/pages/buy/done/done?id='+response.data.id
});
}
} }
}) })
} }

@ -196,6 +196,7 @@ const getnmrList = async () => {
itemsInfo.value = response.data.items_info; itemsInfo.value = response.data.items_info;
truePrice.value = response.data.true_price; truePrice.value = response.data.true_price;
erxianInfo.value=response.data.nmr_list2; erxianInfo.value=response.data.nmr_list2;
yytjInfo.value.erxianInfo=erxianInfo.value;
netReceiptsPrice.value = response.data.true_price; netReceiptsPrice.value = response.data.true_price;
if(itemsInfo.value.items?.length){// if(itemsInfo.value.items?.length){//
let cailiao_price=0 let cailiao_price=0
@ -264,6 +265,7 @@ const getnmrList = async () => {
} }
uni.hideLoading(); uni.hideLoading();
}); });
$store.setYytjInfo(yytjInfo.value);
}; };
const toPlan=async ()=>{ const toPlan=async ()=>{
uni.navigateTo({ uni.navigateTo({

@ -358,13 +358,13 @@
let plan_nmr_id = ""; let plan_nmr_id = "";
uni.showLoading(); uni.showLoading();
console.log(yytjInfo.value?.nmr_list); console.log(yytjInfo.value?.nmr_list);
for (let i = 0; i < yytjInfo.value?.nmr_list?.length; i++) { // for (let i = 0; i < yytjInfo.value?.nmr_list?.length; i++) {
if (!yytjInfo.value?.nmr_list[i].id) { // if (!yytjInfo.value?.nmr_list[i].id) {
uni.$lu.toast("请完善预约时间"); // uni.$lu.toast("");
uni.hideLoading(); // uni.hideLoading();
return; // return;
} // }
} // }
if (yytjInfo.value?.nmr_list?.length > 1) { if (yytjInfo.value?.nmr_list?.length > 1) {
@ -383,7 +383,7 @@
group_id: buyInfo.value.group_id, group_id: buyInfo.value.group_id,
combo_id:buyInfo.value.group_id?"":buyInfo.value?.combo_id, combo_id:buyInfo.value.group_id?"":buyInfo.value?.combo_id,
item_ids: buyInfo.value.item_ids, item_ids: buyInfo.value.item_ids,
plan_id: plan_id, plan_id: tj_plan_id.value,
plan_nmr_info:yytjInfo.value?.nmr_list || null, plan_nmr_info:yytjInfo.value?.nmr_list || null,
doctor: yytjInfo.value?.doctor_name || "", doctor: yytjInfo.value?.doctor_name || "",
duo_xuan_yi: $store.getDuoXuanYi(), duo_xuan_yi: $store.getDuoXuanYi(),
@ -391,7 +391,7 @@
yucunkuan: yytjInfo.value.prepaidPrice?yytjInfo.value.prepaidPrice:0, yucunkuan: yytjInfo.value.prepaidPrice?yytjInfo.value.prepaidPrice:0,
coupon_id:yytjInfo.value?.couponId || null, coupon_id:yytjInfo.value?.couponId || null,
wj: buyInfo.value.wj, wj: buyInfo.value.wj,
erxian_info:erxianInfo.value, erxian_info:yytjInfo.value.erxianInfo,
peiou_info:$store.getPeiOuUser()// peiou_info:$store.getPeiOuUser()//
}; };
console.log(obj); console.log(obj);
@ -402,7 +402,7 @@
StartPay(response.data.orderid); StartPay(response.data.orderid);
} else { } else {
uni.navigateTo({ uni.navigateTo({
url: "/pages/buy/done/done?id=" + response.data.orderid, url: "/pages/buy/done/yuyue_done?id=" + response.data.orderid,
}); });
} }
} }
@ -440,6 +440,48 @@
} }
}); });
} }
//
const StartPay = async (id) => {
//
uni.showLoading();
const response = await $api("StartPay", {
openid: localStorage.getItem("OPENID"),
id: id,
});
uni.hideLoading();
$response(response, () => {
if (response.status) {
let info = response.data.info;
let p =
"&appid=" +
info.appid +
"&sub_org_code=" +
info.sub_org_code +
"&ghzid=" +
info.ghzid +
"&orderid=" +
info.orderid +
"&order_desc=" +
info.order_desc +
"&amount=" +
info.amount +
"&notify_url=" +
info.notify_url +
"&timestamp=" +
info.timestamp +
"&nonce=" +
info.nonce +
"&signature=" +
info.signature;
console.log(p);
wx.miniProgram.navigateTo({
url:
"/pages/other/entry/index?path=/pages/physical-examination/payment/index" +
p,
});
}
});
};
// //
const DateChange = (date) => { const DateChange = (date) => {
selectedDate.value = date selectedDate.value = date

Loading…
Cancel
Save