'1']); $delivery_res = KeloopForm::order_created(84, 12292); $order = Order::findOne(12080); $addr = json_decode($order->address_data, true); $getFee = KeloopForm::getFee(84, $addr['longitude'], $addr['latitude']); $getCouriers = KeloopForm::getCouriers(84); $getMerchants = KeloopForm::getMerchants(84); $getTeamInfo = KeloopForm::getTeamInfo(84); $getFundUrl = KeloopForm::getFundUrl(84); return $this->asJson([$delivery_res, $getFee, $getTeamInfo, $getFundUrl, $getCouriers, $getMerchants]); } public function actionConf() { $store_id = get_store_id(); $conf = KeloopForm::conf($store_id); $getFundUrl = KeloopForm::getFundUrl($store_id); return $this->asJson([ 'code' => 0, 'data' => [ 'conf' => $conf, 'getFundUrl' => $getFundUrl, '$getTeamInfo' => KeloopForm::getTeamInfo($store_id), '$getCouriers' => KeloopForm::getCouriers($store_id), '$getMerchants' => KeloopForm::getMerchants($store_id), ], ]); } public function actionConfSave(){ $store_id = get_store_id(); $conf = input_params('conf'); if(!is_array($conf)){ $conf = json_decode($conf, true); } $res = []; KeloopForm::saveConf($store_id, $conf, $res); return $this->asJson($res); } public function actionOrderList() { $store_id = get_store_id(); $params = all_params(); $res = KeloopForm::orderList($store_id, $params); return $this->asJson($res); } public function actionOrderErrList() { $store_id = get_store_id(); $res = KeloopForm::orderErrList($store_id); return $this->asJson($res); } public function actionOrderErrRecreate() { $store_id = get_store_id(); $id = input_params('id'); $res = KeloopForm::orderErrRecreate($store_id, $id); return $this->asJson($res); } public function actionOrderFee() { $store_id = get_store_id(); $order_id = input_params('order_id'); $res = KeloopForm::orderFee($store_id, $order_id); return $this->asJson($res); } public function actionOrderCancel() { $store_id = get_store_id(); $order_id = input_params('order_id'); $reason = input_params('reason'); $res = KeloopForm::order_canceled($store_id, $order_id, $reason, 2); return $this->asJson($res); } public function actionMealOutOrder() { $store_id = get_store_id(); $trade_no = input_params('trade_no'); $res = KeloopForm::mealOutOrder($store_id, $trade_no, time()); return $this->asJson($res); } public function actionGetOrderInfo() { $store_id = get_store_id(); $trade_no = input_params('trade_no'); $res = KeloopForm::getOrderInfo($store_id, $trade_no, 0); return $this->asJson($res); } public function actionGetCourierTag() { $store_id = get_store_id(); $trade_no = input_params('trade_no'); $res = KeloopForm::getCourierTag($store_id, $trade_no); return $this->asJson($res); } public function actionGetOrderLog() { $store_id = get_store_id(); $trade_no = input_params('trade_no'); $res = KeloopForm::getOrderLog($store_id, $trade_no); return $this->asJson($res); } }