SMS/MMS Development Kit – Eternal Night https://www.shuijingwanwq.com There is no problem not worth solving, and no technology not worth learning! Sun, 07 Jun 2026 14:04:54 +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 Piece in Yii2.0.9 https://www.shuijingwanwq.com/en/2016/07/28/16225/ https://www.shuijingwanwq.com/en/2016/07/28/16225/#respond Thu, 28 Jul 2016 01:37:38 +0000 https://www.shuijingwanwq.com/?p=16225 浏览量: 3

1. You need to refer to the previous website:https://www.shuijingwanwq.com/2016/07/09/1129/;

2. To obtain the implementation of the mobile phone registration verification code, it needs to only support the client version of mainland China before it is compatible. Therefore, the national area code ID is allowed to be empty, and the default value is 0, as shown in Figure 1:

获取手机注册验证码的实现,需要兼容之前只支持中国大陆的客户端版本,因此国家区号ID允许为空,默认值为0

Figure 1

3, the national area code ID is allowed to be empty, the default value is 0, as shown in Figure 2:

国家区号ID允许为空,默认值为0的验证规则

Figure 2

4. Keep the verification code in the cache for 1800 seconds, and its variable name is the splicing of the national area code ID and the mobile phone to maintain uniqueness, as shown in Figure 3:

将验证码在缓存中保留 1800 秒,其变量名为国家区号ID与手机的拼接,以保持唯一性

Figure 3

5. The processing logic of sending template SMS is basically the same as the previous URL. If the sending is successful, the number of sendings within today is calculated and stored in the cache, so as to limit the number of sending times for a day, as shown in Figure 4:

发送模板短信的处理逻辑与上一网址基本一致,发送成功,则计算今日内的发送次数以及将其存储于缓存中,以便限制一天的发送次数

Figure 4

6. The verification of the number of times the template text message is sent within a day is limited to 5 messages per day, as shown in Figure 5 and 6:

模板短信一天内发送次数的验证,限制一天数量为5条

Figure 5

模板短信一天内发送次数的验证,限制一天数量为5条

Figure 6

7. Based on the support of sending SMS from cloud slices, copy the yunpian of the previous website to \vendor\yunpian, as shown in Figure 7:

基于云片发送短信的支持,复制上一网址的Yunpian至\vendor\yunpian

Figure 7

8. Edit\Common\Config\Main.php to define an alias, as shown in Figure 8:
aliass=>[
@yunpian=>@vendor/yunpian,
]#ATFP_CLOSE_Translate_span#,

编辑\common\config\main.php,定义别名

8

9. Edit\Common\Config\params.php, configure the cloud chip SMS interface, as shown in Figure 9:

编辑\common\config\params.php,云片短信接口配置

Figure 9

10. Search $globals in \vendor\yunpian[‘setting_config’][‘yunpian’], replace it with: yii::$app->params[‘yunpian’], as shown in Figure 10:

在\vendor\yunpian中搜索$GLOBALS['setting_config']['yunpian'],将其替换为:Yii::$app->params['yunpian']

Figure 10

11. Based on the support of cloud chip sending SMS, copy the sms.php of the previous URL to \common\components\sms.php, in which is the corresponding class library that can refer to the cloud slice, as shown in Figure 11:

基于云片发送短信的支持,复制上一网址的sms.php至\common\components\Sms.php,在其中便是可以引用云片的相应类库了

Figure 11

12. The international SMS test is successful, as shown in Figure 12:

发送国际短信测试成功

Figure 12

 

]]>
https://www.shuijingwanwq.com/en/2016/07/28/16225/feed/ 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