request->isAjax()) { $get = $this->request->get(); $lists = LocalStoreLogic::lists(); return JsonServer::success('获取成功', $lists); } return View(); } public function add() { return view('', [ 'crftType1List' => LocalLifeICBCEnum::crftType1List(), // 商户证件类型列表 'crftType2List' => LocalLifeICBCEnum::crftType2List(), //法人/负责任人证件类型 'accntType1List' => LocalLifeICBCEnum::accntType1List(), // 消费结算账户类型 'tx_map_key' => ConfigServer::get('map', 'tx_map_key') ]); } public function edit() { $id = $this->request->get('id'); if ($this->request->isAjax()) { $post = $this->request->post(); } return view('', [ 'crftType1List' => LocalLifeICBCEnum::crftType1List(), // 商户证件类型列表 'crftType2List' => LocalLifeICBCEnum::crftType2List(), //法人/负责任人证件类型 'accntType1List' => LocalLifeICBCEnum::accntType1List(), // 消费结算账户类型 'tx_map_key' => ConfigServer::get('map', 'tx_map_key'), 'id' => $id ]); } /** * @notes 审核操作 */ public function operation() { if ($this->request->isAjax()) { $post = $this->request->post(); if (in_array($post['state'], LocalStoreLogic::$STATE_ENUM)) { if ($post['state'] == 1) { $data = LocalStoreLogic::get_data($post['id']); $result = Request::post('https://dlh.hainings.com/shop/abutment.abutment/test', [ 'empowerPhone' => $data['empowerPhone'], 'crftNo1' => $data['crftNo1'] ]); } if (LocalStoreLogic::update_state($post['id'], $post['state'])) { return JsonServer::success('操作成功'); } } return JsonServer::error('操作失败'); } } public function order() { if ($this->request->isAjax()) { $get = $this->request->get(); return JsonServer::success('', LocalStoreLogic::getOrderList($get)); } return view(''); } public function exportOrderData() { $result = LocalStoreLogic::exportOrderData(); if(false === $result) { return JsonServer::error(InvoiceLogic::getError() ?: '导出失败'); } return JsonServer::success('', $result); } public function downloadErCode() { if ($this->request->isAjax()) { $post = $this->request->post(); if ($post['lstore_id'] > 0){ $result = LocalStoreLogic::getPayImage($post['lstore_id']); if ($result['pay_image']) { $path = parse_url($result['pay_image'])['path']; $url = (string)url("index/download/downloadLocalStoreErcodeImage", ['url' => $path], false, true); return JsonServer::success('', ['url' => $url]); } return JsonServer::error('下载失败'); } } } }