ShopNC – Eternal Night https://www.shuijingwanwq.com There is no problem not worth solving, and no technology not worth learning! Sun, 07 Jun 2026 14:13:38 +0000 en-US hourly 1 https://wordpress.org/?v=7.0 Realize the internationalization of mobile phone numbers based on Ronglian Cloud Communication and cloud chips in UCenter and ShopNC https://www.shuijingwanwq.com/en/2016/07/09/16244/ https://www.shuijingwanwq.com/en/2016/07/09/16244/#respond Sat, 09 Jul 2016 03:20:32 +0000 https://www.shuijingwanwq.com/?p=16244 浏览量: 1

1. Platform – Settings – Mail Settings – Message template, let the template content support traditional Chinese implementation (mail_msg_temlates: mail template Add template ID field (APP cloud communication SMS template): temp_id_app Add traditional fields (SMS traditional template content (cloud piece SMS template): content_zh_tw), as shown in Figure 1:

添加繁体字段(短信繁体模板内容(云片短信模板)):content_zh_tw

Add traditional fields (SMS traditional template content (cloud piece SMS template): content_en_tw

2. Added the function of the email template function, as shown in Figure 2;

新增邮件模板功能的实现

Implementation of the function of adding email templates

3. Mail template data, as shown in Figure 3, 4, 5:
(1) Medical management pass mobile phone registration: 96255 (Hydratone communication) 93122 (APP)
[Namanage] You are registering a medical management account, the verification code {1}, please submit the verification code according to the page prompt within {2} minutes. Note: Cloud Communication SMS Template
[Namanty] You are registering a medical management account, the verification code #code#, please submit the verification code according to the page prompt within #minute# minutes. Note: Cloud piece SMS template

【{$site_name}】You are registering a medical account number, the verification code {$verify_code}, please submit the verification code according to the page prompt within {$minute} minutes. Note: The content of the template in the database
【{$site_name}】You are registering a medical account number, the verification code {$verify_code}, please submit the verification code according to the page prompt within {$minute} minutes. Note: The content of SMS traditional template in the database (cloud piece SMS template)

图3:96255(医管通),云通讯短信模板

Figure 3: 96255 (Hydthene), cloud communication SMS template

图4:(医管通),云片短信模板

Figure 4: (Hydthene), cloud piece SMS template

4. Platform – Settings – Region Settings, Editing Region, Editable International Regional Code Prefix (Area: Area Table Add Fields International Area Code Prefix: Area_Mobile), as shown in Figure 5:

Mainland China +86 0
Taiwan +886 32

Ali Cloud
ALTER TABLE `TRADE_AREA` add column `area_mobile` VARCHAR(5) Character set UTF8 COLLATE UTF8_GENERAL_CI NOT NULL commentInternational area code prefixafter `area_region`;

编辑地区,可编辑国际地区号码前缀(area:地区表增加字段国际地区号码前缀:area_mobile)

Editing area, editable international area code prefix (area: area table add field international area code prefix: area_mobile)

5. Trade.service.ygt.cm

http://trade.service.ygt.cm/area/get-area-mobile

http://trade.service.ygt.cm/area/get-area-mobile?area_id=32

6. Implement editable user mobile and area_id in ucenter, as shown in Figure 6:
(1) Add the international regional ID field in the user table: area_id, mobile and area_id are combined together with uniqueness
alter table `kcuc_members` add `area_id` int(11) unsigned not null default0commentCountry code IDafter `mobile`;
(2)http://kcuc.ygt.cm/Pass background, add and edit user mobile, support the selection of international region name and number prefix list
User Management – Add Users, Edit Users
(3) User management is arranged in reverse order based on user ID
(4) User management – search for users, support the selection of national area codes

图6:国际化暂时只支持中国大陆与台湾

Figure 6: Internationalization only supports mainland China and Taiwan for the time being

7. The user interface in the client of UCenter can display and edit the user’s mobile and area_id, as shown in Figure 7:
(1) Check the mobile address (UC_USER_CheckMobile)
(2) User registration (UC_USER_REGISTER), the mobile phone supports the selection of national area codes
(3) Get user data (UC_GET_USER)
(4) Update user information Based on user ID (UC_USER_UIDEdit), the mobile phone supports the selection of national area codes
(5) The API interface updates user information, and the mobile phone supports the national area code
(6) Business system – background – platform – member – member management – member management, new and edit members
alter table `trade_member` add `member_area_mobile` int(11) unsigned not null default0commentCountry code IDafter `member_email_bind`;
(7) Business system – background – mall – member – member management – new and edit members

图7:UCenter的客户端中用户接口实现可显示、编辑用户mobile与area_id

Figure 7: The user interface in the client of UCenter can display and edit the user’s mobile and area_id

8. Mobile phone registration, the mobile phone supports the selection of national area codes
(1) Add the international regional ID field in the mobile phone SMS record table: log_area_mobile, log_area_mobile and log_phone are unique, as shown in Figure 8:
alter table `trade_sms_log` add `log_area_mobile` int(11) unsigned not null default0commentCountry code IDafter `log_id`;

图8:手机短信记录表中增加国际地区ID字段

Figure 8: Add international region ID fields to the mobile phone SMS record table

(2) Send SMS to support mainland China and Taiwan (based on cloud communication and cloud slices), as shown in Figure 9, 10, and 11:

图9:实现了云片的命令空间及自动加载,以及调用服务层:获取国家区号列表

Figure 9: Realize the command space and automatic loading of cloud slices, and call the service layer: get the national area code list

图10:短信发送服务商的选择

Figure 10: Selection of SMS sending service provider

图11:发送模板短信,容联云;发送单条短信,云片(智能匹配)

Figure 11: Send template SMS, Ronglian Cloud; send a single SMS, cloud piece (smart matching)

(3) Realization of mobile phone registration, support internationalization

图12:ajax校验:是否为海外手机

Figure 12: AJAX verification: whether it is an overseas mobile phone

图13:ajax校验:是否为台湾手机

Figure 13: Ajax verification: whether it is a Taiwanese mobile phone

图14:ajax校验:手机是否已经被注册

Figure 14: Ajax verification: whether the phone has been registered

图15:容联云短信

Figure 15: Ronglian Cloud SMS

图16:云片发送至台湾手机号码的短信,繁体

Figure 16: SMS sent to Taiwan mobile phone number, traditional Chinese

9. The member list in the background of the shopnc, as shown in Figure 17:

图17:ShopNC后台的会员列表

Figure 17: Member list of shopnc background

]]>
https://www.shuijingwanwq.com/en/2016/07/09/16244/feed/ 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
Config $config in shopnc[‘wap_site_url’]=http://mall.m.ygt.cm;, resulting in the cross-domain implementation of AJAX requests (GET, POST), and the process of implementing cookies in the request header https://www.shuijingwanwq.com/en/2015/12/16/16291/ https://www.shuijingwanwq.com/en/2015/12/16/16291/#respond Wed, 16 Dec 2015 09:22:45 +0000 https://www.shuijingwanwq.com/?p=16291 浏览量: 0

1. The request code of $.getjson is shown in Figure 1.0

$.getJSON的请求代码如图1.0

The request code of $.getJSON is shown in Figure 1.0

2. Check the network and find that in the response cookie, a new phpssssid is generated, as shown in Figure 1.1

查看网络,发现响应Cookie中,生成了新的PHPSESSID,如图1.1

Check the network and find that in the response cookie, a new phpssssid is generated, as shown in Figure 1.1

3. Add to the request address of $.getjson: &callback=?, which is equivalent to setting the request format to jsonp, as shown in Figure 1.2

在$.getJSON的请求地址中添加:&callback=?,相当于设置请求格式为jsonp,如图1.2

Add to the request address of $.getJSON: &callback=?, which is equivalent to setting the request format to jsonp, as shown in Figure 1.2

4. Check the network and find that the request cookie has been consistent with the current URL, as shown in Figure 1.3

查看网络,发现请求Cookie中已经与当前网址保持一致,如图1.3

Check the network and find that the request cookie has been consistent with the current URL, as shown in Figure 1.3

5. The post request under $.ajax, the code is as shown in Figure 2.0

$.ajax下的post请求,代码如图2.0

The POST request under $.ajax, the code is shown in Figure 2.0

6. Check the network and find that in the response cookie, a new phpssssid is generated, as shown in Figure 2.1

查看网络,发现响应Cookie中,生成了新的PHPSESSID,如图2.1

Check the network and find that in the response cookie, a new phpssssid is generated, as shown in Figure 2.1

7. js code implementation: datatype:jsonp,CrossDomain: true, as shown in Figure 2.2

js代码实现:dataType:'jsonp',crossDomain: true,如图2.2

JS code implementation: dataType:jsonp,CrossDomain: true, as shown in Figure 2.2

8. Check the network and find that the request cookie has been consistent with the current URL, but the POST request has been converted into a GET request, as shown in Figure 2.3

查看网络,发现请求Cookie中已经与当前网址保持一致,但是post请求已经转换为get请求,如图2.3

Looking at the network, it is found that the request cookie has been consistent with the current URL, but the POST request has been converted into a GET request, as shown in Figure 2.3

9. js code implementation: datatype:json,xhrfields:{withcredentials:true},crossDomain: true, as shown in Figure 2.4

js代码实现:dataType:'json',xhrFields:{withCredentials:true},crossDomain: true,如图2.4

JS code implementation: dataType:json,xhrfields:{withcredentials:true},crossDomain: true, as shown in Figure 2.4

10. PHP code implementation:
header(“access-control-allow-credentials: true”);
header(“access-control-allow-origin: ” . c(wap_site_url) . “”);

where c(wap_site_url) is the value of:http://mall.m.ygt.cm, as shown in Figure 2.5

php代码实现:     header("Access-Control-Allow-Credentials: true");     header("Access-Control-Allow-Origin: " . C('wap_site_url') . "");  其中C('wap_site_url')的值为:http://mall.m.ygt.cm ,如图2.5

PHP code implementation:
header(“access-control-allow-credentials: true”);
header(“access-control-allow-origin: ” . c(wap_site_url) . “”);
where c(wap_site_url) is the value of:http://mall.m.ygt.cm, as shown in Figure 2.5

11. Check the network and find that the request cookie has been consistent with the current URL, as shown in Figure 2.6

查看网络,发现请求Cookie中已经与当前网址保持一致,如图2.6

Check the network and find that the request cookie has been consistent with the current URL, as shown in Figure 2.6

12. The code implementation of document.cookie in js: domain=.ygt.cm; as shown in Figure 2.7

js中document.cookie的代码实现:domain=.ygt.cm; 如图2.7

The code implementation of document.cookie in js: domain=.ygt.cm; as shown in Figure 2.7

13. The POST request under $.ajax, the code is as shown in Figure 3.0, and the format is jsonp; in fact, you can also use a processing scheme consistent with the post request under $.ajax, use the format json, and then set xhrfields

]]>
https://www.shuijingwanwq.com/en/2015/12/16/16291/feed/ 0