删除 miniprogram2 目录及其所有文件,包括项目配置、样式、图标和自定义组件,简化项目结构,专注于 miniprogram 目录的开发和维护。
This commit is contained in:
@@ -49,15 +49,16 @@
|
||||
- **vip 相关接口**:已改为 `/api/miniprogram/vip/*`(members、status、profile),符合项目边界。**后端需在 soul-api 的 miniprogram 组下挂对应路由**,可复用现有 handler。
|
||||
- **页面结构**:保留 vip、member-detail,未引入 scan、profile-edit
|
||||
|
||||
## 四、后端待办
|
||||
## 四、后端已补全(soul-api)
|
||||
|
||||
soul-api 需在 miniprogram 组下增加以下 VIP 路由(可复用现有 handler):
|
||||
已在 miniprogram 组下新增以下路由:
|
||||
|
||||
| 路径 | 方法 | 用途 |
|
||||
|------|------|------|
|
||||
| `/api/miniprogram/vip/status` | GET | 查询用户 VIP 状态 |
|
||||
| `/api/miniprogram/vip/profile` | GET/POST | 获取/更新 VIP 资料 |
|
||||
| `/api/miniprogram/vip/members` | GET | 获取 VIP 会员列表(首页超级个体、会员详情) |
|
||||
| `/api/miniprogram/vip/status` | GET | 查询用户 VIP 状态(按 fullbook/vip 订单判断) |
|
||||
| `/api/miniprogram/vip/profile` | GET/POST | 获取/更新 VIP 资料(映射 users 表 nickname/phone) |
|
||||
| `/api/miniprogram/vip/members` | GET | VIP 会员列表(无 id)或单个(?id=) |
|
||||
| `/api/miniprogram/users` | GET | 用户列表(?limit=)或单个(?id=),首页超级个体、会员详情回退 |
|
||||
|
||||
## 五、后续建议
|
||||
|
||||
|
||||
@@ -49,6 +49,9 @@ Page({
|
||||
// 最新新增章节
|
||||
latestChapters: [],
|
||||
|
||||
// 篇章数(从 bookData 计算)
|
||||
partCount: 0,
|
||||
|
||||
// 加载状态
|
||||
loading: true
|
||||
},
|
||||
@@ -164,12 +167,16 @@ Page({
|
||||
.sort((a, b) => new Date(b.updated_at || b.updatedAt || 0) - new Date(a.updated_at || a.updatedAt || 0))
|
||||
.slice(0, 5)
|
||||
}
|
||||
const tagMap = ['热门', '推荐', '精选']
|
||||
const tagClassMap = ['tag-hot', 'tag-rec', 'tag-rec']
|
||||
if (featured.length > 0) {
|
||||
this.setData({
|
||||
featuredSections: featured.slice(0, 3).map(s => ({
|
||||
featuredSections: featured.slice(0, 3).map((s, i) => ({
|
||||
id: s.id || s.section_id,
|
||||
title: s.section_title || s.title,
|
||||
part: (s.cleanPartTitle || s.part_title || '').replace(/[_||]/g, ' ').trim()
|
||||
title: s.section_title || s.sectionTitle || s.title || s.chapterTitle || '',
|
||||
part: (s.cleanPartTitle || s.part_title || s.partTitle || '').replace(/[_||]/g, ' ').trim(),
|
||||
tag: tagMap[i] || '精选',
|
||||
tagClass: tagClassMap[i] || 'tag-rec'
|
||||
}))
|
||||
})
|
||||
}
|
||||
@@ -187,8 +194,8 @@ Page({
|
||||
this.setData({
|
||||
latestSection: {
|
||||
id: latest.id || latest.section_id,
|
||||
title: latest.section_title || latest.title,
|
||||
part: latest.cleanPartTitle || latest.part_title || ''
|
||||
title: latest.section_title || latest.sectionTitle || latest.title || latest.chapterTitle || '',
|
||||
part: latest.cleanPartTitle || latest.part_title || latest.partTitle || ''
|
||||
}
|
||||
})
|
||||
}
|
||||
@@ -202,9 +209,11 @@ Page({
|
||||
const res = await app.request({ url: '/api/miniprogram/book/all-chapters', silent: true })
|
||||
if (res && (res.data || res.chapters)) {
|
||||
const chapters = res.data || res.chapters || []
|
||||
const partIds = new Set(chapters.map(c => c.partId || c.part_id || '').filter(Boolean))
|
||||
this.setData({
|
||||
bookData: chapters,
|
||||
totalSections: res.total || chapters.length || 62
|
||||
totalSections: res.total || chapters.length || 62,
|
||||
partCount: partIds.size || 5
|
||||
})
|
||||
}
|
||||
} catch (e) {
|
||||
@@ -248,6 +257,10 @@ Page({
|
||||
wx.navigateTo({ url: '/pages/vip/vip' })
|
||||
},
|
||||
|
||||
goToAbout() {
|
||||
wx.navigateTo({ url: '/pages/about/about' })
|
||||
},
|
||||
|
||||
goToSuperList() {
|
||||
wx.switchTab({ url: '/pages/match/match' })
|
||||
},
|
||||
@@ -256,16 +269,35 @@ Page({
|
||||
try {
|
||||
const res = await app.request({ url: '/api/miniprogram/book/all-chapters', silent: true })
|
||||
const chapters = (res && res.data) || (res && res.chapters) || []
|
||||
const latest = chapters
|
||||
.filter(c => (c.sectionOrder || c.sort_order || 0) > 62)
|
||||
const sortOrder = c => (c.sortOrder ?? c.sectionOrder ?? c.sort_order ?? 0)
|
||||
// 优先取 sort_order > 62 的「新增」章节;若无则取最近更新的前 10 章(排除序言/尾声/附录)
|
||||
let candidates = chapters.filter(c => sortOrder(c) > 62)
|
||||
if (candidates.length === 0) {
|
||||
const id = (c) => (c.id || '').toLowerCase()
|
||||
const pt = (c) => (c.partTitle || c.part_title || '').toLowerCase()
|
||||
candidates = chapters.filter(c =>
|
||||
!id(c).includes('preface') && !id(c).includes('epilogue') && !id(c).includes('appendix')
|
||||
&& !pt(c).includes('序言') && !pt(c).includes('尾声') && !pt(c).includes('附录')
|
||||
)
|
||||
}
|
||||
const latest = candidates
|
||||
.sort((a, b) => new Date(b.updatedAt || b.updated_at || 0) - new Date(a.updatedAt || a.updated_at || 0))
|
||||
.slice(0, 10)
|
||||
.map(c => {
|
||||
const d = new Date(c.updatedAt || c.updated_at || Date.now())
|
||||
const title = c.section_title || c.sectionTitle || c.title || c.chapterTitle || ''
|
||||
const rawContent = (c.content || '').replace(/<[^>]+>/g, '').trim()
|
||||
// 描述仅用正文摘要,避免 #id 或标题重复;截取 36 字
|
||||
let desc = ''
|
||||
if (rawContent && rawContent.length > 0) {
|
||||
const clean = rawContent.replace(/^#[\d.]+\s*/, '').trim()
|
||||
desc = clean.length > 36 ? clean.slice(0, 36) + '...' : clean
|
||||
}
|
||||
return {
|
||||
id: c.id,
|
||||
title: c.section_title || c.title || c.sectionTitle,
|
||||
price: c.price || 1,
|
||||
title,
|
||||
desc,
|
||||
price: c.price ?? 1,
|
||||
dateStr: `${d.getMonth() + 1}/${d.getDate()}`
|
||||
}
|
||||
})
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<!--pages/index/index.wxml-->
|
||||
<!--Soul创业派对 - 首页 1:1还原Web版本-->
|
||||
<!--Soul创业派对 - 首页(按临时需求池/首页页面设计)-->
|
||||
<view class="page page-transition">
|
||||
<!-- 自定义导航栏占位 -->
|
||||
<view class="nav-placeholder" style="height: {{statusBarHeight + 44}}px;"></view>
|
||||
@@ -12,9 +12,12 @@
|
||||
<text class="logo-text">S</text>
|
||||
</view>
|
||||
<view class="logo-info">
|
||||
<view class="logo-title">
|
||||
<text class="text-white">Soul</text>
|
||||
<text class="brand-color">创业派对</text>
|
||||
<view class="logo-title-row">
|
||||
<text class="logo-title-text">Soul创业派对</text>
|
||||
<view class="contact-btn" bindtap="goToAbout">
|
||||
<text class="contact-icon">+</text>
|
||||
<text class="contact-text">联系作者</text>
|
||||
</view>
|
||||
</view>
|
||||
<text class="logo-subtitle">来自派对房的真实故事</text>
|
||||
</view>
|
||||
@@ -26,9 +29,8 @@
|
||||
|
||||
<!-- 搜索栏 -->
|
||||
<view class="search-bar" bindtap="goToSearch">
|
||||
<view class="search-icon">
|
||||
<view class="search-circle"></view>
|
||||
<view class="search-handle"></view>
|
||||
<view class="search-icon-wrap">
|
||||
<text class="search-icon-text">🔍</text>
|
||||
</view>
|
||||
<text class="search-placeholder">搜索章节标题或内容...</text>
|
||||
</view>
|
||||
@@ -69,53 +71,55 @@
|
||||
<text class="stat-label">待读</text>
|
||||
</view>
|
||||
<view class="stat-item">
|
||||
<text class="stat-value">5</text>
|
||||
<text class="stat-value">{{partCount}}</text>
|
||||
<text class="stat-label">篇章</text>
|
||||
</view>
|
||||
<view class="stat-item">
|
||||
<text class="stat-value">11</text>
|
||||
<text class="stat-value">{{totalSections}}</text>
|
||||
<text class="stat-label">章节</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 超级个体(在阅读下方,精选上方) -->
|
||||
<!-- 超级个体(横向滚动) -->
|
||||
<view class="section">
|
||||
<view class="section-header">
|
||||
<text class="section-title">超级个体</text>
|
||||
<view class="section-more" bindtap="goToSuperList">
|
||||
<text class="more-text">查看全部</text>
|
||||
<text class="more-arrow">→</text>
|
||||
<text class="more-arrow">›</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="super-grid" wx:if="{{superMembers.length > 0}}">
|
||||
<view
|
||||
class="super-item"
|
||||
wx:for="{{superMembers}}"
|
||||
wx:key="id"
|
||||
bindtap="goToMemberDetail"
|
||||
data-id="{{item.id}}"
|
||||
>
|
||||
<view class="super-avatar {{item.isVip ? 'super-avatar-vip' : ''}}">
|
||||
<image class="super-avatar-img" wx:if="{{item.avatar}}" src="{{item.avatar}}" mode="aspectFill"/>
|
||||
<text class="super-avatar-text" wx:else>{{item.name[0] || '会'}}</text>
|
||||
<scroll-view wx:if="{{superMembers.length > 0}}" class="super-scroll" scroll-x>
|
||||
<view class="super-scroll-inner">
|
||||
<view
|
||||
class="super-item-h"
|
||||
wx:for="{{superMembers}}"
|
||||
wx:key="id"
|
||||
bindtap="goToMemberDetail"
|
||||
data-id="{{item.id}}"
|
||||
>
|
||||
<view class="super-avatar {{item.isVip ? 'super-avatar-vip' : ''}}">
|
||||
<image class="super-avatar-img" wx:if="{{item.avatar}}" src="{{item.avatar}}" mode="aspectFill"/>
|
||||
<text class="super-avatar-text" wx:else>{{item.name[0] || '会'}}</text>
|
||||
</view>
|
||||
<text class="super-name">{{item.name}}</text>
|
||||
</view>
|
||||
<text class="super-name">{{item.name}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
<view class="super-empty" wx:else>
|
||||
<text class="super-empty-text">成为会员,展示你的项目</text>
|
||||
<view class="super-empty-btn" bindtap="goToVip">加入创业派对 →</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 精选推荐 -->
|
||||
<!-- 精选推荐(带 tag) -->
|
||||
<view class="section">
|
||||
<view class="section-header">
|
||||
<text class="section-title">精选推荐</text>
|
||||
<view class="section-more" bindtap="goToChapters">
|
||||
<text class="more-text">查看全部</text>
|
||||
<text class="more-arrow">→</text>
|
||||
<text class="more-arrow">›</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="featured-list">
|
||||
@@ -129,32 +133,42 @@
|
||||
<view class="featured-content">
|
||||
<view class="featured-meta">
|
||||
<text class="featured-id brand-color">{{item.id}}</text>
|
||||
<text class="featured-tag {{item.tagClass || 'tag-rec'}}">{{item.tag || '精选'}}</text>
|
||||
</view>
|
||||
<text class="featured-title">{{item.title}}</text>
|
||||
<text class="featured-part">{{item.part}}</text>
|
||||
</view>
|
||||
<view class="featured-arrow">→</view>
|
||||
<view class="featured-arrow">›</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 最新新增(从目录移到此处,精选推荐下方) -->
|
||||
<!-- 最新新增(时间线样式) -->
|
||||
<view class="section" wx:if="{{latestChapters.length > 0}}">
|
||||
<view class="section-header">
|
||||
<view class="section-header latest-header">
|
||||
<text class="section-title">最新新增</text>
|
||||
<view class="daily-badge-wrap">
|
||||
<text class="daily-badge">+{{latestChapters.length}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="latest-list">
|
||||
<view class="latest-item" wx:for="{{latestChapters}}" wx:key="id" bindtap="goToRead" data-id="{{item.id}}">
|
||||
<view class="latest-left">
|
||||
<text class="latest-new-tag">NEW</text>
|
||||
<text class="latest-title">{{item.title}}</text>
|
||||
</view>
|
||||
<view class="latest-right">
|
||||
<text class="latest-price">¥{{item.price}}</text>
|
||||
<text class="latest-date">{{item.dateStr}}</text>
|
||||
<view class="timeline-wrap">
|
||||
<view class="timeline-line"></view>
|
||||
<view class="timeline-list">
|
||||
<view class="timeline-item {{index === 0 ? 'timeline-item-first' : ''}}" wx:for="{{latestChapters}}" wx:key="id" bindtap="goToRead" data-id="{{item.id}}">
|
||||
<view class="timeline-dot"></view>
|
||||
<view class="timeline-content">
|
||||
<view class="timeline-row">
|
||||
<view class="timeline-left">
|
||||
<text class="latest-new-tag">NEW</text>
|
||||
<text class="timeline-title">{{item.title}}</text>
|
||||
</view>
|
||||
<view class="timeline-right">
|
||||
<text class="timeline-price">¥{{item.price}}</text>
|
||||
<text class="timeline-date">{{item.dateStr}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<text class="timeline-desc" wx:if="{{item.desc && item.desc.length > 2}}">{{item.desc}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
}
|
||||
|
||||
.logo-text {
|
||||
color: #ffffff;
|
||||
color: #000000;
|
||||
font-size: 36rpx;
|
||||
font-weight: 700;
|
||||
}
|
||||
@@ -55,6 +55,40 @@
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.logo-title-row {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 16rpx;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.logo-title-text {
|
||||
font-size: 36rpx;
|
||||
font-weight: 700;
|
||||
color: #ffffff;
|
||||
}
|
||||
|
||||
.contact-btn {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 4rpx;
|
||||
padding: 8rpx 16rpx;
|
||||
background: rgba(0, 206, 209, 0.1);
|
||||
border: 2rpx solid rgba(0, 206, 209, 0.2);
|
||||
border-radius: 32rpx;
|
||||
font-size: 20rpx;
|
||||
font-weight: 600;
|
||||
color: #00CED1;
|
||||
}
|
||||
|
||||
.contact-icon {
|
||||
font-size: 20rpx;
|
||||
}
|
||||
|
||||
.contact-text {
|
||||
font-size: 20rpx;
|
||||
}
|
||||
|
||||
.logo-title {
|
||||
font-size: 36rpx;
|
||||
font-weight: 700;
|
||||
@@ -99,28 +133,17 @@
|
||||
border: 2rpx solid rgba(255, 255, 255, 0.05);
|
||||
}
|
||||
|
||||
.search-icon {
|
||||
position: relative;
|
||||
.search-icon-wrap {
|
||||
width: 32rpx;
|
||||
height: 32rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.search-circle {
|
||||
width: 20rpx;
|
||||
height: 20rpx;
|
||||
border: 4rpx solid rgba(255, 255, 255, 0.4);
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
||||
.search-handle {
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
right: 0;
|
||||
width: 12rpx;
|
||||
height: 4rpx;
|
||||
background: rgba(255, 255, 255, 0.4);
|
||||
transform: rotate(45deg);
|
||||
border-radius: 2rpx;
|
||||
.search-icon-text {
|
||||
font-size: 24rpx;
|
||||
opacity: 0.6;
|
||||
}
|
||||
|
||||
.search-placeholder {
|
||||
@@ -135,6 +158,14 @@
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.main-content > .banner-card {
|
||||
margin-bottom: 24rpx;
|
||||
}
|
||||
|
||||
.main-content > .card {
|
||||
margin-bottom: 24rpx;
|
||||
}
|
||||
|
||||
/* ===== Banner卡片 ===== */
|
||||
.banner-card {
|
||||
position: relative;
|
||||
@@ -282,7 +313,7 @@
|
||||
|
||||
/* ===== 区块标题 ===== */
|
||||
.section {
|
||||
margin-bottom: 24rpx;
|
||||
margin-bottom: 48rpx;
|
||||
}
|
||||
|
||||
.section-header {
|
||||
@@ -344,12 +375,29 @@
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 16rpx;
|
||||
margin-bottom: 16rpx;
|
||||
margin-bottom: 12rpx;
|
||||
}
|
||||
|
||||
.featured-id {
|
||||
font-size: 24rpx;
|
||||
font-weight: 500;
|
||||
font-size: 28rpx;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.featured-tag {
|
||||
font-size: 20rpx;
|
||||
font-weight: 600;
|
||||
padding: 4rpx 12rpx;
|
||||
border-radius: 8rpx;
|
||||
}
|
||||
|
||||
.tag-hot {
|
||||
background: rgba(246, 173, 85, 0.15);
|
||||
color: #F6AD55;
|
||||
}
|
||||
|
||||
.tag-rec {
|
||||
background: rgba(0, 206, 209, 0.15);
|
||||
color: #00CED1;
|
||||
}
|
||||
|
||||
.tag {
|
||||
@@ -498,12 +546,46 @@
|
||||
color: rgba(255, 255, 255, 0.6);
|
||||
}
|
||||
|
||||
/* ===== 超级个体 ===== */
|
||||
.super-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(4, 1fr);
|
||||
gap: 24rpx 16rpx;
|
||||
/* ===== 超级个体(横向滚动) ===== */
|
||||
.super-scroll {
|
||||
white-space: nowrap;
|
||||
width: 100%;
|
||||
margin: 0 -32rpx;
|
||||
padding: 0 32rpx;
|
||||
}
|
||||
|
||||
.super-scroll::-webkit-scrollbar {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.super-scroll-inner {
|
||||
display: inline-flex;
|
||||
gap: 32rpx;
|
||||
padding-bottom: 16rpx;
|
||||
}
|
||||
|
||||
.super-item-h {
|
||||
display: inline-flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
gap: 16rpx;
|
||||
min-width: 140rpx;
|
||||
}
|
||||
|
||||
.super-scroll .super-avatar {
|
||||
width: 112rpx;
|
||||
height: 112rpx;
|
||||
}
|
||||
|
||||
.super-scroll .super-name {
|
||||
font-size: 20rpx;
|
||||
max-width: 120rpx;
|
||||
text-align: center;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.super-item {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
@@ -561,72 +643,159 @@
|
||||
color: #00CED1;
|
||||
}
|
||||
|
||||
/* ===== 最新新增 ===== */
|
||||
/* ===== 最新新增(时间线样式) ===== */
|
||||
.latest-header {
|
||||
margin-bottom: 32rpx;
|
||||
}
|
||||
|
||||
.daily-badge-wrap {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
}
|
||||
/* 设计稿 1:1:橙底白字 rounded-full */
|
||||
.daily-badge {
|
||||
background: #FF4500;
|
||||
color: #fff;
|
||||
background: #F6AD55;
|
||||
color: #ffffff;
|
||||
font-size: 20rpx;
|
||||
font-weight: 600;
|
||||
padding: 4rpx 12rpx;
|
||||
border-radius: 16rpx;
|
||||
font-weight: 700;
|
||||
padding: 8rpx 20rpx;
|
||||
border-radius: 999rpx;
|
||||
margin-left: 8rpx;
|
||||
box-shadow: 0 4rpx 16rpx rgba(246, 173, 85, 0.3);
|
||||
}
|
||||
.latest-list {
|
||||
|
||||
/* 设计稿 1:1:pl-3 竖线 left-3 top-2 bottom-2 w-[1px] bg-gray-800 */
|
||||
.timeline-wrap {
|
||||
position: relative;
|
||||
padding-left: 24rpx;
|
||||
}
|
||||
|
||||
.timeline-line {
|
||||
position: absolute;
|
||||
left: 23rpx;
|
||||
top: 16rpx;
|
||||
bottom: 16rpx;
|
||||
width: 2rpx;
|
||||
background: #2c2c2e;
|
||||
z-index: 0;
|
||||
}
|
||||
|
||||
.timeline-list {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 12rpx;
|
||||
gap: 48rpx;
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
}
|
||||
.latest-item {
|
||||
|
||||
/* 设计稿:pl-6,分隔线在 content 内 */
|
||||
.timeline-item {
|
||||
position: relative;
|
||||
padding-left: 48rpx;
|
||||
padding-bottom: 0;
|
||||
}
|
||||
|
||||
.timeline-item:last-child .timeline-content {
|
||||
border-bottom: none;
|
||||
padding-bottom: 0;
|
||||
}
|
||||
|
||||
/* 设计稿:left-[-4.5px] top-1.5 w-2.5 h-2.5 ring-4 ring-black */
|
||||
.timeline-dot {
|
||||
position: absolute;
|
||||
left: -9rpx;
|
||||
top: 12rpx;
|
||||
width: 20rpx;
|
||||
height: 20rpx;
|
||||
border-radius: 50%;
|
||||
background: #2c2c2e;
|
||||
box-shadow: 0 0 0 16rpx #000;
|
||||
z-index: 2;
|
||||
}
|
||||
|
||||
.timeline-item-first .timeline-dot {
|
||||
background: #4FD1C5;
|
||||
}
|
||||
|
||||
.timeline-content {
|
||||
flex: 1;
|
||||
padding-bottom: 32rpx;
|
||||
border-bottom: 2rpx solid #1a1a1a;
|
||||
}
|
||||
|
||||
/* 设计稿:mb-1 justify-between gap-2 */
|
||||
.timeline-row {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding: 20rpx 24rpx;
|
||||
background: rgba(255,255,255,0.04);
|
||||
border-radius: 12rpx;
|
||||
border-left: 4rpx solid #FF4500;
|
||||
align-items: flex-start;
|
||||
gap: 16rpx;
|
||||
margin-bottom: 8rpx;
|
||||
}
|
||||
.latest-left {
|
||||
|
||||
.timeline-left {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 12rpx;
|
||||
gap: 16rpx;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.timeline-right {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: flex-end;
|
||||
flex-shrink: 0;
|
||||
padding-left: 16rpx;
|
||||
}
|
||||
|
||||
/* NEW 标签:黑底黄字黄色边框 */
|
||||
.latest-new-tag {
|
||||
font-size: 18rpx;
|
||||
font-weight: 700;
|
||||
color: #FF4500;
|
||||
background: rgba(255,69,0,0.15);
|
||||
padding: 2rpx 10rpx;
|
||||
border-radius: 6rpx;
|
||||
color: #F6AD55;
|
||||
background: #000000;
|
||||
padding: 6rpx 12rpx;
|
||||
border-radius: 8rpx;
|
||||
border: 2rpx solid #F6AD55;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
.latest-title {
|
||||
font-size: 26rpx;
|
||||
color: rgba(255,255,255,0.9);
|
||||
|
||||
/* 设计稿:text-sm font-medium text-white */
|
||||
.timeline-title {
|
||||
font-size: 28rpx;
|
||||
color: #ffffff;
|
||||
font-weight: 500;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.latest-right {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 12rpx;
|
||||
flex-shrink: 0;
|
||||
margin-left: 12rpx;
|
||||
}
|
||||
.latest-price {
|
||||
|
||||
/* 设计稿 1:1:价格/日期 light grey */
|
||||
.timeline-price {
|
||||
font-size: 26rpx;
|
||||
font-weight: 600;
|
||||
color: #FFD700;
|
||||
font-weight: 700;
|
||||
color: #A0AEC0;
|
||||
}
|
||||
.latest-date {
|
||||
font-size: 22rpx;
|
||||
color: rgba(255,255,255,0.4);
|
||||
|
||||
.timeline-date {
|
||||
font-size: 20rpx;
|
||||
color: #A0AEC0;
|
||||
margin-top: 4rpx;
|
||||
}
|
||||
|
||||
/* 描述仅单行,超出省略 */
|
||||
.timeline-desc {
|
||||
font-size: 24rpx;
|
||||
color: #A0AEC0;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
display: block;
|
||||
line-height: 1;
|
||||
min-width: 0;
|
||||
width: 100%;
|
||||
box-sizing: border-box;
|
||||
height: 26rpx;
|
||||
}
|
||||
|
||||
/* ===== 底部留白 ===== */
|
||||
|
||||
@@ -96,7 +96,7 @@ Page({
|
||||
// 加载匹配配置
|
||||
async loadMatchConfig() {
|
||||
try {
|
||||
const res = await app.request({ url: '/api/match/config', silent: true, method: 'GET',
|
||||
const res = await app.request({ url: '/api/miniprogram/match/config', silent: true, method: 'GET',
|
||||
method: 'GET'
|
||||
})
|
||||
|
||||
@@ -321,7 +321,7 @@ Page({
|
||||
// 从数据库获取真实用户匹配
|
||||
let matchedUser = null
|
||||
try {
|
||||
const res = await app.request({ url: '/api/match/users', silent: true,
|
||||
const res = await app.request({ url: '/api/miniprogram/match/users', silent: true,
|
||||
method: 'POST',
|
||||
data: {
|
||||
matchType: this.data.selectedType,
|
||||
@@ -405,7 +405,7 @@ Page({
|
||||
// 上报匹配行为
|
||||
async reportMatch(matchedUser) {
|
||||
try {
|
||||
await app.request({ url: '/api/ckb/match', silent: true,
|
||||
await app.request({ url: '/api/miniprogram/ckb/match', silent: true,
|
||||
method: 'POST',
|
||||
data: {
|
||||
matchType: this.data.selectedType,
|
||||
|
||||
@@ -671,7 +671,7 @@ Page({
|
||||
app.globalData.userInfo = userInfo
|
||||
wx.setStorageSync('userInfo', userInfo)
|
||||
try {
|
||||
await app.request('/api/user/update', { method: 'POST', data: { userId: userInfo.id, avatar: tempPath } })
|
||||
await app.request('/api/miniprogram/user/update', { method: 'POST', data: { userId: userInfo.id, avatar: tempPath } })
|
||||
} catch (e) { console.log('头像同步失败', e) }
|
||||
wx.showToast({ title: '头像已更新', icon: 'success' })
|
||||
}
|
||||
@@ -698,7 +698,7 @@ Page({
|
||||
wx.showLoading({ title: '提交中...', mask: true })
|
||||
try {
|
||||
const userId = app.globalData.userInfo?.id
|
||||
await app.request({ url: '/api/withdraw', method: 'POST', data: { userId, amount } })
|
||||
await app.request({ url: '/api/miniprogram/withdraw', method: 'POST', data: { userId, amount } })
|
||||
wx.hideLoading()
|
||||
wx.showToast({ title: '提现申请已提交', icon: 'success' })
|
||||
this.loadMyEarnings()
|
||||
|
||||
@@ -20,7 +20,7 @@ Page({
|
||||
try {
|
||||
const userId = app.globalData.userInfo?.id
|
||||
if (userId) {
|
||||
const res = await app.request(`/api/orders?userId=${userId}`)
|
||||
const res = await app.request(`/api/miniprogram/orders?userId=${userId}`)
|
||||
if (res && res.success && res.data) {
|
||||
const orders = (res.data || []).map(item => ({
|
||||
id: item.id || item.order_sn,
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
"projectname": "miniprogram",
|
||||
"setting": {
|
||||
"compileHotReLoad": true,
|
||||
"urlCheck": true,
|
||||
"urlCheck": false,
|
||||
"coverView": true,
|
||||
"lazyloadPlaceholderEnable": false,
|
||||
"skylineRenderEnable": false,
|
||||
|
||||
Reference in New Issue
Block a user