12 Commits
Author SHA1 Message Date
zhangyi 419cefd00e update:优化精准训练描边 2026-11-04 16:06:34 +08:00
zhangyi 14f9ccd1ef Merge branch 'feat-shebei' 2026-10-29 16:49:46 +08:00
zhangyi 899a222e3f update:优化 2026-10-29 16:49:08 +08:00
zhangyi ca727ec1f7 update:优化wifi反馈 2026-10-29 16:28:03 +08:00
zhangyi cc8f997600 Merge branch 'feat-shebei' 2026-10-29 16:12:55 +08:00
zhangyi bac84536c7 update:优化样式 2026-10-29 16:11:58 +08:00
zhangyi a81494973c Merge branch 'feat-shebei' 2026-10-29 15:08:27 +08:00
zhangyi 94c46bb7df update:隐藏新人礼 2026-10-29 15:07:47 +08:00
zhangyi f3fab17687 update:过滤图片 2026-10-29 14:54:00 +08:00
zhangyi d22d958215 Merge branch 'feat-mendian' 2026-10-29 10:05:02 +08:00
zhangyi b4ed13d2b5 Merge branch 'feat-training' 2026-10-29 09:57:48 +08:00
zhangyi b8b0ab4005 Merge branch 'feat-shebei' 2026-10-29 09:57:07 +08:00
8 changed files with 85 additions and 47 deletions
+8 -4
View File
@@ -4,10 +4,6 @@
"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"
@@ -247,6 +243,14 @@
{ {
"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": []
+3 -1
View File
@@ -164,6 +164,8 @@ 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 单独深合并。
@@ -319,7 +321,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) Math.max(1, targetRadius * style.lineWidthRatio) * style.lineWidthScale
); );
}); });
}; };
+8 -4
View File
@@ -55,10 +55,6 @@
"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"
@@ -298,6 +294,14 @@
{ {
"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,6 +21,9 @@
{ {
"path": "pages/audio-test" "path": "pages/audio-test"
}, },
{
"path": "pages/calibration"
},
{ {
"path": "pages/about-us" "path": "pages/about-us"
}, },
@@ -57,6 +60,12 @@
{ {
"path": "pages/match-page" "path": "pages/match-page"
}, },
{
"path": "pages/my-device"
},
{
"path": "pages/device-intro"
},
{ {
"path": "pages/user" "path": "pages/user"
}, },
@@ -98,6 +107,12 @@
}, },
{ {
"path": "pages/mine-bow-data" "path": "pages/mine-bow-data"
},
{
"path": "pages/ota-wifi",
"style": {
"navigationStyle": "custom"
}
} }
], ],
"globalStyle": { "globalStyle": {
+5 -5
View File
@@ -447,12 +447,12 @@ onShow(async () => {
<text class="highlight-text">射灵智能弓箭</text> <text class="highlight-text">射灵智能弓箭</text>
<text>设备上的二维码</text> <text>设备上的二维码</text>
</view> </view>
<view class="benefit-copy"> <!-- <view class="benefit-copy">
<text>新设备首次绑定账号可获赠</text> <text>新设备首次绑定账号可获赠</text>
<text class="highlight-text">6个月射灵会员礼包</text> <text class="highlight-text">6个月射灵会员礼包</text>
<text>,</text> <text>,</text>
<text>该礼包仅可使用一次,请确保当前登录账号为您本人账号。</text> <text>该礼包仅可使用一次,请确保当前登录账号为您本人账号。</text>
</view> </view> -->
<button class="help-link" hover-class="none" @click="showTip = true"> <button class="help-link" hover-class="none" @click="showTip = true">
<text>没找到二维码或遇到问题&gt;</text> <text>没找到二维码或遇到问题&gt;</text>
</button> </button>
@@ -866,7 +866,7 @@ onShow(async () => {
} }
.help-link { .help-link {
margin-top: 72rpx; margin-top: 36rpx;
color: #ffd947; color: #ffd947;
font-size: 26rpx; font-size: 26rpx;
line-height: 36rpx; line-height: 36rpx;
@@ -874,8 +874,8 @@ onShow(async () => {
.product-link { .product-link {
position: fixed; position: fixed;
bottom: 104rpx; bottom: 208rpx;
bottom: calc(env(safe-area-inset-bottom) + 104rpx); /* bottom: calc(env(safe-area-inset-bottom) + 104rpx); */
left: 0; left: 0;
z-index: 2; z-index: 2;
width: 100%; width: 100%;
+20 -1
View File
@@ -39,6 +39,7 @@ const connectMode = ref("secure"); // secure | open | manual
const connectError = ref(""); const connectError = ref("");
const connectStatusText = ref(""); const connectStatusText = ref("");
const isSubmittingWifi = ref(false); const isSubmittingWifi = ref(false);
const wifiSuccessVisible = ref(false);
const keyboardHeight = ref(0); const keyboardHeight = ref(0);
// 控制密码输入框是否显示明文 // 控制密码输入框是否显示明文
const showPassword = ref(false); const showPassword = ref(false);
@@ -364,10 +365,13 @@ const submitDeviceWifiConfig = async ({ ssid, password }) => {
secure: connectMode.value === "secure" || !!password, secure: connectMode.value === "secure" || !!password,
}; };
connectError.value = ""; connectError.value = "";
currentState.value = STATES.CONNECTED;
void refreshConnectedWifiName(); void refreshConnectedWifiName();
if (fromFirmwareUpdate.value) { if (fromFirmwareUpdate.value) {
currentState.value = STATES.CONNECTED;
openFirmwareCountdown(); openFirmwareCountdown();
} else {
// 保留配网输入界面,避免成功提示出现前先露出 WiFi 列表。
wifiSuccessVisible.value = true;
} }
} catch (err) { } catch (err) {
if (requestId === wifiConnectRequestId) { if (requestId === wifiConnectRequestId) {
@@ -382,6 +386,13 @@ const submitDeviceWifiConfig = async ({ ssid, password }) => {
} }
}; };
// 普通配网成功后,确认并收起输入界面,停留在当前 WiFi 页面。
const confirmWifiSuccess = () => {
if (!wifiSuccessVisible.value) return;
wifiSuccessVisible.value = false;
currentState.value = STATES.CONNECTED;
};
// 校验用户输入并提交 WiFi 配置,不再把手机连接结果当作设备连接成功。 // 校验用户输入并提交 WiFi 配置,不再把手机连接结果当作设备连接成功。
const joinNetwork = () => { const joinNetwork = () => {
if (joinDisabled.value) return; if (joinDisabled.value) return;
@@ -755,6 +766,14 @@ onUnmounted(() => {
</view> </view>
</view> </view>
<ModalDialog
:show="wifiSuccessVisible"
content="WIFI连接成功"
confirmText="确定"
:showCancel="false"
:onConfirm="confirmWifiSuccess"
></ModalDialog>
<ModalDialog <ModalDialog
:show="countdownVisible" :show="countdownVisible"
title="WiFi连接成功" title="WiFi连接成功"
@@ -546,6 +546,7 @@ 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"
+9 -16
View File
@@ -93,36 +93,30 @@ function createWebSocket(token, onMessage) {
"/addons/shoot/otaResult", "/addons/shoot/otaResult",
]; ];
if (passthroughEvents.includes(event)) { if (passthroughEvents.includes(event)) {
if ( if ((code == null || Number(code) === 0) && onMessage && data && typeof data === "object") {
(code == null || Number(code) === 0) &&
onMessage &&
data &&
typeof data === "object"
) {
onMessage({ event, data, code, timestamp }); onMessage({ event, data, code, timestamp });
} }
return; return;
} }
if (!data || typeof data !== "object") return; if (data?.type) {
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;
} }
if (!Array.isArray(data.updates)) return; const updates = Array.isArray(data?.updates) ? data.updates : [];
if (onMessage) onMessage(data.updates); if (!updates.length) return;
const firstMessage = data.updates[0]; if (onMessage) onMessage(updates);
if (firstMessage && ENABLE_REALTIME_MESSAGE_LOG) { const msg = updates[0];
if (msg) {
if (ENABLE_REALTIME_MESSAGE_LOG) {
console.log( console.log(
"收到 WebSocket 更新", "收到 WebSocket 更新",
getMessageTypeName(firstMessage.constructor), getMessageTypeName(msg.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) {
@@ -136,7 +130,6 @@ function createWebSocket(token, onMessage) {
} }
} }
}); });
});
socketTask.onError((err) => { socketTask.onError((err) => {
if (socket !== socketTask) return; if (socket !== socketTask) return;