feat: 修复 Redis 超时问题、固定小程序端口、新增人生事件模块及优化多个页面
- 修复 Redis 超时:添加 commons-pool2 依赖,启用 Lettuce 连接池,超时提升至 15s - 固定 mini-program H5 端口为 5175,避免与 web 项目端口冲突 - 新增人生事件(life-event)模块:表单和详情页面 - 新增 EpicScript 灵感接口(Controller/Service/DTO) - 优化登录、引导、主页、记录、剧本详情等多个页面 - 优化服务管理脚本和 Nginx 配置 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
+61
-365
@@ -2,6 +2,7 @@
|
||||
import { ref } from 'vue'
|
||||
import { onLaunch, onShow, onHide } from '@dcloudio/uni-app'
|
||||
import { useAppStore } from './stores/app.js'
|
||||
import { logRuntimeEnv } from './services/request.js'
|
||||
|
||||
const statusBarHeight = ref(0)
|
||||
const safeAreaTop = ref(0)
|
||||
@@ -9,14 +10,11 @@ const safeAreaBottom = ref(0)
|
||||
|
||||
onLaunch(async () => {
|
||||
console.log('App Launch')
|
||||
logRuntimeEnv('app:onLaunch')
|
||||
const store = useAppStore()
|
||||
await store.initialize()
|
||||
|
||||
// 使用新的推荐 API 替代已弃用的 getSystemInfoSync
|
||||
const deviceInfo = uni.getDeviceInfo()
|
||||
const windowInfo = uni.getWindowInfo()
|
||||
const appBaseInfo = uni.getAppBaseInfo()
|
||||
|
||||
statusBarHeight.value = windowInfo.statusBarHeight || 20
|
||||
safeAreaTop.value = windowInfo.safeAreaInsets?.top || windowInfo.statusBarHeight || 20
|
||||
safeAreaBottom.value = windowInfo.safeAreaInsets?.bottom || 0
|
||||
@@ -35,318 +33,36 @@ onHide(() => {
|
||||
</script>
|
||||
|
||||
<style>
|
||||
|
||||
page {
|
||||
background-color: #0F071A;
|
||||
color: #F3E8FF;
|
||||
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', sans-serif;
|
||||
font-size: 28rpx;
|
||||
line-height: 1.5;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
overflow: hidden;
|
||||
-webkit-overflow-scrolling: touch;
|
||||
color: #f8f4ff;
|
||||
background: #050615;
|
||||
font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
|
||||
font-size: 28rpx;
|
||||
line-height: 1.45;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
}
|
||||
|
||||
/* 标题字体 - Cinzel (原型标准) */
|
||||
.font-serif, .page-title, .section-title {
|
||||
font-family: 'Cinzel', 'Inter', serif;
|
||||
}
|
||||
|
||||
/* 星空背景 */
|
||||
.stars-container {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
pointer-events: none;
|
||||
z-index: 0;
|
||||
}
|
||||
|
||||
.star {
|
||||
position: absolute;
|
||||
background: white;
|
||||
border-radius: 50%;
|
||||
opacity: var(--opacity);
|
||||
animation: float-star var(--duration) ease-in-out infinite;
|
||||
animation-delay: var(--delay);
|
||||
}
|
||||
|
||||
@keyframes float-star {
|
||||
0%, 100% {
|
||||
transform: translate(0, 0) scale(1);
|
||||
opacity: var(--opacity);
|
||||
}
|
||||
50% {
|
||||
transform: translate(var(--x), var(--y)) scale(1.5);
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
|
||||
.status-bar-space {
|
||||
width: 100%;
|
||||
button {
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
border: 0;
|
||||
color: inherit;
|
||||
background: transparent;
|
||||
flex-shrink: 0;
|
||||
line-height: normal;
|
||||
font: inherit;
|
||||
}
|
||||
|
||||
.safe-area-bottom {
|
||||
padding-bottom: constant(safe-area-inset-bottom);
|
||||
padding-bottom: env(safe-area-inset-bottom);
|
||||
button::after {
|
||||
border: 0;
|
||||
}
|
||||
|
||||
.safe-area-top {
|
||||
padding-top: constant(safe-area-inset-top);
|
||||
padding-top: env(safe-area-inset-top);
|
||||
}
|
||||
|
||||
/* ==================== 玻璃态卡片 - 原型标准 ==================== */
|
||||
.glass-card {
|
||||
background: rgba(168, 85, 247, 0.05);
|
||||
backdrop-filter: blur(20px);
|
||||
-webkit-backdrop-filter: blur(20px);
|
||||
border: 1px solid rgba(168, 85, 247, 0.15);
|
||||
border-radius: 40rpx; /* 原型标准:2.5rem = 40px */
|
||||
transition: all 0.3s ease;
|
||||
}
|
||||
|
||||
.glass-card:active {
|
||||
transform: scale(0.98);
|
||||
box-shadow: 0 4rpx 20rpx rgba(168, 85, 247, 0.05);
|
||||
}
|
||||
|
||||
.glass-card-gold {
|
||||
background: linear-gradient(135deg, rgba(168, 85, 247, 0.15), rgba(232, 121, 249, 0.1));
|
||||
border: 1px solid rgba(168, 85, 247, 0.3);
|
||||
border-radius: 40rpx;
|
||||
box-shadow: inset 0 0 20rpx rgba(168, 85, 247, 0.08),
|
||||
0 0 20px rgba(168, 85, 247, 0.1);
|
||||
transition: all 0.3s ease;
|
||||
}
|
||||
|
||||
.glass-card-gold:active {
|
||||
transform: scale(0.98);
|
||||
box-shadow: inset 0 0 10rpx rgba(168, 85, 247, 0.05),
|
||||
0 2rpx 12px rgba(168, 85, 247, 0.08);
|
||||
}
|
||||
|
||||
/* 原型标准输入框 - 40rpx 圆角 */
|
||||
.glass-input {
|
||||
background: rgba(255, 255, 255, 0.05);
|
||||
backdrop-filter: blur(20px);
|
||||
-webkit-backdrop-filter: blur(20px);
|
||||
border: 1px solid rgba(168, 85, 247, 0.15);
|
||||
border-radius: 40rpx; /* 原型标准:2.5rem = 40px */
|
||||
padding: 24rpx 32rpx;
|
||||
color: #F3E8FF;
|
||||
font-size: 28rpx;
|
||||
transition: all 0.3s ease;
|
||||
}
|
||||
|
||||
.glass-input:active {
|
||||
background: rgba(168, 85, 247, 0.1);
|
||||
border-color: rgba(168, 85, 247, 0.4);
|
||||
box-shadow: 0 0 15px rgba(168, 85, 247, 0.3);
|
||||
}
|
||||
|
||||
.glass-input::placeholder {
|
||||
color: rgba(255, 255, 255, 0.3);
|
||||
}
|
||||
|
||||
/* 发光边框 - 头像/卡片专用 */
|
||||
.glow-border {
|
||||
box-shadow: 0 0 20px rgba(168, 85, 247, 0.4);
|
||||
}
|
||||
|
||||
/* 强发光效果 - 头像专用 */
|
||||
.glow-strong {
|
||||
box-shadow: 0 0 40px rgba(168, 85, 247, 0.1);
|
||||
}
|
||||
|
||||
/* 左侧紫色边框 - 记录卡片专用 */
|
||||
.border-left-purple {
|
||||
border-left: 4rpx solid #C084FC;
|
||||
}
|
||||
|
||||
.btn-primary {
|
||||
background: linear-gradient(135deg, #9333EA 0%, #7C3AED 100%);
|
||||
border-radius: 32rpx;
|
||||
padding: 28rpx 48rpx;
|
||||
color: white !important;
|
||||
font-weight: 600;
|
||||
font-size: 30rpx;
|
||||
border: none;
|
||||
box-shadow: 0 8rpx 32rpx rgba(168, 85, 247, 0.3);
|
||||
transition: all 0.2s ease;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.btn-primary:active {
|
||||
transform: scale(0.98);
|
||||
opacity: 0.9;
|
||||
}
|
||||
|
||||
.btn-primary:disabled {
|
||||
opacity: 0.5;
|
||||
cursor: not-allowed;
|
||||
}
|
||||
|
||||
.btn-secondary {
|
||||
background: rgba(255, 255, 255, 0.08);
|
||||
border: 1px solid rgba(255, 255, 255, 0.15);
|
||||
border-radius: 24rpx;
|
||||
padding: 24rpx 40rpx;
|
||||
color: rgba(255, 255, 255, 0.8);
|
||||
font-size: 28rpx;
|
||||
}
|
||||
|
||||
.bottom-nav {
|
||||
background: rgba(15, 7, 26, 0.85);
|
||||
backdrop-filter: blur(40rpx);
|
||||
-webkit-backdrop-filter: blur(40rpx);
|
||||
border-top: 1px solid rgba(255, 255, 255, 0.05);
|
||||
}
|
||||
|
||||
.nav-item {
|
||||
color: rgba(255, 255, 255, 0.3);
|
||||
transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
|
||||
}
|
||||
|
||||
.nav-item.active {
|
||||
color: #C084FC;
|
||||
transform: translateY(-8rpx);
|
||||
text-shadow: 0 0 15px rgba(168, 85, 247, 0.6);
|
||||
}
|
||||
|
||||
.step-indicator {
|
||||
display: flex;
|
||||
gap: 12rpx;
|
||||
}
|
||||
|
||||
.step-dot {
|
||||
width: 24rpx;
|
||||
height: 8rpx;
|
||||
background: rgba(255, 255, 255, 0.1);
|
||||
border-radius: 4rpx;
|
||||
transition: all 0.7s ease;
|
||||
}
|
||||
|
||||
.step-dot.active {
|
||||
width: 40rpx;
|
||||
background: #A855F7;
|
||||
box-shadow: 0 0 24rpx rgba(168, 85, 247, 0.6);
|
||||
}
|
||||
|
||||
.hint-chip {
|
||||
background: rgba(255, 255, 255, 0.05);
|
||||
border: 1px solid rgba(255, 255, 255, 0.1);
|
||||
border-radius: 32rpx;
|
||||
padding: 12rpx 24rpx;
|
||||
font-size: 22rpx;
|
||||
color: rgba(243, 232, 255, 0.8);
|
||||
box-shadow: 0 4rpx 12rpx rgba(0, 0, 0, 0.2);
|
||||
backdrop-filter: blur(8rpx);
|
||||
transition: all 0.2s ease;
|
||||
}
|
||||
|
||||
.hint-chip:active {
|
||||
background: rgba(168, 85, 247, 0.2);
|
||||
border-color: rgba(168, 85, 247, 0.4);
|
||||
transform: scale(1.05);
|
||||
box-shadow: 0 8rpx 15rpx rgba(168, 85, 247, 0.3);
|
||||
}
|
||||
|
||||
.ai-reply-card {
|
||||
background: rgba(168, 85, 247, 0.08);
|
||||
border: 1px solid rgba(168, 85, 247, 0.2);
|
||||
border-radius: 20rpx;
|
||||
padding: 24rpx;
|
||||
box-shadow: 0 0 20px rgba(168, 85, 247, 0.1);
|
||||
}
|
||||
|
||||
.typing-text {
|
||||
overflow: hidden;
|
||||
white-space: pre-wrap;
|
||||
animation: reveal 2s steps(60, end);
|
||||
}
|
||||
|
||||
@keyframes reveal {
|
||||
from { opacity: 0; transform: translateY(10rpx); }
|
||||
to { opacity: 1; transform: translateY(0); }
|
||||
}
|
||||
|
||||
/* 星芒加载动画 - 原型标准(双环旋转) */
|
||||
.starlight-loader {
|
||||
position: relative;
|
||||
width: 80rpx;
|
||||
height: 80rpx;
|
||||
margin: 40rpx auto;
|
||||
}
|
||||
|
||||
.starlight-loader::before,
|
||||
.starlight-loader::after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
border-radius: 50%;
|
||||
border: 3rpx solid transparent;
|
||||
border-top-color: #C084FC;
|
||||
border-right-color: #A855F7;
|
||||
animation: starlight-spin 1.5s cubic-bezier(0.4, 0, 0.2, 1) infinite;
|
||||
}
|
||||
|
||||
.starlight-loader::before {
|
||||
width: 70%;
|
||||
height: 70%;
|
||||
border-top-color: #E879F9;
|
||||
border-right-color: #9333EA;
|
||||
animation-delay: -0.75s;
|
||||
}
|
||||
|
||||
@keyframes starlight-spin {
|
||||
0% {
|
||||
transform: translate(-50%, -50%) rotate(0deg) scale(1);
|
||||
}
|
||||
50% {
|
||||
transform: translate(-50%, -50%) rotate(180deg) scale(1.2);
|
||||
}
|
||||
100% {
|
||||
transform: translate(-50%, -50%) rotate(360deg) scale(1);
|
||||
}
|
||||
}
|
||||
|
||||
/* 加载文字 - 脉冲效果 */
|
||||
.loading-text {
|
||||
text-align: center;
|
||||
font-size: 24rpx;
|
||||
color: rgba(192, 132, 252, 0.6);
|
||||
letter-spacing: 4rpx;
|
||||
margin-top: 24rpx;
|
||||
animation: pulse-text 2s ease-in-out infinite;
|
||||
}
|
||||
|
||||
@keyframes pulse-text {
|
||||
0%, 100% { opacity: 0.6; }
|
||||
50% { opacity: 1; }
|
||||
}
|
||||
|
||||
/* 简化 loader 备用 */
|
||||
.starlight-loader-simple {
|
||||
width: 44rpx;
|
||||
height: 44rpx;
|
||||
border-radius: 50%;
|
||||
border: 2rpx solid #A855F7;
|
||||
border-top-color: transparent;
|
||||
animation: spin 0.8s infinite linear;
|
||||
}
|
||||
|
||||
@keyframes spin {
|
||||
from { transform: rotate(0deg); }
|
||||
to { transform: rotate(360deg); }
|
||||
input,
|
||||
textarea {
|
||||
color: #f8f4ff;
|
||||
font: inherit;
|
||||
}
|
||||
|
||||
::-webkit-scrollbar {
|
||||
@@ -355,65 +71,6 @@ page {
|
||||
display: none;
|
||||
}
|
||||
|
||||
::-webkit-scrollbar-thumb {
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
::-webkit-scrollbar-track {
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
@keyframes fadeIn {
|
||||
from { opacity: 0; transform: translateY(20rpx); }
|
||||
to { opacity: 1; transform: translateY(0); }
|
||||
}
|
||||
|
||||
.animate-fade-in {
|
||||
animation: fadeIn 0.5s ease-out;
|
||||
}
|
||||
|
||||
@keyframes pulse {
|
||||
0%, 100% { opacity: 0.3; }
|
||||
50% { opacity: 0.7; }
|
||||
}
|
||||
|
||||
.animate-pulse-slow {
|
||||
animation: pulse 6s ease-in-out infinite;
|
||||
}
|
||||
|
||||
@keyframes float {
|
||||
0%, 100% { transform: translateY(0); }
|
||||
50% { transform: translateY(-10rpx); }
|
||||
}
|
||||
|
||||
.animate-float {
|
||||
animation: float 3s ease-in-out infinite;
|
||||
}
|
||||
|
||||
.text-primary { color: #A855F7; }
|
||||
.text-primary-light { color: #C084FC; }
|
||||
.text-accent { color: #E879F9; }
|
||||
.text-muted { color: rgba(255, 255, 255, 0.4); }
|
||||
.text-white-90 { color: rgba(255, 255, 255, 0.9); }
|
||||
.text-white-70 { color: rgba(255, 255, 255, 0.7); }
|
||||
.text-white-50 { color: rgba(255, 255, 255, 0.5); }
|
||||
.font-serif { font-family: 'Cinzel', serif; }
|
||||
|
||||
.bg-dark { background-color: #0F071A; }
|
||||
.bg-gradient-purple {
|
||||
background: linear-gradient(180deg, #1A0B2E 0%, #0F071A 50%, #050208 100%);
|
||||
}
|
||||
.bg-aurora-top {
|
||||
background: rgba(168, 85, 247, 0.08);
|
||||
filter: blur(120rpx);
|
||||
border-radius: 50%;
|
||||
}
|
||||
.bg-aurora-bottom {
|
||||
background: rgba(139, 92, 246, 0.05);
|
||||
filter: blur(100rpx);
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
||||
.safe-area-bottom {
|
||||
padding-bottom: constant(safe-area-inset-bottom);
|
||||
padding-bottom: env(safe-area-inset-bottom);
|
||||
@@ -423,4 +80,43 @@ page {
|
||||
padding-top: constant(safe-area-inset-top);
|
||||
padding-top: env(safe-area-inset-top);
|
||||
}
|
||||
|
||||
.kos-page {
|
||||
min-height: 100vh;
|
||||
color: #f8f4ff;
|
||||
background:
|
||||
radial-gradient(circle at 78% 10%, rgba(111, 55, 255, 0.32), transparent 28%),
|
||||
radial-gradient(circle at 14% 34%, rgba(36, 124, 255, 0.17), transparent 28%),
|
||||
linear-gradient(180deg, #07091b 0%, #07031a 46%, #04030f 100%);
|
||||
}
|
||||
|
||||
.kos-card {
|
||||
border: 1rpx solid rgba(163, 92, 255, 0.38);
|
||||
background:
|
||||
linear-gradient(145deg, rgba(31, 23, 76, 0.78), rgba(8, 8, 30, 0.9)),
|
||||
radial-gradient(circle at 90% 20%, rgba(139, 78, 255, 0.14), transparent 38%);
|
||||
box-shadow:
|
||||
inset 0 0 44rpx rgba(147, 92, 255, 0.08),
|
||||
0 22rpx 64rpx rgba(0, 0, 0, 0.26);
|
||||
backdrop-filter: blur(24rpx);
|
||||
-webkit-backdrop-filter: blur(24rpx);
|
||||
}
|
||||
|
||||
.kos-pill {
|
||||
border: 1rpx solid rgba(157, 108, 255, 0.34);
|
||||
background: rgba(255, 255, 255, 0.055);
|
||||
box-shadow: inset 0 0 20rpx rgba(160, 96, 255, 0.08);
|
||||
}
|
||||
|
||||
.kos-primary {
|
||||
color: #fff;
|
||||
background:
|
||||
radial-gradient(circle at 68% 20%, rgba(255, 255, 255, 0.28), transparent 22%),
|
||||
linear-gradient(135deg, #b045ff 0%, #612eff 56%, #2b1aff 100%);
|
||||
box-shadow: 0 18rpx 42rpx rgba(129, 66, 255, 0.38), inset 0 0 20rpx rgba(255, 255, 255, 0.1);
|
||||
}
|
||||
|
||||
.placeholder {
|
||||
color: rgba(213, 199, 239, 0.42);
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user