From 2980496abc0b53ee686fc71a8a339667fad534e6 Mon Sep 17 00:00:00 2001 From: YuanHuakk <1751826683@qq.com> Date: Sun, 8 Oct 2023 22:52:44 +0800 Subject: [PATCH] i --- .env.dev | 2 - .env.development | 6 + .env.prod | 1 - .env.production | 4 + .env.test | 6 +- config/index.ts | 2 +- package.json | 2 + src/config/index.ts | 14 +- src/index.html | 1 + src/pages/game_detail/index.scss | 5 + src/pages/game_detail/index.vue | 55 ++- src/pages/index/index.scss | 17 + src/pages/index/index.vue | 31 +- src/pages/yaotouzi/index/index.scss | 52 +- src/pages/yaotouzi/index/index.vue | 693 ++++++++++++++++++--------- src/pages/yaotouzi/records/index.vue | 52 +- src/static/1.jpg | Bin 0 -> 602431 bytes src/static/an.png | Bin 0 -> 22060 bytes src/static/music/bg.MP3 | Bin 0 -> 956340 bytes src/static/music/djs.MP3 | Bin 0 -> 80298 bytes src/static/music/kj.MP3 | Bin 0 -> 97852 bytes src/static/qietu.png | Bin 0 -> 639823 bytes src/utils/index.ts | 11 + 23 files changed, 649 insertions(+), 305 deletions(-) delete mode 100644 .env.dev create mode 100644 .env.development delete mode 100644 .env.prod create mode 100644 .env.production create mode 100644 src/static/1.jpg create mode 100644 src/static/an.png create mode 100644 src/static/music/bg.MP3 create mode 100644 src/static/music/djs.MP3 create mode 100644 src/static/music/kj.MP3 create mode 100644 src/static/qietu.png create mode 100644 src/utils/index.ts diff --git a/.env.dev b/.env.dev deleted file mode 100644 index a3f1b48..0000000 --- a/.env.dev +++ /dev/null @@ -1,2 +0,0 @@ -# 配置文档参考 https://taro-docs.jd.com/docs/next/env-mode-config -# TARO_APP_ID="开发环境下的小程序appid" \ No newline at end of file diff --git a/.env.development b/.env.development new file mode 100644 index 0000000..508568c --- /dev/null +++ b/.env.development @@ -0,0 +1,6 @@ +# 配置文档参考 https://taro-docs.jd.com/docs/next/env-mode-config +# TARO_APP_ID="开发环境下的小程序appid" + + +TARO_APP_API = 'https://game.wanzhuanyongcheng.cn/dice' +TARO_APP_WS = 'wss://game.wanzhuanyongcheng.cn/dice/home?uid=' diff --git a/.env.prod b/.env.prod deleted file mode 100644 index be6f45e..0000000 --- a/.env.prod +++ /dev/null @@ -1 +0,0 @@ -# TARO_APP_ID="生产环境下的小程序appid" \ No newline at end of file diff --git a/.env.production b/.env.production new file mode 100644 index 0000000..cc21fee --- /dev/null +++ b/.env.production @@ -0,0 +1,4 @@ +# TARO_APP_ID="生产环境下的小程序appid" + +TARO_APP_API = 'https://www.jdt168.com/dice' +TARO_APP_WS = 'wss://www.jdt168.com/dice/home?uid=' diff --git a/.env.test b/.env.test index 0215b61..0c9484a 100644 --- a/.env.test +++ b/.env.test @@ -1 +1,5 @@ -# TARO_APP_ID="测试环境下的小程序appid" \ No newline at end of file +# TARO_APP_ID="测试环境下的小程序appid" + + +TARO_APP_API = 'https://game.wanzhuanyongcheng.cn/dice' +TARO_APP_WS = 'wss://game.wanzhuanyongcheng.cn/dice/home?uid=' diff --git a/config/index.ts b/config/index.ts index 7d24f2c..957d9ac 100644 --- a/config/index.ts +++ b/config/index.ts @@ -6,7 +6,7 @@ import prodConfig from './prod' // https://taro-docs.jd.com/docs/next/config#defineconfig-辅助函数 export default defineConfig(async (merge, {}) => { const baseConfig: UserConfigExport = { - projectName: 'newGameHome', + projectName: 'GameHome', date: '2023-8-29', designWidth: 750, deviceRatio: { diff --git a/package.json b/package.json index 791d9ed..4ddd81f 100644 --- a/package.json +++ b/package.json @@ -14,6 +14,8 @@ "build:alipay": "taro build --type alipay", "build:tt": "taro build --type tt", "build:h5": "taro build --type h5", + "build:h5:test": "taro build --type h5 --mode test", + "dev": "npm run build:h5 -- --watch --mode production", "build:rn": "taro build --type rn", "build:qq": "taro build --type qq", "build:jd": "taro build --type jd", diff --git a/src/config/index.ts b/src/config/index.ts index 62bbaca..489ab27 100644 --- a/src/config/index.ts +++ b/src/config/index.ts @@ -1,13 +1,7 @@ // 用于配置项目的一些常量,如接口地址、websocket地址等 -import Taro from '@tarojs/taro' +import Taro from "@tarojs/taro"; export const app = { - API_URL: () => - process.env.NODE_ENV === 'production' - ? 'https://www.jdt168.com/dice' - : 'https://www.jdt168.com/dice', - API_WS: () => - process.env.NODE_ENV === 'production' - ? `wss://www.jdt168.com/dice/home?uid=${Taro.getStorageSync('uid')}` - : `wss://www.jdt168.com/dice/home?uid=${Taro.getStorageSync('uid')}` -} + API_URL: () => `${process.env.TARO_APP_API}`, + API_WS: () => `${process.env.TARO_APP_WS}${Taro.getStorageSync("uid")}`, +}; diff --git a/src/index.html b/src/index.html index bb7cd6e..5c70ad0 100644 --- a/src/index.html +++ b/src/index.html @@ -8,6 +8,7 @@ + newGameHome diff --git a/src/pages/game_detail/index.scss b/src/pages/game_detail/index.scss index e79f43b..87d5994 100644 --- a/src/pages/game_detail/index.scss +++ b/src/pages/game_detail/index.scss @@ -32,3 +32,8 @@ } } } +.text { + padding: 10px; + font-size: 30px; + text-align: left; +} diff --git a/src/pages/game_detail/index.vue b/src/pages/game_detail/index.vue index 3196285..19faf4e 100644 --- a/src/pages/game_detail/index.vue +++ b/src/pages/game_detail/index.vue @@ -1,36 +1,53 @@ diff --git a/src/pages/index/index.scss b/src/pages/index/index.scss index d0389df..863444c 100644 --- a/src/pages/index/index.scss +++ b/src/pages/index/index.scss @@ -19,6 +19,23 @@ border-radius: 20px; text-align: center; line-height: 300px; + background-image: url("../../static/qietu.png"); + background-size: 100% 100%; + position: relative; + + .btn { + position: absolute; + width: 150px; + height: 100px; + background-image: url("../../static/an.png"); + background-size: 100% 100%; + right: 30px; + bottom: 10px; + + &:active { + transform: scale(1.1); + } + } } } } diff --git a/src/pages/index/index.vue b/src/pages/index/index.vue index c935877..ff42017 100644 --- a/src/pages/index/index.vue +++ b/src/pages/index/index.vue @@ -3,42 +3,43 @@ 游戏大厅 - {{ item.name }} + + + diff --git a/src/pages/yaotouzi/index/index.scss b/src/pages/yaotouzi/index/index.scss index 5f88f26..d893784 100644 --- a/src/pages/yaotouzi/index/index.scss +++ b/src/pages/yaotouzi/index/index.scss @@ -10,8 +10,8 @@ //} .userInfo { - width: 90%; - margin: 20px auto; + width: 92%; + margin: 10px auto; //margin: auto; padding: 20px; display: flex; @@ -73,8 +73,8 @@ } .gameInfo { - width: 90%; - margin: 20px auto; + width: 92%; + margin: auto; padding: 20px; display: flex; justify-content: space-between; @@ -138,13 +138,15 @@ .opt { display: flex; - justify-content: space-evenly; + justify-content: space-between; + margin: 0 10px; flex-wrap: wrap; .item { - width: 18%; + width: 19%; text-align: center; //margin: auto 3px; + margin-top: 10px; border: 1px dashed #228960; position: relative; @@ -178,6 +180,11 @@ } } } + + .item1 { + width: 24%; + } + } .opt1 { @@ -187,7 +194,8 @@ text-align: center; box-sizing: border-box; height: 400px; - padding: 10px; + padding: 0 10px; + margin-top: 10px; .optt { width: 27%; @@ -256,7 +264,7 @@ .qz { background-image: url("../../../static/qz.png"); background-size: 100% 100%; - width: 100%; + width: 90%; height: 25%; margin-bottom: 20px; line-height: 100px; @@ -410,3 +418,31 @@ opacity: 1; } } + + +.card { + width: 92%; + padding: 20px; + margin: 10px auto; + border-radius: 10px; + + .sub { + margin-top: 10px; + color: #555555; + } +} + + +.close { + width: 35px; + height: 35px; + border-radius: 50%; + background-color: rgba(255, 0, 0, 0.4); + position: absolute; + top: -10px; + right: -10px; + text-align: center; + line-height: 30px; + font-size: 25px; + z-index: 1; +} diff --git a/src/pages/yaotouzi/index/index.vue b/src/pages/yaotouzi/index/index.vue index a4a76c2..ebca3e2 100644 --- a/src/pages/yaotouzi/index/index.vue +++ b/src/pages/yaotouzi/index/index.vue @@ -8,7 +8,7 @@ - {{ userInfo.nickName || '用户' }} + {{ userInfo.nickName || "用户" }} 积分: {{ userInfo.integral || 0 }} @@ -22,7 +22,7 @@ - 第{{ kJData[0]?.Periods || 0 }}期开奖 + {{ kJData[0]?.Periods || 0 }}期开奖 {{ kJData[0]?.Start || 0 }} {{ kJData[0]?.End || 0 }} @@ -34,36 +34,74 @@ 剩余{{ time }}s开奖 - 开奖记录 - 投注记录 + 开奖记录 + 投注记录 - + {{ item.name }} 赢{{ item.odds }}倍 - {{ item.markNum }} + + {{ item.numStr }} + x - + {{ odds1[0].name }} 赢{{ odds1[0].odds }}倍 - {{ odds1[0].markNum }} + + {{ odds1[0].numStr }} + x - + {{ odds1[1].name }} 赢{{ odds1[1].odds }}倍 - {{ odds1[1].markNum }} + + {{ odds1[1].numStr }} + x @@ -72,411 +110,600 @@ {{ qzTitle }} - {{ nowKJInfo.Start }} - {{ nowKJInfo.End }} + {{ nowKJInfo.Start }} - {{ nowKJInfo.End }} - + {{ odds1[2].name }} 赢{{ odds1[2].odds }}倍 - {{ odds1[2].markNum }} + + {{ odds1[2].numStr }} + x - + {{ item.name }} 赢{{ item.odds }}倍 - {{ item.markNum }} + + {{ item.numStr }} + + x + + + + + + 第{{ item.Periods }}期开奖: + {{ item.Start }} , {{ item.End }} + + , {{ num }} + + + + + + + + - - + - 重置 - X{{ oddVal }} - 投注 + 重置 + X{{ oddVal }} + 投注