<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                ThinkChat2.0新版上線,更智能更精彩,支持會話、畫圖、視頻、閱讀、搜索等,送10W Token,即刻開啟你的AI之旅 廣告
                [TOC] # 微信模塊 >作者:張偉 >整理:楊紅偉 ## 1、下載 http://git.oschina.net/hongweizhiyuan/newthink_module/ 這里面的 `Weixin` 模塊!! ## 2、數據庫 |序號|數據表|注釋| | -- | -- | -- | |1|wx_user|微信用戶| |2|wx_keyword|關鍵詞| |3|wx_menu|微信菜單| |4|wx_text|文本回復| |5|wx_img|微信圖文| |6|wx_news|圖文消息| ## 3、文件結構 ``` ├─application │ ├─Admin │ │ ├─Controller │ │ │ │─WechatController.class.php 微信后臺 │ │ ├─Common │ │ │ │─function.php(convert_arr_key | get_rand_str) │ ├─Api │ │ ├─Controller │ │ │ │─WeixinController.class.php 微信前臺 ├─admin │ ├─themes │ │ ├─simplebootx │ │ │ │─Admin │ │ │ │ │─Wechat │ │ │ │ │ │─index.html 公眾號管理-列表 │ │ │ │ │ │─add.html 公眾號管理-填加公眾號 │ │ │ │ │ │─setting.html 公眾號管理-設置(修改) │ │ │ │ │ │─menu.html 微信菜單管理-列表 │ │ │ │ │ │─text.html 文本回復-列表 │ │ │ │ │ │─add_text.html 文本回復-填加修改 │ │ │ │ │ │─img.html 圖文回復-列表 │ │ │ │ │ │─add_img.html 圖文回復- │ │ │ │ │ │─nes.html 組合回復-(正在開發中) │ │ │ │ │ │─add_news.html 單圖文消息-填加 │ │ │ │ │ │─news.html 多圖文回復-列表 │ │ │ │ │ │─preview.html 多圖文回復-預覽 ``` ## 4、使用方法 直接在后臺“微信配置”后,便可以正確的使用了! ## 5、相關圖片 ## 6、后臺菜單SQL ``` INSERT INTO `new_menu` (`id`, `parentid`, `app`, `model`, `action`, `data`, `type`, `status`, `name`, `icon`, `remark`, `listorder`) VALUES('183','0','Admin','','','','1','1','微信管理','weixin','',''); INSERT INTO `new_menu` (`id`, `parentid`, `app`, `model`, `action`, `data`, `type`, `status`, `name`, `icon`, `remark`, `listorder`) VALUES('184','183','Admin','Wechat','index','','1','1','公眾號管理','','',''); INSERT INTO `new_menu` (`id`, `parentid`, `app`, `model`, `action`, `data`, `type`, `status`, `name`, `icon`, `remark`, `listorder`) VALUES('185','183','Admin','Wechat','menu','','1','1','微信菜單管理','','',''); INSERT INTO `new_menu` (`id`, `parentid`, `app`, `model`, `action`, `data`, `type`, `status`, `name`, `icon`, `remark`, `listorder`) VALUES('186','183','Admin','Wechat','text','','1','1','文本回復','','',''); INSERT INTO `new_menu` (`id`, `parentid`, `app`, `model`, `action`, `data`, `type`, `status`, `name`, `icon`, `remark`, `listorder`) VALUES('187','183','Admin','Wechat','img','','1','1','圖文管理','','',''); ``` ## 7、權限訪問SQL ``` INSERT INTO `new_auth_rule` VALUES ('172', 'Admin', 'admin_url', 'admin/wechat/default', null, '微信管理', '1', ''); INSERT INTO `new_auth_rule` VALUES ('173', 'Admin', 'admin_url', 'admin/wechat/index', null, '公眾號管理', '1', ''); INSERT INTO `new_auth_rule` VALUES ('174', 'Admin', 'admin_url', 'admin/wechat/menu', null, '微信菜單管理', '1', ''); INSERT INTO `new_auth_rule` VALUES ('175', 'Admin', 'admin_url', 'admin/wechat/text', null, '文本回復', '1', ''); INSERT INTO `new_auth_rule` VALUES ('176', 'Admin', 'admin_url', 'admin/wechat/img', null, '圖文回復', '1', ''); ``` ## 微信模塊集成步驟 說明:我們采用的是將 `tpshop` 微信模塊集成到 `newthink` 的步驟,集成方法如下: ### 1.拷貝文件到對應的目錄 - 把 Wechat模板文件夾 全部放到 `/admin/themes/simplebootx/Admin` - 把 `WechatController.class.php` 放到 `/application/Admin/Controller` 目錄下 - 把 `WeixinController.class.php`放到 `/application/Api/Controller` 目錄下 - 把 `function.php`文件 放到`/application/Admin/Common`目錄下,替換源文件 - 把相關的樣式文件放到網站根目錄下 `/public/simpleboot` 中 - `/admin/themes/simplebootx/Admin`建立Public 文件,并把`min-header.html`文件放到此文件夾中 * * * * * ### 2.導入sql語句 - 導入 微信模塊表 ``` 微信模塊表.sql``` - 導入后臺生成微信菜單表 ``` 微信菜單.sql``` >打開后臺,即可生成微信菜單和對應的界面 * * * * * ### 3.接入微信公眾號 #### 3.1 添加微信公眾號 ![](image/57bac09f65677.png) > 配置正確會顯示接入成功 #### 3.2 去微信平臺配置接口信息 ![](image/57bac1679b570.png) #### 3.3 在微信平臺接口權限中設置 網頁授權基本信息 > 只有認證的服務號才有此權限,不設置會導致文本圖文回復不可用 ![](image/57bac1c9d4842.png) - 這里拿測試號演示,填寫自己的網站域名即可 ![](image/57bac299392e8.png) * * * * * ### 4.網站后臺 #### 4.1 把微信接入狀態變成已接入 ![](image/57bac3b880ff1.png) #### 4.2 生成菜單,添加內容 - 添加菜單管理 添加相應的菜單 - 添加對應的文本回復和 圖文回復 #### 4.3 到微信公眾號查看效果 > 備注:生成新菜單,需要需要關注,再重新關注。
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看