更新小程序首页精选推荐逻辑,调整展示的章节数据源为排名接口,优化展开功能以支持动态加载更多章节。修复图标组件的SVG映射,确保图标显示一致性。更新开发环境配置为本地地址,提升开发体验。

This commit is contained in:
Alex-larget
2026-03-20 17:02:09 +08:00
parent 1b87fa92f7
commit 905e8f1e8d
24 changed files with 337 additions and 161 deletions

View File

@@ -14,7 +14,7 @@ const { trackClick } = require('../../utils/trackClick')
// 导师顾问:跳转到存客宝添加微信
// 团队招募:跳转到存客宝添加微信
let MATCH_TYPES = [
{ id: 'partner', label: '找伙伴', matchLabel: '找伙伴', icon: 'star', matchFromDB: true, showJoinAfterMatch: false },
{ id: 'partner', label: '找伙伴', matchLabel: '找伙伴', icon: 'handshake', matchFromDB: true, showJoinAfterMatch: false },
{ id: 'investor', label: '资源对接', matchLabel: '资源对接', icon: 'users', matchFromDB: true, showJoinAfterMatch: true, requirePurchase: true },
{ id: 'mentor', label: '导师顾问', matchLabel: '导师顾问', icon: 'heart', matchFromDB: true, showJoinAfterMatch: true },
{ id: 'team', label: '团队招募', matchLabel: '团队招募', icon: 'gamepad', matchFromDB: true, showJoinAfterMatch: true }
@@ -453,6 +453,13 @@ Page({
const newCount = this.data.todayMatchCount + 1
const matchesRemaining = this.data.hasFullBook ? 999999 : Math.max(0, this.data.totalMatchesAllowed - newCount)
// 规范化 commonInterestsemoji 或无效 icon 转为 SVG 图标名
const normalized = matchedUser.commonInterests?.map(item => ({
...item,
icon: /^[a-z0-9-]+$/i.test(item.icon) ? item.icon : 'target'
})) || []
if (normalized.length) matchedUser = { ...matchedUser, commonInterests: normalized }
this.setData({
isMatching: false,
currentMatch: matchedUser,