chore: 初始化项目 — uni-app + Vue3 + TypeScript 脚手架

This commit is contained in:
jacobxu666
2026-06-14 17:16:18 +08:00
commit 046e84a564
37 changed files with 13763 additions and 0 deletions
+169
View File
@@ -0,0 +1,169 @@
<template>
<view class="container">
<view class="hero">
<image class="logo" src="/static/logo.png" mode="aspectFit" />
<text class="title">zhy-test</text>
<text class="subtitle">uni-app + Vue3 + TypeScript</text>
</view>
<view class="card-list">
<view class="card" @click="goToProfile">
<view class="card-icon">👤</view>
<view class="card-content">
<text class="card-title">个人中心</text>
<text class="card-desc">查看个人信息</text>
</view>
<view class="card-arrow">›</view>
</view>
<view class="card" @click="goToLogs">
<view class="card-icon">📝</view>
<view class="card-content">
<text class="card-title">日志记录</text>
<text class="card-desc">查看应用启动日志</text>
</view>
<view class="card-arrow">›</view>
</view>
<view class="card" @click="goToLogin">
<view class="card-icon">🔑</view>
<view class="card-content">
<text class="card-title">登录</text>
<text class="card-desc">用户登录页面</text>
</view>
<view class="card-arrow">›</view>
</view>
</view>
<view class="info">
<text class="info-title">支持多端发布</text>
<view class="tag-list">
<text class="tag">微信小程序</text>
<text class="tag">H5</text>
<text class="tag">App</text>
</view>
</view>
</view>
</template>
<script setup lang="ts">
function goToProfile() {
uni.switchTab({ url: '/pages/profile/profile' })
}
function goToLogs() {
uni.navigateTo({ url: '/pages/logs/logs' })
}
function goToLogin() {
uni.navigateTo({ url: '/pages/login/login' })
}
</script>
<style scoped>
.container {
padding: 30rpx;
min-height: 100vh;
box-sizing: border-box;
}
.hero {
display: flex;
flex-direction: column;
align-items: center;
padding: 60rpx 0;
}
.logo {
width: 160rpx;
height: 160rpx;
margin-bottom: 30rpx;
}
.title {
font-size: 40rpx;
font-weight: bold;
color: #333;
margin-bottom: 10rpx;
}
.subtitle {
font-size: 26rpx;
color: #888;
}
.card-list {
background: #fff;
border-radius: 20rpx;
overflow: hidden;
margin-bottom: 40rpx;
}
.card {
display: flex;
align-items: center;
padding: 30rpx;
border-bottom: 1rpx solid #f0f0f0;
}
.card:last-child {
border-bottom: none;
}
.card-icon {
font-size: 40rpx;
margin-right: 20rpx;
}
.card-content {
flex: 1;
display: flex;
flex-direction: column;
}
.card-title {
font-size: 30rpx;
color: #333;
margin-bottom: 6rpx;
}
.card-desc {
font-size: 24rpx;
color: #999;
}
.card-arrow {
font-size: 40rpx;
color: #ccc;
}
.info {
padding: 30rpx;
background: #fff;
border-radius: 20rpx;
text-align: center;
}
.info-title {
font-size: 28rpx;
color: #666;
display: block;
margin-bottom: 20rpx;
}
.tag-list {
display: flex;
justify-content: center;
gap: 20rpx;
flex-wrap: wrap;
}
.tag {
display: inline-block;
padding: 10rpx 30rpx;
background: #e8f4ff;
color: #007aff;
border-radius: 30rpx;
font-size: 24rpx;
}
</style>