作者 sgj
1 个管道 的构建 通过 耗费 1 秒

调整评论顺序

... ... @@ -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']);
... ...
... ... @@ -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
... ...