From 6bcfb9e4dff0491bc8933a4df4cb0e6dbe20b79d Mon Sep 17 00:00:00 2001 From: gongfuxiang Date: Wed, 20 Jul 2022 17:29:05 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E6=AD=A3=E5=88=99=E3=80=81?= =?UTF-8?q?=E4=B8=8B=E5=8D=95=E7=BB=86=E8=8A=82=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/common.php | 14 ++++++++++++++ app/service/BuyService.php | 2 +- app/service/ConstService.php | 3 +++ extend/base/Email.php | 10 +++++++++- 4 files changed, 27 insertions(+), 2 deletions(-) diff --git a/app/common.php b/app/common.php index a2025a7fd..d02b30b4c 100755 --- a/app/common.php +++ b/app/common.php @@ -2409,6 +2409,20 @@ function CheckLoginPwd($string) return (preg_match('/'.MyConst('common_regex_pwd').'/', $string) == 1) ? true : false; } +/** + * [CheckAlphaNumber 包含字母和数字] + * @author Devil + * @blog http://gong.gg/ + * @version 0.0.1 + * @datetime 2016-12-03T21:58:54+0800 + * @param [string] $string [登录密码] + * @return [boolean] [正确true, 错误false] + */ +function CheckAlphaNumber($string) +{ + return (preg_match('/'.MyConst('common_regex_alpha_number').'/', $string) == 1) ? true : false; +} + /** * [IsExistRemoteImage 检测一张网络图片是否存在] * @author Devil diff --git a/app/service/BuyService.php b/app/service/BuyService.php index ad5242f0a..b506db2a0 100755 --- a/app/service/BuyService.php +++ b/app/service/BuyService.php @@ -1126,7 +1126,7 @@ class BuyService // 线下支付订单是否直接成功 // 是否开启线下订单正常进入流程 - if($is_under_line == 1 && MyC('common_is_under_line_order_normal') == 1) + if($common_order_is_booking != 1 && $is_under_line == 1 && MyC('common_is_under_line_order_normal') == 1) { $order_status = 2; } diff --git a/app/service/ConstService.php b/app/service/ConstService.php index a5d54e2c0..613f4ee18 100644 --- a/app/service/ConstService.php +++ b/app/service/ConstService.php @@ -399,6 +399,9 @@ class ConstService // 用户名 'common_regex_pwd' => '^.{6,18}$', + // 包含字母和数字、6~16个字符 + 'common_regex_alpha_number' => '^(?![0-9]+$)(?![a-zA-Z]+$)[0-9A-Za-z]{6,16}$', + // 手机号码 'common_regex_mobile' => '^1((3|4|5|6|7|8|9){1}\d{1})\d{8}$', diff --git a/extend/base/Email.php b/extend/base/Email.php index 4121a2f10..48e1d6a5b 100755 --- a/extend/base/Email.php +++ b/extend/base/Email.php @@ -146,7 +146,15 @@ class Email $this->EmailInit(); // 收件人地址,可以替换成任何想要接收邮件的email信箱,格式("收件人email","收件人姓名") - $this->obj->AddAddress($params['email'], isset($params['username']) ? $params['username'] : $params['email']); + if(!is_array($params['email'])) + { + $params['email'] = explode(',', $params['email']); + } + foreach($params['email'] as $email) + { + $username = isset($params['username']) ? $params['username'] : $email; + $this->obj->AddAddress($email, $username); + } // 邮件标题 $this->obj->Subject = $params['title'];