Compare commits
18 Commits
a4e5675da7
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
| 659d1ad5fb | |||
| 8c83f44d4c | |||
| a5f4b2c872 | |||
| ddd7789817 | |||
| ee446dd4a9 | |||
| 42dc0e9580 | |||
| 07da3de186 | |||
| d072b962f5 | |||
| 3702e9688e | |||
| eafadaa3f2 | |||
| 1ed513252b | |||
| 869bff3f4c | |||
| 9f78e9f35c | |||
| b84b482752 | |||
| f87a2e202d | |||
| 579ab497d2 | |||
| fb614e94ac | |||
| ad5dd9b59f |
24
.drone.yml
24
.drone.yml
@@ -2,14 +2,10 @@ kind: pipeline
|
|||||||
type: docker
|
type: docker
|
||||||
name: default
|
name: default
|
||||||
|
|
||||||
platform:
|
|
||||||
os: linux
|
|
||||||
arch: amd64
|
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: 测试服-依赖安装&&编译打包
|
- name: 测试服-依赖安装&&编译打包
|
||||||
pull: if-not-exists
|
pull: if-not-exists
|
||||||
image: node:20-alpine
|
image: node:20
|
||||||
when:
|
when:
|
||||||
branch:
|
branch:
|
||||||
- test
|
- test
|
||||||
@@ -24,7 +20,7 @@ steps:
|
|||||||
|
|
||||||
- name: 正式服-依赖安装&&编译打包
|
- name: 正式服-依赖安装&&编译打包
|
||||||
pull: if-not-exists
|
pull: if-not-exists
|
||||||
image: node:20-alpine
|
image: node:20
|
||||||
when:
|
when:
|
||||||
branch:
|
branch:
|
||||||
- master
|
- master
|
||||||
@@ -32,7 +28,7 @@ steps:
|
|||||||
- npm config set registry https://registry.npmmirror.com/
|
- npm config set registry https://registry.npmmirror.com/
|
||||||
- npm install -g pnpm
|
- npm install -g pnpm
|
||||||
- pnpm install
|
- pnpm install
|
||||||
- pnpm build:h5:prod
|
- pnpm build:h5
|
||||||
- rm -rf dist.tar
|
- rm -rf dist.tar
|
||||||
- rm -rf node_modules
|
- rm -rf node_modules
|
||||||
- tar -zcvf dist.tar ./dist ./default.conf ./Dockerfile
|
- tar -zcvf dist.tar ./dist ./default.conf ./Dockerfile
|
||||||
@@ -77,14 +73,8 @@ steps:
|
|||||||
- rm -rf dist.tar
|
- rm -rf dist.tar
|
||||||
- cd jdt-tz-dev
|
- cd jdt-tz-dev
|
||||||
- docker build -t jdt-tz-dev .
|
- docker build -t jdt-tz-dev .
|
||||||
- target_container="jdt-tz-dev"
|
|
||||||
- if docker ps -a --format '{{.Names}}' | grep -q "^$target_container$"; then
|
|
||||||
- echo "容器存在,执行操作..."
|
|
||||||
- docker stop jdt-tz-dev
|
- docker stop jdt-tz-dev
|
||||||
- docker rm jdt-tz-dev
|
- docker rm jdt-tz-dev
|
||||||
- else
|
|
||||||
- echo "容器不存在"
|
|
||||||
- fi
|
|
||||||
- docker run -d -p 8283:80 --restart=always --name jdt-tz-dev jdt-tz-dev
|
- docker run -d -p 8283:80 --restart=always --name jdt-tz-dev jdt-tz-dev
|
||||||
- cd ..
|
- cd ..
|
||||||
- rm -rf jdt-tz-dev
|
- rm -rf jdt-tz-dev
|
||||||
@@ -128,15 +118,9 @@ steps:
|
|||||||
- tar -xzvf dist.tar -C /www/builder/jdt-tz-prod
|
- tar -xzvf dist.tar -C /www/builder/jdt-tz-prod
|
||||||
- rm -rf dist.tar
|
- rm -rf dist.tar
|
||||||
- cd jdt-tz-prod
|
- cd jdt-tz-prod
|
||||||
- cd docker build -t jdt-tz-prod .
|
- docker build -t jdt-tz-prod .
|
||||||
- target_container="jdt-tz-prod"
|
|
||||||
- if docker ps -a --format '{{.Names}}' | grep -q "^$target_container$"; then
|
|
||||||
- echo "容器存在,执行操作..."
|
|
||||||
- docker stop jdt-tz-prod
|
- docker stop jdt-tz-prod
|
||||||
- docker rm jdt-tz-prod
|
- docker rm jdt-tz-prod
|
||||||
- else
|
|
||||||
- echo "容器不存在"
|
|
||||||
- fi
|
|
||||||
- docker run -d -p 8283:80 --restart=always --name jdt-tz-prod jdt-tz-prod
|
- docker run -d -p 8283:80 --restart=always --name jdt-tz-prod jdt-tz-prod
|
||||||
- cd ..
|
- cd ..
|
||||||
- rm -rf jdt-tz-prod
|
- rm -rf jdt-tz-prod
|
||||||
|
|||||||
41
package.json
41
package.json
@@ -13,7 +13,7 @@
|
|||||||
"build:swan": "taro build --type swan",
|
"build:swan": "taro build --type swan",
|
||||||
"build:alipay": "taro build --type alipay",
|
"build:alipay": "taro build --type alipay",
|
||||||
"build:tt": "taro build --type tt",
|
"build:tt": "taro build --type tt",
|
||||||
"build:h5:prod": "taro build --type h5",
|
"build:h5": "taro build --type h5",
|
||||||
"build:h5:test": "taro build --type h5 --mode test",
|
"build:h5:test": "taro build --type h5 --mode test",
|
||||||
"build:rn": "taro build --type rn",
|
"build:rn": "taro build --type rn",
|
||||||
"build:qq": "taro build --type qq",
|
"build:qq": "taro build --type qq",
|
||||||
@@ -56,19 +56,19 @@
|
|||||||
"author": "",
|
"author": "",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@babel/runtime": "^7.22.11",
|
"@babel/runtime": "^7.22.11",
|
||||||
"@tarojs/components": "3.6.22",
|
"@tarojs/components": "3.6.34",
|
||||||
"@tarojs/helper": "3.6.22",
|
"@tarojs/helper": "3.6.34",
|
||||||
"@tarojs/plugin-framework-vue3": "3.6.22",
|
"@tarojs/plugin-framework-vue3": "3.6.34",
|
||||||
"@tarojs/plugin-platform-alipay": "3.6.22",
|
"@tarojs/plugin-platform-alipay": "3.6.34",
|
||||||
"@tarojs/plugin-platform-h5": "3.6.22",
|
"@tarojs/plugin-platform-h5": "3.6.34",
|
||||||
"@tarojs/plugin-platform-jd": "3.6.22",
|
"@tarojs/plugin-platform-jd": "3.6.34",
|
||||||
"@tarojs/plugin-platform-qq": "3.6.22",
|
"@tarojs/plugin-platform-qq": "3.6.34",
|
||||||
"@tarojs/plugin-platform-swan": "3.6.22",
|
"@tarojs/plugin-platform-swan": "3.6.34",
|
||||||
"@tarojs/plugin-platform-tt": "3.6.22",
|
"@tarojs/plugin-platform-tt": "3.6.34",
|
||||||
"@tarojs/plugin-platform-weapp": "3.6.22",
|
"@tarojs/plugin-platform-weapp": "3.6.34",
|
||||||
"@tarojs/runtime": "3.6.22",
|
"@tarojs/runtime": "3.6.34",
|
||||||
"@tarojs/shared": "3.6.22",
|
"@tarojs/shared": "3.6.34",
|
||||||
"@tarojs/taro": "3.6.22",
|
"@tarojs/taro": "3.6.34",
|
||||||
"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"
|
||||||
@@ -77,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",
|
||||||
@@ -88,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",
|
||||||
@@ -107,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"
|
||||||
}
|
}
|
||||||
|
|||||||
18484
pnpm-lock.yaml
generated
18484
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
@@ -1,6 +1,7 @@
|
|||||||
export default defineAppConfig({
|
export default defineAppConfig({
|
||||||
pages: [
|
pages: [
|
||||||
'pages/index/index',
|
'pages/index/index',
|
||||||
|
'pages/webview/index',
|
||||||
'pages/yaotouzi/index/index',
|
'pages/yaotouzi/index/index',
|
||||||
'pages/game_detail/index',
|
'pages/game_detail/index',
|
||||||
'pages/yaotouzi/records/index',
|
'pages/yaotouzi/records/index',
|
||||||
@@ -16,6 +17,5 @@ export default defineAppConfig({
|
|||||||
navigationBarBackgroundColor: '#fff',
|
navigationBarBackgroundColor: '#fff',
|
||||||
navigationBarTitleText: 'Game',
|
navigationBarTitleText: 'Game',
|
||||||
navigationBarTextStyle: 'black',
|
navigationBarTextStyle: 'black',
|
||||||
},
|
}
|
||||||
animation: false,
|
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -28,8 +28,16 @@ Taro.useLoad(() => {
|
|||||||
})
|
})
|
||||||
|
|
||||||
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) || []
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
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