2
0

2 Säilykkeet 0fce64807b ... 7f19f9802b

Tekijä SHA1 Viesti Päivämäärä
  skyline 7f19f9802b fix: admin-web和admin-mp无法同时登录 — max-login-count 1→5 1 päivä sitten
  skyline b811d0aaf9 fix: 购物进行中页面退出小程序再进入后倒计时停止的问题 1 päivä sitten

+ 2 - 2
haha-admin/src/main/resources/application.yml

@@ -77,8 +77,8 @@ sa-token:
   active-timeout: -1
   # 是否允许同一账号多地同时登录
   is-concurrent: true
-  # 同一账号最大登录数量
-  max-login-count: 1
+  # 同一账号最大登录数量(允许多端同时登录:web + 小程序管理端)
+  max-login-count: 5
   # token 风格
   token-style: uuid
   # 是否输出操作日志

+ 13 - 2
haha-mp/src/pages/shopping/shopping.vue

@@ -187,10 +187,21 @@ onUnmounted(() => {
   cleanupTimers();
 });
 
-// 页面显示时重新激活轮询
+// 页面显示时重新激活轮询和倒计时
 onShow(() => {
-  if (doorStatus.value === 'opened' || doorStatus.value === 'closing') {
+  if (doorStatus.value === 'opened') {
     isComponentActive = true;
+    // 重启选购倒计时(从当前剩余秒数继续)
+    if (!countdownTimer) {
+      startCountdown();
+    }
+    startStatusPolling();
+  } else if (doorStatus.value === 'closing') {
+    isComponentActive = true;
+    // 重启返回首页倒计时(从当前剩余秒数继续)
+    if (!returnCountdownTimer) {
+      startReturnCountdown();
+    }
     startStatusPolling();
   }
 });