Ver Fonte

有小程序新版本提示更新

shish há 5 anos atrás
pai
commit
c20ca2c6da

+ 3 - 1
app-ghs/controllers/AuthController.php

@@ -183,7 +183,7 @@ class AuthController extends PublicController
 
             if (getenv('YII_ENV') == 'production') {
                 $code = '1988';
-            }else{
+            } else {
                 $code = '1964';
             }
 
@@ -257,6 +257,8 @@ class AuthController extends PublicController
             'switchShop' => $switchShop,
             'openShop' => $openShop,
             'showDemo' => $showDemo,
+            //有小程序新版本提示更新
+            'update' => 1,
         ]);
     }
 

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

@@ -250,7 +250,9 @@ class AuthController extends PublicController
             'shopId' => $shopId,
             'shopAdminId' => $shopAdminId,
             'switchShop' => $switchShop,
-            'showDemo' => $showDemo
+            'showDemo' => $showDemo,
+            //有小程序新版本提示更新
+            'update' => 1,
         ]);
     }
 

+ 2 - 2
app-mall/controllers/AuthController.php

@@ -162,11 +162,11 @@ class AuthController extends PublicController
         Yii::$app->redis->executeCommand('SET', [$cacheKey, $sessionKey]);
         $userId = $user['id'];
         $token = jwt::getNewToken($userId);
-        //update = 1 表示要求启动时更新(如果需要马上应用最新版本,可以使用 wx.getUpdateManager API 进行处理。)
         util::success([
             'token' => $token,
             'user' => $user,
-            'update' => 0
+            //有小程序新版本提示更新
+            'update' => 1,
         ]);
     }