feat: 同步今日小程序与后台迭代版本

集中提交今日 API、管理端、小程序与部署文档调整,确保 Gitea 主分支与本地最新开发版本一致。

Made-with: Cursor
This commit is contained in:
卡若
2026-04-20 11:07:55 +08:00
parent 7108f28280
commit ce55c48c64
180 changed files with 11659 additions and 6078 deletions

View File

@@ -1,5 +1,6 @@
// pages/test-select/index.js
const app = getApp()
const { isAuditHideAiMode } = require('../../utils/miniprogramAuditGate.js')
Page({
data: {
@@ -8,9 +9,9 @@ Page({
permSbti: true,
permPdp: true,
permDisc: true,
/** AI 测评聚合页(对话 / 拍照);企业显式关闭 aiHub 时隐藏 */
/** AI 对话(神仙 AI);企业关闭 aiHub 时隐藏 */
permAiHub: true,
/** 四类入口均被企业权限关闭时提示,避免误以为白屏 */
/** 四类问卷入口均被企业权限关闭时提示 */
allTestsDisabled: false
},
@@ -27,17 +28,22 @@ Page({
},
onShow() {
this._syncPerms()
if (app.getRuntimeConfig) {
app.getRuntimeConfig().finally(() => this._syncPerms())
} else {
this._syncPerms()
}
},
_syncPerms() {
const p = app.globalData.enterprisePermissions
const hideAi = isAuditHideAiMode(app.globalData)
const permFace = !p || p.face !== false
const permMbti = !p || p.mbti !== false
const permSbti = !p || p.sbti !== false
const permPdp = !p || p.pdp !== false
const permDisc = !p || p.disc !== false
const permAiHub = !p || p.aiHub !== false
const permAiHub = (!p || p.aiHub !== false) && !hideAi
this.setData({
permFace,
permMbti,
@@ -73,13 +79,15 @@ Page({
wx.navigateTo({ url: '/pages/test/disc' })
},
/** AI 对话解读(神仙 AI */
goAIChatInterpretation() {
if (isAuditHideAiMode(getApp().globalData)) {
wx.showToast({ title: '功能升级中', icon: 'none' })
return
}
this._trackSelect('ai_chat')
wx.navigateTo({ url: '/pages/ai-chat/index?src=test_select' })
},
/** 拍照面相分析(与底部「拍摄」同页) */
goAIFaceAnalysis() {
this._trackSelect('ai_face')
wx.switchTab({

View File

@@ -1,131 +1,131 @@
/* pages/test-select/index.wxss - 详细性格测试入口,与现有 UI 风格一致 */
.container {
min-height: 100vh;
background: linear-gradient(180deg, #fff5f5 0%, #f5f5f5 50%, #ffffff 100%);
padding: 24rpx 24rpx 60rpx;
box-sizing: border-box;
}
.card {
background-color: #fff;
border-radius: 16rpx;
padding: 32rpx;
margin-bottom: 24rpx;
box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.04);
}
/* 顶部说明 */
.intro-card {
text-align: center;
padding: 40rpx 32rpx;
}
.intro-title {
display: block;
font-size: 34rpx;
font-weight: 700;
color: #e63946;
margin-bottom: 16rpx;
}
.intro-desc {
display: block;
font-size: 26rpx;
color: #666;
line-height: 1.6;
}
.perm-disabled-hint {
text-align: center;
padding: 32rpx;
}
.perm-disabled-text {
font-size: 28rpx;
color: #888;
line-height: 1.6;
}
/* 入口卡片(与 result 页 next-btn 同色系) */
.entry-card {
display: flex;
align-items: center;
padding: 28rpx 32rpx;
transition: opacity 0.2s;
border-radius: 16rpx;
border: 2rpx solid transparent;
}
.entry-card:active {
opacity: 0.9;
background: linear-gradient(135deg, rgba(230, 57, 70, 0.04) 0%, rgba(255, 107, 157, 0.04) 100%);
border-color: rgba(230, 57, 70, 0.15);
}
.entry-icon-wrap {
width: 88rpx;
height: 88rpx;
border-radius: 20rpx;
display: flex;
align-items: center;
justify-content: center;
margin-right: 24rpx;
flex-shrink: 0;
}
.entry-icon-wrap.mbti {
background: linear-gradient(135deg, rgba(124, 58, 237, 0.15) 0%, rgba(139, 92, 246, 0.2) 100%);
}
.entry-icon-wrap.sbti {
background: linear-gradient(135deg, #f2f7f3 0%, #dce8e0 100%);
border: 1rpx solid #c5d4cc;
}
.entry-icon-wrap.pdp {
background: linear-gradient(135deg, rgba(230, 57, 70, 0.12) 0%, rgba(255, 107, 157, 0.15) 100%);
}
.entry-icon-wrap.disc {
background: linear-gradient(135deg, rgba(59, 130, 246, 0.12) 0%, rgba(96, 165, 250, 0.18) 100%);
}
.entry-icon-wrap.ai-chat {
background: linear-gradient(135deg, rgba(124, 58, 237, 0.16) 0%, rgba(99, 102, 241, 0.2) 100%);
}
.entry-icon-wrap.ai-face {
background: linear-gradient(135deg, rgba(236, 72, 153, 0.14) 0%, rgba(244, 114, 182, 0.18) 100%);
}
.entry-emoji {
font-size: 44rpx;
}
.entry-content {
flex: 1;
min-width: 0;
}
.entry-name {
display: block;
font-size: 30rpx;
font-weight: 600;
color: #333;
margin-bottom: 8rpx;
}
.entry-brief {
display: block;
font-size: 24rpx;
color: #888;
line-height: 1.4;
}
.entry-arrow {
font-size: 32rpx;
color: #e63946;
font-weight: 600;
margin-left: 16rpx;
flex-shrink: 0;
}
/* pages/test-select/index.wxss - 详细性格测试入口,与现有 UI 风格一致 */
.container {
min-height: 100vh;
background: linear-gradient(180deg, #fff5f5 0%, #f5f5f5 50%, #ffffff 100%);
padding: 24rpx 24rpx 60rpx;
box-sizing: border-box;
}
.card {
background-color: #fff;
border-radius: 16rpx;
padding: 32rpx;
margin-bottom: 24rpx;
box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.04);
}
/* 顶部说明 */
.intro-card {
text-align: center;
padding: 40rpx 32rpx;
}
.intro-title {
display: block;
font-size: 34rpx;
font-weight: 700;
color: #e63946;
margin-bottom: 16rpx;
}
.intro-desc {
display: block;
font-size: 26rpx;
color: #666;
line-height: 1.6;
}
.perm-disabled-hint {
text-align: center;
padding: 32rpx;
}
.perm-disabled-text {
font-size: 28rpx;
color: #888;
line-height: 1.6;
}
/* 入口卡片(与 result 页 next-btn 同色系) */
.entry-card {
display: flex;
align-items: center;
padding: 28rpx 32rpx;
transition: opacity 0.2s;
border-radius: 16rpx;
border: 2rpx solid transparent;
}
.entry-card:active {
opacity: 0.9;
background: linear-gradient(135deg, rgba(230, 57, 70, 0.04) 0%, rgba(255, 107, 157, 0.04) 100%);
border-color: rgba(230, 57, 70, 0.15);
}
.entry-icon-wrap {
width: 88rpx;
height: 88rpx;
border-radius: 20rpx;
display: flex;
align-items: center;
justify-content: center;
margin-right: 24rpx;
flex-shrink: 0;
}
.entry-icon-wrap.mbti {
background: linear-gradient(135deg, rgba(124, 58, 237, 0.15) 0%, rgba(139, 92, 246, 0.2) 100%);
}
.entry-icon-wrap.sbti {
background: linear-gradient(135deg, #f2f7f3 0%, #dce8e0 100%);
border: 1rpx solid #c5d4cc;
}
.entry-icon-wrap.pdp {
background: linear-gradient(135deg, rgba(230, 57, 70, 0.12) 0%, rgba(255, 107, 157, 0.15) 100%);
}
.entry-icon-wrap.disc {
background: linear-gradient(135deg, rgba(59, 130, 246, 0.12) 0%, rgba(96, 165, 250, 0.18) 100%);
}
.entry-icon-wrap.ai-chat {
background: linear-gradient(135deg, rgba(124, 58, 237, 0.16) 0%, rgba(99, 102, 241, 0.2) 100%);
}
.entry-icon-wrap.ai-face {
background: linear-gradient(135deg, rgba(236, 72, 153, 0.14) 0%, rgba(244, 114, 182, 0.18) 100%);
}
.entry-emoji {
font-size: 44rpx;
}
.entry-content {
flex: 1;
min-width: 0;
}
.entry-name {
display: block;
font-size: 30rpx;
font-weight: 600;
color: #333;
margin-bottom: 8rpx;
}
.entry-brief {
display: block;
font-size: 24rpx;
color: #888;
line-height: 1.4;
}
.entry-arrow {
font-size: 32rpx;
color: #e63946;
font-weight: 600;
margin-left: 16rpx;
flex-shrink: 0;
}