From 2b2b85236195cf4ec8d42c9e7f7cac4df2e87c64 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B9=E6=99=AF=E7=AB=8B?= Date: Wed, 5 Apr 2017 17:46:18 +0800 Subject: [PATCH] =?UTF-8?q?[=E6=9B=B4=E6=96=B0]=E5=AE=8C=E5=96=84=E5=85=AC?= =?UTF-8?q?=E4=BC=97=E5=8F=B7=E9=85=8D=E7=BD=AE=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/wechat/controller/Config.php | 38 ++++++- application/wechat/view/config.index.html | 130 +++++++++++----------- application/wechat/view/config.pay.html | 58 +++++----- public/static/admin/app.js | 8 +- 4 files changed, 128 insertions(+), 106 deletions(-) diff --git a/application/wechat/controller/Config.php b/application/wechat/controller/Config.php index 73160c4f0..8eab434ba 100644 --- a/application/wechat/controller/Config.php +++ b/application/wechat/controller/Config.php @@ -14,6 +14,7 @@ namespace app\wechat\controller; use controller\BasicAdmin; +use service\DataService; /** * 微信配置管理 @@ -24,13 +25,42 @@ use controller\BasicAdmin; */ class Config extends BasicAdmin { + /** + * 定义当前操作表名 + * @var string + */ + protected $table = 'SystemConfig'; + + /** + * 微信基础参数配置 + * @return \think\response\View + */ public function index() { - $this->assign('title', '微信接口配置'); - return view(); + if ($this->request->isGet()) { + $this->assign('title', '微信接口配置'); + return view(); + + } + $data = $this->request->post(); + foreach ($data as $key => $vo) { + DataService::save($this->table, ['name' => $key, 'value' => $vo], 'name'); + } + $this->success('数据修改成功!', ''); } + /** + * 微信商户参数配置 + * @return \think\response\View + */ public function pay() { - $this->assign('title', '微信支付配置'); - return view(); + if ($this->request->isGet()) { + $this->assign('title', '微信支付配置'); + return view(); + } + $data = $this->request->post(); + foreach ($data as $key => $vo) { + DataService::save($this->table, ['name' => $key, 'value' => $vo], 'name'); + } + $this->success('数据修改成功!', ''); } } diff --git a/application/wechat/view/config.index.html b/application/wechat/view/config.index.html index c33e2c756..b52f6c745 100644 --- a/application/wechat/view/config.index.html +++ b/application/wechat/view/config.index.html @@ -1,75 +1,71 @@ {extend name="extra@admin/content"} {block name="content"} -
-
-
-
- 微信对接参数 -
-
- -
-
- - - - -
-

- 注意:接口链接的域名必需要备案,分别支持80端口和443端口,建议使用80端口。 -

-
-
+ -
- -
- -
-
-
- -
- -
-
- -
- -
- -
-
- -
- -
- -
-
-
- -
- -
- -
-
-
+
+ +
+ +

+ 注意:接口链接的域名必需要备案,目前微信官方只支持80端口和443端口。 +

+
-
+ +
+ +
+ +
+ +
+
+ +
+ +
+ +
+ +
+
+ +
+ +
+ +
+ +
+
+ +
+ +
+ +
+ +
+
+ +
+ +
+
+ + +
+
+ {/block} \ No newline at end of file diff --git a/application/wechat/view/config.pay.html b/application/wechat/view/config.pay.html index 0c4dde884..f208b8340 100644 --- a/application/wechat/view/config.pay.html +++ b/application/wechat/view/config.pay.html @@ -1,67 +1,63 @@ {extend name="extra@admin/content"} {block name="content"} -
- -
- +
+

商户支付配置

+
+ +
+ +
+ +
+
+
-
- +
+
+
-
+
-
已设置支付证书 (cert.zip)
-

退款操作时需要上传此证书,在微信支付商户平台下载cert.zip,直接上传即可! +

+ 企业打款、企业红包、订单退款等操作需要使用双向证书,可在微信商户平台下载证书!

+
+
- - +