From 5519dee3cf91b6d0366774aca6aaff52966be006 Mon Sep 17 00:00:00 2001 From: Eudemon Date: Wed, 12 Mar 2025 18:59:06 +0800 Subject: [PATCH] fixed --- .env.development | 2 +- .env.production | 2 +- package.json | 38 +- src/api/game.js | 9 +- src/components/popup/GreatRebet.vue | 62 ++- src/manifest.json | 4 +- src/pages/home/Home.vue | 616 +++++++++++++---------- src/pages/home/components/HomeNotice.vue | 2 +- src/pages/webview/GameWeb.vue | 6 +- vite.config.js | 13 +- 10 files changed, 410 insertions(+), 344 deletions(-) diff --git a/.env.development b/.env.development index cd89805..5c90459 100644 --- a/.env.development +++ b/.env.development @@ -1,4 +1,4 @@ -NODE_ENV = development +ENV = development VITE_APP_BASE_URL = https://game.777spinz.com # VITE_APP_BASE_URL=https://game-api.777spinz.com # VITE_APP_BASE_URL=http://192.168.1.24:8093 diff --git a/.env.production b/.env.production index 30d91f7..de83e8c 100644 --- a/.env.production +++ b/.env.production @@ -1,2 +1,2 @@ -NODE_ENV=production +ENV=production VITE_APP_BASE_URL=https://game-api.777spinz.com \ No newline at end of file diff --git a/package.json b/package.json index 65b1aec..2f4e7f1 100644 --- a/package.json +++ b/package.json @@ -180,21 +180,21 @@ }, "dependencies": { "@adjustcom/adjust-web-sdk": "^5.7.1", - "@dcloudio/uni-app": "3.0.0-4040520250104002", - "@dcloudio/uni-app-harmony": "3.0.0-4040520250104002", - "@dcloudio/uni-app-plus": "3.0.0-4040520250104002", - "@dcloudio/uni-components": "3.0.0-4040520250104002", - "@dcloudio/uni-h5": "3.0.0-4040520250104002", - "@dcloudio/uni-mp-alipay": "3.0.0-4040520250104002", - "@dcloudio/uni-mp-baidu": "3.0.0-4040520250104002", - "@dcloudio/uni-mp-jd": "3.0.0-4040520250104002", - "@dcloudio/uni-mp-kuaishou": "3.0.0-4040520250104002", - "@dcloudio/uni-mp-lark": "3.0.0-4040520250104002", - "@dcloudio/uni-mp-qq": "3.0.0-4040520250104002", - "@dcloudio/uni-mp-toutiao": "3.0.0-4040520250104002", - "@dcloudio/uni-mp-weixin": "3.0.0-4040520250104002", - "@dcloudio/uni-mp-xhs": "3.0.0-4040520250104002", - "@dcloudio/uni-quickapp-webview": "3.0.0-4040520250104002", + "@dcloudio/uni-app": "3.0.0-4050520250307001", + "@dcloudio/uni-app-harmony": "3.0.0-4050520250307001", + "@dcloudio/uni-app-plus": "3.0.0-4050520250307001", + "@dcloudio/uni-components": "3.0.0-4050520250307001", + "@dcloudio/uni-h5": "3.0.0-4050520250307001", + "@dcloudio/uni-mp-alipay": "3.0.0-4050520250307001", + "@dcloudio/uni-mp-baidu": "3.0.0-4050520250307001", + "@dcloudio/uni-mp-jd": "3.0.0-4050520250307001", + "@dcloudio/uni-mp-kuaishou": "3.0.0-4050520250307001", + "@dcloudio/uni-mp-lark": "3.0.0-4050520250307001", + "@dcloudio/uni-mp-qq": "3.0.0-4050520250307001", + "@dcloudio/uni-mp-toutiao": "3.0.0-4050520250307001", + "@dcloudio/uni-mp-weixin": "3.0.0-4050520250307001", + "@dcloudio/uni-mp-xhs": "3.0.0-4050520250307001", + "@dcloudio/uni-quickapp-webview": "3.0.0-4050520250307001", "crypto-js": "^4.2.0", "lodash": "^4.17.21", "md5": "^2.3.0", @@ -206,11 +206,11 @@ }, "devDependencies": { "@dcloudio/types": "3.4.14", - "@dcloudio/uni-automator": "3.0.0-4040520250104002", - "@dcloudio/uni-cli-shared": "3.0.0-4040520250104002", - "@dcloudio/uni-stacktracey": "3.0.0-4040520250104002", + "@dcloudio/uni-automator": "3.0.0-4050520250307001", + "@dcloudio/uni-cli-shared": "3.0.0-4050520250307001", + "@dcloudio/uni-stacktracey": "3.0.0-4050520250307001", "@dcloudio/uni-uts-v1": "3.0.0-4040520250104002", - "@dcloudio/vite-plugin-uni": "3.0.0-4040520250104002", + "@dcloudio/vite-plugin-uni": "3.0.0-4050520250307001", "@types/crypto-js": "^4.2.2", "@uni-helper/uni-app-types": "1.0.0-alpha.6", "@vue/runtime-core": "3.4.21", diff --git a/src/api/game.js b/src/api/game.js index 202f376..91d07dd 100644 --- a/src/api/game.js +++ b/src/api/game.js @@ -11,9 +11,16 @@ const api = { openGameSearch: ipConfig.api_app + '/labelGame/openGameSearch', getGameByCategoryAndPage: ipConfig.api_app + '/labelGame/getGameByCategoryAndPage', getSearchResults: ipConfig.api_app + '/labelGame/getSearchResults', - jiliLogout: ipConfig.api_app + '/jili/transfer/logout' + jiliLogout: ipConfig.api_app + '/jili/transfer/logout', + gameOut: ipConfig.api_app + '/labelGame/logoutGame', } +export const gameOutApi = () => { + return httpRequest.post({ + url: api.gameOut, + data: {} + }) +} /** * 获取标签 */ diff --git a/src/components/popup/GreatRebet.vue b/src/components/popup/GreatRebet.vue index 1c5aae6..78a4476 100644 --- a/src/components/popup/GreatRebet.vue +++ b/src/components/popup/GreatRebet.vue @@ -2,7 +2,7 @@ import { ref, computed } from 'vue' import { useThemeStore } from '@/store/useThemeStore.js' import { createBankruptRechargeApi } from '@/api/home' -import { formatNum } from '@/module/utils/util' +import { openWeb } from '@/module/utils/openUrl' const props = defineProps({ detail: { @@ -23,25 +23,22 @@ const close = () => { emit('close') } -/** - * - * @param {number} num - */ -function transNumtoStrArr(num) { - if (!num || isNaN(num)) return [] - return num.toString().split('') -} -const createOrder = async () => { - console.log('createOrder') - const { data } = await createBankruptRechargeApi(); - console.log('createOrder', data); -} -const calAmount = (obj) => { - if(obj.recharge, obj.rate) { - return formatNum(obj.recharge * obj.rate + obj.recharge, 1) +const createOrder = async (recharge) => { + uni.showLoading({ title: 'Loading...' }) + try { + const { data } = await createBankruptRechargeApi(recharge); + console.log('createOrder', data); + if (data?.isSuccess) { + openWeb(data?.url); + } + } catch (error) { + console.log('createOrder error', error); + } finally { + uni.hideLoading() } - return 0 + } + defineExpose({ open, close @@ -52,38 +49,39 @@ defineExpose({ {{ $t('home.greatRebet.tip') }} - + - {{ currency }}{{ detail[0]['give'] }} + {{ currency }}{{ detail[0]['give'] + detail[0]['recharge'] }} - {{ formatNum(detail[0]['rate'] * 100, 1) }} + {{ detail[0]['rate'] }} % - {{ currency }}{{ detail[1]['give'] }} + {{ currency }}{{ detail[1]['give'] + detail[1]['recharge'] }} - {{ formatNum(detail[1]['rate'] * 100, 1) }} + {{ detail[1]['rate'] }} % - {{ currency }}{{ detail[2]['give'] }} + {{ currency }}{{ detail[2]['give'] + detail[2]['recharge'] }} - {{ formatNum(detail[2]['rate'] * 100, 1) }} + {{ detail[2]['rate'] }} % - {{ currency }}{{ item.recharge }} + {{ + currency }}{{ item.recharge }} - + + backgroundColor: '#fff', + selectedBackgroundColor: themeStore.theme.swiper.dot, + selectedBorder: 'none', + bottom: 6, + }"> + { title: $t('home.allgames') }, + { title: $t('home.recent') }, + { title: $t('home.favorite') }, + ]" @change="({ index }) => { + gameStore.getRecentGames(); + gameStore.getFavoriteGames(); + pageData.active = index; + } + " /> @@ -62,7 +64,7 @@ - +