From 3ab25a0866ac38605cbdf34cd16516d6b52c850e Mon Sep 17 00:00:00 2001 From: callmez Date: Sat, 6 Jun 2015 22:11:09 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E6=95=B0=E6=8D=AE=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../example/migrations/m150402_051920_initWechatData.php | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/modules/example/migrations/m150402_051920_initWechatData.php b/modules/example/migrations/m150402_051920_initWechatData.php index 891099f8d..78f6ed4d1 100644 --- a/modules/example/migrations/m150402_051920_initWechatData.php +++ b/modules/example/migrations/m150402_051920_initWechatData.php @@ -14,14 +14,12 @@ public function safeUp() $wechat = new Wechat; $wechat->setAttributes([ 'name' => '示例公众号', - 'hash' => 'shili', 'token' => 'lL2hcT4c41H3wL21Hlftlz4A4w22j12L', 'account' => 'example', 'original' => 'gh_example12345', 'type' => Wechat::TYPE_SUBSCRIBE, - 'app_id' => 'wxd8cce40cc50ce6c7', - 'app_secret' => '8e850dfed1befa106ea0bbe7cb67ad25', - 'encoding_type' => Wechat::ENCODING_COMPATIBLE, + 'key' => 'wxd8cce40cc50ce6c7', + 'secret' => '8e850dfed1befa106ea0bbe7cb67ad25', 'encoding_aes_key' => '8J4In8J3R3ppqWgQkCXhOvU1ZxaPFa5eSDZ8u3XNy45', 'avatar' => 'example_avatar.png', 'qrcode' => 'example_qr_code.png', From 91763832b825f682cbbc5ecc75ceb61b773b64c0 Mon Sep 17 00:00:00 2001 From: callmez Date: Mon, 8 Jun 2015 23:16:23 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E7=AE=A1=E7=90=86=E5=91=98ID?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config/modules.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/config/modules.php b/config/modules.php index ba6979eb3..5e0e8114e 100644 --- a/config/modules.php +++ b/config/modules.php @@ -2,7 +2,8 @@ return [ // 微信模块 'wechat' => [ - 'class' => 'callmez\wechat\Module' + 'class' => 'callmez\wechat\Module', + 'adminId' => [100, 101] // 这里填写管理员ID(拥有wechat最高管理权限) ], 'example' => [ // 微信扩展示例模块, 生产环境可删除 'class' => 'app\modules\example\Module', From 4028e3c20259b5974480ca09c2717d24c648e9e2 Mon Sep 17 00:00:00 2001 From: callmez Date: Thu, 11 Jun 2015 13:14:57 +0800 Subject: [PATCH 3/3] =?UTF-8?q?angular.js=20post=20=E8=A7=A3=E6=9E=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config/web.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/config/web.php b/config/web.php index 13f8fcb16..9fb00526f 100644 --- a/config/web.php +++ b/config/web.php @@ -17,6 +17,9 @@ 'request' => [ // !!! insert a secret key in the following (if it is empty) - this is required by cookie validation 'cookieValidationKey' => 'oxTxC600X5DGRubG2mYdBMmC4MM0C-ZB', + 'parsers' => [ // angular.js 提交数据解析 + 'application/json' => 'yii\web\JsonParser', + ] ], 'cache' => [ 'class' => 'yii\caching\FileCache',