号源显示的bug,修改按钮路径

wenjuan
yanzai 1 year ago
parent 6a2db40e55
commit dcc66adb07

@ -124,15 +124,15 @@ class HomeController extends Controller
'logo' => '/assets/h5/zhuyishixiang.png' 'logo' => '/assets/h5/zhuyishixiang.png'
], ],
[ [
'message' => '暂未开放', 'message' => '',
'name' => '套餐预约', 'name' => '套餐预约',
'url' => '/pages/main/combo/combo', 'url' => '/pages/main/combo/combo',
'logo' => '/assets/h5/zhuyishixiang.png' 'logo' => '/assets/h5/zhuyishixiang.png'
], ],
[ [
'message' => '暂未开放', 'message' => '',
'name' => '项目自选', 'name' => '项目自选',
'url' => '/pages/main/optionalProject/optionalProject', 'url' => '/pages/main/tj/tjzx',
'logo' => '/assets/h5/zhuyishixiang.png' 'logo' => '/assets/h5/zhuyishixiang.png'
] ]
]; ];

@ -90,6 +90,7 @@ class PayController extends Controller
return \Yz::echoError1("支付失败" . $res['data']['trade_state']); return \Yz::echoError1("支付失败" . $res['data']['trade_state']);
} }
} }
//退款 //退款
public function Refund() public function Refund()
{ {
@ -108,7 +109,8 @@ class PayController extends Controller
'预约Id' => $orderInfo->appointment_number '预约Id' => $orderInfo->appointment_number
]); ]);
if ($cancel['code'] != 0) return \Yz::echoError1("取消预约失败," . $cancel['message']); if ($cancel['code'] != 0) return \Yz::echoError1("取消预约失败," . $cancel['message']);
//退款 //如果真实支付大于0 则调用小程序退款
if ($orderInfo->true_price > 0) {
$data = [ $data = [
'orderid' => $orderInfo->order_number, 'orderid' => $orderInfo->order_number,
'refund_order_id' => 'T' . $orderInfo->order_number, 'refund_order_id' => 'T' . $orderInfo->order_number,
@ -117,14 +119,14 @@ class PayController extends Controller
]; ];
$XCX = new XCXApiController(); $XCX = new XCXApiController();
$res = $XCX::Post('订单退款', $data); $res = $XCX::Post('订单退款', $data);
if($res['data']['refund_state']==='SUCCESS'){ if ($res['data']['refund_state'] != 'SUCCESS') {
return \Yz::echoError1("退款失败" . $res['data']['refund_state']);
}
}
DB::table('orders')->where(['id' => $id])->update([ DB::table('orders')->where(['id' => $id])->update([
'status' => 5 'status' => 5
]); ]);
return \Yz::Return(true, "退款成功", []); return \Yz::Return(true, "退款成功", []);
}else{
return \Yz::echoError1("退款失败".$res['data']['refund_state']);
}
} }

@ -29,11 +29,22 @@ class PlanController extends Controller
->whereRaw('JSON_CONTAINS(checkup_type_id, ?, "$")', [$checkup_type_id]) ->whereRaw('JSON_CONTAINS(checkup_type_id, ?, "$")', [$checkup_type_id])
->where(['hospital_id'=>$hospital_id,'type'=>1]) ->where(['hospital_id'=>$hospital_id,'type'=>1])
->whereIn('use_type',[0,$use_type]); ->whereIn('use_type',[0,$use_type]);
// if($use_type==1){
// $list=$list->where(['amount_limit1'=>0])->orWhere('amount_limit1','>=',$amount);
// }
// if($use_type==2){
// $list=$list->where(['amount_limit2'=>0])->orWhere('amount_limit2','>=',$amount);
// }
if ($use_type == 1) { if ($use_type == 1) {
$list=$list->where(['amount_limit1'=>0])->orWhere('amount_limit1','>=',$amount); $list = $list->where(function ($query) use ($amount) {
$query->where('amount_limit1', 0)->orWhere('amount_limit1', '>=', $amount);
});
} }
if ($use_type == 2) { if ($use_type == 2) {
$list=$list->where(['amount_limit2'=>0])->orWhere('amount_limit2','>=',$amount); $list = $list->where(function ($query) use ($amount) {
$query->where('amount_limit2', 0)->orWhere('amount_limit2', '>=', $amount);
});
} }
$list=$list->select('date', DB::raw('COUNT(*) as count')); $list=$list->select('date', DB::raw('COUNT(*) as count'));
$list=$list->groupBy('date')->get(); $list=$list->groupBy('date')->get();
@ -85,10 +96,15 @@ class PlanController extends Controller
->where(['hospital_id'=>$hospital_id,'type'=>1]) ->where(['hospital_id'=>$hospital_id,'type'=>1])
->whereIn('use_type',[0,$use_type]); ->whereIn('use_type',[0,$use_type]);
if ($use_type == 1) { if ($use_type == 1) {
$list=$list->where(['amount_limit1'=>0])->orWhere('amount_limit1','>=',$amount); $list = $list->where(function ($query) use ($amount) {
$query->where('amount_limit1', 0)->orWhere('amount_limit1', '>=', $amount);
});
} }
if ($use_type == 2) { if ($use_type == 2) {
$list=$list->where(['amount_limit2'=>0])->orWhere('amount_limit2','>=',$amount); $list = $list->where(function ($query) use ($amount) {
$query->where('amount_limit2', 0)->orWhere('amount_limit2', '>=', $amount);
});
} }
$list=$list->get(); $list=$list->get();
@ -107,11 +123,22 @@ class PlanController extends Controller
->whereRaw('JSON_CONTAINS(checkup_type_id, ?, "$")', [$checkup_type_id]) ->whereRaw('JSON_CONTAINS(checkup_type_id, ?, "$")', [$checkup_type_id])
->where(['hospital_id'=>$hospital_id,'type'=>1]) ->where(['hospital_id'=>$hospital_id,'type'=>1])
->whereIn('use_type',[0,$use_type]); ->whereIn('use_type',[0,$use_type]);
// if($use_type==1){
// $weeklist=$weeklist->where(['amount_limit1'=>0])->orWhere('amount_limit1','>=',$amount);
// }
// if($use_type==2){
// $weeklist=$weeklist->where(['amount_limit2'=>0])->orWhere('amount_limit2','>=',$amount);
// }
if ($use_type == 1) { if ($use_type == 1) {
$weeklist=$weeklist->where(['amount_limit1'=>0])->orWhere('amount_limit1','>=',$amount); $weeklist = $weeklist->where(function ($query) use ($amount) {
$query->where('amount_limit1', 0)->orWhere('amount_limit1', '>=', $amount);
});
} }
if ($use_type == 2) { if ($use_type == 2) {
$weeklist=$weeklist->where(['amount_limit2'=>0])->orWhere('amount_limit2','>=',$amount); $weeklist = $weeklist->where(function ($query) use ($amount) {
$query->where('amount_limit2', 0)->orWhere('amount_limit2', '>=', $amount);
});
} }
$weeklist=$weeklist->select('date', DB::raw('COUNT(*) as count')); $weeklist=$weeklist->select('date', DB::raw('COUNT(*) as count'));
$weeklist=$weeklist->groupBy('date')->get(); $weeklist=$weeklist->groupBy('date')->get();

Loading…
Cancel
Save