IE10 – Eternal Night https://www.shuijingwanwq.com There is no problem not worth solving, and no technology not worth learning! Sun, 07 Jun 2026 14:06:44 +0000 en-US hourly 1 https://wordpress.org/?v=7.0 Implement WeChat login in ShopNC, and use Detector to detect browser-related processes https://www.shuijingwanwq.com/en/2016/04/29/16258/ https://www.shuijingwanwq.com/en/2016/04/29/16258/#respond Fri, 29 Apr 2016 05:47:23 +0000 https://www.shuijingwanwq.com/?p=16258 浏览量: 0

1. To realize WeChat login in the WeChat client, the QR code scanning layer will pop up, which should be canceled and directly jump to the authorization page, as shown in Figure 1:

在微信客户端中实现微信登录,弹出二维码扫描层

Implement WeChat login in the WeChat client, and pop up the QR code scanning layer

2. In the mobile browser, the QR code scanning layer will pop up, and an error will be reported after scanning, as shown in Figure 2:

在移动浏览器中,弹出二维码扫描层,扫描之后报错

In the mobile browser, the QR code scanning layer pops up, and an error is reported after scanning

3. Background – Platform – Members – Account Synchronization – WeChat public platform, as shown in Figure 3:
Execute SQL:
Insert into `trade_setting`(`name`, `value`) values (mp_weixin_isuse,1)
Insert into `trade_setting`(`name`, `value`) values (mp_weixin_appid,WX5C318E640E87F7E8)
Insert into `trade_setting`(`name`, `value`) values (mp_weixin_secret,1F436A3A0DBFDAC1C8E1C8F72D2FBEC)

后台 - 平台 - 会员 - 账号同步 - 微信公众平台

Background – Platform – Members – Account Synchronization – WeChat Public Platform

4. Use Detector to detect the browser, the URL:http://detector.dmolsen.com/, it can automatically adapt to the new browser, version and device to use unique user agent characters for each browser, based on Modernizr, as shown in Figure 4:

使用Detector来检测浏览器,网址:http://detector.dmolsen.com/

Use Detector to detect the browser, the URL:http://detector.dmolsen.com/

5. Copy the directory lib/detector to core/framework/detector, as shown in Figure 5:

And set the directory: user-agents/core/, user-agents/extended/, config is writable;

复制目录lib/Detector至core/framework/Detector

Copy directory lib/detector to core/framework/detector

6. The rules are formulated as follows, the code in the controller and template file is shown in Figure 6 and 7:

(1) PC, Tablet: pop up the QR code scanning layer (here WeChat open platform, website application);

(2) Mobile browser: hide;

(3) Mobile client: directly jump to the authorization page (here WeChat public platform, service number);

36kr.com: The mobile terminal does not currently support WeChat login, please use the bound mobile phone or mailbox to log in.
Dianping.com: Hide WeChat login button (use this scheme);

控制器文件中代码

code in controller file

模板文件中代码

code in template file

7. Under the Mobile client, the code to directly jump to the authorization page is shown in Figure 8:

在mobile客户端下,直接跳转至授权页面的代码

Under the Mobile client, jump directly to the code of the authorization page

8. Under the Mobile client, jump directly to the page of the authorization page, as shown in Figure 9:

在mobile客户端下,直接跳转至授权页面的网页

Under the Mobile client, jump directly to the page of the authorization page

9. Error when submitting SVN, as shown in Figure 10:

The working copy at

is too old(format 10) to work with client version1.8.10(R1615264)(Expects format 31).You need upgrade the working copy first.

the working copy at is too old(format 10) to work with client version '1.8.10(r1615264)' (expects format 31)

The working copy at is too old(format 10) to work with client version1.8.10(R1615264)(Expects Format 31)

10. Delete all .svn directories under core/framework/detector to prevent svn conflicts, and the submission is successful, as shown in Figure 11 and 12:

删除core/framework/Detector下的所有.svn目录,以防止SVN冲突

Delete all .svn directories under core/framework/detector to prevent svn conflicts

SVN提交成功

SVN submission was successful

11. Under the Edge browser, the error is reported, as shown in Figure 13:

script16389: Unspecified error.

在Edge浏览器下,报错:SCRIPT16389: 未指明的错误。

Under the Edge browser, an error is reported: script16389: Unspecified error.

12. Open the URL:http://detector.dmolsen.com/, I found that I also have this error, as shown in Figure 14:

打开网址:http://detector.dmolsen.com/ ,发现也有此错误

Open URL:http://detector.dmolsen.com/, found this error too

13. The solution is based on $_SERVER[‘HTTP_USER_AGENT’], if it is IE10, IE11, Edge, then detector is not used to detect the browser, as shown in Figure 15:

基于$_SERVER['HTTP_USER_AGENT'],如果为IE10、IE11、Edge,则不使用Detector来检测浏览器

Based on $_SERVER[‘HTTP_USER_AGENT’], if it is IE10, IE11, Edge, then detector is not used to detect the browser

]]>
https://www.shuijingwanwq.com/en/2016/04/29/16258/feed/ 0