diff --git a/src/components/PlayerScore.vue b/src/components/PlayerScore.vue index 7b33491..87c0439 100644 --- a/src/components/PlayerScore.vue +++ b/src/components/PlayerScore.vue @@ -108,5 +108,6 @@ const rowCount = new Array(6).fill(0); .container > text:nth-child(5) { width: 40px; text-align: right; + word-break: keep-all; } diff --git a/src/components/PointSwitcher.vue b/src/components/PointSwitcher.vue index 3891612..1edf96e 100644 --- a/src/components/PointSwitcher.vue +++ b/src/components/PointSwitcher.vue @@ -23,7 +23,7 @@ const onClick = () => { > 放大 @@ -52,6 +52,7 @@ const onClick = () => { word-break: keep-all; padding: 0 12rpx; transition: all 0.3s ease; + transform: translateX(-58rpx); } .point-switcher > view > text:first-child { color: #53ef56; diff --git a/src/components/SModal.vue b/src/components/SModal.vue index 92d677b..5ac9769 100644 --- a/src/components/SModal.vue +++ b/src/components/SModal.vue @@ -81,7 +81,7 @@ watch( align-items: center; opacity: 0; transition: all 0.3s ease; - z-index: 99; + z-index: 999; } .modal-content { width: 100%; diff --git a/src/components/ScoreResult.vue b/src/components/ScoreResult.vue index 2e13c80..73eec70 100644 --- a/src/components/ScoreResult.vue +++ b/src/components/ScoreResult.vue @@ -181,7 +181,7 @@ const getRing = (arrow) => { top: 0; left: 0; background-color: rgba(0, 0, 0, 0.8); - z-index: 5; + z-index: 999; } .container-header { margin-top: 20vh; diff --git a/src/components/Signin.vue b/src/components/Signin.vue index 704630d..80f521a 100644 --- a/src/components/Signin.vue +++ b/src/components/Signin.vue @@ -10,10 +10,13 @@ import { loginAPI, getHomeData, getPhoneNumberAPI, + getDeviceBatteryAPI, } from "@/apis"; + import useStore from "@/store"; const store = useStore(); -const { updateUser, updateDevice } = store; +const { updateUser, updateDevice, updateOnline } = store; + const props = defineProps({ noBg: { type: Boolean, @@ -94,6 +97,8 @@ const handleLogin = async () => { const devices = await getMyDevicesAPI(); if (devices.bindings && devices.bindings.length) { updateDevice(devices.bindings[0].deviceId, devices.bindings[0].deviceName); + const data = await getDeviceBatteryAPI(); + updateOnline(data.online); } loading.value = false; props.onClose(); diff --git a/src/pages/index.vue b/src/pages/index.vue index ac11eee..53487e0 100644 --- a/src/pages/index.vue +++ b/src/pages/index.vue @@ -108,12 +108,12 @@ onShow(async () => { } const devices = await getMyDevicesAPI(); if (devices.bindings && devices.bindings.length) { - const data = await getDeviceBatteryAPI(); - updateOnline(data.online); updateDevice( devices.bindings[0].deviceId, devices.bindings[0].deviceName ); + const data = await getDeviceBatteryAPI(); + updateOnline(data.online); } } }