|
@@ -959,6 +959,9 @@ class Car extends Base |
|
@@ -959,6 +959,9 @@ class Car extends Base |
959
|
public function createintercityorder(){
|
959
|
public function createintercityorder(){
|
960
|
$is_qrcode = $this->request->param("is_qrcode");//二维码下单:0=不是,1=是
|
960
|
$is_qrcode = $this->request->param("is_qrcode");//二维码下单:0=不是,1=是
|
961
|
$route_id = $this->request->param("route_id");//线路
|
961
|
$route_id = $this->request->param("route_id");//线路
|
|
|
962
|
+ $position = $this->request->param("position");//上车地址
|
|
|
963
|
+ $lat = $this->request->param("lat");//经度
|
|
|
964
|
+ $lng = $this->request->param("lng");//维度
|
962
|
$number = $this->request->param("number");//乘车人数
|
965
|
$number = $this->request->param("number");//乘车人数
|
963
|
$carmodel_id = $this->request->param("carmodel_id");//乘车人数
|
966
|
$carmodel_id = $this->request->param("carmodel_id");//乘车人数
|
964
|
$reservation_time = $this->request->param("reservation_time");//预约时间
|
967
|
$reservation_time = $this->request->param("reservation_time");//预约时间
|
|
@@ -1016,6 +1019,9 @@ class Car extends Base |
|
@@ -1016,6 +1019,9 @@ class Car extends Base |
1016
|
$is_qrcode = $this->request->param("is_qrcode");//二维码下单:0=不是,1=是
|
1019
|
$is_qrcode = $this->request->param("is_qrcode");//二维码下单:0=不是,1=是
|
1017
|
$route_id = $this->request->param("route_id");//线路
|
1020
|
$route_id = $this->request->param("route_id");//线路
|
1018
|
$number = $this->request->param("number");//乘车人数
|
1021
|
$number = $this->request->param("number");//乘车人数
|
|
|
1022
|
+ $position = $this->request->param("position");//上车地址
|
|
|
1023
|
+ $lat = $this->request->param("lat");//经度
|
|
|
1024
|
+ $lng = $this->request->param("lng");//维度
|
1019
|
$carmodel_id = $this->request->param("carmodel_id");//乘车人数
|
1025
|
$carmodel_id = $this->request->param("carmodel_id");//乘车人数
|
1020
|
$reservation_time = $this->request->param("reservation_time");//预约时间
|
1026
|
$reservation_time = $this->request->param("reservation_time");//预约时间
|
1021
|
$phone = $this->request->param("phone");//联系电话
|
1027
|
$phone = $this->request->param("phone");//联系电话
|
|
@@ -1110,7 +1116,7 @@ class Car extends Base |
|
@@ -1110,7 +1116,7 @@ class Car extends Base |
1110
|
* @return void
|
1116
|
* @return void
|
1111
|
*/
|
1117
|
*/
|
1112
|
public function set_out(){
|
1118
|
public function set_out(){
|
1113
|
- $where = ["start_address"=>"蒙自"];
|
1119
|
+ $where = ["type"=>1];
|
1114
|
$indexList = [];
|
1120
|
$indexList = [];
|
1115
|
$itemArr = [];
|
1121
|
$itemArr = [];
|
1116
|
$list = Db::name("route")->where($where)
|
1122
|
$list = Db::name("route")->where($where)
|
|
@@ -1150,7 +1156,7 @@ class Car extends Base |
|
@@ -1150,7 +1156,7 @@ class Car extends Base |
1150
|
* @return void
|
1156
|
* @return void
|
1151
|
*/
|
1157
|
*/
|
1152
|
public function reach(){
|
1158
|
public function reach(){
|
1153
|
- $where = ["end_address"=>"蒙自"];
|
1159
|
+ $where = ["type"=>2];
|
1154
|
$indexList = [];
|
1160
|
$indexList = [];
|
1155
|
$itemArr = [];
|
1161
|
$itemArr = [];
|
1156
|
$list = Db::name("route")->where($where)
|
1162
|
$list = Db::name("route")->where($where)
|
|
@@ -1176,9 +1182,46 @@ class Car extends Base |
|
@@ -1176,9 +1182,46 @@ class Car extends Base |
1176
|
$indexList = array_keys($charArray);
|
1182
|
$indexList = array_keys($charArray);
|
1177
|
$itemArr = array_values($charArray);
|
1183
|
$itemArr = array_values($charArray);
|
1178
|
}
|
1184
|
}
|
1179
|
-
|
|
|
1180
|
array_unshift($indexList, "*");
|
1185
|
array_unshift($indexList, "*");
|
1181
|
$this->success("数据获取成功", ["indexList" => $indexList, "itemArr" => $itemArr]);
|
1186
|
$this->success("数据获取成功", ["indexList" => $indexList, "itemArr" => $itemArr]);
|
|
|
1187
|
+ }
|
1182
|
|
1188
|
|
|
|
1189
|
+ /**
|
|
|
1190
|
+ * 订单再次支付
|
|
|
1191
|
+ * @return void
|
|
|
1192
|
+ * @throws \think\Exception
|
|
|
1193
|
+ * @throws \think\db\exception\DataNotFoundException
|
|
|
1194
|
+ * @throws \think\db\exception\ModelNotFoundException
|
|
|
1195
|
+ * @throws \think\exception\DbException
|
|
|
1196
|
+ * @throws \think\exception\PDOException
|
|
|
1197
|
+ */
|
|
|
1198
|
+ public function orderpayagain(){
|
|
|
1199
|
+ $order_no=$this->request->param("order_no");
|
|
|
1200
|
+ $order=Db::name("order")->where("order_no",$order_no)->find();
|
|
|
1201
|
+ if(!$order){
|
|
|
1202
|
+ $this->error("无此订单");
|
|
|
1203
|
+ }
|
|
|
1204
|
+ if($order['is_pay']!=2){
|
|
|
1205
|
+ $this->error("无法支付该订单");
|
|
|
1206
|
+ }
|
|
|
1207
|
+ $data=[
|
|
|
1208
|
+ "order_no"=>getOrderSn(),
|
|
|
1209
|
+ ];
|
|
|
1210
|
+ $res=Db::name("order")->where("id",$order['id'])->update($data);
|
|
|
1211
|
+ $userinfo = Db::name('user')
|
|
|
1212
|
+ ->where(['id' => $this->auth->id])
|
|
|
1213
|
+ ->field('id,wx_xcx_openid')
|
|
|
1214
|
+ ->find();
|
|
|
1215
|
+ $notifyURI = $this->doman . '/addons/epay/api/OrderPayNtf';
|
|
|
1216
|
+ $params = [
|
|
|
1217
|
+ 'amount' => $data['price'],
|
|
|
1218
|
+ 'orderid' => $data['order_no'],
|
|
|
1219
|
+ 'type' => 'wechat',
|
|
|
1220
|
+ 'notifyurl' => $notifyURI,
|
|
|
1221
|
+ 'method' => 'miniapp',
|
|
|
1222
|
+ 'openid' => $userinfo['wx_xcx_openid'],
|
|
|
1223
|
+ ];
|
|
|
1224
|
+ $f = \addons\epay\library\Service::submitOrder($params);
|
|
|
1225
|
+ $this->success("请求成功",$f);
|
1183
|
}
|
1226
|
}
|
1184
|
} |
1227
|
} |