fix(依赖升级,bug 修复):
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2025-09-13 16:26:39 +08:00
parent f567cf7c94
commit 8b55419643
23 changed files with 343 additions and 284 deletions

View File

@@ -9,7 +9,7 @@ platform:
steps: steps:
- name: 测试服-构建部署 - name: 测试服-构建部署
pull: if-not-exists pull: if-not-exists
image: node:22-alpine image: node:24-alpine
when: when:
branch: branch:
- test - test
@@ -22,7 +22,7 @@ steps:
- name: 正式服-构建部署 - name: 正式服-构建部署
pull: if-not-exists pull: if-not-exists
image: node:22-alpine image: node:24-alpine
when: when:
branch: branch:
- master - master
@@ -33,6 +33,19 @@ steps:
- pnpm build:weapp:prod:upload - pnpm build:weapp:prod:upload
- rm -rf dist.tar - rm -rf dist.tar
- name: 备用服-构建部署
pull: if-not-exists
image: node:24-alpine
when:
branch:
- master
commands:
- npm install -g pnpm
- pnpm config set registry https://registry.npmmirror.com/
- pnpm install
- pnpm build:weapp:reserve:upload
- rm -rf dist.tar
- name: 企业微信通知 - name: 企业微信通知
pull: if-not-exists pull: if-not-exists
image: plugins/webhook image: plugins/webhook

View File

@@ -2,32 +2,7 @@
TARO_APP_ID='wx7b3322daa2cf9c88' TARO_APP_ID='wx7b3322daa2cf9c88'
# 开发版appkey # 开发版appkey
TARO_APP_KEY='1234567890' TARO_APP_KEY=''
# API接口 # API接口
TARO_APP_API='https://test.wanzhuanyongcheng.cn/app' TARO_APP_API='https://test.wanzhuanyongcheng.cn/app'
# 骰子游戏链接
TARO_APP_GAME='https://jdt-test-tz.wanzhuanyongcheng.cn/pages/index/index?uid='
# TARO_APP_GAME='http://192.168.31.225:10086?uid='
# 捕鱼游戏链接
TARO_APP_FISH_GAME='https://jdt-test-fish.wanzhuanyongcheng.cn/?uid='
# 游戏API
TARO_APP_HALL_API='https://game.wanzhuanyongcheng.cn'
# 游戏大厅
TARO_APP_HOME='https://test.wanzhuanyongcheng.cn/app/game'
# 游戏ws链接
TARO_APP_WS='wss://game.wanzhuanyongcheng.cn/dice/home'
# 大转盘ws
TARO_APP_TURNTABLE_WS='wss://game2.wanzhuanyongcheng.cn/turntable/home'
# 大转盘api
TARO_APP_TURNTABLE_API='https://game2.wanzhuanyongcheng.cn/turntable'
# 澳拾
TARO_APP_AOSHI_API='https://game3.wanzhuanyongcheng.cn'

View File

@@ -1,16 +1,8 @@
# 正式版appid # 正式版appid
TARO_APP_ID='wxdd00d46fa6f07974' TARO_APP_ID='wxdd00d46fa6f07974'
# 开发版appkey # 正式版appkey
TARO_APP_KEY='private.wxdd00d46fa6f07974.key' TARO_APP_KEY='private.wxdd00d46fa6f07974.key'
# API接口 # API接口
TARO_APP_API='https://www.wanzhuanyongcheng.cn/app' TARO_APP_API='https://www.wanzhuanyongcheng.cn/app'
TARO_APP_GAME='https://jdt-prod-tz.wanzhuanyongcheng.cn/pages/index/index?uid='
# 捕鱼游戏链接
TARO_APP_FISH_GAME='https://jdt-prod-fish.wanzhuanyongcheng.cn/?uid='
# 游戏大厅
TARO_APP_HOME='https://www.wanzhuanyongcheng.cn/app/game'

8
.env.reserve Normal file
View File

@@ -0,0 +1,8 @@
# 正式版appid
TARO_APP_ID='wx4a9380d8bb16d9de'
# 正式版appkey
TARO_APP_KEY='private.wx4a9380d8bb16d9de.key'
# API接口
TARO_APP_API='https://api.gxwzwh.com/app'

View File

@@ -5,28 +5,4 @@ TARO_APP_ID='wx7b3322daa2cf9c88'
TARO_APP_KEY='private.wx7b3322daa2cf9c88.key' TARO_APP_KEY='private.wx7b3322daa2cf9c88.key'
# API接口 # API接口
TARO_APP_API='https://test.wanzhuanyongcheng.cn/app' TARO_APP_API='https://test.wanzhuanyongcheng.cn/app'
# 游戏链接
TARO_APP_GAME='https://jdt-test-tz.wanzhuanyongcheng.cn/pages/index/index?uid='
# 捕鱼游戏链接
TARO_APP_FISH_GAME='https://jdt-test-fish.wanzhuanyongcheng.cn/?uid='
# 游戏API
TARO_APP_HALL_API='https://game.wanzhuanyongcheng.cn'
# 游戏大厅
TARO_APP_HOME='https://test.wanzhuanyongcheng.cn/app/game'
# 游戏ws链接
TARO_APP_WS='wss://game.wanzhuanyongcheng.cn/dice/home'
# 大转盘ws
TARO_APP_TURNTABLE_WS='wss://game2.wanzhuanyongcheng.cn/turntable/home'
# 大转盘api
TARO_APP_TURNTABLE_API='https://game2.wanzhuanyongcheng.cn/turntable'
# 澳拾
TARO_APP_AOSHI_API='https://game3.wanzhuanyongcheng.cn'

8
.idea/.gitignore generated vendored Normal file
View File

@@ -0,0 +1,8 @@
# 默认忽略的文件
/shelf/
/workspace.xml
# 基于编辑器的 HTTP 客户端请求
/httpRequests/
# Datasource local storage ignored files
/dataSources/
/dataSources.local.xml

60
.idea/codeStyles/Project.xml generated Normal file
View File

@@ -0,0 +1,60 @@
<component name="ProjectCodeStyleConfiguration">
<code_scheme name="Project" version="173">
<option name="LINE_SEPARATOR" value="&#10;" />
<HTMLCodeStyleSettings>
<option name="HTML_SPACE_INSIDE_EMPTY_TAG" value="true" />
</HTMLCodeStyleSettings>
<JSCodeStyleSettings version="0">
<option name="FORCE_SEMICOLON_STYLE" value="true" />
<option name="SPACE_BEFORE_FUNCTION_LEFT_PARENTH" value="false" />
<option name="USE_DOUBLE_QUOTES" value="false" />
<option name="FORCE_QUOTE_STYlE" value="true" />
<option name="ENFORCE_TRAILING_COMMA" value="WhenMultiline" />
<option name="SPACES_WITHIN_OBJECT_LITERAL_BRACES" value="true" />
<option name="SPACES_WITHIN_IMPORTS" value="true" />
</JSCodeStyleSettings>
<TypeScriptCodeStyleSettings version="0">
<option name="FORCE_SEMICOLON_STYLE" value="true" />
<option name="SPACE_BEFORE_FUNCTION_LEFT_PARENTH" value="false" />
<option name="USE_DOUBLE_QUOTES" value="false" />
<option name="FORCE_QUOTE_STYlE" value="true" />
<option name="ENFORCE_TRAILING_COMMA" value="WhenMultiline" />
<option name="SPACES_WITHIN_OBJECT_LITERAL_BRACES" value="true" />
<option name="SPACES_WITHIN_IMPORTS" value="true" />
</TypeScriptCodeStyleSettings>
<VueCodeStyleSettings>
<option name="INTERPOLATION_NEW_LINE_AFTER_START_DELIMITER" value="false" />
<option name="INTERPOLATION_NEW_LINE_BEFORE_END_DELIMITER" value="false" />
</VueCodeStyleSettings>
<codeStyleSettings language="HTML">
<option name="SOFT_MARGINS" value="80" />
<indentOptions>
<option name="INDENT_SIZE" value="2" />
<option name="CONTINUATION_INDENT_SIZE" value="2" />
<option name="TAB_SIZE" value="2" />
</indentOptions>
</codeStyleSettings>
<codeStyleSettings language="JavaScript">
<option name="SOFT_MARGINS" value="80" />
<indentOptions>
<option name="INDENT_SIZE" value="2" />
<option name="CONTINUATION_INDENT_SIZE" value="2" />
<option name="TAB_SIZE" value="2" />
</indentOptions>
</codeStyleSettings>
<codeStyleSettings language="TypeScript">
<option name="SOFT_MARGINS" value="80" />
<indentOptions>
<option name="INDENT_SIZE" value="2" />
<option name="CONTINUATION_INDENT_SIZE" value="2" />
<option name="TAB_SIZE" value="2" />
</indentOptions>
</codeStyleSettings>
<codeStyleSettings language="Vue">
<option name="SOFT_MARGINS" value="80" />
<indentOptions>
<option name="CONTINUATION_INDENT_SIZE" value="2" />
</indentOptions>
</codeStyleSettings>
</code_scheme>
</component>

5
.idea/codeStyles/codeStyleConfig.xml generated Normal file
View File

@@ -0,0 +1,5 @@
<component name="ProjectCodeStyleConfiguration">
<state>
<option name="USE_PER_PROJECT_SETTINGS" value="true" />
</state>
</component>

View File

@@ -0,0 +1,7 @@
<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>

12
.idea/jdt-user.iml generated Normal file
View File

@@ -0,0 +1,12 @@
<?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>

8
.idea/modules.xml generated Normal file
View File

@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/.idea/jdt-user.iml" filepath="$PROJECT_DIR$/.idea/jdt-user.iml" />
</modules>
</component>
</project>

6
.idea/prettier.xml generated Normal file
View File

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="PrettierConfiguration">
<option name="myConfigurationMode" value="AUTOMATIC" />
</component>
</project>

6
.idea/vcs.xml generated Normal file
View File

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="" vcs="Git" />
</component>
</project>

4
components.d.ts vendored
View File

@@ -3,7 +3,7 @@
// Generated by unplugin-vue-components // Generated by unplugin-vue-components
// Read more: https://github.com/vuejs/core/pull/3399 // Read more: https://github.com/vuejs/core/pull/3399
// biome-ignore lint: disable // biome-ignore lint: disable
export {}; export {}
/* prettier-ignore */ /* prettier-ignore */
declare module 'vue' { declare module 'vue' {
@@ -42,6 +42,8 @@ declare module 'vue' {
NutSwiper: typeof import('@nutui/nutui-taro')['Swiper'] NutSwiper: typeof import('@nutui/nutui-taro')['Swiper']
NutSwiperItem: typeof import('@nutui/nutui-taro')['SwiperItem'] NutSwiperItem: typeof import('@nutui/nutui-taro')['SwiperItem']
NutSwitch: typeof import('@nutui/nutui-taro')['Switch'] NutSwitch: typeof import('@nutui/nutui-taro')['Switch']
NutTabbar: typeof import('@nutui/nutui-taro')['Tabbar']
NutTabbarItem: typeof import('@nutui/nutui-taro')['TabbarItem']
NutTable: typeof import('@nutui/nutui-taro')['Table'] NutTable: typeof import('@nutui/nutui-taro')['Table']
NutTabPane: typeof import('@nutui/nutui-taro')['TabPane'] NutTabPane: typeof import('@nutui/nutui-taro')['TabPane']
NutTabs: typeof import('@nutui/nutui-taro')['Tabs'] NutTabs: typeof import('@nutui/nutui-taro')['Tabs']

View File

@@ -4,21 +4,21 @@ import { UnifiedWebpackPluginV5 } from 'weapp-tailwindcss/webpack';
import { join } from 'node:path'; import { join } from 'node:path';
import { argv } from 'yargs'; import { argv } from 'yargs';
const { robot = 1, desc } = argv;
const CIPluginOptFn = async () => { const CIPluginOptFn = async () => {
/** /**
* @typedef { import('@tarojs/plugin-mini-ci').CIOptions } CIOptions * @typedef { import('@tarojs/plugin-mini-ci').CIOptions } CIOptions
* @type {CIOptions} * @type {CIOptions}
*/ */
const parsedArgs = await argv;
return { return {
weapp: { weapp: {
appid: process.env.TARO_APP_ID, appid: process.env.TARO_APP_ID,
privateKeyPath: process.env.TARO_APP_KEY, privateKeyPath: process.env.TARO_APP_KEY,
robot, robot: parsedArgs.robot || 1,
}, },
desc, desc: parsedArgs.desc,
}; };
}; };
@@ -48,7 +48,7 @@ const config = {
framework: 'vue3', framework: 'vue3',
compiler: { compiler: {
type: 'webpack5', type: 'webpack5',
prebundle: { enable: false }, prebundle: { enable: process.env.TARO_ENV === 'h5' },
}, },
cache: { cache: {
enable: false, // Webpack 持久化缓存配置建议开启。默认配置请参考https://docs.taro.zone/docs/config-detail#cache enable: false, // Webpack 持久化缓存配置建议开启。默认配置请参考https://docs.taro.zone/docs/config-detail#cache
@@ -98,7 +98,7 @@ const config = {
}, },
}, },
cssModules: { cssModules: {
enable: true, // 默认为 false如需使用 css modules 功能,则设为 true enable: false, // 默认为 false如需使用 css modules 功能,则设为 true
config: { config: {
namingPattern: 'module', // 转换模式,取值为 global/module namingPattern: 'module', // 转换模式,取值为 global/module
generateScopedName: '[name]__[local]___[hash:base64:5]', generateScopedName: '[name]__[local]___[hash:base64:5]',

View File

@@ -1,126 +1,120 @@
{ {
"name": "jdt-user", "name": "jdt-user",
"version": "4.0.11", "version": "4.0.12",
"private": true, "taroConfig": {
"description": "", "version": "4.0.12"
"templateInfo": { },
"name": "jdt-user", "scripts": {
"typescript": true, "build:weapp": "taro build --type weapp",
"css": "sass" "build:test": "taro build --type weapp --mode test",
}, "build:swan": "taro build --type swan",
"taroConfig": { "build:alipay": "taro build --type alipay",
"version": "4.0.11" "build:tt": "taro build --type tt",
}, "build:h5": "taro build --type h5",
"scripts": { "build:rn": "taro build --type rn",
"build:weapp": "taro build --type weapp", "build:qq": "taro build --type qq",
"build:test": "taro build --type weapp --mode test", "build:jd": "taro build --type jd",
"build:swan": "taro build --type swan", "build:quickapp": "taro build --type quickapp",
"build:alipay": "taro build --type alipay", "dev:weapp": "taro build --type weapp --watch",
"build:tt": "taro build --type tt", "dev:weapp:prview": "taro build --type weapp --watch --mode production",
"build:h5": "taro build --type h5", "dev:swan": "npm run build:swan -- --watch",
"build:rn": "taro build --type rn", "dev:alipay": "npm run build:alipay -- --watch",
"build:qq": "taro build --type qq", "dev:tt": "npm run build:tt -- --watch",
"build:jd": "taro build --type jd", "dev:h5": "npm run build:h5 -- --watch",
"build:quickapp": "taro build --type quickapp", "dev:rn": "npm run build:rn -- --watch",
"dev:weapp": "taro build --type weapp --watch", "dev:qq": "npm run build:qq -- --watch",
"dev:weapp:prview": "taro build --type weapp --watch --mode production", "dev:jd": "npm run build:jd -- --watch",
"dev:swan": "npm run build:swan -- --watch", "dev:quickapp": "npm run build:quickapp -- --watch",
"dev:alipay": "npm run build:alipay -- --watch", "lint": "eslint --ext .ts,.vue .",
"dev:tt": "npm run build:tt -- --watch", "lint:fix": "eslint --fix --ext .ts,.vue .",
"dev:h5": "npm run build:h5 -- --watch", "lint:staged": "lint-staged",
"dev:rn": "npm run build:rn -- --watch", "prepare": "husky install",
"dev:qq": "npm run build:qq -- --watch", "cz": "cz",
"dev:jd": "npm run build:jd -- --watch", "postinstall": "weapp-tw patch",
"dev:quickapp": "npm run build:quickapp -- --watch", "build:weapp:prod:upload": "taro build --type weapp --upload --robot=1 --desc='正式环境'",
"lint": "eslint --ext .ts,.vue .", "build:weapp:reserve:upload": "taro build --type weapp --upload --robot=3 --desc='备用环境' --mode reserve",
"lint:fix": "eslint --fix --ext .ts,.vue .", "build:weapp:test:upload": "taro build --type weapp --upload --robot=2 --desc='测试环境' --mode test"
"lint:staged": "lint-staged", },
"prepare": "husky install", "browserslist": [
"cz": "cz", "last 3 versions",
"lf": "npx prettier --write", "Android >= 4.1",
"postinstall": "weapp-tw patch", "ios >= 8"
"build:weapp:prod:upload": "taro build --type weapp --upload --robot=1 --desc='正式环境'", ],
"build:weapp:test:upload": "taro build --type weapp --upload --robot=2 --desc='测试环境' --mode test" "author": "",
}, "lint-staged": {
"browserslist": [ "*.{ts,vue}": [
"last 3 versions", "eslint --ext .ts,.vue .",
"Android >= 4.1", "npx prettier --write --end-of-line lf ."
"ios >= 8" ]
], },
"author": "", "config": {
"lint-staged": { "commitizen": {
"*.{ts,vue}": [ "path": "node_modules/cz-customizable"
"eslint --ext .ts,.vue .", }
"npx prettier --write --end-of-line lf ." },
] "dependencies": {
}, "@babel/runtime": "^7.28.4",
"config": { "@nutui/icons-vue-taro": "^0.0.9",
"commitizen": { "@nutui/nutui-taro": "^4.3.14",
"path": "node_modules/cz-customizable" "@qiun/vue-ucharts": "2.5.0-20230101",
} "@tarojs/components": "4.1.6",
}, "@tarojs/helper": "4.1.6",
"dependencies": { "@tarojs/plugin-framework-vue3": "4.1.6",
"@babel/runtime": "^7.28.4", "@tarojs/plugin-html": "4.1.6",
"@nutui/icons-vue-taro": "^0.0.9", "@tarojs/plugin-platform-alipay": "4.1.6",
"@nutui/nutui-taro": "^4.3.14", "@tarojs/plugin-platform-h5": "4.1.6",
"@qiun/vue-ucharts": "2.5.0-20230101", "@tarojs/plugin-platform-jd": "4.1.6",
"@tarojs/components": "4.1.6", "@tarojs/plugin-platform-qq": "4.1.6",
"@tarojs/helper": "4.1.6", "@tarojs/plugin-platform-swan": "4.1.6",
"@tarojs/plugin-framework-vue3": "4.1.6", "@tarojs/plugin-platform-tt": "4.1.6",
"@tarojs/plugin-html": "4.1.6", "@tarojs/plugin-platform-weapp": "4.1.6",
"@tarojs/plugin-platform-alipay": "4.1.6", "@tarojs/runtime": "4.1.6",
"@tarojs/plugin-platform-h5": "4.1.6", "@tarojs/shared": "4.1.6",
"@tarojs/plugin-platform-jd": "4.1.6", "@tarojs/taro": "4.1.6",
"@tarojs/plugin-platform-qq": "4.1.6", "dayjs": "^1.11.18",
"@tarojs/plugin-platform-swan": "4.1.6", "pinia": "^2.3.1",
"@tarojs/plugin-platform-tt": "4.1.6", "uqrcodejs": "^4.0.7",
"@tarojs/plugin-platform-weapp": "4.1.6", "vue": "^3.5.21"
"@tarojs/runtime": "4.1.6", },
"@tarojs/shared": "4.1.6", "devDependencies": {
"@tarojs/taro": "4.1.6", "@babel/core": "^7.28.4",
"dayjs": "^1.11.18", "@commitlint/cli": "^18.6.1",
"pinia": "^2.3.1", "@commitlint/config-conventional": "^18.6.3",
"uqrcodejs": "^4.0.7", "@tarojs/cli": "4.1.6",
"vue": "^3.5.21" "@tarojs/plugin-mini-ci": "4.1.6",
}, "@tarojs/taro-loader": "4.1.6",
"devDependencies": { "@tarojs/webpack5-runner": "4.1.6",
"@babel/core": "^7.28.4", "@types/node": "^18.19.124",
"@commitlint/cli": "^18.6.1", "@types/webpack-env": "^1.18.8",
"@commitlint/config-conventional": "^18.6.3", "@types/yargs": "^17.0.33",
"@tarojs/cli": "4.1.6", "@typescript-eslint/eslint-plugin": "^6.21.0",
"@tarojs/plugin-mini-ci": "4.1.6", "@typescript-eslint/parser": "^6.21.0",
"@tarojs/taro-loader": "4.1.6", "@unocss/webpack": "^0.60.4",
"@tarojs/webpack5-runner": "4.1.6", "@vue/babel-plugin-jsx": "^1.5.0",
"@types/node": "^18.19.124", "@vue/compiler-sfc": "^3.5.21",
"@types/webpack-env": "^1.18.8", "autoprefixer": "^10.4.21",
"@typescript-eslint/eslint-plugin": "^6.21.0", "babel-preset-taro": "4.1.6",
"@typescript-eslint/parser": "^6.21.0", "commitizen": "^4.3.1",
"@unocss/webpack": "^0.60.4", "css-loader": "3.4.2",
"@vue/babel-plugin-jsx": "^1.5.0", "cz-customizable": "^7.5.1",
"@vue/compiler-sfc": "^3.5.21", "eslint": "^8.57.1",
"autoprefixer": "^10.4.21", "eslint-config-taro": "4.1.6",
"babel-preset-taro": "4.1.6", "eslint-plugin-vue": "^9.33.0",
"commitizen": "^4.3.1", "husky": "^8.0.3",
"css-loader": "3.4.2", "lint-staged": "^15.5.2",
"cz-customizable": "^7.5.1", "miniprogram-ci": "^2.1.26",
"eslint": "^8.57.1", "postcss": "8.4.29",
"eslint-config-taro": "4.1.6", "postcss-rem-to-responsive-pixel": "^6.1.0",
"eslint-plugin-vue": "^9.33.0", "prettier": "^3.6.2",
"husky": "^8.0.3", "style-loader": "1.3.0",
"lint-staged": "^15.5.2", "stylelint": "9.3.0",
"miniprogram-ci": "^2.1.26", "tailwindcss": "^3.4.17",
"postcss": "8.4.29", "ts-node": "^10.9.2",
"postcss-rem-to-responsive-pixel": "^6.1.0", "typescript": "^5.9.2",
"prettier": "^3.6.2", "unplugin-vue-components": "^28.8.0",
"style-loader": "1.3.0", "vue-loader": "^17.4.2",
"stylelint": "9.3.0", "weapp-tailwindcss": "^3.7.0",
"tailwindcss": "^3.4.17", "webpack": "^5.101.3",
"ts-node": "^10.9.2", "yargs": "^17.7.2"
"typescript": "^5.9.2", }
"unplugin-vue-components": "^28.8.0",
"vue-loader": "^17.4.2",
"weapp-tailwindcss": "^3.7.0",
"webpack": "^5.101.3",
"yargs": "^17.7.2"
}
} }

View File

@@ -0,0 +1,27 @@
-----BEGIN RSA PRIVATE KEY-----
MIIEogIBAAKCAQEAmHk5BywZ6y2rji/dL2HooKGiTuHrcSeGFODvDK6PPUjnieWB
ev7C6N9kBWNbtYiwyLVpW5iKCxCb/GaBa5EIE0nXnKiOhThP3a8OYDW0oA9Xyp03
1W56U3tnHA/GziyABIIMxqA45WYh3e9ar/sdhDvDyre0yl+8cWcPdNOVOW7as88W
yXDsCQbQedPIAy3sRANZ6K2QTNe5Aht3Y7F1uMKRlJwLodutUopPd32rxJz7WNhB
j9CrjzgnfLJa7siURM2r6om2osNFqHP4bmy5yO68TPI8JQgJTUqoNswgFDa2ng9Y
lOhks6kMR8ldL89+fYqILGDVG7124LKIo1awTQIDAQABAoIBACS+Kaj5zrEmy02z
aRjO/lEfQk7CEIuvG5eScOjcc/YvyGQpo18xX2Tg2GiX/fSsIPXtCZuiEboC4aQc
S5nRVGHZjJTa5aVi4ZQpaEx1BLcBm4VfB6JuQho2Ba30e1MZ1CvB7zQ6Thux1f12
faMk34MLJ+6FAJM4KOAnFslvZ2l0VxIlBq5pbF71dO/MsIrpBWVFNGqu6jtXRUJw
J92PbaFMi/smsgdXixsokzPmE5em3zLdp5cfHQCRBjNBclMjlnHhwQVK8wU7D609
CPcvPS8J3PMceMeGXC1QXFANllVecmn7jECVBU5H4Ed0pb89T9Q7yWVnVBo31ZB7
r4GuL+ECgYEAyLcE4cuPsp31oaKATSZrBmypQuGFsarddyereN8ATZ9DjbFL9Y2/
NazLmG1KjeD1yN1q9/ek+nctKTNzuY14cVeahDoiv0ALNUOuS7IFzoHWf5SnNKEx
oEgGJV9D6olk9YnPF5iwn/lRL84af3dxSnKr75hh8Yv5hWrPnJ95xJkCgYEAwniQ
z6yFg2SmnzwwYV72/aoukmsI3KKBHMEDkAFOummy7iv8eT+9DLumQ9BC+mT3eFmq
GVNVM+199NTQ5b5CzXYalSsw93rewhRkk0RVV31AJUwaRbYy6F6O502SpFYb4n8f
S7KfDv70utGOnycMBNjeaFGWxAZbUCLjfUv8JdUCgYBb1fGz5lHPZhrXY+TUZ/mc
LOedJFbpncZLGKmKWm5nFbHxCOg6aCrOwks9aPQtynpq93RUFMk1mIXfTh1rDuHG
6lBWo8r2OrVmH5uGIuQpQpsEMN34ZLCyJ4I4Y0hN7aN1/SH2J/TYnViaSPEy1VHO
wH0O2Wgm/uaiNubbQNSUMQKBgCXT5fc/i8j/LxoSTybhnhHBpMV+ZH7mbU72jIba
ekHwhYmmrLm5GED9z12piR3Dvg9/AYNjnlM3gyS4sNm/pKbqrkkN2byJ/gKqjNXI
mQEnr+6RWxrsUgK5QfrkL/4fcdUg/SlwWVhFZ71fPerfYYsf1ENee4Et610vLCkX
OrjxAoGATIlZgaPuDA/Sh/YTxxSEjNZGCWx4YvWZfL+PW2ItuadMeD2lLai6lOOi
9ew2xXZkvaeA9PGOA5YK2121M5brwkB0Kc3zNvEmrkpQDJYqeoRvLEuFGDmZ/MX1
p0bzKs1vvh5dyFjWQ5IN9FckZ3Fpk6A1zMEuyQdk35TwX+w5EdE=
-----END RSA PRIVATE KEY-----

4
src/api/game.ts Normal file
View File

@@ -0,0 +1,4 @@
import request from '../utils/request';
// 获取游戏列表
export const getGameList = () => request('/game', {}, 'POST');

View File

@@ -5,8 +5,6 @@
page { page {
background-color: #f5f5f5; background-color: #f5f5f5;
// font-size: 30rpx;
// IOS安全区域
padding-bottom: constant(safe-area-inset-bottom); padding-bottom: constant(safe-area-inset-bottom);
padding-bottom: env(safe-area-inset-bottom); padding-bottom: env(safe-area-inset-bottom);
} }

View File

@@ -1,10 +0,0 @@
// 用于配置项目的一些常量如接口地址、websocket地址等
import Taro from '@tarojs/taro';
export const app = {
API_URL: () => `${process.env.TARO_APP_HALL_API}`,
API_WS: () =>
`${process.env.TARO_APP_WS}?uid=${Taro.getStorageSync('uid')}&game_id=${
Taro.getStorageSync('gameItem').ID
}`,
};

View File

@@ -16,6 +16,7 @@
import { ref } from 'vue'; import { ref } from 'vue';
import Taro from '@tarojs/taro'; import Taro from '@tarojs/taro';
import { getPersonalInfo } from '@/api/user'; import { getPersonalInfo } from '@/api/user';
import { getGameList } from '@/api/game';
const list = ref<any[]>([]); const list = ref<any[]>([]);
@@ -55,14 +56,8 @@ const getUserInfo = async () => {
const getList = async () => { const getList = async () => {
// console.log(process.env.TARO_APP_HALL_API) // console.log(process.env.TARO_APP_HALL_API)
Taro.request({ const res = await getGameList();
url: `${process.env.TARO_APP_HOME}`, list.value = res.data.data.sort((a: any, b: any) => b.sort - a.sort) || [];
method: 'POST',
success: ({ data: res }) => {
list.value =
res.data.data.sort((a: any, b: any) => b.sort - a.sort) || [];
},
});
}; };
const toPage = item => { const toPage = item => {

View File

@@ -1,14 +1,14 @@
<template> <template>
<view class="appUser"> <view class="appUser">
<view <view
:style="{ width: isLogin ? '100%' : '70%' }"
class="user-center-card__header__transparent" class="user-center-card__header__transparent"
v-if="isLogin" v-if="isLogin">
:style="{ width: isLogin ? '100%' : '70%' }">
<view <view
class="user-center-card__header__avatar" class="user-center-card__header__avatar"
@click="toPage('/pages/users/user_setting/index')"> @click="toPage('/pages/users/user_setting/index')">
<nut-avatar size="large"> <nut-avatar size="large">
<img :src="userInfo.data?.avatarUrl" /> <img :src="userInfo.data?.avatarUrl" alt="" />
</nut-avatar> </nut-avatar>
</view> </view>
<view <view
@@ -34,7 +34,8 @@
<view class="user-center-card__header__avatar"> <view class="user-center-card__header__avatar">
<nut-avatar size="large"> <nut-avatar size="large">
<img <img
src="https://img12.360buyimg.com/imagetools/jfs/t1/196430/38/8105/14329/60c806a4Ed506298a/e6de9fb7b8490f38.png" /> src="https://img12.360buyimg.com/imagetools/jfs/t1/196430/38/8105/14329/60c806a4Ed506298a/e6de9fb7b8490f38.png"
alt="" />
</nut-avatar> </nut-avatar>
</view> </view>
<view class="user-center-card__header__info"> <view class="user-center-card__header__info">
@@ -186,7 +187,11 @@ import { ref } from 'vue';
import { ArrowRight, IconFont } from '@nutui/icons-vue-taro'; import { ArrowRight, IconFont } from '@nutui/icons-vue-taro';
import Taro from '@tarojs/taro'; import Taro from '@tarojs/taro';
import Auth from '@/components/Auth.vue'; import Auth from '@/components/Auth.vue';
import { getPersonalInfo, getPhone, bindParent } from '@/api/user'; import {
getPersonalInfo,
getPhone,
// bindParent
} from '@/api/user';
import { maskString } from '@/utils'; import { maskString } from '@/utils';
const isShowLogin = ref(false); const isShowLogin = ref(false);
@@ -231,15 +236,15 @@ const init_data = () => {
} }
}; };
const test = () => { // const test = () => {
console.log(process.env.TARO_APP_ID); // console.log(process.env.TARO_APP_ID);
Taro.openCustomerServiceChat({ // Taro.openCustomerServiceChat({
corpId: 'wwb5dd953ca36043ef', // corpId: 'wwb5dd953ca36043ef',
extInfo: { // extInfo: {
url: 'https://work.weixin.qq.com/kfid/kfcb2b0420e94102346', // url: 'https://work.weixin.qq.com/kfid/kfcb2b0420e94102346',
}, // },
}); // });
}; // };
const cancelLogin = () => { const cancelLogin = () => {
isShowLogin.value = false; isShowLogin.value = false;
@@ -327,28 +332,28 @@ const toPage = (url: string) => {
}); });
}; };
const scanCode = () => { // const scanCode = () => {
Taro.scanCode({ // Taro.scanCode({
onlyFromCamera: true, // onlyFromCamera: true,
scanType: ['qrCode'], // scanType: ['qrCode'],
success: async data => { // success: async data => {
try { // try {
await bindParent({ // await bindParent({
uid: data.result, // uid: data.result,
}); // });
Taro.showToast({ // Taro.showToast({
title: '绑定成功', // title: '绑定成功',
icon: 'none', // icon: 'none',
}); // });
} catch (error) { // } catch (error) {
Taro.showToast({ // Taro.showToast({
title: error.msg, // title: error.msg,
icon: 'none', // icon: 'none',
}); // });
} // }
}, // },
}); // });
}; // };
</script> </script>
<style lang="scss"> <style lang="scss">

View File

@@ -1,32 +0,0 @@
import { app } from '@/config';
import Taro from '@tarojs/taro';
export interface RequestParams {
url: string;
method: 'GET' | 'POST' | 'PUT' | 'DELETE';
header?: object;
data?: string | object;
}
const request = (request: RequestParams): Promise<any> => {
return new Promise((resolve, reject) => {
Taro.request({
url: `${app.API_URL()}${request.url}`,
method: request.method,
timeout: 5000,
dataType: 'json',
header: request.header || {},
data: request.data || {},
success: res => {
resolve(res.data);
// Taro.hideLoading()
},
fail: err => {
reject(err);
Taro.hideLoading();
},
});
});
};
export default request;