diff --git a/androidPrivacy.json b/androidPrivacy.json
new file mode 100644
index 0000000..0d726ca
--- /dev/null
+++ b/androidPrivacy.json
@@ -0,0 +1,3 @@
+{
+ "prompt" : "template"
+}
diff --git a/api/appUser.js b/api/appUser.js
index bf547d4..e9f7715 100755
--- a/api/appUser.js
+++ b/api/appUser.js
@@ -435,3 +435,10 @@ export function purchaseGamePass(package_id, count = 1, coupon_ids = []) {
export function bindDouyinID(douyin_id) {
return authRequest({ url: '/api/app/users/douyin/bind', method: 'POST', data: { douyin_id } })
}
+
+/**
+ * 同步当前用户绑定的抖音订单
+ */
+export function syncMyDouyinOrders() {
+ return authRequest({ url: '/api/app/users/douyin/orders/sync', method: 'POST' })
+}
diff --git a/pages-game/game/minesweeper/index.vue b/pages-game/game/minesweeper/index.vue
index 9c99e72..2b07fdf 100755
--- a/pages-game/game/minesweeper/index.vue
+++ b/pages-game/game/minesweeper/index.vue
@@ -121,9 +121,14 @@ export default {
}
})
- const nakamaServer = res.nakama_server || 'wss://kdy.1024tool.vip/ws'
+ const nakamaServer = 'wss://game.1024tool.vip'
+ const gameBaseUrl = 'https://game.1024tool.vip'
+ const userInfo = uni.getStorageSync('user_info') || {}
+ const uid = userInfo.id || userInfo.user_id || ''
+ const nickname = encodeURIComponent(userInfo.nickname || userInfo.name || '')
+ const gameUrl = `${gameBaseUrl}/?game_token=${encodeURIComponent(res.game_token)}&nakama_server=${encodeURIComponent(nakamaServer)}&nakama_key=${encodeURIComponent(res.nakama_key)}&game_type=${encodeURIComponent(targetCode)}&uid=${encodeURIComponent(uid)}&nickname=${nickname}`
uni.navigateTo({
- url: `/pages-game/game/minesweeper/play?game_token=${encodeURIComponent(res.game_token)}&nakama_server=${encodeURIComponent(nakamaServer)}&nakama_key=${encodeURIComponent(res.nakama_key)}`
+ url: `/pages-game/game/webview?url=${encodeURIComponent(gameUrl)}`
})
} catch (e) {
uni.showToast({
@@ -140,14 +145,15 @@ export default {
const res = await authRequest({
url: '/api/app/games/enter',
method: 'POST',
- data: {
- game_code: this.gameCode
- }
+ data: { game_code: this.gameCode }
})
-
- const nakamaServer = res.nakama_server || 'wss://kdy.1024tool.vip/ws'
+ const nakamaServer = 'wss://kdy.1024tool.vip'
+ const gameBaseUrl = 'http://192.168.31.185:8082'
+ const userInfo = uni.getStorageSync('user_info') || {}
+ const uid = userInfo.id || userInfo.user_id || ''
+ const gameUrl = `${gameBaseUrl}/?game_token=${encodeURIComponent(res.game_token)}&nakama_server=${encodeURIComponent(nakamaServer)}&nakama_key=${encodeURIComponent(res.nakama_key)}&game_type=${encodeURIComponent(this.gameCode)}&uid=${encodeURIComponent(uid)}&scene=room-list`
uni.navigateTo({
- url: `/pages-game/game/minesweeper/room-list?game_token=${encodeURIComponent(res.game_token)}&nakama_server=${encodeURIComponent(nakamaServer)}&nakama_key=${encodeURIComponent(res.nakama_key)}`
+ url: `/pages-game/game/webview?url=${encodeURIComponent(gameUrl)}`
})
} catch (e) {
uni.showToast({ title: '无法获取对战列表', icon: 'none' })
diff --git a/pages-game/game/minesweeper/leaderboard.vue b/pages-game/game/minesweeper/leaderboard.vue
new file mode 100644
index 0000000..1d8d5cb
--- /dev/null
+++ b/pages-game/game/minesweeper/leaderboard.vue
@@ -0,0 +1,424 @@
+
+
+
+
+
+
+
+ 付费模式
+
+
+ 免费模式
+
+
+
+
+
+
+ 我的排名
+ {{ myRank.rank ? `#${myRank.rank}` : '未上榜' }}
+
+
+
+
+ {{ myRank.wins || 0 }}
+ 胜场
+
+
+ {{ myRank.matches_played || 0 }}
+ 总场次
+
+
+ {{ formatWinRate(myRank.win_rate) }}
+ 胜率
+
+
+
+
+ {{ myRank.total_rank_points || 0 }}
+ 积分
+
+
+
+
+
+
+
+ ⏳
+ 加载中...
+
+
+
+ 🏆
+ 暂无数据,快来挑战吧!
+
+
+
+
+
+ 🥇
+ 🥈
+ 🥉
+ {{ item.rank }}
+
+
+
+
+
+
+ {{ item.nickname || '匿名玩家' }}
+ 我
+
+ {{ item.wins }}胜 · {{ item.matches_played }}场 · {{ formatWinRate(item.win_rate) }}胜率
+
+
+
+ {{ item.total_rank_points }}
+ 分
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/pages-game/game/webview.vue b/pages-game/game/webview.vue
index 42b762e..b8d5fb0 100755
--- a/pages-game/game/webview.vue
+++ b/pages-game/game/webview.vue
@@ -1,7 +1,5 @@
-
-
-
+
-
-
diff --git a/pages.json b/pages.json
index e156f7c..a70878e 100755
--- a/pages.json
+++ b/pages.json
@@ -223,6 +223,12 @@
"disableScroll": true
}
},
+ {
+ "path": "game/minesweeper/leaderboard",
+ "style": {
+ "navigationBarTitleText": "扫雷战绩榜"
+ }
+ },
{
"path": "game/webview",
"style": {
diff --git a/pages/index/index.vue b/pages/index/index.vue
index f8afb6f..08ce6b5 100755
--- a/pages/index/index.vue
+++ b/pages/index/index.vue
@@ -92,9 +92,9 @@
-
- 更多
- 敬请期待
+
+ 排行榜
+ 扫雷战绩榜
@@ -380,6 +380,9 @@ export default {
if(url === '#') return
uni.navigateTo({ url })
},
+ async openLeaderboard() {
+ uni.navigateTo({ url: '/pages-game/game/minesweeper/leaderboard' })
+ },
onNoticeTap() {
const content = this.displayNotices.map(n => n.text).join('\n')
uni.showModal({
diff --git a/pages/mine/index.vue b/pages/mine/index.vue
index ccfa195..b95bf98 100755
--- a/pages/mine/index.vue
+++ b/pages/mine/index.vue
@@ -178,6 +178,12 @@
+