commit
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
<template>
|
||||
<view class="header-wrap">
|
||||
<view class="status-bar"></view>
|
||||
<view class="app-header">
|
||||
<view class="header-side" @click="handleBack"><AppIcon v-if="back" name="chevron-right" :size="44" class="back-icon" /></view>
|
||||
<text class="header-title">{{ title }}</text>
|
||||
<view class="header-side header-right"><slot></slot></view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup lang="uts">
|
||||
import AppIcon from '@/components/AppIcon.uvue'
|
||||
const props = defineProps({ title: { type: String, default: '' }, back: { type: Boolean, default: true } })
|
||||
const handleBack = () => {
|
||||
if (!props.back) return
|
||||
const pages = getCurrentPages()
|
||||
if (pages.length > 1) uni.navigateBack({ delta: 1 })
|
||||
else uni.reLaunch({ url: '/pages/home/home' })
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.header-wrap { background-color: #ffffff; }
|
||||
.status-bar { height: var(--status-bar-height); }
|
||||
.app-header { height: 96rpx; padding: 0 24rpx; flex-direction: row; align-items: center; justify-content: space-between; border-bottom: 1rpx solid #edf1f7; }
|
||||
.header-side { width: 100rpx; height: 96rpx; align-items: flex-start; justify-content: center; }
|
||||
.header-right { align-items: flex-end; }
|
||||
.back-icon { transform: rotate(180deg) scale(1.2); margin-top: 30rpx; }
|
||||
.header-title { font-size: 34rpx; font-weight: 700; color: #111d35; }
|
||||
</style>
|
||||
@@ -0,0 +1,13 @@
|
||||
<template>
|
||||
<image class="app-icon" :class="muted ? 'muted-icon' : ''" :style="iconStyle" :src="iconSrc" mode="aspectFit"></image>
|
||||
</template>
|
||||
|
||||
<script setup lang="uts">
|
||||
const props = defineProps({ name: { type: String, default: 'sparkles' }, size: { type: Number, default: 42 }, muted: { type: Boolean, default: false } })
|
||||
const iconSrc = computed(() => '/static/icons-generated/' + props.name + '.png')
|
||||
const iconStyle = computed(() => 'width:' + props.size + 'rpx;height:' + props.size + 'rpx;')
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.app-icon { display: block; flex-shrink: 0; transform: scale(1.2); }.muted-icon { opacity: .48; }
|
||||
</style>
|
||||
@@ -0,0 +1,23 @@
|
||||
<template>
|
||||
<view class="bottom-nav">
|
||||
<view class="nav-item" @click="go('/pages/home/home')"><view :class="active == 'home' ? 'nav-icon active-icon' : 'nav-icon'"><AppIcon name="home" :size="43" :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="trend-up" :size="43" :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="43" :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="43" :muted="active != 'profile'" /></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'
|
||||
defineProps({ active: { type: String, default: 'home' } })
|
||||
const go = (url: string) => { uni.redirectTo({ url: url }) }
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.bottom-nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; height: 130rpx; padding-bottom: env(safe-area-inset-bottom); background-color: #ffffff; border-top: 1rpx solid #e7edf6; flex-direction: row; box-shadow: 0 -10rpx 30rpx rgba(18, 38, 75, 0.06); }
|
||||
.nav-item { flex: 1; height: 116rpx; align-items: center; justify-content: center; }
|
||||
.nav-icon { width: 60rpx; height: 60rpx; border-radius: 18rpx; align-items: center; justify-content: center; background-color: #f0f4f9; }
|
||||
.active-icon { background-color: #e6f0ff; }
|
||||
.nav-label { margin-top: 7rpx; font-size: 21rpx; color: #7b8799; }
|
||||
.active-label { color: #0868f7; font-weight: 700; }
|
||||
</style>
|
||||
@@ -0,0 +1,17 @@
|
||||
<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>
|
||||
</view>
|
||||
<text class="brand-name">融资</text>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<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; }
|
||||
</style>
|
||||
Reference in New Issue
Block a user