diff --git a/components/FlipGrid.vue b/components/FlipGrid.vue
index 816bd8e..7e447bf 100644
--- a/components/FlipGrid.vue
+++ b/components/FlipGrid.vue
@@ -65,19 +65,132 @@ defineExpose({ revealResults, reset })
diff --git a/components/PaymentPopup.vue b/components/PaymentPopup.vue
index 0af85e9..820b4d9 100644
--- a/components/PaymentPopup.vue
+++ b/components/PaymentPopup.vue
@@ -134,13 +134,18 @@ function handleConfirm() {
diff --git a/components/YifanSelector.vue b/components/YifanSelector.vue
index ed55465..8384761 100644
--- a/components/YifanSelector.vue
+++ b/components/YifanSelector.vue
@@ -34,8 +34,8 @@
-
-
+
+
@@ -291,121 +291,163 @@ async function onPaymentConfirm(paymentData) {
diff --git a/pages.json b/pages.json
index 9bae1d2..87d8fda 100644
--- a/pages.json
+++ b/pages.json
@@ -5,105 +5,108 @@
"style": {
"navigationBarTitleText": "uni-app"
}
- }
- ,
+ },
{
"path": "pages/login/index",
"style": {
"navigationBarTitleText": "登录"
}
- }
- ,
+ },
{
"path": "pages/shop/index",
"style": {
"navigationBarTitleText": "商城"
}
- }
- ,
+ },
{
"path": "pages/shop/detail",
"style": {
"navigationBarTitleText": "商品详情"
}
- }
- ,
+ },
{
"path": "pages/cabinet/index",
"style": {
"navigationBarTitleText": "货柜"
}
- }
- ,
+ },
{
"path": "pages/mine/index",
"style": {
"navigationBarTitleText": "我的"
}
- }
- ,
+ },
{
"path": "pages/points/index",
"style": {
"navigationBarTitleText": "积分记录"
}
- }
- ,
+ },
{
"path": "pages/orders/index",
"style": {
"navigationBarTitleText": "我的订单"
}
- }
- ,
+ },
{
"path": "pages/address/index",
"style": {
"navigationBarTitleText": "地址管理"
}
- }
- ,
+ },
{
"path": "pages/address/edit",
"style": {
"navigationBarTitleText": "编辑地址"
}
- }
- ,
+ },
{
"path": "pages/help/index",
"style": {
"navigationBarTitleText": "使用帮助"
}
- }
- ,
+ },
{
"path": "pages/agreement/user",
"style": {
"navigationBarTitleText": "用户协议"
}
- }
- ,
+ },
{
"path": "pages/agreement/purchase",
"style": {
"navigationBarTitleText": "购买协议"
}
- }
- ,
+ },
{
"path": "pages/activity/yifanshang/index",
- "style": { "navigationBarTitleText": "一番赏" }
- }
- ,
+ "style": {
+ "navigationBarTitleText": "一番赏"
+ }
+ },
{
"path": "pages/activity/wuxianshang/index",
- "style": { "navigationBarTitleText": "无限赏" }
- }
- ,
+ "style": {
+ "navigationBarTitleText": "无限赏"
+ }
+ },
{
"path": "pages/activity/duiduipeng/index",
- "style": { "navigationBarTitleText": "对对碰" }
+ "style": {
+ "navigationBarTitleText": "对对碰"
+ }
+ },
+ {
+ "path": "pages/activity/list/index",
+ "style": {
+ "navigationBarTitleText": "活动列表"
+ }
+ },
+ {
+ "path": "pages/activity/pata/index",
+ "style": {
+ "navigationBarTitleText": "爬塔"
+ }
},
{
"path": "pages/register/register",
@@ -118,10 +121,30 @@
"backgroundColor": "#FFFFFF",
"borderStyle": "black",
"list": [
- { "pagePath": "pages/index/index", "text": "首页", "iconPath": "static/tab/home.png", "selectedIconPath": "static/tab/home_active.png" },
- { "pagePath": "pages/shop/index", "text": "商城", "iconPath": "static/tab/shop.png", "selectedIconPath": "static/tab/shop_active.png" },
- { "pagePath": "pages/cabinet/index", "text": "货柜", "iconPath": "static/tab/box.png", "selectedIconPath": "static/tab/box_active.png" },
- { "pagePath": "pages/mine/index", "text": "我的", "iconPath": "static/tab/profile.png", "selectedIconPath": "static/tab/profile_active.png" }
+ {
+ "pagePath": "pages/index/index",
+ "text": "首页",
+ "iconPath": "static/tab/home.png",
+ "selectedIconPath": "static/tab/home_active.png"
+ },
+ {
+ "pagePath": "pages/shop/index",
+ "text": "商城",
+ "iconPath": "static/tab/shop.png",
+ "selectedIconPath": "static/tab/shop_active.png"
+ },
+ {
+ "pagePath": "pages/cabinet/index",
+ "text": "货柜",
+ "iconPath": "static/tab/box.png",
+ "selectedIconPath": "static/tab/box_active.png"
+ },
+ {
+ "pagePath": "pages/mine/index",
+ "text": "我的",
+ "iconPath": "static/tab/profile.png",
+ "selectedIconPath": "static/tab/profile_active.png"
+ }
]
},
"globalStyle": {
@@ -131,4 +154,4 @@
"backgroundColor": "#F8F8F8"
},
"uniIdRouter": {}
-}
+}
\ No newline at end of file
diff --git a/pages/activity/duiduipeng/index.vue b/pages/activity/duiduipeng/index.vue
index a66117f..5fcd4ce 100644
--- a/pages/activity/duiduipeng/index.vue
+++ b/pages/activity/duiduipeng/index.vue
@@ -293,39 +293,38 @@ onLoad((opts) => {
diff --git a/pages/activity/list/index.vue b/pages/activity/list/index.vue
new file mode 100644
index 0000000..67cfed8
--- /dev/null
+++ b/pages/activity/list/index.vue
@@ -0,0 +1,233 @@
+
+
+
+
+
+
+
+
+ HOT
+
+
+ {{ a.title }}
+
+ {{ a.category_name }} · {{ a.subtitle }}
+ GO
+
+
+
+
+
+
+ 暂无{{ title }}活动
+
+
+
+
+
+
+
+
diff --git a/pages/activity/pata/index.vue b/pages/activity/pata/index.vue
new file mode 100644
index 0000000..8a0f0d7
--- /dev/null
+++ b/pages/activity/pata/index.vue
@@ -0,0 +1,374 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 当前挑战
+ {{ currentIssueTitle || '第1层' }}
+
+ 进行中
+
+
+
+
+
+
+
+ {{ r.title }}
+ 概率 {{ r.percent }}%
+
+
+
+
+
+
+
+
+ ¥
+ {{ (Number(detail.price_draw || 0) / 100).toFixed(2) }}
+ /次
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/pages/activity/wuxianshang/index.vue b/pages/activity/wuxianshang/index.vue
index a81f871..62e9f62 100644
--- a/pages/activity/wuxianshang/index.vue
+++ b/pages/activity/wuxianshang/index.vue
@@ -1,25 +1,62 @@
+
-
-
-
-
-
-
-
-
-
- {{ currentIssueTitle }}
-
+
+
+
+
+
+
+ {{ detail.name || detail.title || '无限赏活动' }}
+ ¥{{ (Number(detail.price_draw || 0) / 100).toFixed(2) }}
+
+
+ 📦 盒柜
+
+
+
+
+
+
+ {{ currentIssueTitle }}
+
+
+
+
+
+
+ 聚宝盆
+ 随机掉落 10%
+ 随机免单 10%
+
+
+
+
+
+
+
+
+
+
+
@@ -388,42 +425,48 @@ function closeFlip() { showFlip.value = false }
diff --git a/pages/activity/yifanshang/index.vue b/pages/activity/yifanshang/index.vue
index 0f29be7..0063cb1 100644
--- a/pages/activity/yifanshang/index.vue
+++ b/pages/activity/yifanshang/index.vue
@@ -1,32 +1,93 @@
-
-
-
-
-
-
-
-
-
- {{ currentIssueTitle }}
-
-
-
-
-
-
-
+
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ item.boss ? 'BOSS' : (item.grade || '赏') }}
+
+ {{ item.title }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -65,6 +126,26 @@ const currentIssueTitle = computed(() => {
const t = (cur && (cur.title || ('第' + (cur.no || '-') + '期'))) || '-'
return t
})
+// 当前期剩余数量
+const currentIssueRemain = computed(() => {
+ const arr = issues.value || []
+ const cur = arr[selectedIssueIndex.value]
+ return cur && cur.remain !== undefined ? cur.remain : ''
+})
+
+// 显示规则
+function showRules() {
+ uni.showModal({
+ title: '活动规则',
+ content: detail.value.rules || '1. 选择号码进行抽选\n2. 每个号码对应一个奖品\n3. 已售号码不可再选',
+ showCancel: false
+ })
+}
+
+// 跳转盒柜
+function goCabinet() {
+ uni.navigateTo({ url: '/pages/cabinet/index' })
+}
function statusToText(s) {
if (s === 1) return '进行中'
@@ -299,54 +380,251 @@ function closeFlip() { showFlip.value = false }
+
diff --git a/pages/address/edit.vue b/pages/address/edit.vue
index aa09913..bc1fb2d 100644
--- a/pages/address/edit.vue
+++ b/pages/address/edit.vue
@@ -149,10 +149,75 @@ onLoad((opts) => {
\ No newline at end of file
diff --git a/pages/address/index.vue b/pages/address/index.vue
index 842f421..5374f9d 100644
--- a/pages/address/index.vue
+++ b/pages/address/index.vue
@@ -114,17 +114,131 @@ onLoad(() => {
\ No newline at end of file
diff --git a/pages/cabinet/index.vue b/pages/cabinet/index.vue
index f990f13..9975d85 100644
--- a/pages/cabinet/index.vue
+++ b/pages/cabinet/index.vue
@@ -570,49 +570,47 @@ async function onShip() {
diff --git a/pages/index/index.vue b/pages/index/index.vue
index bd43b71..17c7fc9 100644
--- a/pages/index/index.vue
+++ b/pages/index/index.vue
@@ -1,44 +1,125 @@
-
-
-
- {{ n.text }}
-
-
+
+
-
-
-
-
-
- {{ b.title || '敬请期待' }}
-
-
-
-
-
-
- 活动
-
-
- {{ g.name }}
-
-
-
-
+
+
+
+
+
+
+
- {{ a.title || '活动敬请期待' }}
+ {{ b.title || '奇盒潮玩 V6.0' }}
+ 功能更新UI优化全面来袭
+
+
+
+
+
+
+
+ 通知
+
+
+ {{ n.text }}
+
+
+ 查看详情
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 一番赏
+ 欧皇擂台
+
+
+
+
+
+ 无限赏
+ 一发入魂
+
+
+
+
+
+
+
+
+ 对对碰
+ 碰一碰消除
+
+
+
+
+ 爬塔
+ 层层挑战
+
+
+
+
+ 更多
+ 敬请期待
+
- {{ a.title }}
- {{ a.subtitle }}
- 该分组暂无活动
- 暂无活动
-
+
+
+
+
+
+
+
+
+
+
+ {{ a.title }}
+
+
+ HOT
+
+
+ {{ a.title }}
+
+ {{ a.subtitle }}
+ GO
+
+
+
+
+ 暂无更多活动
+
+
+
+
+
@@ -80,10 +161,8 @@ export default {
return Array.from(map.entries()).map(([name, items]) => ({ name, items }))
},
activeGroupItems() {
- const groups = this.activityGroups
- const name = this.selectedGroupName || (groups[0] && groups[0].name) || ''
- const g = groups.find(x => x.name === name)
- return g ? g.items : []
+ // Return ALL activities without filtering by group
+ return Array.isArray(this.activities) ? this.activities : []
}
},
onShow() {
@@ -109,11 +188,7 @@ export default {
this.selectedGroupName = String(name || '')
},
updateSelectedGroup() {
- const groups = this.activityGroups
- if (!groups.length) { this.selectedGroupName = ''; return }
- if (!groups.find(g => g.name === this.selectedGroupName)) {
- this.selectedGroupName = groups[0].name
- }
+ // No-op as we now show all
},
toArray(x) { return Array.isArray(x) ? x : [] },
unwrap(list) {
@@ -142,7 +217,6 @@ export default {
},
normalizeBanners(list) {
const arr = this.unwrap(list)
- console.log('normalizeBanners input', list, 'unwrapped', arr)
const mapped = arr.map((i, idx) => ({
id: i.id ?? String(idx),
title: i.title ?? '',
@@ -151,12 +225,10 @@ export default {
sort: typeof i.sort === 'number' ? i.sort : 0
})).filter(i => i.image)
mapped.sort((a, b) => a.sort - b.sort)
- console.log('normalizeBanners mapped', mapped)
return mapped
},
normalizeActivities(list) {
const arr = this.unwrap(list)
- console.log('normalizeActivities input', list, 'unwrapped', arr)
const mapped = arr.map((i, idx) => ({
id: i.id ?? String(idx),
image: this.cleanUrl(i.image ?? i.banner ?? i.coverUrl ?? i.cover_url ?? i.img ?? i.pic ?? ''),
@@ -166,7 +238,6 @@ export default {
category_name: (i.category_name ?? i.categoryName ?? '').trim(),
category_id: i.activity_category_id ?? i.category_id ?? i.categoryId ?? null
})).filter(i => i.image || i.title)
- console.log('normalizeActivities mapped', mapped)
return mapped
},
buildActivitySubtitle(i) {
@@ -178,36 +249,29 @@ export default {
return parts.join(' · ')
},
async loadHomeData() {
- const results = await Promise.allSettled([
- this.apiGet('/api/app/notices'),
- this.apiGet('/api/app/banners'),
- this.apiGet('/api/app/activities')
- ])
- const [nRes, bRes, acRes] = results
- if (nRes.status === 'fulfilled') {
- console.log('notices ok', nRes.value)
- this.notices = this.normalizeNotices(nRes.value)
- } else {
- console.error('notices error', nRes.reason)
+ // Notices
+ try {
+ const nData = await this.apiGet('/api/app/notices')
+ this.notices = this.normalizeNotices(nData)
+ } catch (e) {
this.notices = []
}
- if (bRes.status === 'fulfilled') {
- console.log('banners ok', bRes.value)
- this.banners = this.normalizeBanners(bRes.value)
- } else {
- console.error('banners error', bRes.reason)
+
+ // Banners
+ try {
+ const bData = await this.apiGet('/api/app/banners')
+ this.banners = this.normalizeBanners(bData)
+ } catch (e) {
this.banners = []
}
- if (acRes.status === 'fulfilled') {
- console.log('activities ok', acRes.value)
- this.activities = this.normalizeActivities(acRes.value)
- this.updateSelectedGroup()
- } else {
- console.error('activities error', acRes.reason)
+
+ // Activities
+ try {
+ const acData = await this.apiGet('/api/app/activities')
+ this.activities = this.normalizeActivities(acData)
+ } catch (e) {
this.activities = []
- this.updateSelectedGroup()
}
- console.log('home normalized', { notices: this.notices, banners: this.banners, activities: this.activities })
},
onBannerTap(b) {
const imgs = (Array.isArray(this.banners) ? this.banners : []).map(x => x.image).filter(Boolean)
@@ -224,9 +288,11 @@ export default {
const name = (a.category_name || a.categoryName || '').trim()
const id = a.id
let path = ''
- if (name === '一番赏') path = '/pages/activity/yifanshang/index'
- else if (name === '无限赏') path = '/pages/activity/wuxianshang/index'
- else if (name === '对对碰') path = '/pages/activity/duiduipeng/index'
+ if (name.includes('一番赏')) path = '/pages/activity/yifanshang/index'
+ else if (name.includes('无限赏')) path = '/pages/activity/wuxianshang/index'
+ else if (name.includes('对对碰')) path = '/pages/activity/duiduipeng/index'
+ else if (name.includes('爬塔')) path = '/pages/activity/pata/index'
+
if (path && id) {
uni.navigateTo({ url: `${path}?id=${id}` })
return
@@ -234,29 +300,386 @@ export default {
if (a.link && /^\/.+/.test(a.link)) {
uni.navigateTo({ url: a.link })
}
+ },
+ navigateTo(url) {
+ if(url === '#') return
+ uni.navigateTo({ url })
+ },
+ onNoticeTap() {
+ const content = this.displayNotices.map(n => n.text).join('\n')
+ uni.showModal({
+ title: '系统通知',
+ content: content || '暂无通知',
+ showCancel: false,
+ confirmText: '知道了'
+ })
}
}
}
diff --git a/pages/login/index.vue b/pages/login/index.vue
index d71e622..d3e5117 100644
--- a/pages/login/index.vue
+++ b/pages/login/index.vue
@@ -1,74 +1,103 @@
-
-
-
-
- 账号:
-
-
-
-
- 密码:
-
-
-
-
-
-
- 记住账号密码
-
-
-
-
-
-
-
- 还没有账号?点击注册
-
-
-
-
-
-
-
- 微信登录
-
-
-
-
-
- 注册或登录即表示您已阅读并同意
- 《用户协议》
- 和
- 《购买协议》
+
+
+
+
+
+
+
+
+
+
+ 奇盒潮玩
+ 开启欧气之旅 ✨
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ✓
+
+ 记住密码
+
+
+
+
+
+
+ 没有账号?立即注册
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 登录即代表同意 用户协议 & 隐私政策
+
+
+
+ {{ error }}
- 登录成功,请绑定手机号以完成登录
- {{ error }}
\ No newline at end of file
diff --git a/pages/mine/index.vue b/pages/mine/index.vue
index 2a4becf..805c4be 100644
--- a/pages/mine/index.vue
+++ b/pages/mine/index.vue
@@ -1,218 +1,246 @@
-
+
diff --git a/pages/orders/index.vue b/pages/orders/index.vue
index f634d9d..d943644 100644
--- a/pages/orders/index.vue
+++ b/pages/orders/index.vue
@@ -164,19 +164,127 @@ onReachBottom(() => {
diff --git a/pages/register/register.vue b/pages/register/register.vue
new file mode 100644
index 0000000..3a550c0
--- /dev/null
+++ b/pages/register/register.vue
@@ -0,0 +1,156 @@
+
+
+
+ 注册新账号
+
+
+
+ 账号
+
+
+
+
+ 密码
+
+
+
+
+ 确认密码
+
+
+
+
+
+
+
+ 已有账号?去登录
+
+
+ {{ error }}
+
+
+
+
+
+
diff --git a/pages/shop/detail.vue b/pages/shop/detail.vue
new file mode 100644
index 0000000..463530e
--- /dev/null
+++ b/pages/shop/detail.vue
@@ -0,0 +1,127 @@
+
+
+ 加载中...
+
+
+
+ {{ detail.title || detail.name || '-' }}
+
+ ¥{{ formatPrice(detail.price_sale || detail.price) }}
+ {{ detail.points_required }}积分
+
+ 库存:{{ detail.stock }}
+ {{ detail.description }}
+
+
+ 商品不存在
+
+
+
+
+
+
diff --git a/pages/shop/index.vue b/pages/shop/index.vue
index 2b9cea9..33be12d 100644
--- a/pages/shop/index.vue
+++ b/pages/shop/index.vue
@@ -2,51 +2,74 @@
- 提示
- 由于价格浮动,当前暂不支持自行兑换商品,兑换请联系客服核对价格。
+ 温馨提示
+ 由于商品价格实时浮动,当前暂不支持自助兑换。如需兑换商品,请联系客服核对最新价格。
-
- 不再显示
+
+
+
+ 不再提示
-
+
-
-
- 商品
-
-
-
-
- -
-
-
+
+
+