feat: 完成70%全局样式与可读性优化

This commit is contained in:
rain
2026-07-31 11:27:15 +08:00
parent 96524e4d6c
commit 555aa00043
116 changed files with 1928 additions and 1169 deletions
+21 -8
View File
@@ -20,6 +20,11 @@
/>
<AppButton block label="返回消息中心" @click="backToMessages" />
</view>
<view v-else-if="state === 'invalid'" class="state-card">
<text>消息不存在或链接已失效</text>
<text>请返回消息中心查看最新通知</text>
<AppButton block label="返回消息中心" @click="backToMessages" />
</view>
<view v-else class="detail-card">
<text class="detail-title">{{ detail.noticeTitle || "通知消息" }}</text>
<text v-if="detail.publishTime" class="detail-time">{{
@@ -77,6 +82,10 @@ const controller = createRequestController();
let active = true;
const loadDetail = async () => {
if (!/^[1-9]\d*$/.test(notificationId.value)) {
state.value = "invalid";
return;
}
controller.abort();
state.value = "loading";
loadError.value = "";
@@ -96,7 +105,11 @@ const loadDetail = async () => {
const backToMessages = () => returnTo("N01");
onLoad((options) => {
notificationId.value = options?.id || "";
notificationId.value = String(options?.id || "");
if (!/^[1-9]\d*$/.test(notificationId.value)) {
state.value = "invalid";
return;
}
loadDetail();
});
onUnload(() => {
@@ -106,7 +119,7 @@ onUnload(() => {
</script>
<style scoped lang="scss">
@use "../../styles/adaptive-frame-profiles.scss" as adaptive;
@import "../../styles/adaptive-frame-profiles.scss";
.message-detail-page {
display: flex;
min-height: 100vh;
@@ -124,7 +137,7 @@ onUnload(() => {
.state-card,
.detail-card {
box-sizing: border-box;
@include adaptive.adaptive-family-content;
@include adaptive-family-content;
}
.state-card {
min-height: 340rpx;
@@ -138,13 +151,13 @@ onUnload(() => {
.detail-title {
color: $ink;
font-family: STKaiti, KaiTi, serif;
font-size: 35rpx;
font-size: clamp(19px, 35rpx, 24px);
font-weight: 700;
}
.state-card text:nth-child(2) {
margin-top: 18rpx;
color: $ink-muted;
font-size: 24rpx;
font-size: clamp(15px, 24rpx, 18px);
line-height: 1.65;
}
.state-card .app-button {
@@ -160,12 +173,12 @@ onUnload(() => {
.detail-time {
margin-top: 16rpx;
color: $ink-muted;
font-size: 24rpx;
font-size: clamp(15px, 24rpx, 18px);
}
.detail-content {
margin-top: 36rpx;
color: $ink;
font-size: 29rpx;
font-size: clamp(16px, 29rpx, 20px);
line-height: 1.8;
white-space: pre-wrap;
}
@@ -179,7 +192,7 @@ onUnload(() => {
gap: 22rpx;
padding: 10rpx 0;
color: $ink-muted;
font-size: 24rpx;
font-size: clamp(15px, 24rpx, 18px);
line-height: 1.5;
}
.detail-meta__row text:first-child {