我是小站长 發表於 2019-6-1 21:37:02

如何微信登录访问触屏版

<br /><br /><font face="Tahoma, &amp;quot;">要想用discuz的官方“微信登录”插件的微信登录功能,必须要开启“微社区”,但是微社区不如手机触屏版美观,如何才能既能微信登录?</font><br /><font face="Tahoma, &amp;quot;"><br /></font><br /><br /><font color="#000"><font face="&amp;quot;"><font style="font-size:16px">1、打开文件.</font></font></font><font style="color:rgb(0, 153, 0)"><font face="&amp;quot;"><font style="font-size:16px">/source/plugin/wechat/response.class.php</font></font></font><font face="&amp;quot;"><font style="font-size:16px"><font color="#000000">查找</font></font></font><br /><ol><li>$in_wechat = $_G['wechat']['setting']['wsq_wapdefault'] ? true : strpos($_SERVER['HTTP_USER_AGENT'], 'MicroMessenger') !== false;</ol><font size="3">修改为</font><ol><li>$in_wechat = 0;</ol><font size="3"><font size="3"><br /></font><br />2、</font><font color="#000"><font face="&amp;quot;"><font style="font-size:16px">按上面方法测试后,从微信进入网站就是手机版了,基本可以使用了。但是,如果从微信登录插件提供的扫一扫二维码进入还是微社区。因为生成的二维码地址是微社区地址,</font></font></font><font style="color:rgb(0, 0, 0)"><font face="&amp;quot;"><font style="font-size:16px">需要做以下更改:</font></font></font><br /><font color="#000"><font face="&amp;quot;"><font style="font-size:16px">打开文件.</font></font></font><font style="color:rgb(0, 153, 0)"><font face="&amp;quot;"><font style="font-size:16px">/source/plugin/wechat/qrcode.inc.php</font></font></font><br /><font color="#000"><font face="&amp;quot;"><font style="font-size:16px"><br /></font></font></font><br /><font color="#000"><font face="&amp;quot;"><font style="font-size:16px">查找</font></font></font><ol><li>$url = wsq::$WSQ_DOMAIN.'siteid='.$_G['wechat']['setting']['wsq_siteid'].'&amp;c=index&amp;a=';</ol><font color="#000"><font face="&amp;quot;"><font style="font-size:16px">更改为</font></font></font><ol><li>$url = $_G['siteurl'].'/forum.php?';</ol><br /><font color="#000"><font face="&amp;quot;"><font style="font-size:16px">查找</font></font></font><ol><li>QRcode::png($url.'viewthread&amp;tid='.$_GET['tid'].'&amp;source=pcscan', $file, QR_ECLEVEL_Q, $qrsize);</ol><font color="#000"><font face="&amp;quot;"><font style="font-size:16px">更改为</font></font></font><ol><li>QRcode::png($url.'mod=viewthread&amp;tid='.$_GET['tid'], $file, QR_ECLEVEL_Q, $qrsize);</ol><br /><font color="#000"><font face="&amp;quot;"><font style="font-size:16px">查找</font></font></font><ol><li>QRcode::png($url.'showactivity&amp;tid='.$_GET['tid'].'&amp;viewpid='.$_GET['pid'].'&amp;source=pcscan', false, QR_ECLEVEL_Q, $qrsize);</ol><font color="#000"><font face="&amp;quot;"><font style="font-size:16px">更改为</font></font></font><ol><li>QRcode::png($url.'mod=showactivity&amp;tid='.$_GET['tid'].'&amp;viewpid='.$_GET['pid'], false, QR_ECLEVEL_Q, $qrsize);</ol><br /><font color="#000"><font face="&amp;quot;"><font style="font-size:16px">查找</font></font></font><ol><li>QRcode::png($url.'index&amp;fid='.$_GET['fid'].'&amp;source=pcscan', $file, QR_ECLEVEL_Q, $qrsize);</ol><font color="#000"><font face="&amp;quot;"><font style="font-size:16px">更改为</font></font></font><ol><li>QRcode::png($url.'mod=forumdisplay&amp;fid='.$_GET['fid'], $file, QR_ECLEVEL_Q, $qrsize);</ol><br /><font color="#000"><font face="&amp;quot;"><font style="font-size:16px">查找</font></font></font><ol><li>QRcode::png($url.'index&amp;source=pcscan', $file, QR_ECLEVEL_Q, $qrsize);</ol><font face="&amp;quot;"><font color="#000000"><font style="font-size:16px">更改为</font></font></font><ol><li>QRcode::png($url.'forumlist=1', $file, QR_ECLEVEL_Q, $qrsize);</ol><br /><font style="color:rgb(0, 0, 0)"><font face="&amp;quot;"><font style="font-size:16px">3、通过以上更改后发现扫描还是进入微社区?因为调用的是以前生成的二维码,需要删除重新生成。</font></font></font><br /><font color="#000"><font face="&amp;quot;"><font style="font-size:16px">删除./data/cache/qrcode/所有生成的二维码即可。</font></font></font><br />quot<em>, </em>16px<em>, </em>微信

842939018 發表於 2019-6-2 17:39:42

DZ论坛怎么发这种代码 ?&nbsp;&nbsp;我论坛发不了&nbsp;&nbsp;https://bbs.zhuzi.xyz

allthebest 發表於 2019-6-2 18:03:34

<br /><img title="01.jpg" id="aimg_126" aid="126" src1="static/image/common/none.gif" zoom="https://www.dismall.com/data/attachment/forum/201906/02/180326onb8kdebd4ewkenp.jpg" src="https://www.dismall.com/data/attachment/forum/201906/02/180326onb8kdebd4ewkenp.jpg" class="zoom" onclick="zoom(this, this.src, 0, 0, 0)" width="566" inpost="1" onmouseover="showMenu({'ctrlid':this.id,'pos':'12'})" /><br />

站长 發表於 2019-6-16 15:40:51

感谢分享。。

一苇过江 發表於 2019-6-20 16:02:27

感谢分享。。

Error 發表於 2019-6-21 10:54:20

学习下!<br />修改后 微信 打开 触屏版后是不是直接用的微信登录了?<br /><br />

citywar 發表於 2019-6-21 14:52:58

一个问题。 好像微信打开微社区直接就用微信注册登录呢。<br /><br />那微信打开触屏版,能自动微信登录吗?

ldhxzc 發表於 2019-6-23 22:24:41

<br />不知道耶,你按照这个教程试了吗?效果如何?

cko 發表於 2019-6-24 11:32:04

鉴定完毕,实属干货!

97211 發表於 2020-4-8 07:28:12

有没有修改完,有结果的
頁: [1]
查看完整版本: 如何微信登录访问触屏版