65 lines
2.1 KiB
PHP
65 lines
2.1 KiB
PHP
<?php
|
|
|
|
namespace app\admin\controller\shop;
|
|
|
|
use app\admin\logic\shop\AuthLogic;
|
|
use app\admin\validate\ShopAuthValidate;
|
|
use app\common\basics\AdminBase;
|
|
use app\common\server\ConfigServer;
|
|
use app\common\enum\LocalLifeICBCEnum;
|
|
use app\admin\logic\shop\LocalStoreLogic;
|
|
use app\common\server\JsonServer;
|
|
|
|
class LocalStore extends AdminBase
|
|
{
|
|
public function lists()
|
|
{
|
|
if ($this->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 ($post['state'] == 1 || $post['state'] == 2) {
|
|
if (LocalStoreLogic::update_state($post['id'], $post['state'])) {
|
|
return JsonServer::success('操作成功');
|
|
}
|
|
}
|
|
return JsonServer::error('操作失败');
|
|
}
|
|
}
|
|
} |