From e91298077be3b8c24d41ee01ab6a372817392ccc Mon Sep 17 00:00:00 2001 From: jerryzwu Date: Mon, 14 Dec 2020 13:11:55 +0800 Subject: [PATCH] support windows --- README.md | 10 ++++++---- tencentcloud-sms/TencentWordpressSMSActions.php | 4 ++-- tencentcloud-sms/TencentWordpressSMSSettingPage.php | 2 +- .../common/TencentWordpressPluginsSettingActions.php | 2 +- tencentcloud-sms/common/common.json | 2 +- tencentcloud-sms/readme.txt | 11 ++++++++++- tencentcloud-sms/tencentcloud-sms.php | 6 +++--- 7 files changed, 24 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index 0f11f08..8b1b757 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ | ---------- | ------------------------------------------------------------ | | 中文名称 | 腾讯云短信(SMS)插件 | | 英文名称 | tencentcloud-sms | -| 最新版本 | v1.0.0 (2020.06.22) | +| 最新版本 | v1.0.2 (2020.12.11) | | 适用平台 | [WordPress](https://wordpress.org/) | | 适用产品 | [腾讯云短信(SMS)](https://cloud.tencent.com/product/sms) | | 文档中心 | [春雨文档中心](https://openapp.qq.com/docs/Wordpress/sms.html) | @@ -75,18 +75,20 @@ | GitHub | [link](https://github.com/Tencent-Cloud-Plugins/tencentcloud-wordpress-plugin-sms) | | WordPress插件中心 | [link](https://wordpress.org/plugins/tencentcloud-sms) | - ## 6.FAQ > 暂无 ## 7.GitHub版本迭代记录 -### 7.2 tencentcloud-wordpress-plugin-sms v1.0.1 +### 2020.12.11 tencentcloud-wordpress-plugin-ims v1.0.2 +- 支持在windows环境下运行 + +### 2020.7.22 tencentcloud-wordpress-plugin-sms v1.0.1 - 验证码过期时间错误判断Bug修复 - windows环境下样式加载问题 -### 7.1 tencentcloud-wordpress-plugin-sms v1.0.0 +### 2020.6.22 tencentcloud-wordpress-plugin-sms v1.0.0 - 支持在个人资料页绑定手机号 - 支持登录页面进行绑定手机号 - 支持在评论时对用户手机号进行验证 diff --git a/tencentcloud-sms/TencentWordpressSMSActions.php b/tencentcloud-sms/TencentWordpressSMSActions.php index b55054c..547bdc2 100644 --- a/tencentcloud-sms/TencentWordpressSMSActions.php +++ b/tencentcloud-sms/TencentWordpressSMSActions.php @@ -694,7 +694,7 @@ class TencentWordpressSMSActions } $response = self::sendSMS(array($phone), $SMSOptions, $templateParams); - if ( $response['SendStatusSet'][0]['Fee'] !== 1 || $response['SendStatusSet'][0]['Code'] !== 'Ok' ) { + if ( !in_array($response['SendStatusSet'][0]['Fee'], [1, 2]) || $response['SendStatusSet'][0]['Code'] !== 'Ok' ) { $errorCode = $response['errorCode'] ?: $response['SendStatusSet'][0]['Code']; $msg = self::$errorCodeDesc[$errorCode]; wp_send_json_error(array('msg' => '发送失败:' . $msg)); @@ -763,7 +763,7 @@ class TencentWordpressSMSActions } $response = self::sendSMS(array($phone), $SMSOptions, $templateParams); $status = self::STATUS_SUCCESS; - if ( $response['SendStatusSet'][0]['Fee'] !== 1 || $response['SendStatusSet'][0]['Code'] !== 'Ok' ) { + if ( !in_array($response['SendStatusSet'][0]['Fee'], [1, 2]) || $response['SendStatusSet'][0]['Code'] !== 'Ok' ) { $status = self::STATUS_FAIL; } //记录发送结果 diff --git a/tencentcloud-sms/TencentWordpressSMSSettingPage.php b/tencentcloud-sms/TencentWordpressSMSSettingPage.php index 8be6e6d..d46e6a1 100644 --- a/tencentcloud-sms/TencentWordpressSMSSettingPage.php +++ b/tencentcloud-sms/TencentWordpressSMSSettingPage.php @@ -244,7 +244,7 @@ function TencentWordpressSMSSettingPage()
文档中心 | GitHub | 意见反馈 + href="https://da.do/y0rp" target="_blank">意见反馈