refactor: 重构项目分包结构与资源管理
1. 调整页面路由,将业务页面迁移到对应分包,主包仅保留首页 2. 拆分公共服务模块,将账户、融资相关逻辑移入对应分包 3. 统一资源路径,将专属静态资源放入各分包static目录,更新导航栏图标资源 4. 修复启动引导逻辑,实现仅首次冷启动显示引导页 5. 更新README文档,补充分包配置与开发规范说明
This commit is contained in:
@@ -1,16 +0,0 @@
|
||||
<template>
|
||||
<view class="select-row" @click="choose"><text class="select-label">{{ label }}</text><text :class="modelValue.length > 0 ? 'select-value' : 'select-value select-placeholder'">{{ modelValue.length > 0 ? modelValue : '请选择' }}</text><view class="select-arrow"><AppIcon name="chevron-right" :size="28" /></view></view>
|
||||
</template>
|
||||
<script setup lang="uts">
|
||||
import AppIcon from '@/components/AppIcon.uvue'
|
||||
const props = defineProps({ label: { type: String, default: '' }, modelValue: { type: String, default: '' }, options: { type: Array as PropType<string[]>, default: () => [] as string[] } })
|
||||
const emit = defineEmits(['update:modelValue'])
|
||||
const choose = () => { uni.showActionSheet({ itemList: props.options, success: (result) => { if (result.tapIndex >= 0 && result.tapIndex < props.options.length) emit('update:modelValue', props.options[result.tapIndex]) } }) }
|
||||
</script>
|
||||
<style>
|
||||
.select-row { min-height: 106rpx; flex-direction: row; align-items: center; border-bottom: 1rpx solid #edf1f6; }
|
||||
.select-label { font-size: 28rpx; color: #29374e; margin-right: 16rpx; flex-shrink: 0; }
|
||||
.select-value { flex: 1; min-width: 0; text-align: right; color: #22324a; font-size: 27rpx; line-height: 38rpx; }
|
||||
.select-placeholder { color: #8995a7; }
|
||||
.select-arrow { width: 32rpx; height: 32rpx; margin-left: 12rpx; align-items: center; justify-content: center; transform: rotate(90deg); }
|
||||
</style>
|
||||
@@ -1,14 +1,13 @@
|
||||
<template>
|
||||
<view class="bottom-nav" :style="bottomStyle(14)">
|
||||
<view class="nav-item" @click="go('/pages/home/home')"><view :class="active == 'home' ? 'nav-icon active-icon' : 'nav-icon'"><AppIcon name="home" :size="54" :muted="active != 'home'" /></view><text :class="active == 'home' ? 'nav-label active-label' : 'nav-label'">首页</text></view>
|
||||
<view class="nav-item" @click="go('/pages/news/news')"><view :class="active == 'news' ? 'nav-icon active-icon' : 'nav-icon'"><AppIcon name="file-text" :size="54" :muted="active != 'news'" /></view><text :class="active == 'news' ? 'nav-label active-label' : 'nav-label'">新闻</text></view>
|
||||
<view class="nav-item" @click="go('/pages/messages/messages')"><view :class="active == 'message' ? 'nav-icon active-icon' : 'nav-icon'"><AppIcon name="message" :size="54" :muted="active != 'message'" /></view><text :class="active == 'message' ? 'nav-label active-label' : 'nav-label'">消息</text></view>
|
||||
<view class="nav-item" @click="go('/pages/profile/profile')"><view :class="active == 'profile' ? 'nav-icon active-icon' : 'nav-icon'"><AppIcon name="user" :size="54" :muted="active != 'profile'" /></view><text :class="active == 'profile' ? 'nav-label active-label' : 'nav-label'">我的</text></view>
|
||||
<view class="nav-item" @click="go('/pages/home/home')"><view :class="active == 'home' ? 'nav-icon active-icon' : 'nav-icon'"><image class="nav-image" :class="active != 'home' ? 'muted-icon' : ''" src="/static/mobile/navigation/home.png" mode="aspectFit" /></view><text :class="active == 'home' ? 'nav-label active-label' : 'nav-label'">首页</text></view>
|
||||
<view class="nav-item" @click="go('/packages/content/news/news')"><view :class="active == 'news' ? 'nav-icon active-icon' : 'nav-icon'"><image class="nav-image" :class="active != 'news' ? 'muted-icon' : ''" src="/static/mobile/navigation/file-text.png" mode="aspectFit" /></view><text :class="active == 'news' ? 'nav-label active-label' : 'nav-label'">新闻</text></view>
|
||||
<view class="nav-item" @click="go('/packages/account/messages/messages')"><view :class="active == 'message' ? 'nav-icon active-icon' : 'nav-icon'"><image class="nav-image" :class="active != 'message' ? 'muted-icon' : ''" src="/static/mobile/navigation/message.png" mode="aspectFit" /></view><text :class="active == 'message' ? 'nav-label active-label' : 'nav-label'">消息</text></view>
|
||||
<view class="nav-item" @click="go('/packages/account/profile/profile')"><view :class="active == 'profile' ? 'nav-icon active-icon' : 'nav-icon'"><image class="nav-image" :class="active != 'profile' ? 'muted-icon' : ''" src="/static/mobile/navigation/user.png" mode="aspectFit" /></view><text :class="active == 'profile' ? 'nav-label active-label' : 'nav-label'">我的</text></view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup lang="uts">
|
||||
import AppIcon from '@/components/AppIcon.uvue'
|
||||
import { usePageLayout } from '@/services/layout.uts'
|
||||
const { bottomStyle } = usePageLayout()
|
||||
defineProps({ active: { type: String, default: 'home' } })
|
||||
@@ -23,7 +22,10 @@
|
||||
.bottom-nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; min-height: 130rpx; background-color: #ffffff; border-top: 1rpx solid #e7edf6; flex-direction: row; box-shadow: 0 -6rpx 18rpx rgba(18, 38, 75, 0.04); }
|
||||
.nav-item { flex: 1; height: 116rpx; align-items: center; justify-content: center; }
|
||||
.nav-icon { width: 64rpx; height: 60rpx; border-radius: 18rpx; align-items: center; justify-content: center; }
|
||||
/* 专用位图已统一图案边界,不再叠加 AppIcon 的整体缩放。 */
|
||||
.nav-image { width: 58rpx; height: 58rpx; flex-shrink: 0; }
|
||||
.muted-icon { opacity: .70; }
|
||||
.active-icon { background-color: #edf5ff; }
|
||||
.nav-label { margin-top: 7rpx; font-size: 24rpx; color: #64748b; }
|
||||
.nav-label { margin-top: 7rpx; height: 34rpx; line-height: 34rpx; font-size: 24rpx; color: #64748b; text-align: center; }
|
||||
.active-label { color: #0868f7; font-weight: 700; }
|
||||
</style>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<view class="brand-logo">
|
||||
<view class="brand-symbol">
|
||||
<text class="letter-a">A</text><view class="brand-dot"></view><text class="letter-i">i</text>
|
||||
<text class="letter-a">A</text><view class="letter-i"><view class="brand-dot"></view><view class="brand-stem"></view></view>
|
||||
</view>
|
||||
<text class="brand-name">融资</text>
|
||||
</view>
|
||||
@@ -9,9 +9,10 @@
|
||||
|
||||
<style>
|
||||
.brand-logo { flex-direction: row; align-items: center; }
|
||||
.brand-symbol { width: 96rpx; height: 68rpx; flex-direction: row; align-items: flex-end; position: relative; }
|
||||
.letter-a { color: #0871ff; font-size: 70rpx; line-height: 70rpx; font-weight: 900; }
|
||||
.letter-i { color: #102557; font-size: 55rpx; line-height: 62rpx; font-weight: 900; }
|
||||
.brand-dot { position: absolute; width: 11rpx; height: 11rpx; border-radius: 50%; background-color: #ff5b35; left: 66rpx; top: 2rpx; }
|
||||
.brand-name { color: #102557; font-size: 42rpx; line-height: 58rpx; font-weight: 900; }
|
||||
.brand-symbol { width: 78rpx; height: 68rpx; flex-direction: row; align-items: center; }
|
||||
.letter-a { width: 53rpx; color: #0871ff; font-size: 70rpx; line-height: 68rpx; font-weight: 900; }
|
||||
.letter-i { width: 11rpx; height: 50rpx; margin-left: 3rpx; align-items: center; }
|
||||
.brand-dot { width: 11rpx; height: 11rpx; border-radius: 50%; background-color: #ff5b35; }
|
||||
.brand-stem { width: 10rpx; height: 35rpx; margin-top: 4rpx; background-color: #102557; }
|
||||
.brand-name { color: #102557; font-size: 52rpx; line-height: 68rpx; font-weight: 900; }
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user