diff --git a/config/dev.ts b/config/dev.ts
index 47e93db..76e4d0f 100644
--- a/config/dev.ts
+++ b/config/dev.ts
@@ -1,10 +1,22 @@
-import type { UserConfigExport } from "@tarojs/cli";
+import type {UserConfigExport} from '@tarojs/cli'
export default {
- logger: {
- quiet: false,
- stats: true
- },
- mini: {},
- h5: {}
+ logger: {
+ quiet: false,
+ stats: true
+ },
+ mini: {},
+ h5: {
+ devServer: {
+ // proxy: {
+ // '/api': {
+ // target: 'http://localhost:3000',
+ // changeOrigin: true,
+ // pathRewrite: {
+ // '^/api': ''
+ // }
+ // }
+ // }
+ }
+ }
} satisfies UserConfigExport
diff --git a/src/app.config.ts b/src/app.config.ts
index 072386f..acfef9b 100644
--- a/src/app.config.ts
+++ b/src/app.config.ts
@@ -1,8 +1,9 @@
export default defineAppConfig({
pages: [
'pages/index/index',
- 'pages/game_list/yaotouzi/index',
- 'pages/game_detail/index'
+ 'pages/yaotouzi/index/index',
+ 'pages/game_detail/index',
+ 'pages/yaotouzi/records/index'
],
window: {
backgroundTextStyle: 'light',
diff --git a/src/config/index.ts b/src/config/index.ts
index 28ac20b..62bbaca 100644
--- a/src/config/index.ts
+++ b/src/config/index.ts
@@ -1,13 +1,13 @@
// 用于配置项目的一些常量,如接口地址、websocket地址等
-import Taro from "@tarojs/taro";
+import Taro from '@tarojs/taro'
export const app = {
API_URL: () =>
- process.env.NODE_ENV === "production"
- ? "https://game.jdt168.com/dice"
- : "http://game.jdt168.com/dice",
+ process.env.NODE_ENV === 'production'
+ ? 'https://www.jdt168.com/dice'
+ : 'https://www.jdt168.com/dice',
API_WS: () =>
- process.env.NODE_ENV === "production"
- ? `wss://game.jdt168.com/dice/home?uid=${Taro.getStorageSync('uid')}`
- : `ws://game.jdt168.com/dice/home?uid=${Taro.getStorageSync('uid')}`,
-};
+ 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')}`
+}
diff --git a/src/pages/game_detail/index.vue b/src/pages/game_detail/index.vue
index 74ce43b..3196285 100644
--- a/src/pages/game_detail/index.vue
+++ b/src/pages/game_detail/index.vue
@@ -30,7 +30,7 @@ const list = ref(['https://storage.360buyimg.com/jdc-article/NutUItaro34.jpg', '
const startGame = () => {
Taro.navigateTo({
- url: '/pages/game_list/yaotouzi/index'
+ url: '/pages/yaotouzi/index/index'
})
}
diff --git a/src/pages/game_list/yaotouzi/index.vue b/src/pages/game_list/yaotouzi/index.vue
deleted file mode 100644
index 5d25d66..0000000
--- a/src/pages/game_list/yaotouzi/index.vue
+++ /dev/null
@@ -1,264 +0,0 @@
-
-
-
-
-
-
-
-
-
- YuanHuakk
- 积分:10000000
-
-
-
-
- 1231321
-
-
-
-
-
-
-
- 第1000期开奖
-
- 3
- 4
- 6
-
-
-
-
- 开奖记录
- 投注记录
-
-
-
-
-
- {{ item.name }}
- 赢{{ item.odds }}倍
-
-
-
-
-
-
- {{ odds1[0].name }}
- 赢{{ odds1[0].odds }}倍
-
-
- {{ odds1[1].name }}
- 赢{{ odds1[1].odds }}倍
-
-
-
-
- {{ qzTitle }}
-
-
-
-
- {{ odds1[2].name }}
- 赢{{ odds1[2].odds }}倍
-
-
- {{ odds1[3].name }}
- 赢{{ odds1[3].odds }}倍
-
-
-
-
-
-
- {{ item.name }}
- 赢{{ item.odds }}倍
-
-
-
-
- 重置
- X100
- 投注
-
-
-
-
-
-
-
diff --git a/src/pages/game_list/yaotouzi/index.config.ts b/src/pages/yaotouzi/index/index.config.ts
similarity index 100%
rename from src/pages/game_list/yaotouzi/index.config.ts
rename to src/pages/yaotouzi/index/index.config.ts
diff --git a/src/pages/game_list/yaotouzi/index.scss b/src/pages/yaotouzi/index/index.scss
similarity index 65%
rename from src/pages/game_list/yaotouzi/index.scss
rename to src/pages/yaotouzi/index/index.scss
index 7d0e023..01848ba 100644
--- a/src/pages/game_list/yaotouzi/index.scss
+++ b/src/pages/yaotouzi/index/index.scss
@@ -4,13 +4,15 @@
height: 100%;
.tips {
+ border-radius: 0;
width: 100%;
- height: 80px;
+ height: 60px;
}
.userInfo {
width: 680px;
margin: 20px auto;
+ //margin: auto;
padding: 20px;
display: flex;
justify-content: space-between;
@@ -54,13 +56,13 @@
display: flex;
justify-content: flex-start;
align-items: center;
- padding: 15px;
+ padding: 10px;
.icon {
background-image: url("../../../static/dz.png");
background-size: 100% 100%;
- width: 60px;
- height: 60px;
+ width: 50px;
+ height: 50px;
display: inline-block;
}
@@ -136,8 +138,11 @@
flex-wrap: wrap;
.item {
- width: 140px;
+ width: 18%;
text-align: center;
+ //margin: auto 3px;
+ border: 1px dashed #228960;
+ position: relative;
.name {
//font-size: 30px;
@@ -147,6 +152,27 @@
.odd {
font-size: 25px;
}
+
+ .mask {
+ position: absolute;
+ //background: #7950f2;
+ width: 100%;
+ height: 100%;
+ left: 50%;
+ top: 50%;
+ transform: translate(-50%, -50%);
+ border-radius: 10px;
+ text-align: center;
+ line-height: 100px;
+ background-color: rgba(0, 0, 0, 0.4);
+
+ .text {
+ position: absolute;
+ left: 50%;
+ top: 50%;
+ transform: translate(-50%, -50%);
+ }
+ }
}
}
@@ -160,7 +186,9 @@
width: 200px;
margin-bottom: 10px;
text-align: center;
- padding: 33px 0;
+ padding: 31px 0;
+ border: 1px dashed #228960;
+ position: relative;
.name {
font-size: 55px;
@@ -170,6 +198,25 @@
.odd {
font-size: 25px;
}
+
+ .mask {
+ position: absolute;
+ //background: #7950f2;
+ width: 100%;
+ height: 100%;
+ left: 50%;
+ top: 50%;
+ transform: translate(-50%, -50%);
+ border-radius: 10px;
+ background-color: rgba(0, 0, 0, 0.4);
+
+ .text {
+ position: absolute;
+ left: 50%;
+ top: 50%;
+ transform: translate(-50%, -50%);
+ }
+ }
}
.base {
@@ -181,6 +228,8 @@
flex-direction: column;
justify-content: flex-end;
align-items: center;
+ position: relative;
+ overflow: hidden;
.qz {
background-image: url("../../../static/qz.png");
@@ -260,3 +309,79 @@
transform: scale(1);
}
}
+
+// 虚线边框且闪烁3秒
+.flicker {
+ animation: flicker 1s infinite;
+}
+
+@keyframes flicker {
+ 0% {
+ border: 1px dashed #228960;
+ }
+ 50% {
+ border: 1px dashed white;
+ }
+ 100% {
+ border: 1px dashed #228960;
+ }
+}
+
+.expanding-div {
+ width: 10px;
+ height: 90px;
+ background-image: url("../../../static/qzzz.png");
+ background-size: 100% 100%;
+ position: absolute;
+ left: 50%;
+ top: 55%;
+ transform: translate(-50%, -50%);
+ animation-name: rotate, expand;
+ animation-duration: 2s, 3s;
+ animation-delay: 0s, 2s;
+ animation-timing-function: linear, ease-in-out;
+ animation-fill-mode: forwards, forwards;
+ overflow: hidden;
+ text-align: center;
+ line-height: 90px;
+ color: red;
+}
+
+@keyframes rotate {
+ 0% {
+ top: -100%;
+ transform: translate(-50%, -50%) rotate(0deg);
+ }
+ 100% {
+ top: 50%;
+ transform: translate(-50%, -50%) rotate(360deg);
+ }
+}
+
+@keyframes expand {
+ from {
+ width: 10px;
+ }
+ to {
+ width: 200px;
+ }
+}
+
+// 倒计时动画
+.activeQz {
+ animation: change-size 1s ease-in-out infinite;
+ font-weight: bold;
+}
+
+@keyframes change-size {
+ 0% {
+ opacity: 1;
+ }
+ 90% {
+ font-size: 300px;
+ opacity: 0;
+ }
+ 100% {
+ opacity: 1;
+ }
+}
diff --git a/src/pages/yaotouzi/index/index.vue b/src/pages/yaotouzi/index/index.vue
new file mode 100644
index 0000000..62708c6
--- /dev/null
+++ b/src/pages/yaotouzi/index/index.vue
@@ -0,0 +1,473 @@
+
+
+
+
+
+
+
+
+
+ {{ userInfo.nickName || '用户' }}
+ 积分: {{ userInfo.integral || 0 }}
+
+
+
+
+ {{ userInfo.pulse || 0 }}
+
+
+
+
+
+
+
+ 第{{ kJData[0]?.Periods || 0 }}期开奖
+
+ {{ kJData[0]?.Start || 0 }}
+ {{ kJData[0]?.End || 0 }}
+
+
+
+
+
+ 开奖记录
+ 投注记录
+
+
+
+
+
+ {{ item.name }}
+ 赢{{ item.odds }}倍
+
+ {{ item.markNum }}
+
+
+
+
+
+
+
+ {{ odds1[0].name }}
+ 赢{{ odds1[0].odds }}倍
+
+ {{ odds1[0].markNum }}
+
+
+
+ {{ odds1[1].name }}
+ 赢{{ odds1[1].odds }}倍
+
+ {{ odds1[1].markNum }}
+
+
+
+
+
+
+ {{ qzTitle }}
+
+
+ {{ nowKJInfo.Start }} - {{ nowKJInfo.End }}
+
+
+
+ {{ odds1[2].name }}
+ 赢{{ odds1[2].odds }}倍
+
+ {{ odds1[2].markNum }}
+
+
+
+ {{ odds1[3].name }}
+ 赢{{ odds1[3].odds }}倍
+
+ {{ odds1[3].markNum }}
+
+
+
+
+
+
+
+ {{ item.name }}
+ 赢{{ item.odds }}倍
+
+ {{ item.markNum }}
+
+
+
+
+
+
+ 重置
+ X{{ oddVal }}
+ 投注
+
+
+
+
+
+
+
diff --git a/src/pages/yaotouzi/records/index.config.ts b/src/pages/yaotouzi/records/index.config.ts
new file mode 100644
index 0000000..7ca222c
--- /dev/null
+++ b/src/pages/yaotouzi/records/index.config.ts
@@ -0,0 +1,3 @@
+export default definePageConfig({
+ navigationBarBackgroundColor: '#23684B'
+})
diff --git a/src/pages/yaotouzi/records/index.vue b/src/pages/yaotouzi/records/index.vue
new file mode 100644
index 0000000..183e23a
--- /dev/null
+++ b/src/pages/yaotouzi/records/index.vue
@@ -0,0 +1,91 @@
+
+
+
+
+
+ 第{{ item.Periods }}期开奖:
+ {{ item.Start }},{{ item.End }}
+
+ 开奖时间:
+ {{ item.DrawTime }}
+
+
+
+
+
+
+
+ 第{{ item.Periods }}期投注:
+
+
+ 点数:
+ {{ item.Name }}
+
+ 投注时间:
+ {{ item.DrawTime }}
+
+
+
+ +{{ item.DrawNum }}积分
+ -{{ item.Number }}
+
+
+
+
+
+
+
+
+
diff --git a/src/static/qzzz.png b/src/static/qzzz.png
new file mode 100644
index 0000000..65bfac1
Binary files /dev/null and b/src/static/qzzz.png differ
diff --git a/src/utils/request.ts b/src/utils/request.ts
index 9b80a78..e904284 100644
--- a/src/utils/request.ts
+++ b/src/utils/request.ts
@@ -8,7 +8,7 @@ export interface RequestParams {
data?: string | object;
}
-const request = (request: RequestParams) => {
+const request = (request: RequestParams): Promise => {
return new Promise((resolve, reject) => {
Taro.request({
url: `${app.API_URL()}${request.url}`,