Commit 578c137389fe73182e18ceddedc997fc8736b9c0
1 parent
24c0bbe7
样式优化
Showing
4 changed files
with
106 additions
and
88 deletions
pages-sub/data/tree-archive/treeRecord.vue
| 1 | <template> | 1 | <template> |
| 2 | - <view class="container"> | 2 | + <view class="page-container"> |
| 3 | 3 | ||
| 4 | <!-- 内容区域 - 集成z-paging分页 --> | 4 | <!-- 内容区域 - 集成z-paging分页 --> |
| 5 | <z-paging | 5 | <z-paging |
| @@ -12,50 +12,52 @@ | @@ -12,50 +12,52 @@ | ||
| 12 | <template #empty> | 12 | <template #empty> |
| 13 | <empty-view/> | 13 | <empty-view/> |
| 14 | </template> | 14 | </template> |
| 15 | - <!-- 空数据组件 --> | ||
| 16 | -<!-- <up-empty v-if="rows.length === 0" text="暂无数据" marginTop="100"></up-empty>--> | ||
| 17 | - | ||
| 18 | - <!-- 树木列表:up-card重构 + 保留原始背景图写法 核心满足你的要求 --> | ||
| 19 | - <view class="record-wrap" > | ||
| 20 | - <up-card | ||
| 21 | - v-for="i in rows" | ||
| 22 | - :key="i.treenumber" | ||
| 23 | - :border="false" | ||
| 24 | - :show-head="false" | ||
| 25 | - class="tree-card" | ||
| 26 | - :foot-border-top="false" | ||
| 27 | - @click="toEditPage(i.id)" | ||
| 28 | - > | ||
| 29 | - <template #body> | ||
| 30 | - <view class="card-body-inner"> | ||
| 31 | - <view class="record-list-left" :style="`background-image: url(${i.treephoto});`"></view> | ||
| 32 | - | ||
| 33 | - <view class="record-list-right"> | ||
| 34 | - <view class="up-flex up-flex-items-center up-flex-between"> | ||
| 35 | - <view class="u-line-1 treetypeName">{{ i.treetype }}</view> | ||
| 36 | - <view style="text-align: right">{{ timeFormat(i.updatetime) }}</view> | ||
| 37 | - </view> | ||
| 38 | - <view class="up-flex up-flex-items-center" style="margin: 8px 0"> | ||
| 39 | - <img src="../../../static/imgs/tree/tree-high.png" style="width: 12px;height: 12px;margin-right: 6px;" alt=""> 高度:{{ i.treeheight }} 米 | ||
| 40 | - </view> | ||
| 41 | - <view class="up-flex up-flex-items-center"> | ||
| 42 | - <img src="../../../static/imgs/tree/treearound.png" style="width: 12px;height: 12px;margin-right: 6px;" alt="">胸径:{{ i.dbh }} 厘米 | 15 | + <!-- 空数据组件 --> |
| 16 | + <!-- <up-empty v-if="rows.length === 0" text="暂无数据" marginTop="100"></up-empty>--> | ||
| 17 | + | ||
| 18 | + <!-- 树木列表:up-card重构 + 保留原始背景图写法 核心满足你的要求 --> | ||
| 19 | + <view class="record-wrap"> | ||
| 20 | + <up-card | ||
| 21 | + v-for="i in rows" | ||
| 22 | + :key="i.treenumber" | ||
| 23 | + :border="false" | ||
| 24 | + :show-head="false" | ||
| 25 | + class="tree-card" | ||
| 26 | + :foot-border-top="false" | ||
| 27 | + @click="toEditPage(i.id)" | ||
| 28 | + > | ||
| 29 | + <template #body> | ||
| 30 | + <view class="card-body-inner"> | ||
| 31 | + <view class="record-list-left" :style="`background-image: url(${i.treephoto});`"></view> | ||
| 32 | + | ||
| 33 | + <view class="record-list-right"> | ||
| 34 | + <view class="up-flex up-flex-items-center up-flex-between"> | ||
| 35 | + <view class="u-line-1 treetypeName">{{ i.treetype }}</view> | ||
| 36 | + <view style="text-align: right">{{ timeFormat(i.updatetime) }}</view> | ||
| 37 | + </view> | ||
| 38 | + <view class="up-flex up-flex-items-center" style="margin: 8px 0"> | ||
| 39 | + <img src="../../../static/imgs/tree/tree-high.png" style="width: 12px;height: 12px;margin-right: 6px;" | ||
| 40 | + alt=""> 高度:{{ i.treeheight }} 米 | ||
| 41 | + </view> | ||
| 42 | + <view class="up-flex up-flex-items-center"> | ||
| 43 | + <img src="../../../static/imgs/tree/treearound.png" | ||
| 44 | + style="width: 12px;height: 12px;margin-right: 6px;" alt="">胸径:{{ i.dbh }} 厘米 | ||
| 45 | + </view> | ||
| 43 | </view> | 46 | </view> |
| 44 | </view> | 47 | </view> |
| 45 | - </view> | ||
| 46 | - <view class="treenumber-no"> | ||
| 47 | - 树木编号:{{ i.treenumber }} | ||
| 48 | - </view> | ||
| 49 | - </template> | ||
| 50 | - </up-card> | ||
| 51 | - </view> | 48 | + <view class="treenumber-no"> |
| 49 | + 树木编号:{{ i.treenumber }} | ||
| 50 | + </view> | ||
| 51 | + </template> | ||
| 52 | + </up-card> | ||
| 53 | + </view> | ||
| 52 | </z-paging> | 54 | </z-paging> |
| 53 | <!-- 底部新增按钮 --> | 55 | <!-- 底部新增按钮 --> |
| 54 | <view class="fixed-bottom-btn-wrap"> | 56 | <view class="fixed-bottom-btn-wrap"> |
| 55 | <up-button | 57 | <up-button |
| 56 | type="primary" | 58 | type="primary" |
| 57 | @click="toAddTreePage" | 59 | @click="toAddTreePage" |
| 58 | - v-show="count > 0 && count > rows.length" | 60 | + v-show="count > 0 && count > allCount" |
| 59 | > | 61 | > |
| 60 | 新增树木录入 | 62 | 新增树木录入 |
| 61 | </up-button> | 63 | </up-button> |
| @@ -65,8 +67,8 @@ | @@ -65,8 +67,8 @@ | ||
| 65 | </template> | 67 | </template> |
| 66 | 68 | ||
| 67 | <script setup> | 69 | <script setup> |
| 68 | -import { ref} from 'vue' | ||
| 69 | -import { onLoad, onShow, onUnload } from '@dcloudio/uni-app'; | 70 | +import { ref } from 'vue' |
| 71 | +import { onLoad, onShow, onUnload } from '@dcloudio/uni-app'; | ||
| 70 | onUnload(() => { | 72 | onUnload(() => { |
| 71 | // 关闭所有页面,直接打开【行道树档案】主页面 【微信小程序完美兼容,无任何报错】 | 73 | // 关闭所有页面,直接打开【行道树档案】主页面 【微信小程序完美兼容,无任何报错】 |
| 72 | uni.reLaunch({ | 74 | uni.reLaunch({ |
| @@ -75,40 +77,34 @@ onUnload(() => { | @@ -75,40 +77,34 @@ onUnload(() => { | ||
| 75 | }) | 77 | }) |
| 76 | import { treeRoadReq } from "@/api/tree-archive/tree-archive.js"; | 78 | import { treeRoadReq } from "@/api/tree-archive/tree-archive.js"; |
| 77 | import { timeFormat } from '@/uni_modules/uview-plus'; | 79 | import { timeFormat } from '@/uni_modules/uview-plus'; |
| 78 | - | ||
| 79 | const rows = ref([]) | 80 | const rows = ref([]) |
| 80 | const roadId = ref('') | 81 | const roadId = ref('') |
| 81 | const count = ref(0) | 82 | const count = ref(0) |
| 82 | - | 83 | +const allCount = ref(0) |
| 83 | onLoad((options) => { | 84 | onLoad((options) => { |
| 84 | console.log(options) | 85 | console.log(options) |
| 85 | roadId.value = options.roadId | 86 | roadId.value = options.roadId |
| 86 | count.value = options.count | 87 | count.value = options.count |
| 87 | }) | 88 | }) |
| 88 | - | ||
| 89 | onShow(() => { | 89 | onShow(() => { |
| 90 | // 初始化分页数据 | 90 | // 初始化分页数据 |
| 91 | pagingRef.value?.reload() | 91 | pagingRef.value?.reload() |
| 92 | }) | 92 | }) |
| 93 | - | ||
| 94 | - | ||
| 95 | - | ||
| 96 | const toEditPage = (id) => { | 93 | const toEditPage = (id) => { |
| 97 | uni.navigateTo({ | 94 | uni.navigateTo({ |
| 98 | url: `/pages-sub/data/tree-archive/editTree?id=${id}` | 95 | url: `/pages-sub/data/tree-archive/editTree?id=${id}` |
| 99 | }) | 96 | }) |
| 100 | } | 97 | } |
| 101 | - | ||
| 102 | const toAddTreePage = () => { | 98 | const toAddTreePage = () => { |
| 103 | uni.navigateTo({ | 99 | uni.navigateTo({ |
| 104 | url: `/pages-sub/data/tree-archive/addTree?roadId=${roadId.value}` | 100 | url: `/pages-sub/data/tree-archive/addTree?roadId=${roadId.value}` |
| 105 | }) | 101 | }) |
| 106 | } | 102 | } |
| 107 | - | ||
| 108 | const pagingRef = ref(null) // z-paging实例 | 103 | const pagingRef = ref(null) // z-paging实例 |
| 109 | const fetchData = async (pageNo, pageSize) => { | 104 | const fetchData = async (pageNo, pageSize) => { |
| 110 | - const res = await treeRoadReq( {road: roadId.value,pageNo, pageSize}) | 105 | + const res = await treeRoadReq({road: roadId.value, pageNo, pageSize}) |
| 111 | console.log(res) | 106 | console.log(res) |
| 107 | + allCount.value = res.total | ||
| 112 | // rows.value = res.list | 108 | // rows.value = res.list |
| 113 | pagingRef.value?.complete(res?.list || [], res?.total) | 109 | pagingRef.value?.complete(res?.list || [], res?.total) |
| 114 | } | 110 | } |
| @@ -116,11 +112,12 @@ const fetchData = async (pageNo, pageSize) => { | @@ -116,11 +112,12 @@ const fetchData = async (pageNo, pageSize) => { | ||
| 116 | 112 | ||
| 117 | <style scoped lang="scss"> | 113 | <style scoped lang="scss"> |
| 118 | // ✅ 你的原始样式 一行没删、一行没改、全部保留 | 114 | // ✅ 你的原始样式 一行没删、一行没改、全部保留 |
| 119 | -.container { | 115 | +.page-container { |
| 120 | min-height: 100vh; | 116 | min-height: 100vh; |
| 121 | } | 117 | } |
| 118 | + | ||
| 122 | .record-wrap { | 119 | .record-wrap { |
| 123 | - padding-bottom: 60px; | 120 | + padding-bottom: 20px; |
| 124 | } | 121 | } |
| 125 | 122 | ||
| 126 | .record-list-wrap { | 123 | .record-list-wrap { |
| @@ -141,7 +138,7 @@ const fetchData = async (pageNo, pageSize) => { | @@ -141,7 +138,7 @@ const fetchData = async (pageNo, pageSize) => { | ||
| 141 | width: 70px; | 138 | width: 70px; |
| 142 | background-size: 100% 100%; | 139 | background-size: 100% 100%; |
| 143 | background-repeat: no-repeat; // 新增:防止图片平铺 | 140 | background-repeat: no-repeat; // 新增:防止图片平铺 |
| 144 | - background-position: center; // 新增:图片居中显示 | 141 | + background-position: center; // 新增:图片居中显示 |
| 145 | } | 142 | } |
| 146 | 143 | ||
| 147 | .record-list-right { | 144 | .record-list-right { |
| @@ -167,7 +164,8 @@ const fetchData = async (pageNo, pageSize) => { | @@ -167,7 +164,8 @@ const fetchData = async (pageNo, pageSize) => { | ||
| 167 | //box-shadow: 0 2rpx 8rpx rgba(0,0,0,0.04); | 164 | //box-shadow: 0 2rpx 8rpx rgba(0,0,0,0.04); |
| 168 | //background: #fff; | 165 | //background: #fff; |
| 169 | } | 166 | } |
| 170 | -.card-body-inner{ | 167 | + |
| 168 | +.card-body-inner { | ||
| 171 | display: flex; | 169 | display: flex; |
| 172 | font-size: 12px; | 170 | font-size: 12px; |
| 173 | } | 171 | } |
pages/index/index.vue
| @@ -10,7 +10,7 @@ | @@ -10,7 +10,7 @@ | ||
| 10 | </view> | 10 | </view> |
| 11 | <view class="msg-icon" @click="handleMsgClick" hover-class="msg-icon--hover"> | 11 | <view class="msg-icon" @click="handleMsgClick" hover-class="msg-icon--hover"> |
| 12 | <up-icon name="chat" color="#fff" size="24"/> | 12 | <up-icon name="chat" color="#fff" size="24"/> |
| 13 | - <view class="msg-badge" > | 13 | + <view class="msg-badge"> |
| 14 | <up-badge type="error" showZero="true" max="999" :value="msgCount"></up-badge> | 14 | <up-badge type="error" showZero="true" max="999" :value="msgCount"></up-badge> |
| 15 | </view> | 15 | </view> |
| 16 | </view> | 16 | </view> |
| @@ -52,13 +52,18 @@ | @@ -52,13 +52,18 @@ | ||
| 52 | <!-- 使用up-tabs组件实现Tab切换 --> | 52 | <!-- 使用up-tabs组件实现Tab切换 --> |
| 53 | <up-tabs | 53 | <up-tabs |
| 54 | :list="tabList" | 54 | :list="tabList" |
| 55 | - active-color="#0A86F4" | ||
| 56 | - inactive-color="#666" | ||
| 57 | - font-size="14px" | ||
| 58 | lineWidth="60" | 55 | lineWidth="60" |
| 59 | @change="handleTabChange" | 56 | @change="handleTabChange" |
| 60 | class="task-tab-container" | 57 | class="task-tab-container" |
| 61 | :scrollable="false" | 58 | :scrollable="false" |
| 59 | + :activeStyle="{ | ||
| 60 | + color: '#000000', | ||
| 61 | + fontSize: '14' | ||
| 62 | + }" | ||
| 63 | + :inactiveStyle="{ | ||
| 64 | + color: '#787070', | ||
| 65 | + fontSize: '14' | ||
| 66 | + }" | ||
| 62 | ></up-tabs> | 67 | ></up-tabs> |
| 63 | 68 | ||
| 64 | <!-- z-paging分页列表 --> | 69 | <!-- z-paging分页列表 --> |
| @@ -71,7 +76,7 @@ | @@ -71,7 +76,7 @@ | ||
| 71 | use-page-scroll | 76 | use-page-scroll |
| 72 | > | 77 | > |
| 73 | <template #empty> | 78 | <template #empty> |
| 74 | - <up-empty /> | 79 | + <up-empty/> |
| 75 | </template> | 80 | </template> |
| 76 | <view class="task-list-container"> | 81 | <view class="task-list-container"> |
| 77 | <view | 82 | <view |
| @@ -87,8 +92,8 @@ | @@ -87,8 +92,8 @@ | ||
| 87 | </view> | 92 | </view> |
| 88 | <view class="task-item__footer u-flex common-item-center common-justify-between" | 93 | <view class="task-item__footer u-flex common-item-center common-justify-between" |
| 89 | style="font-size: 13px; margin-top: 5px;"> | 94 | style="font-size: 13px; margin-top: 5px;"> |
| 90 | - <view class="urgency-tag" > | ||
| 91 | - 紧急程度: {{ item.pressingType||'--' }} | 95 | + <view class="urgency-tag"> |
| 96 | + 紧急程度: {{ uni.$dict.getDictLabel('workorder_pressing_type', item.pressingType) || '--' }} | ||
| 92 | </view> | 97 | </view> |
| 93 | <view style="font-size: 13px;color: #333">{{ | 98 | <view style="font-size: 13px;color: #333">{{ |
| 94 | timeFormat(item.busiDateTime, 'yyyy-mm-dd hh:MM:ss') | 99 | timeFormat(item.busiDateTime, 'yyyy-mm-dd hh:MM:ss') |
| @@ -392,7 +397,7 @@ $border-color: #e5e5e5; // 新增边框颜色变量 | @@ -392,7 +397,7 @@ $border-color: #e5e5e5; // 新增边框颜色变量 | ||
| 392 | .msg-icon { | 397 | .msg-icon { |
| 393 | position: relative; | 398 | position: relative; |
| 394 | padding: 5px; | 399 | padding: 5px; |
| 395 | - top:10px; | 400 | + top: 10px; |
| 396 | border-radius: 50%; | 401 | border-radius: 50%; |
| 397 | 402 | ||
| 398 | &--hover { | 403 | &--hover { |
| @@ -401,8 +406,8 @@ $border-color: #e5e5e5; // 新增边框颜色变量 | @@ -401,8 +406,8 @@ $border-color: #e5e5e5; // 新增边框颜色变量 | ||
| 401 | 406 | ||
| 402 | .msg-badge { | 407 | .msg-badge { |
| 403 | position: absolute; | 408 | position: absolute; |
| 404 | - top: -5px; | ||
| 405 | - right: -5px; | 409 | + top: -2px; |
| 410 | + right: -3px; | ||
| 406 | } | 411 | } |
| 407 | } | 412 | } |
| 408 | } | 413 | } |
| @@ -419,7 +424,7 @@ $border-color: #e5e5e5; // 新增边框颜色变量 | @@ -419,7 +424,7 @@ $border-color: #e5e5e5; // 新增边框颜色变量 | ||
| 419 | 424 | ||
| 420 | .module-title { | 425 | .module-title { |
| 421 | padding: $spacing-lg; | 426 | padding: $spacing-lg; |
| 422 | - font-size: 15px; | 427 | + font-size: 14px; |
| 423 | font-weight: 600; | 428 | font-weight: 600; |
| 424 | color: $text-color-light; | 429 | color: $text-color-light; |
| 425 | } | 430 | } |
| @@ -475,6 +480,7 @@ $border-color: #e5e5e5; // 新增边框颜色变量 | @@ -475,6 +480,7 @@ $border-color: #e5e5e5; // 新增边框颜色变量 | ||
| 475 | padding: $spacing-md; | 480 | padding: $spacing-md; |
| 476 | transition: background-color 0.2s; | 481 | transition: background-color 0.2s; |
| 477 | border-bottom: 1px solid $border-color; | 482 | border-bottom: 1px solid $border-color; |
| 483 | + | ||
| 478 | &:last-child { | 484 | &:last-child { |
| 479 | border-bottom: none; | 485 | border-bottom: none; |
| 480 | } | 486 | } |
pages/login/index.vue
| @@ -11,12 +11,18 @@ | @@ -11,12 +11,18 @@ | ||
| 11 | <!-- uview-plus的Tabs组件 --> | 11 | <!-- uview-plus的Tabs组件 --> |
| 12 | <up-tabs | 12 | <up-tabs |
| 13 | :list="tabList" | 13 | :list="tabList" |
| 14 | - active-color="#0A86F4" | ||
| 15 | - inactive-color="#666" | ||
| 16 | - font-size="16px" | ||
| 17 | - line-width="40" | ||
| 18 | - line-height="3" | 14 | + line-width="55" |
| 15 | + line-height="2" | ||
| 19 | @change="handleTabChange" | 16 | @change="handleTabChange" |
| 17 | + :activeStyle="{ | ||
| 18 | + color: '#3c9cff', | ||
| 19 | + fontWeight:'500', | ||
| 20 | + fontSize: '14' | ||
| 21 | + }" | ||
| 22 | + :inactiveStyle="{ | ||
| 23 | + color: '#606060', | ||
| 24 | + fontSize: '14' | ||
| 25 | + }" | ||
| 20 | ></up-tabs> | 26 | ></up-tabs> |
| 21 | 27 | ||
| 22 | <!-- 表单校验容器 --> | 28 | <!-- 表单校验容器 --> |
| @@ -34,10 +40,12 @@ | @@ -34,10 +40,12 @@ | ||
| 34 | clearable | 40 | clearable |
| 35 | maxlength="11" | 41 | maxlength="11" |
| 36 | input-align="left" | 42 | input-align="left" |
| 37 | - fontSize="16px" | 43 | + fontSize="14px" |
| 38 | :disabled="isLoading" | 44 | :disabled="isLoading" |
| 39 | shape="circle" | 45 | shape="circle" |
| 40 | placeholder="请输入手机号" | 46 | placeholder="请输入手机号" |
| 47 | + selectionStart="10" | ||
| 48 | + selectionEnd="10" | ||
| 41 | @blur="() => loginFormRef.validateField('mobile')" | 49 | @blur="() => loginFormRef.validateField('mobile')" |
| 42 | /> | 50 | /> |
| 43 | </up-form-item> | 51 | </up-form-item> |
| @@ -50,7 +58,7 @@ | @@ -50,7 +58,7 @@ | ||
| 50 | clearable | 58 | clearable |
| 51 | maxlength="30" | 59 | maxlength="30" |
| 52 | input-align="left" | 60 | input-align="left" |
| 53 | - fontSize="16px" | 61 | + fontSize="14px" |
| 54 | :disabled="isLoading" | 62 | :disabled="isLoading" |
| 55 | shape="circle" | 63 | shape="circle" |
| 56 | placeholder="请输入账户" | 64 | placeholder="请输入账户" |
| @@ -83,6 +91,10 @@ | @@ -83,6 +91,10 @@ | ||
| 83 | :customStyle="{marginBottom: '8px'}" | 91 | :customStyle="{marginBottom: '8px'}" |
| 84 | label="记住密码" | 92 | label="记住密码" |
| 85 | name="agree" | 93 | name="agree" |
| 94 | + size="14" | ||
| 95 | + iconSize="14" | ||
| 96 | + labelSize="14" | ||
| 97 | + labelColor="'#3F3F3F'" | ||
| 86 | usedAlone | 98 | usedAlone |
| 87 | v-model:checked="rememberPwd" | 99 | v-model:checked="rememberPwd" |
| 88 | > | 100 | > |
| @@ -331,17 +343,15 @@ onMounted(() => { | @@ -331,17 +343,15 @@ onMounted(() => { | ||
| 331 | z-index: 1; | 343 | z-index: 1; |
| 332 | 344 | ||
| 333 | .welcome-text { | 345 | .welcome-text { |
| 334 | - font-size: 23px; | 346 | + font-size: 20px; |
| 335 | display: block; | 347 | display: block; |
| 336 | margin-bottom: 10px; | 348 | margin-bottom: 10px; |
| 337 | - font-weight: 500; | ||
| 338 | } | 349 | } |
| 339 | 350 | ||
| 340 | .platform-name { | 351 | .platform-name { |
| 341 | margin-bottom: 10px; | 352 | margin-bottom: 10px; |
| 342 | - font-size: 23px; | 353 | + font-size: 20px; |
| 343 | display: block; | 354 | display: block; |
| 344 | - opacity: 0.95; | ||
| 345 | } | 355 | } |
| 346 | } | 356 | } |
| 347 | 357 | ||
| @@ -398,7 +408,7 @@ onMounted(() => { | @@ -398,7 +408,7 @@ onMounted(() => { | ||
| 398 | height: 44px; | 408 | height: 44px; |
| 399 | line-height: 44px; | 409 | line-height: 44px; |
| 400 | border-radius: 4px; | 410 | border-radius: 4px; |
| 401 | - font-size: 16px; | 411 | + font-size: 18px; |
| 402 | background: #0A86F4; | 412 | background: #0A86F4; |
| 403 | box-shadow: 0px 4px 6px 1px rgba(25,94,215,0.5); | 413 | box-shadow: 0px 4px 6px 1px rgba(25,94,215,0.5); |
| 404 | border-radius: 23px; | 414 | border-radius: 23px; |
pages/workbench/index.vue
| @@ -10,7 +10,7 @@ | @@ -10,7 +10,7 @@ | ||
| 10 | 10 | ||
| 11 | <!-- 蓝色装饰块 --> | 11 | <!-- 蓝色装饰块 --> |
| 12 | <view class="blue-decor-block" v-show="!loading"> | 12 | <view class="blue-decor-block" v-show="!loading"> |
| 13 | - <text class="welcome-text u-line-1">你好{{userInfo?.user?.nickname || ''}},欢迎登录</text> | 13 | + <text class="welcome-text u-line-1">你好{{ userInfo?.user?.nickname || '' }},欢迎登录</text> |
| 14 | <text class="platform-name">全域智能运营管理平台</text> | 14 | <text class="platform-name">全域智能运营管理平台</text> |
| 15 | </view> | 15 | </view> |
| 16 | 16 | ||
| @@ -25,9 +25,13 @@ | @@ -25,9 +25,13 @@ | ||
| 25 | <!-- 菜单卡片列表:仅渲染有子节点的父模块 --> | 25 | <!-- 菜单卡片列表:仅渲染有子节点的父模块 --> |
| 26 | <view class="menu-card-wrap"> | 26 | <view class="menu-card-wrap"> |
| 27 | <up-card | 27 | <up-card |
| 28 | - :title-size="18" | 28 | + :title-size="14" |
| 29 | + :titleColor="'#000'" | ||
| 29 | :border="false" | 30 | :border="false" |
| 30 | :shadow="true" | 31 | :shadow="true" |
| 32 | + :head-style="{ | ||
| 33 | + fontWeight:'500' | ||
| 34 | + }" | ||
| 31 | :foot-border-top="false" | 35 | :foot-border-top="false" |
| 32 | v-for="(parentModule, index) in filteredModuleList" | 36 | v-for="(parentModule, index) in filteredModuleList" |
| 33 | :key="`$parentModule.id_${index}`" | 37 | :key="`$parentModule.id_${index}`" |
| @@ -45,8 +49,8 @@ | @@ -45,8 +49,8 @@ | ||
| 45 | <u-image | 49 | <u-image |
| 46 | :src="listItem.icon" | 50 | :src="listItem.icon" |
| 47 | mode="aspectFit" | 51 | mode="aspectFit" |
| 48 | - width="40px" | ||
| 49 | - height="40px" | 52 | + width="48px" |
| 53 | + height="48px" | ||
| 50 | lazy-load | 54 | lazy-load |
| 51 | radius="8px" | 55 | radius="8px" |
| 52 | class="block-icon" | 56 | class="block-icon" |
| @@ -62,9 +66,9 @@ | @@ -62,9 +66,9 @@ | ||
| 62 | </template> | 66 | </template> |
| 63 | 67 | ||
| 64 | <script setup lang="ts"> | 68 | <script setup lang="ts"> |
| 65 | -import { ref, computed } from 'vue'; | ||
| 66 | -import { onShow } from '@dcloudio/uni-app'; | ||
| 67 | -import { useUserStore } from '@/pinia/user'; | 69 | +import {ref, computed} from 'vue'; |
| 70 | +import {onShow} from '@dcloudio/uni-app'; | ||
| 71 | +import {useUserStore} from '@/pinia/user'; | ||
| 68 | import globalConfig from '@/common/config/global'; | 72 | import globalConfig from '@/common/config/global'; |
| 69 | import cache from '@/common/utils/cache'; | 73 | import cache from '@/common/utils/cache'; |
| 70 | 74 | ||
| @@ -114,13 +118,13 @@ onShow(async () => { | @@ -114,13 +118,13 @@ onShow(async () => { | ||
| 114 | 118 | ||
| 115 | // 未登录处理:跳转登录页,阻止后续逻辑执行 | 119 | // 未登录处理:跳转登录页,阻止后续逻辑执行 |
| 116 | if (!isLogin()) { | 120 | if (!isLogin()) { |
| 117 | - uni.showToast({ title: '请先登录', icon: 'none', duration: 1500 }); | 121 | + uni.showToast({title: '请先登录', icon: 'none', duration: 1500}); |
| 118 | setTimeout(() => { | 122 | setTimeout(() => { |
| 119 | uni.reLaunch({ | 123 | uni.reLaunch({ |
| 120 | url: '/pages/login/index', | 124 | url: '/pages/login/index', |
| 121 | fail: (err) => { | 125 | fail: (err) => { |
| 122 | console.error('跳转登录页失败:', err); | 126 | console.error('跳转登录页失败:', err); |
| 123 | - uni.showToast({ title: '跳转登录页异常', icon: 'none' }); | 127 | + uni.showToast({title: '跳转登录页异常', icon: 'none'}); |
| 124 | } | 128 | } |
| 125 | }); | 129 | }); |
| 126 | }, 1500); | 130 | }, 1500); |
| @@ -142,14 +146,14 @@ onShow(async () => { | @@ -142,14 +146,14 @@ onShow(async () => { | ||
| 142 | 146 | ||
| 143 | const handleMenuClick = (item: MenuItem) => { | 147 | const handleMenuClick = (item: MenuItem) => { |
| 144 | if (!item.jumpUrl) { | 148 | if (!item.jumpUrl) { |
| 145 | - uni.showToast({ title: '暂无跳转链接', icon: 'none', duration: 2000 }); | 149 | + uni.showToast({title: '暂无跳转链接', icon: 'none', duration: 2000}); |
| 146 | return; | 150 | return; |
| 147 | } | 151 | } |
| 148 | uni.navigateTo({ | 152 | uni.navigateTo({ |
| 149 | url: item.jumpUrl, | 153 | url: item.jumpUrl, |
| 150 | fail: (err) => { | 154 | fail: (err) => { |
| 151 | console.error('页面跳转失败:', err); | 155 | console.error('页面跳转失败:', err); |
| 152 | - uni.showToast({ title: '页面路径错误', icon: 'none', duration: 2000 }); | 156 | + uni.showToast({title: '页面路径错误', icon: 'none', duration: 2000}); |
| 153 | } | 157 | } |
| 154 | }); | 158 | }); |
| 155 | }; | 159 | }; |
| @@ -170,7 +174,7 @@ const handleMenuClick = (item: MenuItem) => { | @@ -170,7 +174,7 @@ const handleMenuClick = (item: MenuItem) => { | ||
| 170 | background: url("https://img.jichengshanshui.com.cn:28207/appimg/bg.jpg") no-repeat; | 174 | background: url("https://img.jichengshanshui.com.cn:28207/appimg/bg.jpg") no-repeat; |
| 171 | background-size: 100% 100%; | 175 | background-size: 100% 100%; |
| 172 | z-index: 1; | 176 | z-index: 1; |
| 173 | - color:#fff; | 177 | + color: #fff; |
| 174 | text-align: left; | 178 | text-align: left; |
| 175 | 179 | ||
| 176 | .welcome-text { | 180 | .welcome-text { |
| @@ -236,7 +240,7 @@ const handleMenuClick = (item: MenuItem) => { | @@ -236,7 +240,7 @@ const handleMenuClick = (item: MenuItem) => { | ||
| 236 | 240 | ||
| 237 | .grid-text { | 241 | .grid-text { |
| 238 | font-size: 13px; | 242 | font-size: 13px; |
| 239 | - color: #333; | 243 | + color: #1C1C1C; |
| 240 | text-align: center; | 244 | text-align: center; |
| 241 | margin-top: 5px; | 245 | margin-top: 5px; |
| 242 | display: block; | 246 | display: block; |