From 92af61597b5ff2f0ad38150d89b9a3038d0ce2d6 Mon Sep 17 00:00:00 2001
From: sgj <sgj@bronet.cn>
Date: Thu, 17 Jan 2019 15:43:21 +0800
Subject: [PATCH] 调整评论顺序

---
 app/portal/controller/FriendsController.php              | 12 ++++++++++++
 public/themes/simpleboot3/portal/friends/friendlist.html | 11 +++++++++++
 2 files changed, 23 insertions(+), 0 deletions(-)

diff --git a/app/portal/controller/FriendsController.php b/app/portal/controller/FriendsController.php
index c323d04..03c6e4b 100644
--- a/app/portal/controller/FriendsController.php
+++ b/app/portal/controller/FriendsController.php
@@ -41,6 +41,17 @@ class FriendsController extends WeChatBaseController
      * @throws \think\exception\DbException
      */
     public function friendList(){
+
+        $config=config('wechat_config');
+        $Wechat=new Application($config);
+        $js = $Wechat->js;
+        $api[]='chooseImage';
+        $api[]='previewImage';
+        $api[]='uploadImage';
+        $api[]='downloadImage';
+        $sdk=$js->config($api, true);
+
+
         $group_id=input('id');
         /*检查权限*/
         $user_id=cmf_get_current_user_id();
@@ -58,6 +69,7 @@ class FriendsController extends WeChatBaseController
         foreach ($article as $k=>$v){
             $article[$k]['pic']=cmf_get_image_url(json_decode($v['amore'],true)['thumbnail']);
         }
+        $this->assign('sdk',$sdk);
         $this->assign('silence',$silence);
         $this->assign('info',$info);
         $this->assign('userinfo',$user['0']);
diff --git a/public/themes/simpleboot3/portal/friends/friendlist.html b/public/themes/simpleboot3/portal/friends/friendlist.html
index 558c546..a99be51 100644
--- a/public/themes/simpleboot3/portal/friends/friendlist.html
+++ b/public/themes/simpleboot3/portal/friends/friendlist.html
@@ -10,6 +10,7 @@
     <link rel="stylesheet" href="__TMPL__/public/assets/css/diseaseColumn.css">
     <link rel="stylesheet" href="__TMPL__/public/assets/css/ChatCircle.css">
     <link rel="stylesheet" href="__TMPL__/public/assets/css/chat.css">
+    <script src="http://res.wx.qq.com/open/js/jweixin-1.4.0.js"></script>
 </head>
 <body>
 <div>
@@ -250,5 +251,15 @@
 
     })
 </script>
+<script type="application/javascript">
+    wx.config({$sdk});
+    $('.list_img_box').onclick(function (res) {
+        alert('1111');
+    })
+    wx.previewImage({
+        current: '', // 当前显示图片的http链接
+        urls: [] // 需要预览的图片http链接列表
+    });
+    </script>
 </body>
 </html>
\ No newline at end of file
--
libgit2 0.24.0