This commit is contained in:
张成
2025-12-22 16:26:59 +08:00
parent aa2d03ee30
commit e17d5610f5
54 changed files with 11735 additions and 3 deletions

View File

@@ -0,0 +1,42 @@
/**
* 二维码状态管理
*/
export default {
namespaced: true,
state: {
qrCodeUrl: null,
qrCodeOosUrl: null,
qrCodeCountdown: 0,
qrCodeCountdownActive: false,
qrCodeRefreshCount: 0,
qrCodeExpired: false
},
mutations: {
SET_QR_CODE_URL(state, { url, oosUrl }) {
state.qrCodeUrl = url;
state.qrCodeOosUrl = oosUrl || null;
},
SET_QR_CODE_COUNTDOWN(state, { countdown, isActive, refreshCount, isExpired }) {
state.qrCodeCountdown = countdown || 0;
state.qrCodeCountdownActive = isActive || false;
state.qrCodeRefreshCount = refreshCount || 0;
state.qrCodeExpired = isExpired || false;
},
CLEAR_QR_CODE(state) {
state.qrCodeUrl = null;
state.qrCodeOosUrl = null;
}
},
actions: {
setQrCode({ commit }, { url, oosUrl }) {
commit('SET_QR_CODE_URL', { url, oosUrl });
},
setQrCodeCountdown({ commit }, data) {
commit('SET_QR_CODE_COUNTDOWN', data);
},
clearQrCode({ commit }) {
commit('CLEAR_QR_CODE');
}
}
};