From 82eedc3ab859a82e2d1cf185f942ca57964f45f9 Mon Sep 17 00:00:00 2001 From: zhangyibo95 <690096405@qq.com> Date: Thu, 9 Jul 2026 17:53:29 +0800 Subject: [PATCH] =?UTF-8?q?update:=E5=88=86=E5=8C=85=E3=80=81=E5=AF=B9?= =?UTF-8?q?=E6=8E=A5=E4=B8=AA=E4=BA=BA=E7=BB=83=E4=B9=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- project.config.json | 235 ++++++++++++++++- src/apis.js | 14 +- src/components/AppFooter.vue | 6 +- src/components/BackToGame.vue | 4 +- src/components/BattleFooter.vue | 4 +- src/components/BattleHeader.vue | 2 +- src/components/BowShotEffect.vue | 4 +- src/components/BowTarget.vue | 2 +- src/components/CreateRoom.vue | 2 +- src/components/Guide.vue | 4 +- src/components/Matching.vue | 2 +- src/components/ModalDialog.vue | 6 +- src/components/PlayerSeats.vue | 2 +- src/components/PointRecord.vue | 2 +- src/components/RewardUs.vue | 2 +- src/components/ScorePanel.vue | 4 +- src/components/ScoreResult.vue | 2 +- src/components/ScreenHint.vue | 8 +- src/components/ScreenHint2.vue | 2 +- src/components/ShootProgress.vue | 2 +- src/components/TestDistance.vue | 2 +- src/components/UserUpgrade.vue | 10 +- src/manifest.json | 236 ++++++++++++++++++ src/matchWebsocket.js | 31 ++- src/pages.json | 65 +++-- src/pages/battle-result.vue | 12 +- src/pages/battle-room.vue | 6 +- src/pages/first-try.vue | 66 +++-- src/pages/friend-battle-result.vue | 6 +- src/pages/friend-battle.vue | 4 +- src/pages/index.vue | 10 +- src/pages/melee-bow-data.vue | 2 +- src/pages/my-device.vue | 8 +- src/pages/point-book-rank.vue | 2 +- src/pages/point-book.vue | 4 +- src/pages/practise-one.vue | 72 +++--- src/pages/practise-two.vue | 64 +++-- src/pages/ranking.vue | 4 +- .../team-battle/components/BackToGame.vue | 4 +- .../team-battle/components/BattleFooter.vue | 4 +- .../team-battle/components/BattleHeader.vue | 2 +- .../team-battle/components/BowTarget.vue | 2 +- src/pages/team-battle/components/Guide.vue | 4 +- .../team-battle/components/ScreenHint.vue | 8 +- .../team-battle/components/TestDistance.vue | 2 +- src/pages/user.vue | 2 +- src/utils/protobufUtf8Compat.js | 131 ++++++++++ src/websocket.js | 4 +- vite.config.js | 16 ++ 49 files changed, 911 insertions(+), 181 deletions(-) create mode 100644 src/utils/protobufUtf8Compat.js diff --git a/project.config.json b/project.config.json index f6d496c..0ffafb0 100644 --- a/project.config.json +++ b/project.config.json @@ -3,7 +3,240 @@ "compileType": "miniprogram", "libVersion": "3.7.7", "packOptions": { - "ignore": [], + "ignore": [ + { + "type": "file", + "value": "static/common/dialog-light.png" + }, + { + "type": "file", + "value": "static/common/dialog-bg.png" + }, + { + "type": "file", + "value": "static/common/dialog-icon.png" + }, + { + "type": "file", + "value": "static/prompt-bg-square.png" + }, + { + "type": "file", + "value": "static/coach-comment.png" + }, + { + "type": "file", + "value": "static/screen-hint-bg.png" + }, + { + "type": "file", + "value": "static/red-team-win.png" + }, + { + "type": "file", + "value": "static/blue-team-win.png" + }, + { + "type": "file", + "value": "static/my-grow.png" + }, + { + "type": "file", + "value": "static/gold-shining.png" + }, + { + "type": "file", + "value": "static/bow-target.png" + }, + { + "type": "file", + "value": "static/matching-bg.png" + }, + { + "type": "file", + "value": "static/versus.png" + }, + { + "type": "file", + "value": "static/point-champion.png" + }, + { + "type": "file", + "value": "static/my-practise.png" + }, + { + "type": "file", + "value": "static/shining-bg.png" + }, + { + "type": "file", + "value": "static/donate.png" + }, + { + "type": "file", + "value": "static/friend-battle.png" + }, + { + "type": "file", + "value": "static/user-upgrade.png" + }, + { + "type": "file", + "value": "static/finish-frame.png" + }, + { + "type": "file", + "value": "static/vip/svip-jian.png" + }, + { + "type": "file", + "value": "static/battle-header.png" + }, + { + "type": "file", + "value": "static/battle-header-melee.png" + }, + { + "type": "file", + "value": "static/player-bg.png" + }, + { + "type": "file", + "value": "static/mvp-blue.png" + }, + { + "type": "file", + "value": "static/finish-tip.png" + }, + { + "type": "file", + "value": "static/2unfinish-tip.png" + }, + { + "type": "file", + "value": "static/have-no-device.png" + }, + { + "type": "file", + "value": "static/device-icon.png" + }, + { + "type": "file", + "value": "static/unfinish-tip.png" + }, + { + "type": "file", + "value": "static/test-tip.png" + }, + { + "type": "file", + "value": "static/mvp-red.png" + }, + { + "type": "file", + "value": "static/vip/svip-lie.png" + }, + { + "type": "file", + "value": "static/mvp-tip.png" + }, + { + "type": "file", + "value": "static/rank/battle-choose.png" + }, + { + "type": "file", + "value": "static/back-to-game-bg.png" + }, + { + "type": "file", + "value": "static/complete-light1.png" + }, + { + "type": "file", + "value": "static/complete-light2.png" + }, + { + "type": "file", + "value": "static/title-2v2.png" + }, + { + "type": "file", + "value": "static/tab-bg.png" + }, + { + "type": "file", + "value": "static/scan.png" + }, + { + "type": "file", + "value": "static/choose-battle-mode.png" + }, + { + "type": "file", + "value": "static/shooter.png" + }, + { + "type": "file", + "value": "static/my-growth.png" + }, + { + "type": "file", + "value": "static/juezhanbang.png" + }, + { + "type": "file", + "value": "static/title-3v3.png" + }, + { + "type": "file", + "value": "static/point-book-tip-bg.png" + }, + { + "type": "file", + "value": "static/reward-us.png" + }, + { + "type": "file", + "value": "static/rank/star.png" + }, + { + "type": "file", + "value": "static/tab-point-book.png" + }, + { + "type": "file", + "value": "static/pk-icon.png" + }, + { + "type": "file", + "value": "static/first-try.png" + }, + { + "type": "file", + "value": "static/row-yellow-bg.png" + }, + { + "type": "file", + "value": "static/room-notfound-title.png" + }, + { + "type": "file", + "value": "static/title-mvp.png" + }, + { + "type": "file", + "value": "static/long-bubble-tall.png" + }, + { + "type": "file", + "value": "static/battle-result.png" + }, + { + "type": "file", + "value": "static/tab-mall.png" + } + ], "include": [] }, "setting": { diff --git a/src/apis.js b/src/apis.js index 867dacc..baeff6a 100644 --- a/src/apis.js +++ b/src/apis.js @@ -8,8 +8,8 @@ try { switch (envVersion) { case "develop": // 开发版 - // BASE_URL = "http://192.168.1.2:8000/api/shoot"; - BASE_URL = "https://apitest.shelingxingqiu.com/api/shoot"; + BASE_URL = "http://192.168.1.2:8000/api/shoot"; + // BASE_URL = "https://apitest.shelingxingqiu.com/api/shoot"; break; case "trial": // 体验版 BASE_URL = "https://apitest.shelingxingqiu.com/api/shoot"; @@ -26,6 +26,7 @@ try { } const ADDONS_BASE_URL = BASE_URL.replace(/\/api\/shoot$/, "/api/shoot"); +const PRACTICE_BASE_URL = BASE_URL.replace(/\/api\/shoot$/, "/api"); // 统一处理业务接口请求,包含登录态、业务错误和 WiFi 连接空响应兼容。 function request(method, url, data = {}, baseUrl = BASE_URL) { @@ -263,6 +264,15 @@ export const createPractiseAPI = (arrows, time, target) => { }); }; +export const createPractiseV2API = (arrows, time, target, deviceId) => { + return request("POST", "/practice/create-v2", { + shootNumber: arrows, + shootTime: time, + targetType: Number(target || 1) * 20, + deviceId, + }, PRACTICE_BASE_URL); +}; + export const startPractiseAPI = () => { return request("POST", "/user/practice/begin"); }; diff --git a/src/components/AppFooter.vue b/src/components/AppFooter.vue index bfe2831..f65b8fc 100644 --- a/src/components/AppFooter.vue +++ b/src/components/AppFooter.vue @@ -1,8 +1,8 @@