From 8f467d3492f84d21919e26631df165b8bd702644 Mon Sep 17 00:00:00 2001 From: devil_gong Date: Wed, 29 Aug 2018 11:21:00 +0800 Subject: [PATCH] detail mv goods --- .../Application/Admin/Controller/GoodsController.class.php | 3 +++ service/Application/Admin/View/Default/Goods/Index.html | 4 ++-- ...DetailController.class.php => GoodsController.class.php} | 6 +++--- .../Home/View/Default/{Detail => Goods}/Index.html | 6 +++--- service/Application/Home/View/Default/Index/Index.html | 2 +- service/Public/Home/Default/Css/{Detail.css => Goods.css} | 0 service/Public/Home/Default/Js/{Detail.js => Goods.js} | 0 7 files changed, 12 insertions(+), 9 deletions(-) rename service/Application/Home/Controller/{DetailController.class.php => GoodsController.class.php} (94%) rename service/Application/Home/View/Default/{Detail => Goods}/Index.html (98%) rename service/Public/Home/Default/Css/{Detail.css => Goods.css} (100%) rename service/Public/Home/Default/Js/{Detail.js => Goods.js} (100%) diff --git a/service/Application/Admin/Controller/GoodsController.class.php b/service/Application/Admin/Controller/GoodsController.class.php index dd3218663..5b7d17221 100755 --- a/service/Application/Admin/Controller/GoodsController.class.php +++ b/service/Application/Admin/Controller/GoodsController.class.php @@ -102,6 +102,9 @@ class GoodsController extends CommonController // 产地 $v['place_origin_text'] = M('Region')->where(['id'=>$v['place_origin']])->getField('name'); + // 商品url地址 + $v['goods_url'] = HomeUrl('Goods', 'Index', ['id'=>$v['id']]); + // 创建时间 $v['add_time'] = date('Y-m-d H:i:s', $v['add_time']); diff --git a/service/Application/Admin/View/Default/Goods/Index.html b/service/Application/Admin/View/Default/Goods/Index.html index 2eb73c387..c6a3e91e7 100755 --- a/service/Application/Admin/View/Default/Goods/Index.html +++ b/service/Application/Admin/View/Default/Goods/Index.html @@ -62,10 +62,10 @@ class="am-active"> - + - style="color:{{$v.title_color}};" >{{$v.title}} + style="color:{{$v.title_color}};" >{{$v.title}} {{$v.price}} diff --git a/service/Application/Home/Controller/DetailController.class.php b/service/Application/Home/Controller/GoodsController.class.php similarity index 94% rename from service/Application/Home/Controller/DetailController.class.php rename to service/Application/Home/Controller/GoodsController.class.php index f7b261e16..37158522d 100644 --- a/service/Application/Home/Controller/DetailController.class.php +++ b/service/Application/Home/Controller/GoodsController.class.php @@ -9,7 +9,7 @@ namespace Home\Controller; * @version 0.0.1 * @datetime 2016-12-01T21:51:08+0800 */ -class DetailController extends CommonController +class GoodsController extends CommonController { /** * [_initialize 前置操作-继承公共前置方法] @@ -33,10 +33,10 @@ class DetailController extends CommonController */ public function Index() { - $goods_id = I('goods_id'); + $id = I('id'); $params = [ 'where' => [ - 'g.id' => $goods_id, + 'g.id' => $id, 'g.is_delete_time' => 0, ], 'is_photo' => true, diff --git a/service/Application/Home/View/Default/Detail/Index.html b/service/Application/Home/View/Default/Goods/Index.html similarity index 98% rename from service/Application/Home/View/Default/Detail/Index.html rename to service/Application/Home/View/Default/Goods/Index.html index 0b56db7f3..dc529475b 100644 --- a/service/Application/Home/View/Default/Detail/Index.html +++ b/service/Application/Home/View/Default/Goods/Index.html @@ -192,12 +192,12 @@
  • class="first">
    ¥{{$v.price}}
  • @@ -260,7 +260,7 @@
  • - + {{$v.title}}

    {{$v.title}}

    diff --git a/service/Application/Home/View/Default/Index/Index.html b/service/Application/Home/View/Default/Index/Index.html index 8adda85c4..402f05ba8 100755 --- a/service/Application/Home/View/Default/Index/Index.html +++ b/service/Application/Home/View/Default/Index/Index.html @@ -146,7 +146,7 @@
    {{$goods.title}}
    ¥{{$goods.price}}
    - + diff --git a/service/Public/Home/Default/Css/Detail.css b/service/Public/Home/Default/Css/Goods.css similarity index 100% rename from service/Public/Home/Default/Css/Detail.css rename to service/Public/Home/Default/Css/Goods.css diff --git a/service/Public/Home/Default/Js/Detail.js b/service/Public/Home/Default/Js/Goods.js similarity index 100% rename from service/Public/Home/Default/Js/Detail.js rename to service/Public/Home/Default/Js/Goods.js