Compare commits
24 Commits
98cd8e67c9
...
test
| Author | SHA1 | Date | |
|---|---|---|---|
| 659d1ad5fb | |||
| 8c83f44d4c | |||
| a5f4b2c872 | |||
| ddd7789817 | |||
| ee446dd4a9 | |||
| 42dc0e9580 | |||
| 07da3de186 | |||
| d072b962f5 | |||
| 3702e9688e | |||
| eafadaa3f2 | |||
| 1ed513252b | |||
| 869bff3f4c | |||
| 9f78e9f35c | |||
| b84b482752 | |||
| f87a2e202d | |||
| 579ab497d2 | |||
| fb614e94ac | |||
| ad5dd9b59f | |||
| a4e5675da7 | |||
| 9b1ab6e19e | |||
| 0dc1da654e | |||
| 45aa1c49e9 | |||
| bfae502f5e | |||
| 2abf70daa8 |
154
.drone.yml
Normal file
154
.drone.yml
Normal file
@@ -0,0 +1,154 @@
|
|||||||
|
kind: pipeline
|
||||||
|
type: docker
|
||||||
|
name: default
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: 测试服-依赖安装&&编译打包
|
||||||
|
pull: if-not-exists
|
||||||
|
image: node:20
|
||||||
|
when:
|
||||||
|
branch:
|
||||||
|
- test
|
||||||
|
commands:
|
||||||
|
- npm config set registry https://registry.npmmirror.com/
|
||||||
|
- npm install -g pnpm
|
||||||
|
- pnpm install
|
||||||
|
- pnpm build:h5:test
|
||||||
|
- rm -rf dist.tar
|
||||||
|
- rm -rf node_modules
|
||||||
|
- tar -zcvf dist.tar ./dist ./default.conf ./Dockerfile
|
||||||
|
|
||||||
|
- name: 正式服-依赖安装&&编译打包
|
||||||
|
pull: if-not-exists
|
||||||
|
image: node:20
|
||||||
|
when:
|
||||||
|
branch:
|
||||||
|
- master
|
||||||
|
commands:
|
||||||
|
- npm config set registry https://registry.npmmirror.com/
|
||||||
|
- npm install -g pnpm
|
||||||
|
- pnpm install
|
||||||
|
- pnpm build:h5
|
||||||
|
- rm -rf dist.tar
|
||||||
|
- rm -rf node_modules
|
||||||
|
- tar -zcvf dist.tar ./dist ./default.conf ./Dockerfile
|
||||||
|
|
||||||
|
- name: 测试服-产物上传
|
||||||
|
pull: if-not-exists
|
||||||
|
image: appleboy/drone-scp
|
||||||
|
when:
|
||||||
|
branch:
|
||||||
|
- test
|
||||||
|
settings:
|
||||||
|
host:
|
||||||
|
from_secret: HOST_DEV
|
||||||
|
username:
|
||||||
|
from_secret: USER_DEV
|
||||||
|
password:
|
||||||
|
from_secret: PWD_DEV
|
||||||
|
port: 22
|
||||||
|
strip_components: 1
|
||||||
|
target: /www/builder
|
||||||
|
source:
|
||||||
|
- ./dist.tar
|
||||||
|
|
||||||
|
- name: 测试服-部署
|
||||||
|
pull: if-not-exists
|
||||||
|
image: appleboy/drone-ssh
|
||||||
|
when:
|
||||||
|
branch:
|
||||||
|
- test
|
||||||
|
settings:
|
||||||
|
host:
|
||||||
|
from_secret: HOST_DEV
|
||||||
|
username:
|
||||||
|
from_secret: USER_DEV
|
||||||
|
password:
|
||||||
|
from_secret: PWD_DEV
|
||||||
|
port: 22
|
||||||
|
script:
|
||||||
|
- cd /www/builder
|
||||||
|
- mkdir jdt-tz-dev
|
||||||
|
- tar -xzvf dist.tar -C /www/builder/jdt-tz-dev
|
||||||
|
- rm -rf dist.tar
|
||||||
|
- cd jdt-tz-dev
|
||||||
|
- docker build -t jdt-tz-dev .
|
||||||
|
- docker stop jdt-tz-dev
|
||||||
|
- docker rm jdt-tz-dev
|
||||||
|
- docker run -d -p 8283:80 --restart=always --name jdt-tz-dev jdt-tz-dev
|
||||||
|
- cd ..
|
||||||
|
- rm -rf jdt-tz-dev
|
||||||
|
|
||||||
|
- name: 正式服-产物上传
|
||||||
|
pull: if-not-exists
|
||||||
|
image: appleboy/drone-scp
|
||||||
|
when:
|
||||||
|
branch:
|
||||||
|
- master
|
||||||
|
settings:
|
||||||
|
host:
|
||||||
|
from_secret: HOST_PROD
|
||||||
|
username:
|
||||||
|
from_secret: USER_PROD
|
||||||
|
password:
|
||||||
|
from_secret: PWD_PROD
|
||||||
|
port: 22
|
||||||
|
strip_components: 1
|
||||||
|
target: /www/builder
|
||||||
|
source:
|
||||||
|
- ./dist.tar
|
||||||
|
|
||||||
|
- name: 正式服-部署
|
||||||
|
pull: if-not-exists
|
||||||
|
image: appleboy/drone-ssh
|
||||||
|
when:
|
||||||
|
branch:
|
||||||
|
- master
|
||||||
|
settings:
|
||||||
|
host:
|
||||||
|
from_secret: HOST_PROD
|
||||||
|
username:
|
||||||
|
from_secret: USER_PROD
|
||||||
|
password:
|
||||||
|
from_secret: PWD_PROD
|
||||||
|
port: 22
|
||||||
|
script:
|
||||||
|
- cd /www/builder
|
||||||
|
- mkdir jdt-tz-prod
|
||||||
|
- tar -xzvf dist.tar -C /www/builder/jdt-tz-prod
|
||||||
|
- rm -rf dist.tar
|
||||||
|
- cd jdt-tz-prod
|
||||||
|
- docker build -t jdt-tz-prod .
|
||||||
|
- docker stop jdt-tz-prod
|
||||||
|
- docker rm jdt-tz-prod
|
||||||
|
- docker run -d -p 8283:80 --restart=always --name jdt-tz-prod jdt-tz-prod
|
||||||
|
- cd ..
|
||||||
|
- rm -rf jdt-tz-prod
|
||||||
|
|
||||||
|
- name: 企业微信通知
|
||||||
|
pull: if-not-exists
|
||||||
|
image: plugins/webhook
|
||||||
|
when:
|
||||||
|
branch:
|
||||||
|
- test
|
||||||
|
- master
|
||||||
|
status:
|
||||||
|
- success
|
||||||
|
- failure
|
||||||
|
settings:
|
||||||
|
urls: https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=a2065e21-4f92-4f5b-a432-2c0cd1d965b5
|
||||||
|
content_type: application/json
|
||||||
|
template: |
|
||||||
|
{
|
||||||
|
"msgtype": "markdown",
|
||||||
|
"markdown": {
|
||||||
|
"content": "{{#success build.status}}✅{{else}}❌{{/success}}**{{ repo.owner }}/{{ repo.name }}** (Build #{{build.number}})\n
|
||||||
|
>**构建结果**: {{ build.status }}
|
||||||
|
>**构建详情**: [点击查看]({{ build.link }})
|
||||||
|
>**代码分支**: {{ build.branch }}
|
||||||
|
>**提交标识**: {{ build.commit }}
|
||||||
|
>**提交发起**: {{ build.author }}
|
||||||
|
>**提交信息**: {{ build.message }}
|
||||||
|
"
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
|
|
||||||
TARO_APP_API = 'https://www.jdt168.com/dice'
|
TARO_APP_API = 'https://www.jdt168.com'
|
||||||
|
|
||||||
TARO_APP_WS = 'wss://www.jdt168.com/dice/home'
|
TARO_APP_WS = 'wss://www.jdt168.com/dice/home'
|
||||||
|
|
||||||
|
|||||||
8
.idea/.gitignore
generated
vendored
8
.idea/.gitignore
generated
vendored
@@ -1,8 +0,0 @@
|
|||||||
# 默认忽略的文件
|
|
||||||
/shelf/
|
|
||||||
/workspace.xml
|
|
||||||
# 基于编辑器的 HTTP 客户端请求
|
|
||||||
/httpRequests/
|
|
||||||
# Datasource local storage ignored files
|
|
||||||
/dataSources/
|
|
||||||
/dataSources.local.xml
|
|
||||||
15
.idea/git_toolbox_prj.xml
generated
15
.idea/git_toolbox_prj.xml
generated
@@ -1,15 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<project version="4">
|
|
||||||
<component name="GitToolBoxProjectSettings">
|
|
||||||
<option name="commitMessageIssueKeyValidationOverride">
|
|
||||||
<BoolValueOverride>
|
|
||||||
<option name="enabled" value="true" />
|
|
||||||
</BoolValueOverride>
|
|
||||||
</option>
|
|
||||||
<option name="commitMessageValidationEnabledOverride">
|
|
||||||
<BoolValueOverride>
|
|
||||||
<option name="enabled" value="true" />
|
|
||||||
</BoolValueOverride>
|
|
||||||
</option>
|
|
||||||
</component>
|
|
||||||
</project>
|
|
||||||
7
.idea/inspectionProfiles/Project_Default.xml
generated
7
.idea/inspectionProfiles/Project_Default.xml
generated
@@ -1,7 +0,0 @@
|
|||||||
<component name="InspectionProjectProfileManager">
|
|
||||||
<profile version="1.0">
|
|
||||||
<option name="myName" value="Project Default" />
|
|
||||||
<inspection_tool class="Eslint" enabled="true" level="WARNING" enabled_by_default="true" />
|
|
||||||
<inspection_tool class="Stylelint" enabled="true" level="ERROR" enabled_by_default="true" />
|
|
||||||
</profile>
|
|
||||||
</component>
|
|
||||||
8
.idea/modules.xml
generated
8
.idea/modules.xml
generated
@@ -1,8 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<project version="4">
|
|
||||||
<component name="ProjectModuleManager">
|
|
||||||
<modules>
|
|
||||||
<module fileurl="file://$PROJECT_DIR$/.idea/newGameHome.iml" filepath="$PROJECT_DIR$/.idea/newGameHome.iml" />
|
|
||||||
</modules>
|
|
||||||
</component>
|
|
||||||
</project>
|
|
||||||
12
.idea/newGameHome.iml
generated
12
.idea/newGameHome.iml
generated
@@ -1,12 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<module type="WEB_MODULE" version="4">
|
|
||||||
<component name="NewModuleRootManager">
|
|
||||||
<content url="file://$MODULE_DIR$">
|
|
||||||
<excludeFolder url="file://$MODULE_DIR$/.tmp" />
|
|
||||||
<excludeFolder url="file://$MODULE_DIR$/temp" />
|
|
||||||
<excludeFolder url="file://$MODULE_DIR$/tmp" />
|
|
||||||
</content>
|
|
||||||
<orderEntry type="inheritedJdk" />
|
|
||||||
<orderEntry type="sourceFolder" forTests="false" />
|
|
||||||
</component>
|
|
||||||
</module>
|
|
||||||
6
.idea/vcs.xml
generated
6
.idea/vcs.xml
generated
@@ -1,6 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<project version="4">
|
|
||||||
<component name="VcsDirectoryMappings">
|
|
||||||
<mapping directory="" vcs="Git" />
|
|
||||||
</component>
|
|
||||||
</project>
|
|
||||||
4
.idea/watcherTasks.xml
generated
4
.idea/watcherTasks.xml
generated
@@ -1,4 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<project version="4">
|
|
||||||
<component name="ProjectTasksOptions" suppressed-tasks="SCSS" />
|
|
||||||
</project>
|
|
||||||
42
package.json
42
package.json
@@ -56,22 +56,19 @@
|
|||||||
"author": "",
|
"author": "",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@babel/runtime": "^7.22.11",
|
"@babel/runtime": "^7.22.11",
|
||||||
"@sentry/browser": "^7.81.0",
|
"@tarojs/components": "3.6.34",
|
||||||
"@sentry/vue": "^7.81.0",
|
"@tarojs/helper": "3.6.34",
|
||||||
"@sentry/webpack-plugin": "^2.10.1",
|
"@tarojs/plugin-framework-vue3": "3.6.34",
|
||||||
"@tarojs/components": "3.6.22",
|
"@tarojs/plugin-platform-alipay": "3.6.34",
|
||||||
"@tarojs/helper": "3.6.22",
|
"@tarojs/plugin-platform-h5": "3.6.34",
|
||||||
"@tarojs/plugin-framework-vue3": "3.6.22",
|
"@tarojs/plugin-platform-jd": "3.6.34",
|
||||||
"@tarojs/plugin-platform-alipay": "3.6.22",
|
"@tarojs/plugin-platform-qq": "3.6.34",
|
||||||
"@tarojs/plugin-platform-h5": "3.6.22",
|
"@tarojs/plugin-platform-swan": "3.6.34",
|
||||||
"@tarojs/plugin-platform-jd": "3.6.22",
|
"@tarojs/plugin-platform-tt": "3.6.34",
|
||||||
"@tarojs/plugin-platform-qq": "3.6.22",
|
"@tarojs/plugin-platform-weapp": "3.6.34",
|
||||||
"@tarojs/plugin-platform-swan": "3.6.22",
|
"@tarojs/runtime": "3.6.34",
|
||||||
"@tarojs/plugin-platform-tt": "3.6.22",
|
"@tarojs/shared": "3.6.34",
|
||||||
"@tarojs/plugin-platform-weapp": "3.6.22",
|
"@tarojs/taro": "3.6.34",
|
||||||
"@tarojs/runtime": "3.6.22",
|
|
||||||
"@tarojs/shared": "3.6.22",
|
|
||||||
"@tarojs/taro": "3.6.22",
|
|
||||||
"dayjs": "^1.11.10",
|
"dayjs": "^1.11.10",
|
||||||
"lottie-web": "^5.12.2",
|
"lottie-web": "^5.12.2",
|
||||||
"vue": "^3.3.4"
|
"vue": "^3.3.4"
|
||||||
@@ -80,10 +77,10 @@
|
|||||||
"@babel/core": "^7.22.11",
|
"@babel/core": "^7.22.11",
|
||||||
"@commitlint/cli": "^18.2.0",
|
"@commitlint/cli": "^18.2.0",
|
||||||
"@commitlint/config-conventional": "^18.1.0",
|
"@commitlint/config-conventional": "^18.1.0",
|
||||||
"@tarojs/cli": "3.6.22",
|
"@tarojs/cli": "3.6.34",
|
||||||
"@tarojs/taro-loader": "3.6.22",
|
"@tarojs/taro-loader": "3.6.34",
|
||||||
"@tarojs/test-utils-vue3": "^0.1.1",
|
"@tarojs/test-utils-vue3": "^0.1.1",
|
||||||
"@tarojs/webpack5-runner": "3.6.22",
|
"@tarojs/webpack5-runner": "3.6.34",
|
||||||
"@types/jest": "^29.5.4",
|
"@types/jest": "^29.5.4",
|
||||||
"@types/node": "^20.5.7",
|
"@types/node": "^20.5.7",
|
||||||
"@types/webpack-env": "^1.18.1",
|
"@types/webpack-env": "^1.18.1",
|
||||||
@@ -91,12 +88,12 @@
|
|||||||
"@typescript-eslint/parser": "^6.5.0",
|
"@typescript-eslint/parser": "^6.5.0",
|
||||||
"@vue/babel-plugin-jsx": "^1.1.5",
|
"@vue/babel-plugin-jsx": "^1.1.5",
|
||||||
"@vue/compiler-sfc": "^3.3.4",
|
"@vue/compiler-sfc": "^3.3.4",
|
||||||
"babel-preset-taro": "3.6.22",
|
"babel-preset-taro": "3.6.34",
|
||||||
"commitizen": "^4.3.0",
|
"commitizen": "^4.3.0",
|
||||||
"css-loader": "6.8.1",
|
"css-loader": "6.8.1",
|
||||||
"cz-customizable": "^7.0.0",
|
"cz-customizable": "^7.0.0",
|
||||||
"eslint": "^8.48.0",
|
"eslint": "^8.48.0",
|
||||||
"eslint-config-taro": "3.6.22",
|
"eslint-config-taro": "3.6.34",
|
||||||
"eslint-plugin-vue": "^9.17.0",
|
"eslint-plugin-vue": "^9.17.0",
|
||||||
"husky": "^8.0.0",
|
"husky": "^8.0.0",
|
||||||
"jest": "^29.6.4",
|
"jest": "^29.6.4",
|
||||||
@@ -110,5 +107,6 @@
|
|||||||
"typescript": "^5.2.2",
|
"typescript": "^5.2.2",
|
||||||
"vue-loader": "^17.2.2",
|
"vue-loader": "^17.2.2",
|
||||||
"webpack": "5.88.2"
|
"webpack": "5.88.2"
|
||||||
}
|
},
|
||||||
|
"packageManager": "pnpm@9.1.4+sha512.9df9cf27c91715646c7d675d1c9c8e41f6fce88246f1318c1aa6a1ed1aeb3c4f032fcdf4ba63cc69c4fe6d634279176b5358727d8f2cc1e65b65f43ce2f8bfb0"
|
||||||
}
|
}
|
||||||
|
|||||||
18841
pnpm-lock.yaml
generated
18841
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
@@ -1,21 +1,21 @@
|
|||||||
export default defineAppConfig({
|
export default defineAppConfig({
|
||||||
pages: [
|
pages: [
|
||||||
'pages/index/index',
|
'pages/index/index',
|
||||||
'pages/yaotouzi/index/index',
|
'pages/webview/index',
|
||||||
'pages/game_detail/index',
|
'pages/yaotouzi/index/index',
|
||||||
'pages/yaotouzi/records/index',
|
'pages/game_detail/index',
|
||||||
'pages/balloon/index/index',
|
'pages/yaotouzi/records/index',
|
||||||
'pages/balloon/records/index',
|
'pages/balloon/index/index',
|
||||||
'pages/aoshi/index/index',
|
'pages/balloon/records/index',
|
||||||
'pages/aoshi/records/index',
|
'pages/aoshi/index/index',
|
||||||
'pages/turntable/index/index',
|
'pages/aoshi/records/index',
|
||||||
'pages/turntable/records/index',
|
'pages/turntable/index/index',
|
||||||
],
|
'pages/turntable/records/index',
|
||||||
window: {
|
],
|
||||||
backgroundTextStyle: 'light',
|
window: {
|
||||||
navigationBarBackgroundColor: '#fff',
|
backgroundTextStyle: 'light',
|
||||||
navigationBarTitleText: 'Game',
|
navigationBarBackgroundColor: '#fff',
|
||||||
navigationBarTextStyle: 'black',
|
navigationBarTitleText: 'Game',
|
||||||
},
|
navigationBarTextStyle: 'black',
|
||||||
animation: false,
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -2,9 +2,9 @@
|
|||||||
// background-color: #f5f5f5 !important;
|
// background-color: #f5f5f5 !important;
|
||||||
// }
|
// }
|
||||||
|
|
||||||
body {
|
// body {
|
||||||
// line-height: 1;
|
// line-height: 1;
|
||||||
}
|
// }
|
||||||
|
|
||||||
.mt-15 {
|
.mt-15 {
|
||||||
margin-top: 15px;
|
margin-top: 15px;
|
||||||
|
|||||||
35
src/components/Popup.vue
Normal file
35
src/components/Popup.vue
Normal file
@@ -0,0 +1,35 @@
|
|||||||
|
<template>
|
||||||
|
<view class="mask" v-if="show" @click="isShowFn">
|
||||||
|
<slot></slot>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup lang="ts">
|
||||||
|
defineProps({
|
||||||
|
show: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false,
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
|
const emits = defineEmits(['isShow'])
|
||||||
|
|
||||||
|
const isShowFn = () => {
|
||||||
|
emits('isShow')
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss">
|
||||||
|
.mask {
|
||||||
|
position: fixed;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
right: 0;
|
||||||
|
bottom: 0;
|
||||||
|
background-color: rgba(0, 0, 0, 0.5);
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
overflow: auto;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -555,3 +555,10 @@ body {
|
|||||||
width: 700px;
|
width: 700px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.popup-content {
|
||||||
|
background-color: #fff;
|
||||||
|
width: 70%;
|
||||||
|
padding: 20px;
|
||||||
|
border-radius: 8px;
|
||||||
|
}
|
||||||
@@ -2,6 +2,7 @@
|
|||||||
import { onBeforeUnmount, onMounted, ref } from 'vue'
|
import { onBeforeUnmount, onMounted, ref } from 'vue'
|
||||||
import Taro from '@tarojs/taro'
|
import Taro from '@tarojs/taro'
|
||||||
import Lottie from 'lottie-web'
|
import Lottie from 'lottie-web'
|
||||||
|
import HPopup from '../../../components/Popup.vue'
|
||||||
import * as dayjs from 'dayjs'
|
import * as dayjs from 'dayjs'
|
||||||
import dan from '../../../static/dan.png'
|
import dan from '../../../static/dan.png'
|
||||||
import he from '../../../static/he.png'
|
import he from '../../../static/he.png'
|
||||||
@@ -192,7 +193,10 @@ const countdownFn = () => {
|
|||||||
if (m === 0 && s === 0) {
|
if (m === 0 && s === 0) {
|
||||||
clearInterval(timeId.value)
|
clearInterval(timeId.value)
|
||||||
clearInterval(time_i.value)
|
clearInterval(time_i.value)
|
||||||
startRun(list.value[0].name)
|
getList()
|
||||||
|
setTimeout(() => {
|
||||||
|
startRun(list.value[0].name)
|
||||||
|
}, 1500)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -377,6 +381,13 @@ onBeforeUnmount(() => {
|
|||||||
clearInterval(time_i.value)
|
clearInterval(time_i.value)
|
||||||
innerAudioContext.stop()
|
innerAudioContext.stop()
|
||||||
})
|
})
|
||||||
|
|
||||||
|
const showPopup = ref(false)
|
||||||
|
const game_info = ref<any>({})
|
||||||
|
|
||||||
|
Taro.useDidShow(() => {
|
||||||
|
game_info.value = Taro.getStorageSync('gameItem')
|
||||||
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
@@ -403,7 +414,7 @@ onBeforeUnmount(() => {
|
|||||||
<view class="dz-bg"></view>
|
<view class="dz-bg"></view>
|
||||||
<view class="text">{{ user_info.pulse || 0 }}</view>
|
<view class="text">{{ user_info.pulse || 0 }}</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="rule-btn"></view>
|
<view class="rule-btn" @click="showPopup = true"></view>
|
||||||
</view>
|
</view>
|
||||||
<view class="kj-box">
|
<view class="kj-box">
|
||||||
<text class="title">第{{ list[0]?.preDrawIssue || 0 }}期已开奖</text>
|
<text class="title">第{{ list[0]?.preDrawIssue || 0 }}期已开奖</text>
|
||||||
@@ -469,5 +480,11 @@ onBeforeUnmount(() => {
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view id="lottie" v-show="isLottie"></view>
|
<view id="lottie" v-show="isLottie"></view>
|
||||||
|
<!-- 弹窗 -->
|
||||||
|
<HPopup :show="showPopup" @isShow="showPopup = false">
|
||||||
|
<view class="popup-content">
|
||||||
|
<rich-text :nodes="game_info.introduction"></rich-text>
|
||||||
|
</view>
|
||||||
|
</HPopup>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@@ -47,3 +47,10 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.popup-content {
|
||||||
|
background-color: #fff;
|
||||||
|
width: 70%;
|
||||||
|
padding: 20px;
|
||||||
|
border-radius: 8px;
|
||||||
|
}
|
||||||
@@ -1,17 +1,17 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="index">
|
<view class="index">
|
||||||
<swiper class="swiper" :circular="true" :autoplay="true">
|
<swiper class="swiper" :circular="true" :autoplay="true">
|
||||||
<swiper-item v-for="(item, index) in list" :key="index">
|
<swiper-item v-for="(item, index) in list" :key="index">
|
||||||
<image :src="item" />
|
<image :src="item" />
|
||||||
</swiper-item>
|
</swiper-item>
|
||||||
</swiper>
|
</swiper>
|
||||||
<view class="container">
|
<view class="container">
|
||||||
<!-- <view>摇骰子</view> -->
|
<!-- <view>摇骰子</view> -->
|
||||||
|
|
||||||
<rich-text :nodes="info.introduction"></rich-text>
|
<rich-text :nodes="info.introduction"></rich-text>
|
||||||
<view class="btn" @click="startGame()">开始游戏</view>
|
<view class="btn" @click="startGame()">开始游戏</view>
|
||||||
</view>
|
|
||||||
</view>
|
</view>
|
||||||
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
@@ -23,13 +23,21 @@ const info = ref<any>({})
|
|||||||
const list = ref<string[]>([])
|
const list = ref<string[]>([])
|
||||||
|
|
||||||
Taro.useLoad(() => {
|
Taro.useLoad(() => {
|
||||||
info.value = Taro.getStorageSync('gameItem')
|
info.value = Taro.getStorageSync('gameItem')
|
||||||
list.value.push(info.value.cover)
|
list.value.push(info.value.cover)
|
||||||
})
|
})
|
||||||
|
|
||||||
const startGame = () => {
|
const startGame = () => {
|
||||||
|
// 判断url中是否含有http
|
||||||
|
if (info.value.url.indexOf('http') === -1) {
|
||||||
Taro.navigateTo({
|
Taro.navigateTo({
|
||||||
url: info.value.url,
|
url: info.value.url,
|
||||||
})
|
})
|
||||||
|
} else {
|
||||||
|
Taro.setStorageSync("url", `${info.value.url}?uid=${Taro.getStorageSync('uid')}&game_id=${info.value.ID}`)
|
||||||
|
Taro.navigateTo({
|
||||||
|
url: `/pages/webview/index`,
|
||||||
|
})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ const getList = async () => {
|
|||||||
url: `${process.env.TARO_APP_HOME}`,
|
url: `${process.env.TARO_APP_HOME}`,
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
success: ({ data: res }) => {
|
success: ({ data: res }) => {
|
||||||
list.value = res.data.data || []
|
list.value = res.data.data.sort((a: any, b: any) => b.sort - a.sort) || []
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -555,3 +555,10 @@ body {
|
|||||||
width: 700px;
|
width: 700px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.popup-content {
|
||||||
|
background-color: #fff;
|
||||||
|
width: 70%;
|
||||||
|
padding: 20px;
|
||||||
|
border-radius: 8px;
|
||||||
|
}
|
||||||
@@ -3,6 +3,7 @@ import { onBeforeUnmount, onMounted, ref } from 'vue'
|
|||||||
import Taro from '@tarojs/taro'
|
import Taro from '@tarojs/taro'
|
||||||
import Lottie from 'lottie-web'
|
import Lottie from 'lottie-web'
|
||||||
import * as dayjs from 'dayjs'
|
import * as dayjs from 'dayjs'
|
||||||
|
import HPopup from '../../../components/Popup.vue'
|
||||||
import dan from '../../../static/dan.png'
|
import dan from '../../../static/dan.png'
|
||||||
import he from '../../../static/he.png'
|
import he from '../../../static/he.png'
|
||||||
import shuang from '../../../static/shuang.png'
|
import shuang from '../../../static/shuang.png'
|
||||||
@@ -39,7 +40,7 @@ const user_info = ref<{
|
|||||||
const bet_options = ref([
|
const bet_options = ref([
|
||||||
{
|
{
|
||||||
id: 1,
|
id: 1,
|
||||||
name: 600,
|
name: 100,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 2,
|
id: 2,
|
||||||
@@ -424,6 +425,13 @@ onBeforeUnmount(() => {
|
|||||||
ws.value?.close()
|
ws.value?.close()
|
||||||
innerAudioContext.stop()
|
innerAudioContext.stop()
|
||||||
})
|
})
|
||||||
|
|
||||||
|
const showPopup = ref(false)
|
||||||
|
const game_info = ref<any>({})
|
||||||
|
|
||||||
|
Taro.useDidShow(() => {
|
||||||
|
game_info.value = Taro.getStorageSync('gameItem')
|
||||||
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
@@ -450,7 +458,7 @@ onBeforeUnmount(() => {
|
|||||||
<view class="dz-bg"></view>
|
<view class="dz-bg"></view>
|
||||||
<view class="text">{{ user_info.pulse || 0 }}</view>
|
<view class="text">{{ user_info.pulse || 0 }}</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="rule-btn"></view>
|
<view class="rule-btn" @click="showPopup = true"></view>
|
||||||
</view>
|
</view>
|
||||||
<view class="kj-box">
|
<view class="kj-box">
|
||||||
<text class="title">第{{ list[0]?.Periods || 0 }}期已开奖</text>
|
<text class="title">第{{ list[0]?.Periods || 0 }}期已开奖</text>
|
||||||
@@ -518,5 +526,12 @@ onBeforeUnmount(() => {
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view id="lottie" v-show="isLottie"></view>
|
<view id="lottie" v-show="isLottie"></view>
|
||||||
|
|
||||||
|
<!-- 弹窗 -->
|
||||||
|
<HPopup :show="showPopup" @isShow="showPopup = false">
|
||||||
|
<view class="popup-content">
|
||||||
|
<rich-text :nodes="game_info.introduction"></rich-text>
|
||||||
|
</view>
|
||||||
|
</HPopup>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
3
src/pages/webview/index.config.ts
Normal file
3
src/pages/webview/index.config.ts
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
export default definePageConfig({
|
||||||
|
navigationBarTitleText: '',
|
||||||
|
})
|
||||||
18
src/pages/webview/index.vue
Normal file
18
src/pages/webview/index.vue
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
<template>
|
||||||
|
<view>
|
||||||
|
<web-view :src="src" />
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup lang="ts">
|
||||||
|
import { ref } from 'vue'
|
||||||
|
import Taro from '@tarojs/taro'
|
||||||
|
|
||||||
|
const src = ref('')
|
||||||
|
|
||||||
|
Taro.useLoad((e) => {
|
||||||
|
src.value = Taro.getStorageSync("url")
|
||||||
|
})
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss"></style>
|
||||||
Reference in New Issue
Block a user