...
|
...
|
@@ -959,6 +959,9 @@ class Car extends Base |
|
|
public function createintercityorder(){
|
|
|
$is_qrcode = $this->request->param("is_qrcode");//二维码下单:0=不是,1=是
|
|
|
$route_id = $this->request->param("route_id");//线路
|
|
|
$position = $this->request->param("position");//上车地址
|
|
|
$lat = $this->request->param("lat");//经度
|
|
|
$lng = $this->request->param("lng");//维度
|
|
|
$number = $this->request->param("number");//乘车人数
|
|
|
$carmodel_id = $this->request->param("carmodel_id");//乘车人数
|
|
|
$reservation_time = $this->request->param("reservation_time");//预约时间
|
...
|
...
|
@@ -1016,6 +1019,9 @@ class Car extends Base |
|
|
$is_qrcode = $this->request->param("is_qrcode");//二维码下单:0=不是,1=是
|
|
|
$route_id = $this->request->param("route_id");//线路
|
|
|
$number = $this->request->param("number");//乘车人数
|
|
|
$position = $this->request->param("position");//上车地址
|
|
|
$lat = $this->request->param("lat");//经度
|
|
|
$lng = $this->request->param("lng");//维度
|
|
|
$carmodel_id = $this->request->param("carmodel_id");//乘车人数
|
|
|
$reservation_time = $this->request->param("reservation_time");//预约时间
|
|
|
$phone = $this->request->param("phone");//联系电话
|
...
|
...
|
@@ -1110,7 +1116,7 @@ class Car extends Base |
|
|
* @return void
|
|
|
*/
|
|
|
public function set_out(){
|
|
|
$where = ["start_address"=>"蒙自"];
|
|
|
$where = ["type"=>1];
|
|
|
$indexList = [];
|
|
|
$itemArr = [];
|
|
|
$list = Db::name("route")->where($where)
|
...
|
...
|
@@ -1150,7 +1156,7 @@ class Car extends Base |
|
|
* @return void
|
|
|
*/
|
|
|
public function reach(){
|
|
|
$where = ["end_address"=>"蒙自"];
|
|
|
$where = ["type"=>2];
|
|
|
$indexList = [];
|
|
|
$itemArr = [];
|
|
|
$list = Db::name("route")->where($where)
|
...
|
...
|
@@ -1176,9 +1182,46 @@ class Car extends Base |
|
|
$indexList = array_keys($charArray);
|
|
|
$itemArr = array_values($charArray);
|
|
|
}
|
|
|
|
|
|
array_unshift($indexList, "*");
|
|
|
$this->success("数据获取成功", ["indexList" => $indexList, "itemArr" => $itemArr]);
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 订单再次支付
|
|
|
* @return void
|
|
|
* @throws \think\Exception
|
|
|
* @throws \think\db\exception\DataNotFoundException
|
|
|
* @throws \think\db\exception\ModelNotFoundException
|
|
|
* @throws \think\exception\DbException
|
|
|
* @throws \think\exception\PDOException
|
|
|
*/
|
|
|
public function orderpayagain(){
|
|
|
$order_no=$this->request->param("order_no");
|
|
|
$order=Db::name("order")->where("order_no",$order_no)->find();
|
|
|
if(!$order){
|
|
|
$this->error("无此订单");
|
|
|
}
|
|
|
if($order['is_pay']!=2){
|
|
|
$this->error("无法支付该订单");
|
|
|
}
|
|
|
$data=[
|
|
|
"order_no"=>getOrderSn(),
|
|
|
];
|
|
|
$res=Db::name("order")->where("id",$order['id'])->update($data);
|
|
|
$userinfo = Db::name('user')
|
|
|
->where(['id' => $this->auth->id])
|
|
|
->field('id,wx_xcx_openid')
|
|
|
->find();
|
|
|
$notifyURI = $this->doman . '/addons/epay/api/OrderPayNtf';
|
|
|
$params = [
|
|
|
'amount' => $data['price'],
|
|
|
'orderid' => $data['order_no'],
|
|
|
'type' => 'wechat',
|
|
|
'notifyurl' => $notifyURI,
|
|
|
'method' => 'miniapp',
|
|
|
'openid' => $userinfo['wx_xcx_openid'],
|
|
|
];
|
|
|
$f = \addons\epay\library\Service::submitOrder($params);
|
|
|
$this->success("请求成功",$f);
|
|
|
}
|
|
|
} |
|
|
\ No newline at end of file |
...
|
...
|
|