diff --git a/api/thresholdActivity.js b/api/thresholdActivity.js
new file mode 100644
index 0000000..dcf2288
--- /dev/null
+++ b/api/thresholdActivity.js
@@ -0,0 +1,25 @@
+import { request, authRequest } from '../utils/request'
+
+export function listThresholdActivities(params = {}) {
+ return request({ url: '/api/app/threshold-activities', method: 'GET', data: params })
+}
+
+export function getThresholdActivity(id) {
+ return request({ url: `/api/app/threshold-activities/${id}`, method: 'GET' })
+}
+
+export function getMyThresholdActivity(id) {
+ return authRequest({ url: `/api/app/threshold-activities/${id}/my`, method: 'GET', suppressAuthModal: true })
+}
+
+export function joinThresholdActivity(id) {
+ return authRequest({ url: `/api/app/threshold-activities/${id}/join`, method: 'POST' })
+}
+
+export function listThresholdParticipants(id, page = 1, page_size = 20) {
+ return request({ url: `/api/app/threshold-activities/${id}/participants`, method: 'GET', data: { page, page_size } })
+}
+
+export function listThresholdWinners(id, page = 1, page_size = 100) {
+ return request({ url: `/api/app/threshold-activities/${id}/winners`, method: 'GET', data: { page, page_size } })
+}
diff --git a/pages-activity/activity/threshold/detail.vue b/pages-activity/activity/threshold/detail.vue
new file mode 100644
index 0000000..63e6b2f
--- /dev/null
+++ b/pages-activity/activity/threshold/detail.vue
@@ -0,0 +1,586 @@
+
+
+
+ 暂无活动图片
+
+
+
+ {{ detail.title }}
+ {{ typeLabel(detail.type) }}
+
+ {{ statusText(detail.status) }}
+ 开奖时间:{{ formatTime(detail.draw_time) }}
+ {{ detail.description }}
+
+
+
+
+ 我的参与资格
+ {{ qualificationModeLabel(detail.qualification_mode) }}
+
+
+
+
+ 邀请好友一起冲开奖
+ 裂变加速
+
+ 当前还差 {{ crowdGapCount }} 人达到开奖标准,分享活动给好友可更快凑齐人数。
+
+
+ 复制邀请口令
+ 我的邀请记录
+
+
+
+
+
+ 消费进度
+
+ {{ qualification?.spend_qualified ? '已达标' : '未达标' }}
+
+
+ {{ money(qualification?.current_paid || 0) }} / {{ money(detail.spend_threshold_amount) }}
+
+
+
+
+
+
+
+ 邀请进度
+
+ {{ qualification?.invite_qualified ? '已达标' : '未达标' }}
+
+
+ {{ qualification?.effective_invite_count || 0 }} / {{ detail.invite_threshold_count || 0 }} 人
+
+
+
+ 每位活动开始后新邀请的用户消费满 {{ money(detail.invite_effective_amount) }} 才算 1 位有效邀请
+
+
+
+ {{ qualificationSummary }}
+ {{ joinButtonText }}
+
+
+
+
+
+ 开奖进度
+ {{ detail.participant_count || 0 }} / {{ detail.min_participants || 0 }} 人
+
+
+
+
+
+ {{ crowdSummary }}
+ {{ crowdHint }}
+
+
+
+
+
+ 奖品
+ 参与人数 {{ detail.participant_count || 0 }} / 最低开奖 {{ detail.min_participants || 0 }}
+
+
+
+
+
+ {{ prizePlaceholderText(prize) }}
+ {{ prize.name }}
+ 参考价 ¥{{ formatAmount(prizePrice(prize)) }}
+ x{{ prize.quantity }}
+
+
+
+ 暂无奖品
+
+
+
+
+ 参与玩家
+
+ 中奖概览
+ 查看更多
+
+
+
+ 共 {{ participantCount }} 人
+ {{ crowdGapText }}
+
+
+
+
+
+
+ 暂无参与玩家
+
+
+
+
+ 查看往期裂变活动
+ 浏览历史开奖与流产活动
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/pages-activity/activity/threshold/index.vue b/pages-activity/activity/threshold/index.vue
new file mode 100644
index 0000000..11e829a
--- /dev/null
+++ b/pages-activity/activity/threshold/index.vue
@@ -0,0 +1,130 @@
+
+
+
+ {{ mode === 'history' ? '往期裂变活动' : '拉新裂变活动' }}
+ {{ mode === 'history' ? '查看历史开奖与流产活动' : '完成消费或邀请门槛即可参与' }}
+
+
+
+ 进行中
+ 往期
+
+
+ 加载中...
+ {{ mode === 'history' ? '暂无往期活动' : '暂无进行中的活动' }}
+
+
+
+
+ 暂无图片
+
+
+ {{ item.title }}
+ {{ statusLabel(item.status) }}
+
+
+ {{ typeLabel(item.type) }}
+ {{ qualificationModeLabel(item.qualification_mode) }}
+
+
+ 消费门槛 {{ money(item.spend_threshold_amount) }}
+ 最低开奖 {{ item.min_participants || 0 }} 人
+
+
+ 邀请门槛 {{ item.invite_threshold_count || 0 }} 人
+ 有效消费 {{ money(item.invite_effective_amount) }}
+
+
+
+
+
+
+
+
+
+
diff --git a/pages-game/game/minesweeper/index.vue b/pages-game/game/minesweeper/index.vue
index a61da12..2a4dd9c 100755
--- a/pages-game/game/minesweeper/index.vue
+++ b/pages-game/game/minesweeper/index.vue
@@ -43,19 +43,21 @@
@@ -77,6 +79,9 @@ export default {
this.loadTickets()
},
methods: {
+ async openLeaderboard() {
+ uni.navigateTo({ url: '/pages-game/game/minesweeper/leaderboard' })
+ },
async loadTickets() {
this.loading = true
@@ -304,6 +309,12 @@ export default {
padding-bottom: calc(40rpx + env(safe-area-inset-bottom));
}
+.minesweeper-actions {
+ display: flex;
+ gap: 20rpx;
+ margin-top: 24rpx;
+}
+
.btn-primary {
height: 110rpx;
width: 100%;
@@ -316,8 +327,8 @@ export default {
}
}
-.btn-secondary {
- margin-top: 24rpx;
+btn-secondary {
+ flex: 1;
background: rgba(255,255,255,0.05);
border: 1px solid rgba(255,255,255,0.1);
border-radius: 55rpx;
@@ -327,6 +338,11 @@ export default {
justify-content: center;
}
+.leaderboard-btn {
+ background: rgba($brand-primary, 0.10);
+ border-color: rgba($brand-primary, 0.18);
+}
+
.secondary-btn-text {
color: #94a3b8;
font-size: 32rpx;
diff --git a/pages-user/invite/landing.vue b/pages-user/invite/landing.vue
index 74fb22f..7e44184 100755
--- a/pages-user/invite/landing.vue
+++ b/pages-user/invite/landing.vue
@@ -185,13 +185,18 @@ function onGetPhoneNumber(e) {
} catch(e) {}
uni.showToast({ title: '欢迎加入!', icon: 'success' })
+ const backTarget = '/pages-activity/activity/threshold/index'
setTimeout(() => {
// #ifdef MP-TOUTIAO
- // 抖音平台跳转到商城
uni.switchTab({ url: '/pages/shop/index' })
// #endif
// #ifndef MP-TOUTIAO
- uni.switchTab({ url: '/pages/index/index' })
+ const pages = getCurrentPages()
+ if (pages.length > 1) {
+ uni.navigateBack({ delta: 1 })
+ } else {
+ uni.switchTab({ url: '/pages/index/index' })
+ }
// #endif
}, 500)
diff --git a/pages-user/invites/index.vue b/pages-user/invites/index.vue
index 4594631..759de87 100755
--- a/pages-user/invites/index.vue
+++ b/pages-user/invites/index.vue
@@ -19,6 +19,16 @@
{{ getRewardsTotal() }}
累计奖励
+
+
+ {{ shareCount }}
+ 分享引导
+
+
+
+
+
+ 复制邀请码
@@ -83,6 +93,7 @@ const isRefreshing = ref(false)
const page = ref(1)
const pageSize = 20
const hasMore = ref(true)
+const shareCount = ref(0)
// 获取用户ID
function getUserId() {
@@ -126,6 +137,16 @@ function getRewardsTotal() {
return list.value.length * rewardPerInvite
}
+function copyInviteLink() {
+ const inviteCode = uni.getStorageSync('invite_code') || (uni.getStorageSync('user_info') || {}).invite_code || ''
+ const text = inviteCode ? `快来和我一起参加裂变活动,邀请码:${inviteCode}` : '快来和我一起参加裂变活动'
+ uni.setClipboardData({
+ data: text,
+ success: () => uni.showToast({ title: '邀请码已复制', icon: 'success' }),
+ fail: () => uni.showToast({ title: '复制失败', icon: 'none' })
+ })
+}
+
// 下拉刷新
async function onRefresh() {
isRefreshing.value = true
@@ -172,8 +193,19 @@ async function fetchData(append = false) {
}
onLoad(() => {
+ const inviteCode = uni.getStorageSync('invite_code') || (uni.getStorageSync('user_info') || {}).invite_code || ''
+ shareCount.value = inviteCode ? 1 : 0
fetchData()
})
+
+onShareAppMessage(() => {
+ const inviteCode = uni.getStorageSync('invite_code') || (uni.getStorageSync('user_info') || {}).invite_code || ''
+ return {
+ title: '邀请好友一起参加裂变活动,达标就能开奖!',
+ path: `/pages-user/invite/landing?invite_code=${inviteCode}`,
+ imageUrl: '/static/logo.png'
+ }
+})