feat: 小程序与管理端迭代(神仙AI、了解自己CRM、AI测试入口、报表与分润等)
Made-with: Cursor
This commit is contained in:
@@ -8,6 +8,8 @@ Page({
|
||||
permSbti: true,
|
||||
permPdp: true,
|
||||
permDisc: true,
|
||||
/** AI 测评聚合页(对话 / 拍照);企业显式关闭 aiHub 时隐藏 */
|
||||
permAiHub: true,
|
||||
/** 四类入口均被企业权限关闭时提示,避免误以为白屏 */
|
||||
allTestsDisabled: false
|
||||
},
|
||||
@@ -35,36 +37,63 @@ Page({
|
||||
const permSbti = !p || p.sbti !== false
|
||||
const permPdp = !p || p.pdp !== false
|
||||
const permDisc = !p || p.disc !== false
|
||||
const permAiHub = !p || p.aiHub !== false
|
||||
this.setData({
|
||||
permFace,
|
||||
permMbti,
|
||||
permSbti,
|
||||
permPdp,
|
||||
permDisc,
|
||||
permAiHub,
|
||||
allTestsDisabled: p && !permMbti && !permSbti && !permPdp && !permDisc
|
||||
})
|
||||
},
|
||||
|
||||
_trackSelect(type) {
|
||||
try { require('../../utils/analytics').track('tap_test_select', { type }) } catch (e) {}
|
||||
},
|
||||
|
||||
goMBTI() {
|
||||
this._trackSelect('mbti')
|
||||
wx.navigateTo({ url: '/pages/test/mbti' })
|
||||
},
|
||||
|
||||
goSBTI() {
|
||||
this._trackSelect('sbti')
|
||||
wx.navigateTo({ url: '/pages/test/sbti' })
|
||||
},
|
||||
|
||||
goPDP() {
|
||||
this._trackSelect('pdp')
|
||||
wx.navigateTo({ url: '/pages/test/pdp' })
|
||||
},
|
||||
|
||||
goDISC() {
|
||||
this._trackSelect('disc')
|
||||
wx.navigateTo({ url: '/pages/test/disc' })
|
||||
},
|
||||
|
||||
/** AI 对话解读(神仙 AI) */
|
||||
goAIChatInterpretation() {
|
||||
this._trackSelect('ai_chat')
|
||||
wx.navigateTo({ url: '/pages/ai-chat/index?src=test_select' })
|
||||
},
|
||||
|
||||
/** 拍照面相分析(与底部「拍摄」同页) */
|
||||
goAIFaceAnalysis() {
|
||||
this._trackSelect('ai_face')
|
||||
wx.switchTab({
|
||||
url: '/pages/index/camera',
|
||||
fail: () => {
|
||||
wx.showToast({ title: '请从底部「拍摄」进入', icon: 'none' })
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
onShareAppMessage() {
|
||||
const { getSharePath } = require('../../utils/share')
|
||||
return {
|
||||
title: '4 大详细性格测试,来测测你的性格类型',
|
||||
title: '问卷 + AI 测评,发现你的性格类型',
|
||||
path: getSharePath('/pages/test-select/index')
|
||||
}
|
||||
},
|
||||
@@ -72,7 +101,7 @@ Page({
|
||||
onShareTimeline() {
|
||||
const { buildShareQuery } = require('../../utils/share')
|
||||
return {
|
||||
title: '4 大详细性格测试,来测测你的性格类型',
|
||||
title: '问卷 + AI 测评,发现你的性格类型',
|
||||
query: buildShareQuery()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
<!--pages/test-select/index.wxml - 详细性格测试入口(MBTI / SBTI / PDP / DISC)-->
|
||||
<!--pages/test-select/index.wxml - 详细性格测试入口(MBTI / SBTI / PDP / DISC / AI)-->
|
||||
<view class="container">
|
||||
<view class="card intro-card">
|
||||
<text class="intro-title">选择一项详细性格测试</text>
|
||||
<text class="intro-desc">完成问卷即可获得对应维度的专业性格报告</text>
|
||||
<text class="intro-desc">问卷测评与 AI 对话 / 拍照面相分项进入,完成后可获得对应报告</text>
|
||||
</view>
|
||||
|
||||
<view class="card entry-card" bindtap="goMBTI" wx:if="{{permMbti}}">
|
||||
@@ -49,6 +49,28 @@
|
||||
<text class="entry-arrow">→</text>
|
||||
</view>
|
||||
|
||||
<view class="card entry-card" bindtap="goAIChatInterpretation" wx:if="{{permAiHub}}">
|
||||
<view class="entry-icon-wrap ai-chat">
|
||||
<text class="entry-emoji">💬</text>
|
||||
</view>
|
||||
<view class="entry-content">
|
||||
<text class="entry-name">AI 对话解读</text>
|
||||
<text class="entry-brief">与神仙 AI 对话 · 结合测评画像的深度解读与建议</text>
|
||||
</view>
|
||||
<text class="entry-arrow">→</text>
|
||||
</view>
|
||||
|
||||
<view class="card entry-card" bindtap="goAIFaceAnalysis" wx:if="{{permFace}}">
|
||||
<view class="entry-icon-wrap ai-face">
|
||||
<text class="entry-emoji">📷</text>
|
||||
</view>
|
||||
<view class="entry-content">
|
||||
<text class="entry-name">拍照面相分析</text>
|
||||
<text class="entry-brief">上传正面与侧面照 · 面相 / 骨相与性格报告</text>
|
||||
</view>
|
||||
<text class="entry-arrow">→</text>
|
||||
</view>
|
||||
|
||||
<view class="card perm-disabled-hint" wx:if="{{allTestsDisabled}}">
|
||||
<text class="perm-disabled-text">当前环境下暂未开放问卷测试,请联系管理员或从首页进入。</text>
|
||||
</view>
|
||||
|
||||
@@ -90,6 +90,14 @@
|
||||
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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user