diff --git a/src/App.vue b/src/App.vue index 4a59546..5ff28ef 100644 --- a/src/App.vue +++ b/src/App.vue @@ -37,7 +37,8 @@ if (window.localStorage.getItem("settings")) { // 如果没有,使用默认值并且保存 settings.value = { waveData: waveData, - strengthData: strengthData + strengthData: strengthData, + guardLevel: 0 }; window.localStorage.setItem('settings', JSON.stringify(settings.value)); } @@ -268,7 +269,15 @@ const addRelationAndSave = () => {
+
+

大航海

+

+ 大航海等级达到 + + 才可互动 +

+

强度规则

礼物规则 ?

@@ -298,8 +307,6 @@ const addRelationAndSave = () => { B
- -

波形规则

@@ -352,6 +359,8 @@ const addRelationAndSave = () => {

游戏玩法

+

大航海

+

等级达到 才可互动

强度控制

赠送 diff --git a/src/socket/index.ts b/src/socket/index.ts index 1d27bcc..4ff0f17 100644 --- a/src/socket/index.ts +++ b/src/socket/index.ts @@ -10,11 +10,13 @@ const notyf = new Notyf({ duration: 4000 }) interface SettingsType { strengthData: typeof strengthData; waveData: typeof waveData; + guardLevel: number; } let settings: Ref = ref({ waveData: waveData, - strengthData: strengthData + strengthData: strengthData, + guardLevel: 0 }); if (window.localStorage.getItem("settings")) { @@ -24,7 +26,8 @@ if (window.localStorage.getItem("settings")) { // 如果没有,使用默认值 settings.value = { waveData: waveData, - strengthData: strengthData + strengthData: strengthData, + guardLevel: 0 }; } @@ -54,7 +57,7 @@ function createSocket(authBody: string, wssLinks: string[]) { settings = window.localStorage.getItem("settings") ? ref(JSON.parse(window.localStorage.getItem("settings") || '{}')) : null - if (res.cmd == "LIVE_OPEN_PLATFORM_SEND_GIFT") { + if (res.cmd == "LIVE_OPEN_PLATFORM_SEND_GIFT" && res.data.guard_level > settings.value.guardLevel) { if (settings && res.data.gift_id.toString() === settings.value.strengthData[0]) { // 牛哇牛哇:加强度1 try {