From 0c3e40c399a00fe6405f7b9a79eb1c93b7cc660e Mon Sep 17 00:00:00 2001
From: qingyiay <2386314947@qq.com>
Date: 星期二, 11 七月 2023 16:23:33 +0800
Subject: [PATCH] 更改字眼,增加非稳定态下不可称重,增加验质字段
---
store/index.js | 12 +++++++++---
1 files changed, 9 insertions(+), 3 deletions(-)
diff --git a/store/index.js b/store/index.js
index 4c8a99f..e9c61e3 100644
--- a/store/index.js
+++ b/store/index.js
@@ -105,7 +105,9 @@
globalIntervalId: null,
is_open_socket: false, //閬垮厤閲嶅杩炴帴
connectNum: 1, //閲嶈繛娆℃暟,
- reconnectTimeOut: null
+ reconnectTimeOut: null,
+ // 绉伴噸绋冲畾鎬� 0/绋冲畾 1/闈炵ǔ瀹� 闈炵ǔ瀹氭�佷笉鑳界偣绉伴噸
+ globalWarning: false
},
mutations: {
lengthchange(state, payload) {
@@ -169,12 +171,16 @@
},
// 鏀瑰彉閲嶈繛娆℃暟
changereconnectNum(state, payload) {
- if (state.connectNum < 6) {
+ if (state.connectNum <= 6) {
state.connectNum += payload
} else {
state.connectNum = payload
}
},
+ // 鏀瑰彉绋冲畾鎬�
+ changeWarning(state, payload) {
+ state.globalWarning = payload
+ }
},
actions: {
websocketInit({ state, dispatch, commit }) {
@@ -225,7 +231,7 @@
clearInterval(state.reconnectTimeOut)
state.socketTast = null
commit('changereconnectState', false)
- if (state.connectNum < 6 && state.globalisLogin) {
+ if (state.connectNum <= 6 && state.globalisLogin) {
uni.showToast({
title: `杩炴帴澶辫触锛屾鍦ㄥ皾璇曠${state.connectNum}娆¤繛鎺,
icon: 'none'
--
Gitblit v1.9.1