shish 2 gadi atpakaļ
vecāks
revīzija
d2f3fa58a5

+ 5 - 1
app-ghs/controllers/ApplyController.php

@@ -34,7 +34,11 @@ class ApplyController extends BaseController
         }
         $rand = rand(11111, 99999);
         $minute = 10;
-        sms::send($mobile . ',' . $rand . ',' . $minute, '注册验证码:{$var},{$var}分钟内有效');
+        if (getenv('YII_ENV') == 'production') {
+            sms::send($mobile . ',' . $rand . ',' . $minute, '注册验证码:{$var},{$var}分钟内有效');
+        } else {
+            noticeUtil::push("注册验证码:{$rand}", '15280215347');
+        }
         $ptStyle = Yii::$app->params['ptStyle'];
         $cacheKey = 'register_mobile_code_' . $ptStyle . '_' . $mobile;
         Yii::$app->redis->executeCommand('SETEX', [$cacheKey, 600, $rand]);

+ 3 - 1
app-pt/controllers/ApplyController.php

@@ -55,7 +55,9 @@ class ApplyController extends BaseController
             if ($status == 1) {
                 $mobile = $apply['mobile'] ?? '';
                 $cf = '15280215347';
-                sms::freeSend($mobile . ',' . $cf, '恭喜,开店申请审核通过了,登录后请及时修改密码,如有疑问请联系 {$var}');
+                if (getenv('YII_ENV') == 'production') {
+                    sms::freeSend($mobile . ',' . $cf, '恭喜,开店申请审核通过了,登录后请及时修改密码,如有疑问请联系 {$var}');
+                }
             }
         } catch (\Exception $exception) {
             $transaction->rollBack();