From fa56134bc28caa0eb06b86f97f21b78c269ca473 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B9=E6=99=AF=E7=AB=8B?= Date: Fri, 21 Apr 2017 11:14:23 +0800 Subject: [PATCH] =?UTF-8?q?[=E5=A2=9E=E5=8A=A0]=E8=A7=86=E5=9B=BE=E8=BE=93?= =?UTF-8?q?=E5=87=BA=E8=A1=8C=E4=B8=BA=E5=A4=84=E7=90=86=EF=BC=8C=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=5F=5FSELF=5F=5F=E3=80=81=5F=5FAPP=5F=5F=E3=80=81=5F?= =?UTF-8?q?=5FPUBLIC=5F=5F=E3=80=90=E5=85=A8=E5=9F=9F=E5=90=8D=E3=80=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/admin/view/config.file.html | 2 +- application/admin/view/config.index.html | 2 +- application/admin/view/menu.form.html | 2 +- application/admin/view/user.index.html | 2 +- application/tags.php | 2 +- application/wechat/view/config.index.html | 2 +- application/wechat/view/config.pay.html | 2 +- application/wechat/view/fans.index.html | 2 +- application/wechat/view/keys.form.html | 388 +++++++++++----------- extend/controller/BasicAdmin.php | 2 - extend/hook/FilterView.php | 56 ++++ 11 files changed, 267 insertions(+), 195 deletions(-) create mode 100644 extend/hook/FilterView.php diff --git a/application/admin/view/config.file.html b/application/admin/view/config.file.html index 582ef94c3..36deb149a 100644 --- a/application/admin/view/config.file.html +++ b/application/admin/view/config.file.html @@ -1,7 +1,7 @@ {extend name="extra@admin/content"} {block name="content"} -
diff --git a/application/admin/view/config.index.html b/application/admin/view/config.index.html index ab5787f19..c72dd4004 100644 --- a/application/admin/view/config.index.html +++ b/application/admin/view/config.index.html @@ -1,7 +1,7 @@ {extend name="extra@admin/content"} {block name="content"} -
diff --git a/application/admin/view/menu.form.html b/application/admin/view/menu.form.html index 741404be8..67f801d86 100644 --- a/application/admin/view/menu.form.html +++ b/application/admin/view/menu.form.html @@ -1,4 +1,4 @@ - +
diff --git a/application/admin/view/user.index.html b/application/admin/view/user.index.html index 038525e54..cc3a0b7d6 100644 --- a/application/admin/view/user.index.html +++ b/application/admin/view/user.index.html @@ -14,7 +14,7 @@ {block name="content"} - +
diff --git a/application/tags.php b/application/tags.php index 0d024445e..718650be1 100644 --- a/application/tags.php +++ b/application/tags.php @@ -22,7 +22,7 @@ return [ // 操作开始执行 'action_begin' => [], // 视图内容过滤 - 'view_filter' => [], + 'view_filter' => ['hook\\FilterView'], // 日志写入 'log_write' => [], // 应用结束 diff --git a/application/wechat/view/config.index.html b/application/wechat/view/config.index.html index f669155fc..bf748edae 100644 --- a/application/wechat/view/config.index.html +++ b/application/wechat/view/config.index.html @@ -1,7 +1,7 @@ {extend name="extra@admin/content"} {block name="content"} -
diff --git a/application/wechat/view/config.pay.html b/application/wechat/view/config.pay.html index a452fe756..14e5e671c 100644 --- a/application/wechat/view/config.pay.html +++ b/application/wechat/view/config.pay.html @@ -16,7 +16,7 @@ {/block} {block name="content"} -
diff --git a/application/wechat/view/fans.index.html b/application/wechat/view/fans.index.html index a7d03ade0..bc81cbbbd 100644 --- a/application/wechat/view/fans.index.html +++ b/application/wechat/view/fans.index.html @@ -11,7 +11,7 @@ {block name="content"} - +
diff --git a/application/wechat/view/keys.form.html b/application/wechat/view/keys.form.html index 06da50e8b..724604909 100644 --- a/application/wechat/view/keys.form.html +++ b/application/wechat/view/keys.form.html @@ -1,5 +1,17 @@ {extend name='extra@admin/content' /} +{block name="style"} + +{/block} {block name="content"}
@@ -14,214 +26,220 @@
- -
+ +
+ 编辑规则 +
+ {if !isset($vo.keys) or $vo.keys neq 'default' and $vo.keys neq 'subscribe'} +
+ +
+ - {if isset($vo.keys) and $vo.keys neq 'default' and $vo.keys neq 'subscribe'} -
- -
- {if isset($vo.keys) and $vo.keys neq ""} - - {else/} - - {/if} -
-
- {else} -
- -
-
- {if !isset($vo.status) or $vo.status neq 0} - - - {else/} - - - {/if}
-
- {/if} - -
- -
- + {else} +
+ +
+
+ {if !isset($vo.status) or $vo.status neq 0} + + + {else/} + + + {/if} +
+
-
+ {/if} -
- -
- +
+ +
+ +
-
-
- -
- - 选择图文 - - +
+ +
+ +
-
-
- -
- - - 上传图片 -
-
- -
- -
- -
- -
- -
-
-
- -
-
- - - - -
-
-
-
- -
- -
-
-
- -
+
+ +
- + - + - 上传图片 - -
-
- -
- -
- -
-
- -
- -
-
-
-
- -
- -
-
- -
-
-
- +
+ +
+
+ + + + +
+ +
+ +
+ +
+
+
+ +
+
+ + + + +
+
+
+
+ +
+ +
+
+
+ +
+ + + + + + 上传图片 + +
+
+ +
+ +
+ +
+
+ +
+ +
+
+ + + + + + + +
+
+
+ +
+ +
+ +
+
+ +
+ +
+ +
+ + {if isset($vo['id'])}{/if}
- {if isset($vo['id'])}{/if} -
+
diff --git a/extend/controller/BasicAdmin.php b/extend/controller/BasicAdmin.php index fff7dbab1..244fcf14f 100644 --- a/extend/controller/BasicAdmin.php +++ b/extend/controller/BasicAdmin.php @@ -66,8 +66,6 @@ class BasicAdmin extends Controller { $this->error('抱歉,您没有访问该模块的权限!'); } // 初始化赋值常用变量 - $this->assign('_url_', $this->request->url(true)); - $this->assign('_uri_', strtolower("{$module}/{$controller}/{$action}")); $this->assign('classuri', strtolower("{$module}/{$controller}")); } diff --git a/extend/hook/FilterView.php b/extend/hook/FilterView.php new file mode 100644 index 000000000..53fd70d18 --- /dev/null +++ b/extend/hook/FilterView.php @@ -0,0 +1,56 @@ +root(true); + $replace = [ + '__APP__' => $app, + '__SELF__' => Request::instance()->url(true), + '__PUBLIC__' => strpos($app, '.') ? ltrim(dirname($app), DS) : $app, + ]; + $params = str_replace(array_keys($replace), array_values($replace), $params); + $this->baidu($params); + $this->cnzz($params); + } + + /** + * 百度统计实现代码 + * @param $params + */ + public function baidu(&$params) { + // @todo 百度统计 + } + + /** + * CNZZ统计实现代码 + * @param $params + */ + public function cnzz(&$params) { + // @todo CNZZ统计 + } +} \ No newline at end of file