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:
- name: 测试服-构建部署
pull: if-not-exists
image: node:22-alpine
image: node:24-alpine
when:
branch:
- test
@@ -22,7 +22,7 @@ steps:
- name: 正式服-构建部署
pull: if-not-exists
image: node:22-alpine
image: node:24-alpine
when:
branch:
- master
@@ -33,6 +33,19 @@ steps:
- pnpm build:weapp:prod:upload
- 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: 企业微信通知
pull: if-not-exists
image: plugins/webhook

View File

@@ -2,32 +2,7 @@
TARO_APP_ID='wx7b3322daa2cf9c88'
# 开发版appkey
TARO_APP_KEY='1234567890'
TARO_APP_KEY=''
# API接口
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'
TARO_APP_API='https://test.wanzhuanyongcheng.cn/app'

View File

@@ -1,16 +1,8 @@
# 正式版appid
# 正式版appid
TARO_APP_ID='wxdd00d46fa6f07974'
# 开发版appkey
# 正式版appkey
TARO_APP_KEY='private.wxdd00d46fa6f07974.key'
# API接口
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'
TARO_APP_API='https://www.wanzhuanyongcheng.cn/app'

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'
# API接口
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'
TARO_APP_API='https://test.wanzhuanyongcheng.cn/app'

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
// Read more: https://github.com/vuejs/core/pull/3399
// biome-ignore lint: disable
export {};
export {}
/* prettier-ignore */
declare module 'vue' {
@@ -42,6 +42,8 @@ declare module 'vue' {
NutSwiper: typeof import('@nutui/nutui-taro')['Swiper']
NutSwiperItem: typeof import('@nutui/nutui-taro')['SwiperItem']
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']
NutTabPane: typeof import('@nutui/nutui-taro')['TabPane']
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 { argv } from 'yargs';
const { robot = 1, desc } = argv;
const CIPluginOptFn = async () => {
/**
* @typedef { import('@tarojs/plugin-mini-ci').CIOptions } CIOptions
* @type {CIOptions}
*/
const parsedArgs = await argv;
return {
weapp: {
appid: process.env.TARO_APP_ID,
privateKeyPath: process.env.TARO_APP_KEY,
robot,
robot: parsedArgs.robot || 1,
},
desc,
desc: parsedArgs.desc,
};
};
@@ -48,7 +48,7 @@ const config = {
framework: 'vue3',
compiler: {
type: 'webpack5',
prebundle: { enable: false },
prebundle: { enable: process.env.TARO_ENV === 'h5' },
},
cache: {
enable: false, // Webpack 持久化缓存配置建议开启。默认配置请参考https://docs.taro.zone/docs/config-detail#cache
@@ -98,7 +98,7 @@ const config = {
},
},
cssModules: {
enable: true, // 默认为 false如需使用 css modules 功能,则设为 true
enable: false, // 默认为 false如需使用 css modules 功能,则设为 true
config: {
namingPattern: 'module', // 转换模式,取值为 global/module
generateScopedName: '[name]__[local]___[hash:base64:5]',

View File

@@ -1,126 +1,120 @@
{
"name": "jdt-user",
"version": "4.0.11",
"private": true,
"description": "",
"templateInfo": {
"name": "jdt-user",
"typescript": true,
"css": "sass"
},
"taroConfig": {
"version": "4.0.11"
},
"scripts": {
"build:weapp": "taro build --type weapp",
"build:test": "taro build --type weapp --mode test",
"build:swan": "taro build --type swan",
"build:alipay": "taro build --type alipay",
"build:tt": "taro build --type tt",
"build:h5": "taro build --type h5",
"build:rn": "taro build --type rn",
"build:qq": "taro build --type qq",
"build:jd": "taro build --type jd",
"build:quickapp": "taro build --type quickapp",
"dev:weapp": "taro build --type weapp --watch",
"dev:weapp:prview": "taro build --type weapp --watch --mode production",
"dev:swan": "npm run build:swan -- --watch",
"dev:alipay": "npm run build:alipay -- --watch",
"dev:tt": "npm run build:tt -- --watch",
"dev:h5": "npm run build:h5 -- --watch",
"dev:rn": "npm run build:rn -- --watch",
"dev:qq": "npm run build:qq -- --watch",
"dev:jd": "npm run build:jd -- --watch",
"dev:quickapp": "npm run build:quickapp -- --watch",
"lint": "eslint --ext .ts,.vue .",
"lint:fix": "eslint --fix --ext .ts,.vue .",
"lint:staged": "lint-staged",
"prepare": "husky install",
"cz": "cz",
"lf": "npx prettier --write",
"postinstall": "weapp-tw patch",
"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"
},
"browserslist": [
"last 3 versions",
"Android >= 4.1",
"ios >= 8"
],
"author": "",
"lint-staged": {
"*.{ts,vue}": [
"eslint --ext .ts,.vue .",
"npx prettier --write --end-of-line lf ."
]
},
"config": {
"commitizen": {
"path": "node_modules/cz-customizable"
}
},
"dependencies": {
"@babel/runtime": "^7.28.4",
"@nutui/icons-vue-taro": "^0.0.9",
"@nutui/nutui-taro": "^4.3.14",
"@qiun/vue-ucharts": "2.5.0-20230101",
"@tarojs/components": "4.1.6",
"@tarojs/helper": "4.1.6",
"@tarojs/plugin-framework-vue3": "4.1.6",
"@tarojs/plugin-html": "4.1.6",
"@tarojs/plugin-platform-alipay": "4.1.6",
"@tarojs/plugin-platform-h5": "4.1.6",
"@tarojs/plugin-platform-jd": "4.1.6",
"@tarojs/plugin-platform-qq": "4.1.6",
"@tarojs/plugin-platform-swan": "4.1.6",
"@tarojs/plugin-platform-tt": "4.1.6",
"@tarojs/plugin-platform-weapp": "4.1.6",
"@tarojs/runtime": "4.1.6",
"@tarojs/shared": "4.1.6",
"@tarojs/taro": "4.1.6",
"dayjs": "^1.11.18",
"pinia": "^2.3.1",
"uqrcodejs": "^4.0.7",
"vue": "^3.5.21"
},
"devDependencies": {
"@babel/core": "^7.28.4",
"@commitlint/cli": "^18.6.1",
"@commitlint/config-conventional": "^18.6.3",
"@tarojs/cli": "4.1.6",
"@tarojs/plugin-mini-ci": "4.1.6",
"@tarojs/taro-loader": "4.1.6",
"@tarojs/webpack5-runner": "4.1.6",
"@types/node": "^18.19.124",
"@types/webpack-env": "^1.18.8",
"@typescript-eslint/eslint-plugin": "^6.21.0",
"@typescript-eslint/parser": "^6.21.0",
"@unocss/webpack": "^0.60.4",
"@vue/babel-plugin-jsx": "^1.5.0",
"@vue/compiler-sfc": "^3.5.21",
"autoprefixer": "^10.4.21",
"babel-preset-taro": "4.1.6",
"commitizen": "^4.3.1",
"css-loader": "3.4.2",
"cz-customizable": "^7.5.1",
"eslint": "^8.57.1",
"eslint-config-taro": "4.1.6",
"eslint-plugin-vue": "^9.33.0",
"husky": "^8.0.3",
"lint-staged": "^15.5.2",
"miniprogram-ci": "^2.1.26",
"postcss": "8.4.29",
"postcss-rem-to-responsive-pixel": "^6.1.0",
"prettier": "^3.6.2",
"style-loader": "1.3.0",
"stylelint": "9.3.0",
"tailwindcss": "^3.4.17",
"ts-node": "^10.9.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"
}
"name": "jdt-user",
"version": "4.0.12",
"taroConfig": {
"version": "4.0.12"
},
"scripts": {
"build:weapp": "taro build --type weapp",
"build:test": "taro build --type weapp --mode test",
"build:swan": "taro build --type swan",
"build:alipay": "taro build --type alipay",
"build:tt": "taro build --type tt",
"build:h5": "taro build --type h5",
"build:rn": "taro build --type rn",
"build:qq": "taro build --type qq",
"build:jd": "taro build --type jd",
"build:quickapp": "taro build --type quickapp",
"dev:weapp": "taro build --type weapp --watch",
"dev:weapp:prview": "taro build --type weapp --watch --mode production",
"dev:swan": "npm run build:swan -- --watch",
"dev:alipay": "npm run build:alipay -- --watch",
"dev:tt": "npm run build:tt -- --watch",
"dev:h5": "npm run build:h5 -- --watch",
"dev:rn": "npm run build:rn -- --watch",
"dev:qq": "npm run build:qq -- --watch",
"dev:jd": "npm run build:jd -- --watch",
"dev:quickapp": "npm run build:quickapp -- --watch",
"lint": "eslint --ext .ts,.vue .",
"lint:fix": "eslint --fix --ext .ts,.vue .",
"lint:staged": "lint-staged",
"prepare": "husky install",
"cz": "cz",
"postinstall": "weapp-tw patch",
"build:weapp:prod:upload": "taro build --type weapp --upload --robot=1 --desc='正式环境'",
"build:weapp:reserve:upload": "taro build --type weapp --upload --robot=3 --desc='备用环境' --mode reserve",
"build:weapp:test:upload": "taro build --type weapp --upload --robot=2 --desc='测试环境' --mode test"
},
"browserslist": [
"last 3 versions",
"Android >= 4.1",
"ios >= 8"
],
"author": "",
"lint-staged": {
"*.{ts,vue}": [
"eslint --ext .ts,.vue .",
"npx prettier --write --end-of-line lf ."
]
},
"config": {
"commitizen": {
"path": "node_modules/cz-customizable"
}
},
"dependencies": {
"@babel/runtime": "^7.28.4",
"@nutui/icons-vue-taro": "^0.0.9",
"@nutui/nutui-taro": "^4.3.14",
"@qiun/vue-ucharts": "2.5.0-20230101",
"@tarojs/components": "4.1.6",
"@tarojs/helper": "4.1.6",
"@tarojs/plugin-framework-vue3": "4.1.6",
"@tarojs/plugin-html": "4.1.6",
"@tarojs/plugin-platform-alipay": "4.1.6",
"@tarojs/plugin-platform-h5": "4.1.6",
"@tarojs/plugin-platform-jd": "4.1.6",
"@tarojs/plugin-platform-qq": "4.1.6",
"@tarojs/plugin-platform-swan": "4.1.6",
"@tarojs/plugin-platform-tt": "4.1.6",
"@tarojs/plugin-platform-weapp": "4.1.6",
"@tarojs/runtime": "4.1.6",
"@tarojs/shared": "4.1.6",
"@tarojs/taro": "4.1.6",
"dayjs": "^1.11.18",
"pinia": "^2.3.1",
"uqrcodejs": "^4.0.7",
"vue": "^3.5.21"
},
"devDependencies": {
"@babel/core": "^7.28.4",
"@commitlint/cli": "^18.6.1",
"@commitlint/config-conventional": "^18.6.3",
"@tarojs/cli": "4.1.6",
"@tarojs/plugin-mini-ci": "4.1.6",
"@tarojs/taro-loader": "4.1.6",
"@tarojs/webpack5-runner": "4.1.6",
"@types/node": "^18.19.124",
"@types/webpack-env": "^1.18.8",
"@types/yargs": "^17.0.33",
"@typescript-eslint/eslint-plugin": "^6.21.0",
"@typescript-eslint/parser": "^6.21.0",
"@unocss/webpack": "^0.60.4",
"@vue/babel-plugin-jsx": "^1.5.0",
"@vue/compiler-sfc": "^3.5.21",
"autoprefixer": "^10.4.21",
"babel-preset-taro": "4.1.6",
"commitizen": "^4.3.1",
"css-loader": "3.4.2",
"cz-customizable": "^7.5.1",
"eslint": "^8.57.1",
"eslint-config-taro": "4.1.6",
"eslint-plugin-vue": "^9.33.0",
"husky": "^8.0.3",
"lint-staged": "^15.5.2",
"miniprogram-ci": "^2.1.26",
"postcss": "8.4.29",
"postcss-rem-to-responsive-pixel": "^6.1.0",
"prettier": "^3.6.2",
"style-loader": "1.3.0",
"stylelint": "9.3.0",
"tailwindcss": "^3.4.17",
"ts-node": "^10.9.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 {
background-color: #f5f5f5;
// font-size: 30rpx;
// IOS安全区域
padding-bottom: constant(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 Taro from '@tarojs/taro';
import { getPersonalInfo } from '@/api/user';
import { getGameList } from '@/api/game';
const list = ref<any[]>([]);
@@ -55,14 +56,8 @@ const getUserInfo = async () => {
const getList = async () => {
// console.log(process.env.TARO_APP_HALL_API)
Taro.request({
url: `${process.env.TARO_APP_HOME}`,
method: 'POST',
success: ({ data: res }) => {
list.value =
res.data.data.sort((a: any, b: any) => b.sort - a.sort) || [];
},
});
const res = await getGameList();
list.value = res.data.data.sort((a: any, b: any) => b.sort - a.sort) || [];
};
const toPage = item => {

View File

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