ソースを参照

登录流程优化

shish 4 年 前
コミット
30469e6ce6

+ 4 - 4
app-ghs/controllers/AuthController.php

@@ -38,14 +38,14 @@ class AuthController extends PublicController
         $appId = $merchant['miniAppId'];
         $miniOpenId = $post['miniOpenId'] ?? '';
         if (empty($miniOpenId)) {
-            util::success(['hasNoOpenId' => 1], '登录失败');
+            util::success(['hasNoOpenId' => 1], '登录失败,没有miniOpenId');
         }
         $cacheKey = 'GHS_SHOP_MINI_SESSION_KEY_' . $miniOpenId;
         $sessionKey = Yii::$app->redis->executeCommand('GET', [$cacheKey]);
         if (empty($sessionKey)) {
             Yii::$app->redis->executeCommand('DEL', [$cacheKey]);
             noticeUtil::push($cacheKey . " 登录失败!!sessionKey空的", '15280215347');
-            util::success(['hasNoOpenId' => 1], '登录失败');
+            util::success(['hasNoOpenId' => 1], '登录失败');
         }
         $wxMiniSecret = Yii::getAlias("@vendor/weixinMiniSecret");
         require_once($wxMiniSecret . '/wxBizDataCrypt.php');
@@ -54,14 +54,14 @@ class AuthController extends PublicController
         if ($errCode != 0) {
             Yii::$app->redis->executeCommand('DEL', [$cacheKey]);
             noticeUtil::push($cacheKey . "批发商 登录失败!!!!sessionKey异常", '15280215347');
-            util::success(['hasNoOpenId' => 1], '登录失败');
+            util::success(['hasNoOpenId' => 1], '登录失败');
         }
         $arr = Json::decode($result);
         $phoneNumber = isset($arr['purePhoneNumber']) ? $arr['purePhoneNumber'] : '';
         if (empty($phoneNumber)) {
             Yii::$app->redis->executeCommand('DEL', [$cacheKey]);
             noticeUtil::push($cacheKey . "批发商 登录失败了!获取手机号失败", '15280215347');
-            util::success(['hasNoOpenId' => 1], '登录失败');
+            util::success(['hasNoOpenId' => 1], '登录失败了哦');
         }
         $admin = AdminClass::getByCondition(['mobile' => $phoneNumber]);
         if (empty($admin)) {

+ 1 - 1
app-hd/controllers/AuthController.php

@@ -40,7 +40,7 @@ class AuthController extends PublicController
         $appId = $merchant['miniAppId'];
         $miniOpenId = $post['miniOpenId'] ?? '';
         if (empty($miniOpenId)) {
-            util::success(['hasNoOpenId' => 1], '登录失败');
+            util::success(['hasNoOpenId' => 1], '登录失败,没有miniOpenId');
         }
         $cacheKey = 'SHOP_MINI_SESSION_KEY_' . $miniOpenId;
         $sessionKey = Yii::$app->redis->executeCommand('GET', [$cacheKey]);