From d50769474c910ff6d4a6b55c123f3e8accf08f4e Mon Sep 17 00:00:00 2001 From: devil_gong Date: Sun, 23 Jun 2019 19:41:17 +0800 Subject: [PATCH] =?UTF-8?q?=E5=95=86=E5=93=81=E8=AF=A6=E6=83=85=E6=96=B0?= =?UTF-8?q?=E5=A2=9E=E7=9B=B8=E5=86=8C=E9=92=A9=E5=AD=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/index/controller/Goods.php | 9 ++++++ .../index/view/default/goods/index.html | 28 +++++++++++++++++++ 2 files changed, 37 insertions(+) diff --git a/application/index/controller/Goods.php b/application/index/controller/Goods.php index 790b6aa5c..50968cf15 100755 --- a/application/index/controller/Goods.php +++ b/application/index/controller/Goods.php @@ -145,6 +145,15 @@ class Goods extends Common */ private function PluginsHook($goods_id, &$goods) { + // 商品页面相册内部钩子 + $this->assign('plugins_view_goods_detail_photo_within_data', Hook::listen('plugins_view_goods_detail_photo_bottom', + [ + 'hook_name' => 'plugins_view_goods_detail_photo_within', + 'is_backend' => false, + 'goods_id' => $goods_id, + 'goods' => &$goods, + ])); + // 商品页面相册底部钩子 $this->assign('plugins_view_goods_detail_photo_bottom_data', Hook::listen('plugins_view_goods_detail_photo_bottom', [ diff --git a/application/index/view/default/goods/index.html b/application/index/view/default/goods/index.html index 82a6c0a6a..b2275c4be 100755 --- a/application/index/view/default/goods/index.html +++ b/application/index/view/default/goods/index.html @@ -36,6 +36,20 @@ your browser does not support the video tag {{/if}} + + + {{if isset($shopxo_is_develop) and $shopxo_is_develop eq true and (!isset($is_footer) or $is_footer eq 1)}} +
+ plugins_view_goods_detail_photo_within +
+ {{/if}} + {{if !empty($plugins_view_goods_detail_photo_within_data) and is_array($plugins_view_goods_detail_photo_within_data)}} + {{foreach $plugins_view_goods_detail_photo_within_data as $hook}} + {{if is_string($hook) or is_int($hook)}} + {{$hook|raw}} + {{/if}} + {{/foreach}} + {{/if}} @@ -85,6 +99,20 @@ your browser does not support the video tag {{/if}} + + + {{if isset($shopxo_is_develop) and $shopxo_is_develop eq true and (!isset($is_footer) or $is_footer eq 1)}} +
+ plugins_view_goods_detail_photo_within +
+ {{/if}} + {{if !empty($plugins_view_goods_detail_photo_within_data) and is_array($plugins_view_goods_detail_photo_within_data)}} + {{foreach $plugins_view_goods_detail_photo_within_data as $hook}} + {{if is_string($hook) or is_int($hook)}} + {{$hook|raw}} + {{/if}} + {{/foreach}} + {{/if}} -- GitLab