18 Commits
Author SHA1 Message Date
zhangyi 9699f1356f Merge branch 'feat-shebei' into test 2026-10-29 16:49:26 +08:00
zhangyi aa33a931b1 Merge branch 'feat-shebei' into test 2026-10-29 16:12:32 +08:00
zhangyi f044a95872 Merge branch 'feat-shebei' into test 2026-10-29 15:08:06 +08:00
zhangyi 318b952a9b Merge branch 'feat-training' into test 2026-10-23 14:50:28 +08:00
zhangyi 14437bb5a7 Merge branch 'feat-training' into test 2026-10-23 11:55:19 +08:00
zhangyi f16b486a89 update:优化打包 2026-10-21 16:02:34 +08:00
zhangyi 6c69e14630 Merge branch 'feat-mendian' into test 2026-10-21 15:50:01 +08:00
zhangyi 34118d59d3 Merge branch 'feat-mendian' into test 2026-10-21 15:38:46 +08:00
zhangyi b82474913a Merge branch 'feat-training' into test 2026-10-13 11:33:10 +08:00
zhangyi 9d9f005ca3 Merge branch 'feat-training' into test 2026-10-12 14:57:28 +08:00
zhangyi 605a0b2d91 Merge branch 'feat-shebei' into test 2026-10-08 14:35:34 +08:00
zhangyi c9bfa6792b Merge branch 'feat-shebei' into test 2026-09-24 17:10:53 +08:00
zhangyi b0ddf147aa Merge branch 'feat-shebei' into test 2026-09-24 15:16:37 +08:00
zhangyi 3caa53d4be Merge branch 'feat-training' into test 2026-09-24 10:23:55 +08:00
zhangyi f4f63954eb Merge branch 'feat-shebei' into test 2026-09-23 18:35:04 +08:00
zhangyi b89744802a Merge branch 'feat-shebei' into test 2026-09-23 15:37:10 +08:00
zhangyi fd6be25ba5 update:恢复ws电量通知代码 2026-09-23 14:22:57 +08:00
zhangyi bad3c8ff9a Merge branch 'feat-training' into test 2026-09-23 10:50:06 +08:00
6 changed files with 41 additions and 60 deletions
+4 -8
View File
@@ -4,6 +4,10 @@
"libVersion": "3.7.7", "libVersion": "3.7.7",
"packOptions": { "packOptions": {
"ignore": [ "ignore": [
{
"type": "folder",
"value": "static/coin"
},
{ {
"type": "file", "type": "file",
"value": "static/common/dialog-light.png" "value": "static/common/dialog-light.png"
@@ -243,14 +247,6 @@
{ {
"type": "folder", "type": "folder",
"value": "static/training-difficulty-design" "value": "static/training-difficulty-design"
},
{
"type": "folder",
"value": "static/coin"
},
{
"type": "folder",
"value": "static/home-device"
} }
], ],
"include": [] "include": []
+1 -3
View File
@@ -164,8 +164,6 @@ const defaultHighlightStyle = {
color: "rgba(255, 228, 0, 0.6)", color: "rgba(255, 228, 0, 0.6)",
strokeColor: "rgba(254, 216, 71, 0.82)", strokeColor: "rgba(254, 216, 71, 0.82)",
lineWidthRatio: 0.003, lineWidthRatio: 0.003,
// 在最小线宽计算后应用倍数,确保不同靶面尺寸下按比例加粗。
lineWidthScale: 1,
}; };
// 合并默认靶纸样式和外部传入样式,ringColors 单独深合并。 // 合并默认靶纸样式和外部传入样式,ringColors 单独深合并。
@@ -321,7 +319,7 @@ const drawSectorHighlight = (
(angles.endAngle - angles.startAngle) * safeRevealProgress, (angles.endAngle - angles.startAngle) * safeRevealProgress,
style.color, style.color,
style.strokeColor, style.strokeColor,
Math.max(1, targetRadius * style.lineWidthRatio) * style.lineWidthScale Math.max(1, targetRadius * style.lineWidthRatio)
); );
}); });
}; };
+4 -8
View File
@@ -55,6 +55,10 @@
"appid" : "wxa8f5989dcd45cc23", "appid" : "wxa8f5989dcd45cc23",
"packOptions" : { "packOptions" : {
"ignore" : [ "ignore" : [
{
"type" : "folder",
"value" : "static/coin"
},
{ {
"type" : "file", "type" : "file",
"value" : "static/common/dialog-light.png" "value" : "static/common/dialog-light.png"
@@ -294,14 +298,6 @@
{ {
"type" : "folder", "type" : "folder",
"value" : "static/training-difficulty-design" "value" : "static/training-difficulty-design"
},
{
"type" : "folder",
"value" : "static/coin"
},
{
"type" : "folder",
"value" : "static/home-device"
} }
] ]
}, },
-15
View File
@@ -21,9 +21,6 @@
{ {
"path": "pages/audio-test" "path": "pages/audio-test"
}, },
{
"path": "pages/calibration"
},
{ {
"path": "pages/about-us" "path": "pages/about-us"
}, },
@@ -60,12 +57,6 @@
{ {
"path": "pages/match-page" "path": "pages/match-page"
}, },
{
"path": "pages/my-device"
},
{
"path": "pages/device-intro"
},
{ {
"path": "pages/user" "path": "pages/user"
}, },
@@ -107,12 +98,6 @@
}, },
{ {
"path": "pages/mine-bow-data" "path": "pages/mine-bow-data"
},
{
"path": "pages/ota-wifi",
"style": {
"navigationStyle": "custom"
}
} }
], ],
"globalStyle": { "globalStyle": {
@@ -546,7 +546,6 @@ onBeforeUnmount(() => {
:showCrosshair="false" :showCrosshair="false"
:showRingLabels="false" :showRingLabels="false"
:highlightOnly="true" :highlightOnly="true"
:highlightStyle="{ strokeColor: '#00fffc', lineWidthScale: 3 }"
:sectorCount="sectorCount" :sectorCount="sectorCount"
:activeSector="activeSector" :activeSector="activeSector"
:activeRings="activeRings" :activeRings="activeRings"
+16 -9
View File
@@ -93,30 +93,36 @@ function createWebSocket(token, onMessage) {
"/addons/shoot/otaResult", "/addons/shoot/otaResult",
]; ];
if (passthroughEvents.includes(event)) { if (passthroughEvents.includes(event)) {
if ((code == null || Number(code) === 0) && onMessage && data && typeof data === "object") { if (
(code == null || Number(code) === 0) &&
onMessage &&
data &&
typeof data === "object"
) {
onMessage({ event, data, code, timestamp }); onMessage({ event, data, code, timestamp });
} }
return; return;
} }
if (data?.type) { if (!data || typeof data !== "object") return;
if (data.type) {
if (ENABLE_REALTIME_MESSAGE_LOG) { if (ENABLE_REALTIME_MESSAGE_LOG) {
console.log("收到 WebSocket 消息", getMessageTypeName(data.type)); console.log("收到 WebSocket 消息", getMessageTypeName(data.type));
} }
if (onMessage) onMessage({ ...(data.data || {}), type: data.type }); if (onMessage) onMessage({ ...(data.data || {}), type: data.type });
return; return;
} }
const updates = Array.isArray(data?.updates) ? data.updates : []; if (!Array.isArray(data.updates)) return;
if (!updates.length) return; if (onMessage) onMessage(data.updates);
if (onMessage) onMessage(updates); const firstMessage = data.updates[0];
const msg = updates[0]; if (firstMessage && ENABLE_REALTIME_MESSAGE_LOG) {
if (msg) {
if (ENABLE_REALTIME_MESSAGE_LOG) {
console.log( console.log(
"收到 WebSocket 更新", "收到 WebSocket 更新",
getMessageTypeName(msg.constructor), getMessageTypeName(firstMessage.constructor),
{ updateCount: data.updates.length } { updateCount: data.updates.length }
); );
} }
data.updates.forEach((msg) => {
if (msg) {
if (msg.constructor === MESSAGETYPES.RankUpdate) { if (msg.constructor === MESSAGETYPES.RankUpdate) {
uni.setStorageSync("latestRank", msg.lvl); uni.setStorageSync("latestRank", msg.lvl);
} else if (msg.constructor === MESSAGETYPES.LvlUpdate) { } else if (msg.constructor === MESSAGETYPES.LvlUpdate) {
@@ -130,6 +136,7 @@ function createWebSocket(token, onMessage) {
} }
} }
}); });
});
socketTask.onError((err) => { socketTask.onError((err) => {
if (socket !== socketTask) return; if (socket !== socketTask) return;