|
@@ -60,7 +60,7 @@
|
|
|
<text class="tag-chip" v-for="(t, ti) in tagList(act.tags)" :key="ti">{{ t }}</text>
|
|
<text class="tag-chip" v-for="(t, ti) in tagList(act.tags)" :key="ti">{{ t }}</text>
|
|
|
</view>
|
|
</view>
|
|
|
<text class="card-meta" v-if="act.registrantName">报名人:{{ act.registrantName }}</text>
|
|
<text class="card-meta" v-if="act.registrantName">报名人:{{ act.registrantName }}</text>
|
|
|
- <text class="card-meta">开始 {{ formatDateTime(act.startTime) }}{{ act.endTime ? ' 结束 ' + formatDateTime(act.endTime) : '' }}</text>
|
|
|
|
|
|
|
+ <text class="card-meta">开始 {{ formatActivityTime(act.startTime) }}{{ act.endTime ? ' 结束 ' + formatActivityTime(act.endTime) : '' }}</text>
|
|
|
<text class="card-meta" v-if="act.location">📍 {{ act.location }}</text>
|
|
<text class="card-meta" v-if="act.location">📍 {{ act.location }}</text>
|
|
|
<view class="card-bottom">
|
|
<view class="card-bottom">
|
|
|
<text class="card-status" :class="'status-' + (act._cls || 'upcoming')">
|
|
<text class="card-status" :class="'status-' + (act._cls || 'upcoming')">
|
|
@@ -136,7 +136,7 @@
|
|
|
<view class="card-tags" v-if="tagList(act.tags).length">
|
|
<view class="card-tags" v-if="tagList(act.tags).length">
|
|
|
<text class="tag-chip" v-for="(t, ti) in tagList(act.tags)" :key="ti">{{ t }}</text>
|
|
<text class="tag-chip" v-for="(t, ti) in tagList(act.tags)" :key="ti">{{ t }}</text>
|
|
|
</view>
|
|
</view>
|
|
|
- <text class="card-meta">开始 {{ formatDateTime(act.startTime) }}{{ act.endTime ? ' 结束 ' + formatDateTime(act.endTime) : '' }}</text>
|
|
|
|
|
|
|
+ <text class="card-meta">开始 {{ formatActivityTime(act.startTime) }}{{ act.endTime ? ' 结束 ' + formatActivityTime(act.endTime) : '' }}</text>
|
|
|
<text class="card-desc" v-if="act.intro || act.description">{{ act.intro || act.description }}</text>
|
|
<text class="card-desc" v-if="act.intro || act.description">{{ act.intro || act.description }}</text>
|
|
|
<text class="card-meta" v-if="act.location">📍 {{ act.location }}</text>
|
|
<text class="card-meta" v-if="act.location">📍 {{ act.location }}</text>
|
|
|
<view class="card-bottom">
|
|
<view class="card-bottom">
|
|
@@ -204,7 +204,7 @@
|
|
|
<view class="card-tags" v-if="tagList(act.tags).length">
|
|
<view class="card-tags" v-if="tagList(act.tags).length">
|
|
|
<text class="tag-chip" v-for="(t, ti) in tagList(act.tags)" :key="ti">{{ t }}</text>
|
|
<text class="tag-chip" v-for="(t, ti) in tagList(act.tags)" :key="ti">{{ t }}</text>
|
|
|
</view>
|
|
</view>
|
|
|
- <text class="card-meta">开始 {{ formatDateTime(act.startTime) }}{{ act.endTime ? ' 结束 ' + formatDateTime(act.endTime) : '' }}</text>
|
|
|
|
|
|
|
+ <text class="card-meta">开始 {{ formatActivityTime(act.startTime) }}{{ act.endTime ? ' 结束 ' + formatActivityTime(act.endTime) : '' }}</text>
|
|
|
<text class="card-meta" v-if="act.location">📍 {{ act.location }}</text>
|
|
<text class="card-meta" v-if="act.location">📍 {{ act.location }}</text>
|
|
|
<view class="card-bottom">
|
|
<view class="card-bottom">
|
|
|
<text class="card-status status-ended">已结束</text>
|
|
<text class="card-status status-ended">已结束</text>
|
|
@@ -285,7 +285,7 @@
|
|
|
<view class="card-tags" v-if="tagList(act.tags).length">
|
|
<view class="card-tags" v-if="tagList(act.tags).length">
|
|
|
<text class="tag-chip" v-for="(t, ti) in tagList(act.tags)" :key="ti">{{ t }}</text>
|
|
<text class="tag-chip" v-for="(t, ti) in tagList(act.tags)" :key="ti">{{ t }}</text>
|
|
|
</view>
|
|
</view>
|
|
|
- <text class="card-meta">{{ act.startTime }}</text>
|
|
|
|
|
|
|
+ <text class="card-meta">{{ formatActivityTime(act.startTime) }}</text>
|
|
|
<view class="card-bottom">
|
|
<view class="card-bottom">
|
|
|
<text class="card-status" :class="'status-' + (act.status || 'draft')">
|
|
<text class="card-status" :class="'status-' + (act.status || 'draft')">
|
|
|
{{ statusLabel(act.status) }}
|
|
{{ statusLabel(act.status) }}
|
|
@@ -459,12 +459,25 @@ export default {
|
|
|
}
|
|
}
|
|
|
this.loadData()
|
|
this.loadData()
|
|
|
},
|
|
},
|
|
|
|
|
+ // 统一入口:onLoad / Tab 切换 / 筛选变更 / 从详情页返回(onShow) 都走这里。
|
|
|
|
|
+ // 语义固定为「重置为第一页后重新加载」——先清空数组并回到 page=1,
|
|
|
|
|
+ // 避免走 loadXxxActivities() 的非 refresh 分支导致列表被 concat 叠加(详情页返回时列表翻倍)。
|
|
|
|
|
+ // 加载更多不走这里,由 onLoadMore 自行递增页码追加。
|
|
|
loadData: function() {
|
|
loadData: function() {
|
|
|
if (this.currentTab === 'mine') {
|
|
if (this.currentTab === 'mine') {
|
|
|
|
|
+ this.minePage = 1
|
|
|
|
|
+ this.myActivities = []
|
|
|
|
|
+ this.hasMore = true
|
|
|
this.loadMyActivities()
|
|
this.loadMyActivities()
|
|
|
} else if (this.currentTab === 'discover') {
|
|
} else if (this.currentTab === 'discover') {
|
|
|
|
|
+ this.discoverPage = 1
|
|
|
|
|
+ this.discoverActivities = []
|
|
|
|
|
+ this.hasMore = true
|
|
|
this.loadDiscoverActivities()
|
|
this.loadDiscoverActivities()
|
|
|
} else if (this.currentTab === 'history') {
|
|
} else if (this.currentTab === 'history') {
|
|
|
|
|
+ this.historyPage = 1
|
|
|
|
|
+ this.historyActivities = []
|
|
|
|
|
+ this.hasMore = true
|
|
|
this.loadHistoryActivities()
|
|
this.loadHistoryActivities()
|
|
|
} else if (this.currentTab === 'manage') {
|
|
} else if (this.currentTab === 'manage') {
|
|
|
// 权限未解析/无权限时不发管理列表请求(onPermissionResolved 会回落 mine)
|
|
// 权限未解析/无权限时不发管理列表请求(onPermissionResolved 会回落 mine)
|
|
@@ -826,6 +839,11 @@ export default {
|
|
|
return (price / 100).toFixed(2)
|
|
return (price / 100).toFixed(2)
|
|
|
},
|
|
},
|
|
|
formatDateTime: formatDateTime,
|
|
formatDateTime: formatDateTime,
|
|
|
|
|
+ // 活动时间展示:复用统一 formatDateTime 后裁剪秒,输出 yyyy-MM-dd HH:mm(活动到分钟即可)
|
|
|
|
|
+ formatActivityTime: function(t) {
|
|
|
|
|
+ var s = formatDateTime(t)
|
|
|
|
|
+ return s ? s.substring(0, 16) : ''
|
|
|
|
|
+ },
|
|
|
hasFee: function(act) {
|
|
hasFee: function(act) {
|
|
|
return (act.childFee > 0) || (act.childMemberFee > 0) || (act.parentFee > 0) || (act.parentMemberFee > 0)
|
|
return (act.childFee > 0) || (act.childMemberFee > 0) || (act.parentFee > 0) || (act.parentMemberFee > 0)
|
|
|
},
|
|
},
|