feat: 小程序与管理端迭代(神仙AI、了解自己CRM、AI测试入口、报表与分润等)

Made-with: Cursor
This commit is contained in:
卡若
2026-04-17 19:46:48 +08:00
parent cf835ea585
commit 7108f28280
239 changed files with 21061 additions and 2175 deletions

View File

@@ -0,0 +1,23 @@
// components/result-section-nav/index.js
// 结果页顶部分类锚点导航:横向 chip 条,点击触发 navtap 事件,由页面 scroll-into-view 接管跳转
Component({
options: {
addGlobalClass: true,
multipleSlots: false
},
properties: {
// [{ id: 'sec-insight', label: '洞察', emoji: '🧠' }, ...]
sections: { type: Array, value: [] },
// 当前高亮的 section id可选暂未接滚动联动
active: { type: String, value: '' },
// 色系锚点purple / blue / orange / teal对应 MBTI/DISC/PDP/SBTI
theme: { type: String, value: 'purple' }
},
methods: {
onTap(e) {
const id = e.currentTarget.dataset.id
if (!id) return
this.triggerEvent('navtap', { id })
}
}
})

View File

@@ -0,0 +1,4 @@
{
"component": true,
"usingComponents": {}
}

View File

@@ -0,0 +1,17 @@
<!--components/result-section-nav/index.wxml-->
<view class="rsn rsn--{{theme}}" wx:if="{{sections && sections.length}}">
<scroll-view class="rsn__scroll" scroll-x enhanced show-scrollbar="{{false}}">
<view class="rsn__row">
<view
class="rsn__chip {{active === item.id ? 'rsn__chip--active' : ''}}"
wx:for="{{sections}}"
wx:key="id"
data-id="{{item.id}}"
bindtap="onTap"
>
<text wx:if="{{item.emoji}}" class="rsn__emoji">{{item.emoji}}</text>
<text class="rsn__label">{{item.label}}</text>
</view>
</view>
</scroll-view>
</view>

View File

@@ -0,0 +1,67 @@
/* components/result-section-nav/index.wxss */
.rsn {
position: sticky;
top: 0;
z-index: 50;
background: linear-gradient(180deg, rgba(255,255,255,0.98) 0%, rgba(255,255,255,0.94) 100%);
backdrop-filter: saturate(140%) blur(8rpx);
border-bottom: 1rpx solid #f1f5f9;
padding: 14rpx 8rpx 12rpx;
}
.rsn__scroll {
width: 100%;
white-space: nowrap;
}
.rsn__row {
display: inline-flex;
align-items: center;
gap: 12rpx;
padding: 0 12rpx;
}
.rsn__chip {
flex: 0 0 auto;
display: inline-flex;
align-items: center;
gap: 6rpx;
height: 56rpx;
padding: 0 22rpx;
border-radius: 28rpx;
background: #f1f5f9;
border: 1rpx solid transparent;
transition: all 0.2s ease;
}
.rsn__emoji {
font-size: 24rpx;
line-height: 1;
}
.rsn__label {
font-size: 24rpx;
font-weight: 500;
color: #475569;
letter-spacing: 0.02em;
line-height: 1;
}
.rsn__chip--active {
background: #fff;
border-color: currentColor;
box-shadow: 0 4rpx 12rpx rgba(15, 23, 42, 0.08);
}
/* 色系:与四测 hero 色对齐 */
.rsn--purple .rsn__chip--active { color: #6366f1; }
.rsn--purple .rsn__chip--active .rsn__label { color: #4f46e5; font-weight: 600; }
.rsn--blue .rsn__chip--active { color: #0ea5e9; }
.rsn--blue .rsn__chip--active .rsn__label { color: #0284c7; font-weight: 600; }
.rsn--orange .rsn__chip--active { color: #f97316; }
.rsn--orange .rsn__chip--active .rsn__label { color: #ea580c; font-weight: 600; }
.rsn--teal .rsn__chip--active { color: #14b8a6; }
.rsn--teal .rsn__chip--active .rsn__label { color: #0d9488; font-weight: 600; }