From a538ac1dce0f7da51af3d21e88971f288aaeaa39 Mon Sep 17 00:00:00 2001 From: augushong Date: Mon, 11 Jul 2022 12:12:22 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=A0=E9=99=A4=E6=B5=8B=E8=AF=95=E4=BB=A3?= =?UTF-8?q?=E7=A0=81=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/admin/controller/test/Goods.php | 65 ---------- app/admin/model/TestGoods.php | 31 ----- app/admin/view/test/goods/add.html | 179 --------------------------- app/admin/view/test/goods/edit.html | 179 --------------------------- app/admin/view/test/goods/index.html | 10 -- public/static/admin/js/test/goods.js | 34 ----- 6 files changed, 498 deletions(-) delete mode 100644 app/admin/controller/test/Goods.php delete mode 100644 app/admin/model/TestGoods.php delete mode 100644 app/admin/view/test/goods/add.html delete mode 100644 app/admin/view/test/goods/edit.html delete mode 100644 app/admin/view/test/goods/index.html delete mode 100644 public/static/admin/js/test/goods.js diff --git a/app/admin/controller/test/Goods.php b/app/admin/controller/test/Goods.php deleted file mode 100644 index 53e2082..0000000 --- a/app/admin/controller/test/Goods.php +++ /dev/null @@ -1,65 +0,0 @@ -model = new \app\admin\model\TestGoods(); - - $this->assign('select_list_status', $this->model::SELECT_LIST_STATUS, true); - - $this->assign('select_list_time_status', $this->model::SELECT_LIST_TIME_STATUS, true); - - $this->assign('select_list_is_recommend', $this->model::SELECT_LIST_IS_RECOMMEND, true); - - $this->assign('select_list_shop_type', $this->model::SELECT_LIST_SHOP_TYPE, true); - - } - - - /** - * @NodeAnotation(title="列表") - */ - public function index() - { - if ($this->request->isAjax()) { - if (input('selectFields')) { - return $this->selectList(); - } - list($page, $limit, $where) = $this->buildTableParames(); - $count = $this->model - ->withJoin('mallCate', 'LEFT') - ->where($where) - ->count(); - $list = $this->model - ->withJoin('mallCate', 'LEFT') - ->where($where) - ->page($page, $limit) - ->order($this->sort) - ->select(); - $data = [ - 'code' => 0, - 'msg' => '', - 'count' => $count, - 'data' => $list, - ]; - return json($data); - } - return $this->fetch(); - } -} \ No newline at end of file diff --git a/app/admin/model/TestGoods.php b/app/admin/model/TestGoods.php deleted file mode 100644 index cd1ed50..0000000 --- a/app/admin/model/TestGoods.php +++ /dev/null @@ -1,31 +0,0 @@ -'正常','1'=>'禁用',]; - - public const SELECT_LIST_TIME_STATUS = ['0'=>'未参加','1'=>'已开始','3'=>'已结束',]; - - public const SELECT_LIST_IS_RECOMMEND = ['0'=>'不推荐','1'=>'推荐',]; - - public const SELECT_LIST_SHOP_TYPE = ['taobao'=>'淘宝','jd'=>'京东',]; - - - - public function mallCate() - { - return $this->belongsTo('\app\admin\model\MallCate', 'cate_id', 'id'); - } - - -} \ No newline at end of file diff --git a/app/admin/view/test/goods/add.html b/app/admin/view/test/goods/add.html deleted file mode 100644 index 25a28e8..0000000 --- a/app/admin/view/test/goods/add.html +++ /dev/null @@ -1,179 +0,0 @@ -
-
- -
- -
-
- -
-
-
-
- -
- -
-
-
- -
- - -
-
-
- -
- - -
-
-
- -
- -
-
-
- -
- -
-
-
- -
- -
-
-
- -
- {foreach $select_list_status as $k=>$v} - - {/foreach} -
-
- -
- -
- - -
-
-
- -
- - -
-
-
- -
- -
-
-
- -
- -
-
-
- -
- -
-
-
- -
- -
-
-
- -
- -
-
-
- -
- {foreach $select_list_is_recommend as $k=>$v} - - {/foreach} -
-
- -
- -
- {foreach $select_list_shop_type as $k=>$v} - - {/foreach} -
-
- -
- -
-
- -
-
-
-
- -
-
- -
-
-
-
- -
- -
-
-
- -
- -
-
-
- -
-
-
-
-
-
- - -
- -
-
\ No newline at end of file diff --git a/app/admin/view/test/goods/edit.html b/app/admin/view/test/goods/edit.html deleted file mode 100644 index 5fd10ba..0000000 --- a/app/admin/view/test/goods/edit.html +++ /dev/null @@ -1,179 +0,0 @@ -
-
- -
- -
-
- -
-
-
-
- -
- -
-
-
- -
- - -
-
-
- -
- - -
-
-
- -
- -
-
-
- -
- -
-
-
- -
- -
-
-
- -
- {foreach $select_list_status as $k=>$v} - - {/foreach} -
-
- -
- -
- - -
-
-
- -
- - -
-
-
- -
- -
-
-
- -
- -
-
-
- -
- -
-
-
- -
- -
-
-
- -
- -
-
-
- -
- {foreach $select_list_is_recommend as $k=>$v} - - {/foreach} -
-
- -
- -
- {foreach $select_list_shop_type as $k=>$v} - - {/foreach} -
-
- -
- -
-
- -
-
-
-
- -
-
- -
-
-
-
- -
- -
-
-
- -
- -
-
-
- -
-
-
-
-
-
- - -
- -
-
\ No newline at end of file diff --git a/app/admin/view/test/goods/index.html b/app/admin/view/test/goods/index.html deleted file mode 100644 index da5508a..0000000 --- a/app/admin/view/test/goods/index.html +++ /dev/null @@ -1,10 +0,0 @@ -
-
- -
-
-
\ No newline at end of file diff --git a/public/static/admin/js/test/goods.js b/public/static/admin/js/test/goods.js deleted file mode 100644 index bec81b2..0000000 --- a/public/static/admin/js/test/goods.js +++ /dev/null @@ -1,34 +0,0 @@ -define(["jquery", "easy-admin"], function ($, ea) { - - var init = { - table_elem: '#currentTable', - table_render_id: 'currentTableRenderId', - index_url: 'test.goods/index', - add_url: 'test.goods/add', - edit_url: 'test.goods/edit', - delete_url: 'test.goods/delete', - export_url: 'test.goods/export', - modify_url: 'test.goods/modify', - }; - - var Controller = { - - index: function () { - ea.table.render({ - init: init, - cols: [[ - {type: 'checkbox'}, {field: 'id', title: 'id'}, {field: 'cate_id', title: '分类ID'}, {field: 'title', title: '商品名称'}, {field: 'logo', title: '商品logo', templet: ea.table.image}, {field: 'total_stock', title: '总库存'}, {field: 'sort', title: '排序', edit: 'text'}, {field: 'status', search: 'select', selectList: ea.getDataBrage('select_list_status'), title: '状态', templet: ea.table.switch}, {field: 'cert_file', title: '合格证', templet: ea.table.url}, {field: 'remark', title: '备注说明', templet: ea.table.text}, {field: 'create_time', title: 'create_time'}, {field: 'publish_time', title: '发布日期'}, {field: 'sale_time', title: '售卖日期'}, {field: 'intro', title: '简介'}, {field: 'time_status', search: 'select', selectList: ea.getDataBrage('select_list_time_status'), title: '秒杀状态'}, {field: 'is_recommend', search: 'select', selectList: ea.getDataBrage('select_list_is_recommend'), title: '是否推荐'}, {field: 'shop_type', search: 'select', selectList: ea.getDataBrage('select_list_shop_type'), title: '商品类型'}, {field: 'from_area', title: '产地'}, {field: 'store_city', title: '仓库'}, {field: 'tag_input', title: '商品标签 (输入)'}, {field: 'mallCate.id', title: ''}, {field: 'mallCate.title', title: '分类名'}, {field: 'mallCate.image', title: '分类图片', templet: ea.table.image}, {field: 'mallCate.sort', title: '排序', edit: 'text'}, {field: 'mallCate.status', title: '状态', templet: ea.table.switch}, {field: 'mallCate.remark', title: '备注说明', templet: ea.table.text}, {field: 'mallCate.create_time', title: '创建时间'}, {width: 250, title: '操作', templet: ea.table.tool , fixed:'right'}, - ]], - }); - - ea.listen(); - }, - add: function () { - ea.listen(); - }, - edit: function () { - ea.listen(); - }, - }; - return Controller; -}); \ No newline at end of file