我是小站长 發表於 2019-6-2 14:14:24

discuzX3.3 ucenter改为https后,站点同步显示正在连接的问题解...

<br /><br />ucenter为独立安装<br />dzx为3.3<br /><br />当ucenter 改为https后,应用那里变成了“正在连接”,直接用http访问是通信成功<br /><br />问题出在输出的js文档没有声明为js,在chrome浏览器中无法执行,新版的safari应该也不可以<br /><br />找到uc下 control/admin/app.php,130行左右<br />加一句<br /><ol><li>header('Content-Type:text/javascript');</ol>变成<br /><ol><li>if($status == '1') {<br /><li>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;header('Content-Type:text/javascript');<br /><li>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;echo 'document.getElementById(\'status_'.$appid.'\').innerHTML = &quot;&lt;img src=\'images/correct.gif\' border=\'0\' class=\'statimg\' \/&gt;&lt;span class=\'green\'&gt;'.$this-&gt;lang['app_connent_ok'].'&lt;/span&gt;&quot;;testlink();';<br /><li>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp; } else {<br /><li>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;echo 'document.getElementById(\'status_'.$appid.'\').innerHTML = &quot;&lt;img src=\'images/error.gif\' border=\'0\' class=\'statimg\' \/&gt;&lt;span class=\'red\'&gt;'.$this-&gt;lang['app_connent_false'].'&lt;/span&gt;&quot;;testlink();';<br /><li>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp; }<br /><li></ol>gbk可能会出现乱码,直接把<font style="background-color:rgb(247, 247, 247)">$this-&gt;lang['app_connent_ok']. 改为 ‘ok’算了</font><br />ucenter<em>, </em>改为<em>, </em>https<em>, </em>正在<em>, </em>连接

耗子 發表於 2019-6-2 19:09:30

干货 收藏了

9252com 發表於 2019-6-4 13:44:20

收藏了!<br />

鸿茂传媒 發表於 2019-6-5 09:31:06

收藏了。

元归 發表於 2019-6-15 09:27:16

收藏了!

站长 發表於 2019-6-16 14:30:55

感谢 学习一下
頁: [1]
查看完整版本: discuzX3.3 ucenter改为https后,站点同步显示正在连接的问题解...