diff --git a/app/admin/controller/merchant/system/merchant/Merchant.php b/app/admin/controller/merchant/system/merchant/Merchant.php deleted file mode 100644 index 620f30a..0000000 --- a/app/admin/controller/merchant/system/merchant/Merchant.php +++ /dev/null @@ -1,26 +0,0 @@ -model = $model; - } - - /** - * TODO 创建申请 - * @param MerchantApplymentsValidate $validate - * @return \think\response\Json - * @author Qinii - * @day 6/22/21 - */ - public function create(MerchantApplymentsValidate $validate) - { - // if(!systemConfig('open_wx_sub_mch')) return app('json')->fail('未开启子商户入驻'); - $data = $this->checkParams($validate); - - } - - /** - * TODO 创建申请 - * @param MerchantApplymentsValidate $validate - * @return \think\response\Json - * @author Qinii - * @day 6/22/21 - */ - public function detail() - {} - - /** - * TODO 编辑提交 - * @param MerchantApplymentsValidate $validate - * @return \think\response\Json - * @author Qinii - * @day 6/22/21 - */ - public function update($id,MerchantApplymentsValidate $validate) - {} - - /** - * TODO 查询更新状态 - * @param MerchantApplymentsValidate $validate - * @return \think\response\Json - * @author Qinii - * @day 6/22/21 - */ - public function check() - {} - - /** - * TODO 上传图片 - * @param MerchantApplymentsValidate $validate - * @return \think\response\Json - * @author Qinii - * @day 6/22/21 - */ - public function uploadImage($field) - {} - - /** - * TODO 检验参数 - * @param MerchantApplymentsValidate $validate - * @return \think\response\Json - * @author Qinii - * @day 6/22/21 - */ - public function checkParams(MerchantApplymentsValidate $validate) - { - //'organization_cert_info', - $data = $this->request->params([ - 'organization_type','business_license_info','id_doc_type','id_card_info','id_doc_info','need_account_info','account_info','contact_info','sales_scene_info','merchant_shortname','qualifications','business_addition_pics','business_addition_desc' - ]); - - if($data['id_doc_type'] == 1){ - unset($data['id_doc_info']); - }else{ - unset($data['id_card_info']); - } - - if(in_array($data['organization_type'],['2401','2500'])){ - unset($data['business_license_info']); - } - - if(isset($data['qualifications']) && !$data['qualifications']) unset($data['qualifications']); - - if(isset($data['business_addition_pics']) && !$data['business_addition_pics']) unset($data['business_addition_pics']); - if($data['organization_type'] !== 2 && isset($data['id_card_info']['id_card_address'])){ - unset($data['id_card_info']['id_card_address']); - } - $validate->check($data); - return $data; - } -} \ No newline at end of file diff --git a/app/admin/controller/merchant/system/merchant/auth/Menu.php b/app/admin/controller/merchant/system/merchant/auth/Menu.php deleted file mode 100644 index 7e0398a..0000000 --- a/app/admin/controller/merchant/system/merchant/auth/Menu.php +++ /dev/null @@ -1,133 +0,0 @@ -adminInfo = get_login_admin(); - - $this->menu = $menu; - - $this->params = get_params() ; - } - - /** - * 空白菜单页,由前端 ajax 获取数据 - */ - function Index() { - return view('merchant/system/auth/index'); - } - - /** - * 菜单列表 - */ - function Lst(){ - // 查出商户所有菜单数据 - $data = $this->menu->Search([], 1); - - to_assign(0,'',$data['list']); - } - - /** - * 表单页 - * TODO: 操作日志要另建表做关联 - * 操作日志待开发 - * - */ - function AddForm(FormatList $format){ - $id = isset($this->params['id']) ? $this->params['id'] : 0; - $pid = isset($this->params['pid']) ? $this->params['pid'] : 0; - if($id>0){ - $detail = $this->menu->Find($id); - $detail['name'] = $detail['title']; - View::assign('detail', $detail); - } - // 查出商户所有菜单数据 - $data = $this->menu->Search([], 1); - $menus = $format->DropDownMenu($data['list']); - - View::assign('id', $id); - View::assign('pid', $pid); - View::assign('menus',$menus); - - return view('merchant/system/auth/add'); - } - - /** - * 添加菜单 - */ - function Add(){ - echo 'add'; - $this->params['src'] = preg_replace('# #','',$this->params['src']); - // if ($param['id'] == 0) { - try { - validate(RuleCheck::class)->scene('add')->check($this->params); - } catch (ValidateException $e) { - // 验证失败 输出错误信息 - return to_assign(1, $e->getError()); - } - $this->params['create_time'] = time(); - $rid = Db::name('AdminRule')->strict(false)->field(true)->insertGetId($this->params); - //自动为系统所有者管理组分配新增的节点 - $group = Db::name('AdminGroup')->find(1); - if (!empty($group)) { - $newGroup['id'] = 1; - $newGroup['rules'] = $group['rules'] . ',' . $rid; - Db::name('AdminGroup')->strict(false)->field(true)->update($newGroup); - add_log('add', $rid, $this->params); - } - // } - // 删除后台节点缓存 - clear_cache('adminRules'); - return to_assign(); - } - - /** - * 编辑菜单 - */ - function Edit(){ - echo 'edit'; - if ($this->params['id'] > 0) { - try { - validate(RuleCheck::class)->scene('edit')->check($this->params); - } catch (ValidateException $e) { - // 验证失败 输出错误信息 - return to_assign(1, $e->getError()); - } - Db::name('AdminRule')->strict(false)->field(true)->update($this->params); - add_log('edit', $this->params['id'], $this->params); - } - } - - /** - * 删除菜单 - */ - function Del(){ - $id = get_params("id"); - try{ - $this->menu->Del($id); - return to_assign(0, "删除节点成功"); - }catch(ValidateException $e){ - return to_assign(1, $e->getMessage()); - } - } -} \ No newline at end of file diff --git a/app/admin/model/system/Merchant.php b/app/admin/model/system/Merchant.php deleted file mode 100644 index 7687c90..0000000 --- a/app/admin/model/system/Merchant.php +++ /dev/null @@ -1,51 +0,0 @@ -field('id,user_id,title,content,create_time,status,is_read,read_time') - ->page($offset) - ->limit($limit) - ->select(); - - return $list; - } - - /** - * @ 店铺类型说明 - * - * return string - */ - public function GetDescription(){} - - /** - * @ 店铺保证金 - * - * return list - */ - public function Getdeposit(){} - -} \ No newline at end of file diff --git a/app/admin/model/system/MerchantApplyments.php b/app/admin/model/system/MerchantApplyments.php deleted file mode 100644 index e623c12..0000000 --- a/app/admin/model/system/MerchantApplyments.php +++ /dev/null @@ -1,22 +0,0 @@ -select(); - - return $list; - } -} diff --git a/app/admin/model/system/auth/Menu.php b/app/admin/model/system/auth/Menu.php deleted file mode 100644 index a1843ed..0000000 --- a/app/admin/model/system/auth/Menu.php +++ /dev/null @@ -1,53 +0,0 @@ -order('sort DESC,menu_id ASC'); - if (isset($where['pid'])) $query->where('pid', (int)$where['pid']); - if (isset($where['keyword'])) $query->whereLike('menu_name|route', "%{$where['keyword']}%"); - if (isset($where['is_menu'])) $query->where('is_menu', (int)$where['is_menu']); - - // 查询记录总行数 - // $count = $query->count(); - - // 隐藏指定字段 - $list = $query->hidden(['update_time', 'path'])->select()->toArray(); - - // 合并为一个数组并返回 - // compact('count', 'list'); - - return $list; - } -} diff --git a/app/admin/model/system/auth/Role.php b/app/admin/model/system/auth/Role.php deleted file mode 100644 index 60cfe62..0000000 --- a/app/admin/model/system/auth/Role.php +++ /dev/null @@ -1,14 +0,0 @@ - -{block name="body"} -
-

功能菜单/节点

- {if condition="$id eq 0"} - - - - - - - - - - - - - - - - - - - - - - - -
父级菜单/节点* - - - 左侧菜单显示* - - - -
菜单/节点名称* - - - 操作日志名称* - - -
菜单/节点URL - - 菜单排序 - -
菜单图标 - - 如:bi-gear[查看图标] -
- {else/} - - - - - - - - - - - - - - - - - - - - - - - -
父级菜单/节点* - - - 左侧菜单显示* - - - -
菜单/节点名称* - - - 操作日志名称* - - -
菜单/节点URL - - 菜单排序 - -
菜单图标 - - [查看图标] -
- {/if} -
- - - -
-
-{/block} - - - -{block name="script"} - -{/block} - \ No newline at end of file