From ea0e4cf47d0a6448ec868d0c0ad69abdbb06e97e Mon Sep 17 00:00:00 2001 From: Anyon Date: Tue, 8 Sep 2020 14:40:22 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=95=86=E5=93=81=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E7=AE=A1=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/data/service/GoodsService.php | 17 ++++++++++++++++ app/data/view/news_item/form.html | 10 ---------- app/data/view/news_mark/form.html | 7 ------- app/data/view/news_mark/index.html | 5 ----- app/data/view/shop_goods_cate/form.html | 26 ++++++++++++------------- app/data/view/shop_goods_mark/form.html | 7 ------- 6 files changed, 30 insertions(+), 42 deletions(-) diff --git a/app/data/service/GoodsService.php b/app/data/service/GoodsService.php index c95448e89..978e61d88 100644 --- a/app/data/service/GoodsService.php +++ b/app/data/service/GoodsService.php @@ -2,6 +2,7 @@ namespace app\data\service; +use think\admin\extend\DataExtend; use think\admin\Service; /** @@ -12,6 +13,22 @@ use think\admin\Service; class GoodsService extends Service { + /** + * 获取分类数据 + * @return array + * @throws \think\db\exception\DataNotFoundException + * @throws \think\db\exception\DbException + * @throws \think\db\exception\ModelNotFoundException + */ + public function getCateList(): array + { + $map = ['deleted' => 0, 'status' => 1]; + $query = $this->app->db->name('ShopGoodsCate'); + $query->where($map)->order('sort desc,id desc'); + $query->withoutField('sort,status,deleted,create_at'); + return DataExtend::arr2tree($query->select()->toArray()); + } + /** * 最大分类级别 * @return integer diff --git a/app/data/view/news_item/form.html b/app/data/view/news_item/form.html index a7604fee0..aaa6dc00c 100644 --- a/app/data/view/news_item/form.html +++ b/app/data/view/news_item/form.html @@ -2,9 +2,7 @@ {block name='content'}
-
-
文章标签
@@ -15,7 +13,6 @@ {/if}{/foreach}
-
文章图片
- - -
文章内容
-
{notempty name='vo.id'}{/notempty} -
-
-
- diff --git a/app/data/view/shop_goods_mark/form.html b/app/data/view/shop_goods_mark/form.html index c3232180e..95a944dae 100644 --- a/app/data/view/shop_goods_mark/form.html +++ b/app/data/view/shop_goods_mark/form.html @@ -1,14 +1,11 @@
-
- -
标签描述 Label Remark @@ -16,15 +13,11 @@
-
-
{notempty name='vo.id'}{/notempty} -
-
\ No newline at end of file