提交 192edf94 作者: 方治民

feat: 新增 websocket(stomp)、统一网络/代理配置

上级 d19af0d4
# API 接口地址
VITE_GLOB_API_URL=http://192.168.0.156:18181
VITE_GLOB_API_URL=http://192.168.0.156:17181
# API 接口地址前缀
VITE_GLOB_API_URL_PREFIX=/api
......@@ -25,6 +25,7 @@
- [x] 项目构建,文档编写
- [x] [changelog](https://www.cnblogs.com/mengfangui/p/12634845.html)
- [x] 完善网络请求相关配置
- [x] 集成 [Stomp WebSocket](https://github.com/jmesnil/stomp-websocket)
- [x] 集成 [Pont](https://github.com/alibaba/pont)
- [x] 集成 [Pinia](https://pinia.vuejs.org/)
- [x] 集成 [vue-i18n](https://github.com/intlify/vue-i18n-next)
......
......@@ -22,6 +22,7 @@ export function configAutoImportPlugin(): Plugin {
'@/api/services': ['defs'],
'@/api/services/mods': ['API'],
'@/common': ['Message'],
'@/utils/stomp': [['default', 'Stomp']],
},
],
})
......
......@@ -78,13 +78,14 @@
"@dcloudio/uni-quickapp-webview": "^3.0.0-alpha-3060820221027004",
"@dcloudio/uni-ui": "^1.4.23",
"@vue/runtime-core": "3.2.41",
"@vueuse/core": "^8.9.4",
"@vueuse/core": "^9.5.0",
"axios": "^0.26.1",
"dayjs": "^1.11.6",
"lodash-es": "^4.17.21",
"mockjs": "^1.1.0",
"pinia": "^2.0.23",
"qs": "~6.9.7",
"stompjs": "^2.3.3",
"vue": "3.2.41",
"vue-i18n": "^9.2.2",
"vue-types": "^4.2.1"
......@@ -101,6 +102,7 @@
"@types/mockjs": "^1.0.7",
"@types/prettier": "^2.7.1",
"@types/qs": "^6.9.7",
"@types/stompjs": "^2.3.5",
"@typescript-eslint/eslint-plugin": "^5.42.1",
"@typescript-eslint/parser": "^5.42.1",
"commitizen": "^4.2.5",
......@@ -120,7 +122,7 @@
"npm-run-all": "^4.1.5",
"picocolors": "^1.0.0",
"pont-engine": "^1.5.2",
"postcss": "^8.4.18",
"postcss": "^8.4.19",
"postcss-html": "^1.5.0",
"postcss-less": "^6.0.0",
"prettier": "^2.7.1",
......
......@@ -25,10 +25,11 @@ specifiers:
'@types/mockjs': ^1.0.7
'@types/prettier': ^2.7.1
'@types/qs': ^6.9.7
'@types/stompjs': ^2.3.5
'@typescript-eslint/eslint-plugin': ^5.42.1
'@typescript-eslint/parser': ^5.42.1
'@vue/runtime-core': 3.2.41
'@vueuse/core': ^8.9.4
'@vueuse/core': ^9.5.0
axios: ^0.26.1
commitizen: ^4.2.5
conventional-changelog-cli: ^2.2.2
......@@ -51,7 +52,7 @@ specifiers:
picocolors: ^1.0.0
pinia: ^2.0.23
pont-engine: ^1.5.2
postcss: ^8.4.18
postcss: ^8.4.19
postcss-html: ^1.5.0
postcss-less: ^6.0.0
prettier: ^2.7.1
......@@ -59,6 +60,7 @@ specifiers:
rimraf: ^3.0.2
sass: ^1.56.1
sort-package-json: ^1.57.0
stompjs: ^2.3.3
stylelint: ^14.14.1
stylelint-config-html: ^1.1.0
stylelint-config-prettier: ^9.0.4
......@@ -77,27 +79,28 @@ specifiers:
vue-types: ^4.2.1
dependencies:
'@dcloudio/uni-app': 3.0.0-alpha-3060820221027004_postcss@8.4.18+vue@3.2.41
'@dcloudio/uni-app-plus': 3.0.0-alpha-3060820221027004_ye7i4l32thyfreu66zm4trdn3q
'@dcloudio/uni-app': 3.0.0-alpha-3060820221027004_postcss@8.4.19+vue@3.2.41
'@dcloudio/uni-app-plus': 3.0.0-alpha-3060820221027004_njcqccjy2xtvug4hisn25whdv4
'@dcloudio/uni-components': 3.0.0-alpha-3060820221027004
'@dcloudio/uni-h5': 3.0.0-alpha-3060820221027004_postcss@8.4.18+vue@3.2.41
'@dcloudio/uni-mp-alipay': 3.0.0-alpha-3060820221027004_postcss@8.4.18+vue@3.2.41
'@dcloudio/uni-mp-baidu': 3.0.0-alpha-3060820221027004_postcss@8.4.18+vue@3.2.41
'@dcloudio/uni-mp-kuaishou': 3.0.0-alpha-3060820221027004_postcss@8.4.18+vue@3.2.41
'@dcloudio/uni-mp-lark': 3.0.0-alpha-3060820221027004_postcss@8.4.18+vue@3.2.41
'@dcloudio/uni-mp-qq': 3.0.0-alpha-3060820221027004_postcss@8.4.18+vue@3.2.41
'@dcloudio/uni-mp-toutiao': 3.0.0-alpha-3060820221027004_postcss@8.4.18+vue@3.2.41
'@dcloudio/uni-mp-weixin': 3.0.0-alpha-3060820221027004_postcss@8.4.18+vue@3.2.41
'@dcloudio/uni-quickapp-webview': 3.0.0-alpha-3060820221027004_postcss@8.4.18+vue@3.2.41
'@dcloudio/uni-h5': 3.0.0-alpha-3060820221027004_postcss@8.4.19+vue@3.2.41
'@dcloudio/uni-mp-alipay': 3.0.0-alpha-3060820221027004_postcss@8.4.19+vue@3.2.41
'@dcloudio/uni-mp-baidu': 3.0.0-alpha-3060820221027004_postcss@8.4.19+vue@3.2.41
'@dcloudio/uni-mp-kuaishou': 3.0.0-alpha-3060820221027004_postcss@8.4.19+vue@3.2.41
'@dcloudio/uni-mp-lark': 3.0.0-alpha-3060820221027004_postcss@8.4.19+vue@3.2.41
'@dcloudio/uni-mp-qq': 3.0.0-alpha-3060820221027004_postcss@8.4.19+vue@3.2.41
'@dcloudio/uni-mp-toutiao': 3.0.0-alpha-3060820221027004_postcss@8.4.19+vue@3.2.41
'@dcloudio/uni-mp-weixin': 3.0.0-alpha-3060820221027004_postcss@8.4.19+vue@3.2.41
'@dcloudio/uni-quickapp-webview': 3.0.0-alpha-3060820221027004_postcss@8.4.19+vue@3.2.41
'@dcloudio/uni-ui': 1.4.23
'@vue/runtime-core': 3.2.41
'@vueuse/core': 8.9.4_vue@3.2.41
'@vueuse/core': 9.5.0_vue@3.2.41
axios: 0.26.1
dayjs: 1.11.6
lodash-es: 4.17.21
mockjs: 1.1.0
pinia: 2.0.23_l7r24p6nevbtlimqmqcwa3ouhu
qs: 6.9.7
stompjs: 2.3.3
vue: 3.2.41
vue-i18n: 9.2.2_vue@3.2.41
vue-types: 4.2.1_vue@3.2.41
......@@ -106,14 +109,15 @@ devDependencies:
'@commitlint/cli': 17.2.0
'@commitlint/config-conventional': 16.2.4
'@dcloudio/types': 3.0.19
'@dcloudio/uni-automator': 3.0.0-alpha-3060820221027004_postcss@8.4.18+vue@3.2.41
'@dcloudio/uni-cli-shared': 3.0.0-alpha-3060820221027004_postcss@8.4.18+vue@3.2.41
'@dcloudio/uni-automator': 3.0.0-alpha-3060820221027004_postcss@8.4.19+vue@3.2.41
'@dcloudio/uni-cli-shared': 3.0.0-alpha-3060820221027004_postcss@8.4.19+vue@3.2.41
'@dcloudio/uni-helper-json': 1.0.13
'@dcloudio/vite-plugin-uni': 3.0.0-alpha-3060820221027004_ye7i4l32thyfreu66zm4trdn3q
'@dcloudio/vite-plugin-uni': 3.0.0-alpha-3060820221027004_njcqccjy2xtvug4hisn25whdv4
'@types/lodash-es': 4.17.6
'@types/mockjs': 1.0.7
'@types/prettier': 2.7.1
'@types/qs': 6.9.7
'@types/stompjs': 2.3.5
'@typescript-eslint/eslint-plugin': 5.42.1_2udltptbznfmezdozpdoa2aemq
'@typescript-eslint/parser': 5.42.1_rmayb2veg2btbq6mbmnyivgasy
commitizen: 4.2.5
......@@ -133,9 +137,9 @@ devDependencies:
npm-run-all: 4.1.5
picocolors: 1.0.0
pont-engine: 1.5.2
postcss: 8.4.18
postcss: 8.4.19
postcss-html: 1.5.0
postcss-less: 6.0.0_postcss@8.4.18
postcss-less: 6.0.0_postcss@8.4.19
prettier: 2.7.1
rimraf: 3.0.2
sass: 1.56.1
......@@ -149,7 +153,7 @@ devDependencies:
stylus: 0.59.0
terser: 5.15.1
typescript: 4.8.4
unplugin-auto-import: 0.11.4_@vueuse+core@8.9.4
unplugin-auto-import: 0.11.4_@vueuse+core@9.5.0
unplugin-vue-components: 0.22.9_vue@3.2.41
vite: 3.2.2_g6gdovjup2ztda6pb55v6rb7am
vue-eslint-parser: 9.1.0_eslint@8.27.0
......@@ -616,14 +620,14 @@ packages:
'@jridgewell/trace-mapping': 0.3.9
dev: true
/@csstools/selector-specificity/2.0.2_dvkg4kkb622mvceygg47xxdz3a:
/@csstools/selector-specificity/2.0.2_45y636a2vqremknoajyxd5nkzy:
resolution: {integrity: sha512-IkpVW/ehM1hWKln4fCA3NzJU8KwD+kIOvPZA4cqxoJHtE21CCzjyp+Kxbu0i5I4tBNOlXPL9mjwnWlL0VEG4Fg==}
engines: {node: ^12 || ^14 || >=16}
peerDependencies:
postcss: ^8.2
postcss-selector-parser: ^6.0.10
dependencies:
postcss: 8.4.18
postcss: 8.4.19
postcss-selector-parser: 6.0.10
dev: true
......@@ -631,10 +635,10 @@ packages:
resolution: {integrity: sha512-j5mmKskyAxGa3yD5s+M03mRJu6IjxesHJMsXLB3p4jhd2K8D1aqHB3XDrhwPRauOTrKkQSGF14bp8oQsS2t4tA==}
dev: true
/@dcloudio/uni-app-plus/3.0.0-alpha-3060820221027004_ye7i4l32thyfreu66zm4trdn3q:
/@dcloudio/uni-app-plus/3.0.0-alpha-3060820221027004_njcqccjy2xtvug4hisn25whdv4:
resolution: {integrity: sha512-9znCiTYU44SSCM4Dl6fYiLIquvcOnAxFzzq2hARxIGWI6MihjnAqzJ1hg32+QpoShZ0NkohxStX/IjCDbY0/Mw==}
dependencies:
'@dcloudio/uni-app-vite': 3.0.0-alpha-3060820221027004_ye7i4l32thyfreu66zm4trdn3q
'@dcloudio/uni-app-vite': 3.0.0-alpha-3060820221027004_njcqccjy2xtvug4hisn25whdv4
'@dcloudio/uni-app-vue': 3.0.0-alpha-3060820221027004
transitivePeerDependencies:
- postcss
......@@ -644,10 +648,10 @@ packages:
- vue
dev: false
/@dcloudio/uni-app-vite/3.0.0-alpha-3060820221027004_ye7i4l32thyfreu66zm4trdn3q:
/@dcloudio/uni-app-vite/3.0.0-alpha-3060820221027004_njcqccjy2xtvug4hisn25whdv4:
resolution: {integrity: sha512-5+aik7NjW+x6cxO8/E7d1JgbVzndTxHi7MVX/IIXhYaczc2cG2EfT9LfwBA4WMOnq9DH7dlv9NhAlA0a6eg/rg==}
dependencies:
'@dcloudio/uni-cli-shared': 3.0.0-alpha-3060820221027004_postcss@8.4.18+vue@3.2.41
'@dcloudio/uni-cli-shared': 3.0.0-alpha-3060820221027004_postcss@8.4.19+vue@3.2.41
'@dcloudio/uni-i18n': 3.0.0-alpha-3060820221027004
'@dcloudio/uni-nvue-styler': 3.0.0-alpha-3060820221027004
'@dcloudio/uni-shared': 3.0.0-alpha-3060820221027004
......@@ -671,15 +675,15 @@ packages:
resolution: {integrity: sha512-/l92Ed3+TiESyPzEcRqzPdEM0JN0nzOR9U3Q0eijBurIlOZkyHWVOlHtSVbj9vcYxUXM2ueCLPbuzTT2zuSuMg==}
dev: false
/@dcloudio/uni-app/3.0.0-alpha-3060820221027004_postcss@8.4.18+vue@3.2.41:
/@dcloudio/uni-app/3.0.0-alpha-3060820221027004_postcss@8.4.19+vue@3.2.41:
resolution: {integrity: sha512-skOOmhRl3Fvlqfmo1q+gwGiIDu90xeFbiTo5GNDPQ+6PgwtCUDip+t+gGmS/ZplyRZL/Bnet0sYjta0df2+kCw==}
dependencies:
'@dcloudio/uni-cloud': 3.0.0-alpha-3060820221027004_postcss@8.4.18+vue@3.2.41
'@dcloudio/uni-cloud': 3.0.0-alpha-3060820221027004_postcss@8.4.19+vue@3.2.41
'@dcloudio/uni-components': 3.0.0-alpha-3060820221027004
'@dcloudio/uni-i18n': 3.0.0-alpha-3060820221027004
'@dcloudio/uni-push': 3.0.0-alpha-3060820221027004_postcss@8.4.18+vue@3.2.41
'@dcloudio/uni-push': 3.0.0-alpha-3060820221027004_postcss@8.4.19+vue@3.2.41
'@dcloudio/uni-shared': 3.0.0-alpha-3060820221027004
'@dcloudio/uni-stat': 3.0.0-alpha-3060820221027004_postcss@8.4.18+vue@3.2.41
'@dcloudio/uni-stat': 3.0.0-alpha-3060820221027004_postcss@8.4.19+vue@3.2.41
'@vue/shared': 3.2.41
transitivePeerDependencies:
- postcss
......@@ -688,10 +692,10 @@ packages:
- vue
dev: false
/@dcloudio/uni-automator/3.0.0-alpha-3060820221027004_postcss@8.4.18+vue@3.2.41:
/@dcloudio/uni-automator/3.0.0-alpha-3060820221027004_postcss@8.4.19+vue@3.2.41:
resolution: {integrity: sha512-CZejXMIwdaT86zuZ5Z/8BLcP74pcciTDm08XvFDv/r2WNJCS7117UIyO0W6WeRRteE+rsa0iQYWTDRxaTKdrRQ==}
dependencies:
'@dcloudio/uni-cli-shared': 3.0.0-alpha-3060820221027004_postcss@8.4.18+vue@3.2.41
'@dcloudio/uni-cli-shared': 3.0.0-alpha-3060820221027004_postcss@8.4.19+vue@3.2.41
address: 1.2.1
cross-env: 7.0.3
debug: 4.3.4
......@@ -711,7 +715,7 @@ packages:
- vue
dev: true
/@dcloudio/uni-cli-shared/3.0.0-alpha-3060820221027004_postcss@8.4.18+vue@3.2.41:
/@dcloudio/uni-cli-shared/3.0.0-alpha-3060820221027004_postcss@8.4.19+vue@3.2.41:
resolution: {integrity: sha512-zzGxi/+RSq21GLo4l5lIzENZwC0K2O79ZpVHF5WmLfL3IcMTRQAMclTL2Po5JUaqfT2ambbViibMwFa3FHRf5A==}
engines: {node: ^14.18.0 || >=16.0.0}
dependencies:
......@@ -730,7 +734,7 @@ packages:
'@vue/compiler-sfc': 3.2.41
'@vue/server-renderer': 3.2.41_vue@3.2.41
'@vue/shared': 3.2.41
autoprefixer: 10.4.13_postcss@8.4.18
autoprefixer: 10.4.13_postcss@8.4.19
base64url: 3.0.1
chokidar: 3.5.3
compare-versions: 3.6.0
......@@ -748,9 +752,9 @@ packages:
module-alias: 2.2.2
os-locale-s-fix: 1.0.8-fix-1
picocolors: 1.0.0
postcss-import: 14.1.0_postcss@8.4.18
postcss-load-config: 3.1.4_postcss@8.4.18
postcss-modules: 4.3.1_postcss@8.4.18
postcss-import: 14.1.0_postcss@8.4.19
postcss-load-config: 3.1.4_postcss@8.4.19
postcss-modules: 4.3.1_postcss@8.4.19
postcss-selector-parser: 6.0.10
resolve: 1.22.1
tapable: 2.2.1
......@@ -761,10 +765,10 @@ packages:
- ts-node
- vue
/@dcloudio/uni-cloud/3.0.0-alpha-3060820221027004_postcss@8.4.18+vue@3.2.41:
/@dcloudio/uni-cloud/3.0.0-alpha-3060820221027004_postcss@8.4.19+vue@3.2.41:
resolution: {integrity: sha512-1xN88oIKG6VGaGtHYV2a7lFtOfb9jZNRJUSjyattbEqtGTNo9pfuvxEq+aKU3rfGtmBWrSRurZpMmkwZfVWAyQ==}
dependencies:
'@dcloudio/uni-cli-shared': 3.0.0-alpha-3060820221027004_postcss@8.4.18+vue@3.2.41
'@dcloudio/uni-cli-shared': 3.0.0-alpha-3060820221027004_postcss@8.4.19+vue@3.2.41
'@dcloudio/uni-i18n': 3.0.0-alpha-3060820221027004
'@dcloudio/uni-shared': 3.0.0-alpha-3060820221027004
'@vue/shared': 3.2.41
......@@ -780,10 +784,10 @@ packages:
resolution: {integrity: sha512-1si0au6LTcFGnJ6/mdG2NjTK5FDVyMFZih4TCRYM6VpYIJC5phqbx5dnKlznIkP1z2sjwq7RspYzfnsBPEg9aA==}
dev: false
/@dcloudio/uni-h5-vite/3.0.0-alpha-3060820221027004_postcss@8.4.18+vue@3.2.41:
/@dcloudio/uni-h5-vite/3.0.0-alpha-3060820221027004_postcss@8.4.19+vue@3.2.41:
resolution: {integrity: sha512-b+AaiiTxiUS8JGyxSISEEDvMTQUPxv/+9owbA1vbE8wN4z6RYYIC47Lp51VuxuzruJXJ0/wLRiJKjfw4VPXG7A==}
dependencies:
'@dcloudio/uni-cli-shared': 3.0.0-alpha-3060820221027004_postcss@8.4.18+vue@3.2.41
'@dcloudio/uni-cli-shared': 3.0.0-alpha-3060820221027004_postcss@8.4.19+vue@3.2.41
'@dcloudio/uni-shared': 3.0.0-alpha-3060820221027004
'@rollup/pluginutils': 4.2.1
'@vue/compiler-dom': 3.2.41
......@@ -807,10 +811,10 @@ packages:
'@dcloudio/uni-shared': 3.0.0-alpha-3060820221027004
dev: false
/@dcloudio/uni-h5/3.0.0-alpha-3060820221027004_postcss@8.4.18+vue@3.2.41:
/@dcloudio/uni-h5/3.0.0-alpha-3060820221027004_postcss@8.4.19+vue@3.2.41:
resolution: {integrity: sha512-pj4moDmgga+S8LGOlQO9Iq+jbH5a79SsuzRbyB5/AYIKgMVeJVKUO63SYZ5VHVC3JSDNFblo7qPkwQ6qakvWBA==}
dependencies:
'@dcloudio/uni-h5-vite': 3.0.0-alpha-3060820221027004_postcss@8.4.18+vue@3.2.41
'@dcloudio/uni-h5-vite': 3.0.0-alpha-3060820221027004_postcss@8.4.19+vue@3.2.41
'@dcloudio/uni-h5-vue': 3.0.0-alpha-3060820221027004
'@dcloudio/uni-i18n': 3.0.0-alpha-3060820221027004
'@dcloudio/uni-shared': 3.0.0-alpha-3060820221027004
......@@ -834,11 +838,11 @@ packages:
/@dcloudio/uni-i18n/3.0.0-alpha-3060820221027004:
resolution: {integrity: sha512-K6TR40ErIuZm5rGOg87z6RDq9PMwkjJW7Cgz8RsgzecFM37rAeDZSspL5OOpsHjYadcaZlK6RtaQ1yYp7j6S9g==}
/@dcloudio/uni-mp-alipay/3.0.0-alpha-3060820221027004_postcss@8.4.18+vue@3.2.41:
/@dcloudio/uni-mp-alipay/3.0.0-alpha-3060820221027004_postcss@8.4.19+vue@3.2.41:
resolution: {integrity: sha512-QL2dIOZYm1n6e5N8J/Awhw7iv+ABfz1eJEfevr7zElIrrQS7shGjGagVUswxTozMk7n7XDSzoSSIFM1xu4ilYA==}
dependencies:
'@dcloudio/uni-cli-shared': 3.0.0-alpha-3060820221027004_postcss@8.4.18+vue@3.2.41
'@dcloudio/uni-mp-vite': 3.0.0-alpha-3060820221027004_postcss@8.4.18+vue@3.2.41
'@dcloudio/uni-cli-shared': 3.0.0-alpha-3060820221027004_postcss@8.4.19+vue@3.2.41
'@dcloudio/uni-mp-vite': 3.0.0-alpha-3060820221027004_postcss@8.4.19+vue@3.2.41
'@dcloudio/uni-mp-vue': 3.0.0-alpha-3060820221027004
'@dcloudio/uni-shared': 3.0.0-alpha-3060820221027004
'@vue/compiler-core': 3.2.41
......@@ -850,14 +854,14 @@ packages:
- vue
dev: false
/@dcloudio/uni-mp-baidu/3.0.0-alpha-3060820221027004_postcss@8.4.18+vue@3.2.41:
/@dcloudio/uni-mp-baidu/3.0.0-alpha-3060820221027004_postcss@8.4.19+vue@3.2.41:
resolution: {integrity: sha512-1HKdd3CLZ1919YuLLP5roXi+viFx7+wX8Kc2Bm5KQAKS0GEhphcEoWfMprIt5KLpCk0C19edhjGmwRypHn0uWQ==}
dependencies:
'@dcloudio/uni-cli-shared': 3.0.0-alpha-3060820221027004_postcss@8.4.18+vue@3.2.41
'@dcloudio/uni-mp-compiler': 3.0.0-alpha-3060820221027004_postcss@8.4.18+vue@3.2.41
'@dcloudio/uni-mp-vite': 3.0.0-alpha-3060820221027004_postcss@8.4.18+vue@3.2.41
'@dcloudio/uni-cli-shared': 3.0.0-alpha-3060820221027004_postcss@8.4.19+vue@3.2.41
'@dcloudio/uni-mp-compiler': 3.0.0-alpha-3060820221027004_postcss@8.4.19+vue@3.2.41
'@dcloudio/uni-mp-vite': 3.0.0-alpha-3060820221027004_postcss@8.4.19+vue@3.2.41
'@dcloudio/uni-mp-vue': 3.0.0-alpha-3060820221027004
'@dcloudio/uni-mp-weixin': 3.0.0-alpha-3060820221027004_postcss@8.4.18+vue@3.2.41
'@dcloudio/uni-mp-weixin': 3.0.0-alpha-3060820221027004_postcss@8.4.19+vue@3.2.41
'@dcloudio/uni-shared': 3.0.0-alpha-3060820221027004
'@vue/compiler-core': 3.2.41
'@vue/shared': 3.2.41
......@@ -868,13 +872,13 @@ packages:
- vue
dev: false
/@dcloudio/uni-mp-compiler/3.0.0-alpha-3060820221027004_postcss@8.4.18+vue@3.2.41:
/@dcloudio/uni-mp-compiler/3.0.0-alpha-3060820221027004_postcss@8.4.19+vue@3.2.41:
resolution: {integrity: sha512-dLhvVhU8uyvVBWzEE5hCp3d7Pt4e2IiTZuEbskIUIUtTQBG5TvTW1QsOObtzxuF8+yoy/TqX0yY7Y6vw87GZKw==}
dependencies:
'@babel/generator': 7.20.4
'@babel/parser': 7.20.3
'@babel/types': 7.20.2
'@dcloudio/uni-cli-shared': 3.0.0-alpha-3060820221027004_postcss@8.4.18+vue@3.2.41
'@dcloudio/uni-cli-shared': 3.0.0-alpha-3060820221027004_postcss@8.4.19+vue@3.2.41
'@dcloudio/uni-shared': 3.0.0-alpha-3060820221027004
'@vue/compiler-core': 3.2.41
'@vue/compiler-dom': 3.2.41
......@@ -887,14 +891,14 @@ packages:
- vue
dev: false
/@dcloudio/uni-mp-kuaishou/3.0.0-alpha-3060820221027004_postcss@8.4.18+vue@3.2.41:
/@dcloudio/uni-mp-kuaishou/3.0.0-alpha-3060820221027004_postcss@8.4.19+vue@3.2.41:
resolution: {integrity: sha512-X7+CWI7F7tKU3An8nztcoOkc+3xRQ1tQ2hXXdXJfciriEWQiegEpckgh7MJ9c8Xv++utxQBNZevspO0wskHD+A==}
dependencies:
'@dcloudio/uni-cli-shared': 3.0.0-alpha-3060820221027004_postcss@8.4.18+vue@3.2.41
'@dcloudio/uni-mp-compiler': 3.0.0-alpha-3060820221027004_postcss@8.4.18+vue@3.2.41
'@dcloudio/uni-mp-vite': 3.0.0-alpha-3060820221027004_postcss@8.4.18+vue@3.2.41
'@dcloudio/uni-cli-shared': 3.0.0-alpha-3060820221027004_postcss@8.4.19+vue@3.2.41
'@dcloudio/uni-mp-compiler': 3.0.0-alpha-3060820221027004_postcss@8.4.19+vue@3.2.41
'@dcloudio/uni-mp-vite': 3.0.0-alpha-3060820221027004_postcss@8.4.19+vue@3.2.41
'@dcloudio/uni-mp-vue': 3.0.0-alpha-3060820221027004
'@dcloudio/uni-mp-weixin': 3.0.0-alpha-3060820221027004_postcss@8.4.18+vue@3.2.41
'@dcloudio/uni-mp-weixin': 3.0.0-alpha-3060820221027004_postcss@8.4.19+vue@3.2.41
'@dcloudio/uni-shared': 3.0.0-alpha-3060820221027004
'@vue/compiler-core': 3.2.41
'@vue/shared': 3.2.41
......@@ -905,13 +909,13 @@ packages:
- vue
dev: false
/@dcloudio/uni-mp-lark/3.0.0-alpha-3060820221027004_postcss@8.4.18+vue@3.2.41:
/@dcloudio/uni-mp-lark/3.0.0-alpha-3060820221027004_postcss@8.4.19+vue@3.2.41:
resolution: {integrity: sha512-h8WiGH7FDI4/puYcPnnTZgikafCw11lpR5wkcwjBM87vypoMqkMchfXj/Lwe2+ZvGRHusMLvQ2bJXivECfJ+aQ==}
dependencies:
'@dcloudio/uni-cli-shared': 3.0.0-alpha-3060820221027004_postcss@8.4.18+vue@3.2.41
'@dcloudio/uni-mp-compiler': 3.0.0-alpha-3060820221027004_postcss@8.4.18+vue@3.2.41
'@dcloudio/uni-mp-toutiao': 3.0.0-alpha-3060820221027004_postcss@8.4.18+vue@3.2.41
'@dcloudio/uni-mp-vite': 3.0.0-alpha-3060820221027004_postcss@8.4.18+vue@3.2.41
'@dcloudio/uni-cli-shared': 3.0.0-alpha-3060820221027004_postcss@8.4.19+vue@3.2.41
'@dcloudio/uni-mp-compiler': 3.0.0-alpha-3060820221027004_postcss@8.4.19+vue@3.2.41
'@dcloudio/uni-mp-toutiao': 3.0.0-alpha-3060820221027004_postcss@8.4.19+vue@3.2.41
'@dcloudio/uni-mp-vite': 3.0.0-alpha-3060820221027004_postcss@8.4.19+vue@3.2.41
'@dcloudio/uni-mp-vue': 3.0.0-alpha-3060820221027004
'@dcloudio/uni-shared': 3.0.0-alpha-3060820221027004
'@vue/compiler-core': 3.2.41
......@@ -923,11 +927,11 @@ packages:
- vue
dev: false
/@dcloudio/uni-mp-qq/3.0.0-alpha-3060820221027004_postcss@8.4.18+vue@3.2.41:
/@dcloudio/uni-mp-qq/3.0.0-alpha-3060820221027004_postcss@8.4.19+vue@3.2.41:
resolution: {integrity: sha512-HY7Duo3iR9EFqwiUgjC6Rh4JmnvDjP6zHU1mhzoVXK9caXXDeN7JOnre9EucP8Ci2gEuIXZvUk46N3ytPnYRVw==}
dependencies:
'@dcloudio/uni-cli-shared': 3.0.0-alpha-3060820221027004_postcss@8.4.18+vue@3.2.41
'@dcloudio/uni-mp-vite': 3.0.0-alpha-3060820221027004_postcss@8.4.18+vue@3.2.41
'@dcloudio/uni-cli-shared': 3.0.0-alpha-3060820221027004_postcss@8.4.19+vue@3.2.41
'@dcloudio/uni-mp-vite': 3.0.0-alpha-3060820221027004_postcss@8.4.19+vue@3.2.41
'@dcloudio/uni-mp-vue': 3.0.0-alpha-3060820221027004
'@dcloudio/uni-shared': 3.0.0-alpha-3060820221027004
'@vue/shared': 3.2.41
......@@ -939,12 +943,12 @@ packages:
- vue
dev: false
/@dcloudio/uni-mp-toutiao/3.0.0-alpha-3060820221027004_postcss@8.4.18+vue@3.2.41:
/@dcloudio/uni-mp-toutiao/3.0.0-alpha-3060820221027004_postcss@8.4.19+vue@3.2.41:
resolution: {integrity: sha512-xByf3m/wPFUos29v352oANmqPNk2pAH3rCEb4tz2Nx5Kkbx599RxhRSfj8vsABCST9hfLmkoHFKF1P4xaajNjg==}
dependencies:
'@dcloudio/uni-cli-shared': 3.0.0-alpha-3060820221027004_postcss@8.4.18+vue@3.2.41
'@dcloudio/uni-mp-compiler': 3.0.0-alpha-3060820221027004_postcss@8.4.18+vue@3.2.41
'@dcloudio/uni-mp-vite': 3.0.0-alpha-3060820221027004_postcss@8.4.18+vue@3.2.41
'@dcloudio/uni-cli-shared': 3.0.0-alpha-3060820221027004_postcss@8.4.19+vue@3.2.41
'@dcloudio/uni-mp-compiler': 3.0.0-alpha-3060820221027004_postcss@8.4.19+vue@3.2.41
'@dcloudio/uni-mp-vite': 3.0.0-alpha-3060820221027004_postcss@8.4.19+vue@3.2.41
'@dcloudio/uni-mp-vue': 3.0.0-alpha-3060820221027004
'@dcloudio/uni-shared': 3.0.0-alpha-3060820221027004
'@vue/compiler-core': 3.2.41
......@@ -956,12 +960,12 @@ packages:
- vue
dev: false
/@dcloudio/uni-mp-vite/3.0.0-alpha-3060820221027004_postcss@8.4.18+vue@3.2.41:
/@dcloudio/uni-mp-vite/3.0.0-alpha-3060820221027004_postcss@8.4.19+vue@3.2.41:
resolution: {integrity: sha512-Db8ZNyvPPlL8mYHhEua1lLxthNQl2h5LdsroV0o9soo37AEgXko9HHMRt377M89GsnA3mmQlLIaxbLjazvxlKA==}
dependencies:
'@dcloudio/uni-cli-shared': 3.0.0-alpha-3060820221027004_postcss@8.4.18+vue@3.2.41
'@dcloudio/uni-cli-shared': 3.0.0-alpha-3060820221027004_postcss@8.4.19+vue@3.2.41
'@dcloudio/uni-i18n': 3.0.0-alpha-3060820221027004
'@dcloudio/uni-mp-compiler': 3.0.0-alpha-3060820221027004_postcss@8.4.18+vue@3.2.41
'@dcloudio/uni-mp-compiler': 3.0.0-alpha-3060820221027004_postcss@8.4.19+vue@3.2.41
'@dcloudio/uni-mp-vue': 3.0.0-alpha-3060820221027004
'@dcloudio/uni-shared': 3.0.0-alpha-3060820221027004
'@vue/compiler-sfc': 3.2.41
......@@ -981,11 +985,11 @@ packages:
'@vue/shared': 3.2.41
dev: false
/@dcloudio/uni-mp-weixin/3.0.0-alpha-3060820221027004_postcss@8.4.18+vue@3.2.41:
/@dcloudio/uni-mp-weixin/3.0.0-alpha-3060820221027004_postcss@8.4.19+vue@3.2.41:
resolution: {integrity: sha512-tFjSe/nDBHGlQUA9M7gyk8UCtbcc1eS1Ib+J4tlNWAJIGSynyoD4lfhsF54a9TFvr1zl1BaPZKKtr66vv8mukg==}
dependencies:
'@dcloudio/uni-cli-shared': 3.0.0-alpha-3060820221027004_postcss@8.4.18+vue@3.2.41
'@dcloudio/uni-mp-vite': 3.0.0-alpha-3060820221027004_postcss@8.4.18+vue@3.2.41
'@dcloudio/uni-cli-shared': 3.0.0-alpha-3060820221027004_postcss@8.4.19+vue@3.2.41
'@dcloudio/uni-mp-vite': 3.0.0-alpha-3060820221027004_postcss@8.4.19+vue@3.2.41
'@dcloudio/uni-mp-vue': 3.0.0-alpha-3060820221027004
'@dcloudio/uni-shared': 3.0.0-alpha-3060820221027004
'@vue/shared': 3.2.41
......@@ -1001,13 +1005,13 @@ packages:
dependencies:
'@vue/shared': 3.2.41
parse-css-font: 4.0.0
postcss: 8.4.18
postcss: 8.4.19
dev: false
/@dcloudio/uni-push/3.0.0-alpha-3060820221027004_postcss@8.4.18+vue@3.2.41:
/@dcloudio/uni-push/3.0.0-alpha-3060820221027004_postcss@8.4.19+vue@3.2.41:
resolution: {integrity: sha512-2LOeKy35HJPxKrooG4OM5h1J//fxa8t0DJeWkAiLyp0OhR6pS8paU9s+/D9/Mxdg+LBcrQMB9jccp+WfD5/tgA==}
dependencies:
'@dcloudio/uni-cli-shared': 3.0.0-alpha-3060820221027004_postcss@8.4.18+vue@3.2.41
'@dcloudio/uni-cli-shared': 3.0.0-alpha-3060820221027004_postcss@8.4.19+vue@3.2.41
transitivePeerDependencies:
- postcss
- supports-color
......@@ -1015,11 +1019,11 @@ packages:
- vue
dev: false
/@dcloudio/uni-quickapp-webview/3.0.0-alpha-3060820221027004_postcss@8.4.18+vue@3.2.41:
/@dcloudio/uni-quickapp-webview/3.0.0-alpha-3060820221027004_postcss@8.4.19+vue@3.2.41:
resolution: {integrity: sha512-jcEGjrh0GMLsDnWc3yzLpu3cWpQzmuIEzNrR4RyMvSO1TieP8jcN7tF8MbWRMH/siNZ9+FXN87/+sEDrWuibZw==}
dependencies:
'@dcloudio/uni-cli-shared': 3.0.0-alpha-3060820221027004_postcss@8.4.18+vue@3.2.41
'@dcloudio/uni-mp-vite': 3.0.0-alpha-3060820221027004_postcss@8.4.18+vue@3.2.41
'@dcloudio/uni-cli-shared': 3.0.0-alpha-3060820221027004_postcss@8.4.19+vue@3.2.41
'@dcloudio/uni-mp-vite': 3.0.0-alpha-3060820221027004_postcss@8.4.19+vue@3.2.41
'@dcloudio/uni-mp-vue': 3.0.0-alpha-3060820221027004
'@dcloudio/uni-shared': 3.0.0-alpha-3060820221027004
'@vue/shared': 3.2.41
......@@ -1035,10 +1039,10 @@ packages:
dependencies:
'@vue/shared': 3.2.41
/@dcloudio/uni-stat/3.0.0-alpha-3060820221027004_postcss@8.4.18+vue@3.2.41:
/@dcloudio/uni-stat/3.0.0-alpha-3060820221027004_postcss@8.4.19+vue@3.2.41:
resolution: {integrity: sha512-gapZehPC84QAuGKm5/mAqbOkksAVgXyCwyhB/lcssWDm26BdIamQcgrNcrW5gz2AsXwkj40OKXXRl3PhJTIS8w==}
dependencies:
'@dcloudio/uni-cli-shared': 3.0.0-alpha-3060820221027004_postcss@8.4.18+vue@3.2.41
'@dcloudio/uni-cli-shared': 3.0.0-alpha-3060820221027004_postcss@8.4.19+vue@3.2.41
'@dcloudio/uni-shared': 3.0.0-alpha-3060820221027004
debug: 4.3.4
transitivePeerDependencies:
......@@ -1052,7 +1056,7 @@ packages:
resolution: {integrity: sha512-FJRkhL240gin9WvOunY38Yi2/0FzTLVlEI3dxcjzaV1oYa81o+IWEf/29YDiRrsHuvYDk9g600QgiZLC+A6ycA==}
dev: false
/@dcloudio/vite-plugin-uni/3.0.0-alpha-3060820221027004_ye7i4l32thyfreu66zm4trdn3q:
/@dcloudio/vite-plugin-uni/3.0.0-alpha-3060820221027004_njcqccjy2xtvug4hisn25whdv4:
resolution: {integrity: sha512-g8l3Kgqbb5jtlGsxUOhPPmBKX+0u+/cGLtKEBm9/HJkZQ4DsDlIr30dLD5tp/G4a/JXTwjsWFTHX3o7jF6BEuQ==}
engines: {node: ^14.18.0 || >=16.0.0}
hasBin: true
......@@ -1062,7 +1066,7 @@ packages:
'@babel/core': 7.20.2
'@babel/plugin-syntax-import-meta': 7.10.4_@babel+core@7.20.2
'@babel/plugin-transform-typescript': 7.20.2_@babel+core@7.20.2
'@dcloudio/uni-cli-shared': 3.0.0-alpha-3060820221027004_postcss@8.4.18+vue@3.2.41
'@dcloudio/uni-cli-shared': 3.0.0-alpha-3060820221027004_postcss@8.4.19+vue@3.2.41
'@dcloudio/uni-shared': 3.0.0-alpha-3060820221027004
'@rollup/pluginutils': 4.2.1
'@vitejs/plugin-legacy': 2.3.1_terser@5.15.1+vite@3.2.2
......@@ -1408,8 +1412,14 @@ packages:
resolution: {integrity: sha512-21cFJr9z3g5dW8B0CVI9g2O9beqaThGQ6ZFBqHfwhzLDKUxaqTIy3vnfah/UPkfOiF2pLq+tGz+W8RyCskuslw==}
dev: true
/@types/web-bluetooth/0.0.14:
resolution: {integrity: sha512-5d2RhCard1nQUC3aHcq/gHzWYO6K0WJmAbjO7mQJgCQKtZpgXxv1rOM6O/dBDhDYYVutk1sciOgNSe+5YyfM8A==}
/@types/stompjs/2.3.5:
resolution: {integrity: sha512-0WkL8RlB1uuZt8XJEdnwdFdV5RIFcQw9UhNQfTpiJYcjqC6QQpFqc5YcIrlH+K/843EGJVIaOFANjs7u7bmTlw==}
dependencies:
'@types/node': 18.11.9
dev: true
/@types/web-bluetooth/0.0.16:
resolution: {integrity: sha512-oh8q2Zc32S6gd/j50GowEjKLoOVOwHP/bWVjKJInBwQqdOYMdPrf1oVlelTlyfFK3CKxL1uahMDAr+vy8T7yMQ==}
/@typescript-eslint/eslint-plugin/5.42.1_2udltptbznfmezdozpdoa2aemq:
resolution: {integrity: sha512-LyR6x784JCiJ1j6sH5Y0K6cdExqCCm8DJUTcwG5ThNXJj/G8o5E56u5EdG4SLy+bZAwZBswC+GYn3eGdttBVCg==}
......@@ -1628,7 +1638,7 @@ packages:
'@vue/shared': 3.2.41
estree-walker: 2.0.2
magic-string: 0.25.9
postcss: 8.4.18
postcss: 8.4.19
source-map: 0.6.1
/@vue/compiler-ssr/3.2.41:
......@@ -1680,39 +1690,27 @@ packages:
/@vue/shared/3.2.41:
resolution: {integrity: sha512-W9mfWLHmJhkfAmV+7gDjcHeAWALQtgGT3JErxULl0oz6R6+3ug91I7IErs93eCFhPCZPHBs4QJS7YWEV7A3sxw==}
/@vueuse/core/8.9.4_vue@3.2.41:
resolution: {integrity: sha512-B/Mdj9TK1peFyWaPof+Zf/mP9XuGAngaJZBwPaXBvU3aCTZlx3ltlrFFFyMV4iGBwsjSCeUCgZrtkEj9dS2Y3Q==}
peerDependencies:
'@vue/composition-api': ^1.1.0
vue: ^2.6.0 || ^3.2.0
peerDependenciesMeta:
'@vue/composition-api':
optional: true
vue:
optional: true
/@vueuse/core/9.5.0_vue@3.2.41:
resolution: {integrity: sha512-6GsWBsJHEb3sYw15mbLrcbslAVY45pkzjJYTKYKCXv88z7srAF0VEW0q+oXKsl58tCbqooplInahXFg8Yo1m4w==}
dependencies:
'@types/web-bluetooth': 0.0.14
'@vueuse/metadata': 8.9.4
'@vueuse/shared': 8.9.4_vue@3.2.41
vue: 3.2.41
'@types/web-bluetooth': 0.0.16
'@vueuse/metadata': 9.5.0
'@vueuse/shared': 9.5.0_vue@3.2.41
vue-demi: 0.13.11_vue@3.2.41
transitivePeerDependencies:
- '@vue/composition-api'
- vue
/@vueuse/metadata/8.9.4:
resolution: {integrity: sha512-IwSfzH80bnJMzqhaapqJl9JRIiyQU0zsRGEgnxN6jhq7992cPUJIRfV+JHRIZXjYqbwt07E1gTEp0R0zPJ1aqw==}
/@vueuse/metadata/9.5.0:
resolution: {integrity: sha512-4M1AyPZmIv41pym+K5+4wup3bKuYebbH8w8BROY1hmT7rIwcyS4tEL+UsGz0Hiu1FCOxcoBrwtAizc0YmBJjyQ==}
/@vueuse/shared/8.9.4_vue@3.2.41:
resolution: {integrity: sha512-wt+T30c4K6dGRMVqPddexEVLa28YwxW5OFIPmzUHICjphfAuBFTTdDoyqREZNDOFJZ44ARH1WWQNCUK8koJ+Ag==}
peerDependencies:
'@vue/composition-api': ^1.1.0
vue: ^2.6.0 || ^3.2.0
peerDependenciesMeta:
'@vue/composition-api':
optional: true
vue:
optional: true
/@vueuse/shared/9.5.0_vue@3.2.41:
resolution: {integrity: sha512-HnnCWU1Vg9CVWRCcI8ohDKDRB2Sc4bTgT1XAIaoLSfVHHn+TKbrox6pd3klCSw4UDxkhDfOk8cAdcK+Z5KleCA==}
dependencies:
vue: 3.2.41
vue-demi: 0.13.11_vue@3.2.41
transitivePeerDependencies:
- '@vue/composition-api'
- vue
/JSONStream/1.3.5:
resolution: {integrity: sha512-E+iruNOY8VV9s4JEbe1aNEm6MiszPRr/UfcHMz0TQh1BXSxHK+ASV1R6W4HpjBhSeS+54PIsAMCBmwD06LLsqQ==}
......@@ -1876,7 +1874,7 @@ packages:
engines: {node: '>= 4.0.0'}
dev: true
/autoprefixer/10.4.13_postcss@8.4.18:
/autoprefixer/10.4.13_postcss@8.4.19:
resolution: {integrity: sha512-49vKpMqcZYsJjwotvt4+h/BCjJVnhGwcLpDt5xkcaOG3eLrG/HUYLagrihYsQ+qrIBgIzX1Rw7a6L8I/ZA1Atg==}
engines: {node: ^10 || ^12 || >=14}
hasBin: true
......@@ -1888,7 +1886,7 @@ packages:
fraction.js: 4.2.0
normalize-range: 0.1.2
picocolors: 1.0.0
postcss: 8.4.18
postcss: 8.4.19
postcss-value-parser: 4.2.0
/axios/0.26.1:
......@@ -1992,6 +1990,15 @@ packages:
ieee754: 1.2.1
dev: true
/bufferutil/4.0.7:
resolution: {integrity: sha512-kukuqc39WOHtdxtw4UScxF/WVnMFVSQVKhtx3AjZJzhd0RGZZldcrfSEbVsWWe6KNH253574cq5F+wpv0G9pJw==}
engines: {node: '>=6.14.2'}
requiresBuild: true
dependencies:
node-gyp-build: 4.5.0
dev: false
optional: true
/bytes/3.1.2:
resolution: {integrity: sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==}
engines: {node: '>= 0.8'}
......@@ -2550,6 +2557,14 @@ packages:
hasBin: true
dev: true
/d/1.0.1:
resolution: {integrity: sha512-m62ShEObQ39CfralilEQRjH6oAMtNCV1xJyEx5LpRYUVN+EviphDgUc/F3hnYbADmkiNs67Y+3ylmlG7Lnu+FA==}
dependencies:
es5-ext: 0.10.62
type: 1.2.0
dev: false
optional: true
/dargs/7.0.0:
resolution: {integrity: sha512-2iy1EkLdlBzQGvbweYRFxmFath8+K7+AKB0TlhHWkNuH+TmovaMH/Wp7V7R4u7f4SnX3OgLsU9t1NI9ioDnUpg==}
engines: {node: '>=8'}
......@@ -2572,7 +2587,6 @@ packages:
optional: true
dependencies:
ms: 2.0.0
dev: true
/debug/3.2.7:
resolution: {integrity: sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==}
......@@ -2810,6 +2824,34 @@ packages:
is-symbol: 1.0.4
dev: true
/es5-ext/0.10.62:
resolution: {integrity: sha512-BHLqn0klhEpnOKSrzn/Xsz2UIW8j+cGmo9JLzr8BiUapV8hPL9+FliFqjwr9ngW7jWdnxv6eO+/LqyhJVqgrjA==}
engines: {node: '>=0.10'}
requiresBuild: true
dependencies:
es6-iterator: 2.0.3
es6-symbol: 3.1.3
next-tick: 1.1.0
dev: false
optional: true
/es6-iterator/2.0.3:
resolution: {integrity: sha512-zw4SRzoUkd+cl+ZoE15A9o1oQd920Bb0iOJMQkQhl3jNc03YqVjAhG7scf9C5KWRU/R13Orf588uCC6525o02g==}
dependencies:
d: 1.0.1
es5-ext: 0.10.62
es6-symbol: 3.1.3
dev: false
optional: true
/es6-symbol/3.1.3:
resolution: {integrity: sha512-NJ6Yn3FuDinBaBRWl/q5X/s4koRHBrgKAu+yGI6JCBeiu3qrcbJhwT2GeR/EXVfylRk8dpQVJoLEFhK+Mu31NA==}
dependencies:
d: 1.0.1
ext: 1.7.0
dev: false
optional: true
/esbuild-android-64/0.15.13:
resolution: {integrity: sha512-yRorukXBlokwTip+Sy4MYskLhJsO0Kn0/Fj43s1krVblfwP+hMD37a4Wmg139GEsMLl+vh8WXp2mq/cTA9J97g==}
engines: {node: '>=12'}
......@@ -3271,6 +3313,13 @@ packages:
- supports-color
dev: true
/ext/1.7.0:
resolution: {integrity: sha512-6hxeJYaL110a9b5TEJSj0gojyHQAmA2ch5Os+ySCiA1QGdS697XWY1pzsrSjqA9LDEEgdB/KypIlR59RcLuHYw==}
dependencies:
type: 2.7.2
dev: false
optional: true
/external-editor/3.1.0:
resolution: {integrity: sha512-hMQ4CX1p1izmuLYyZqLMO/qGNw10wSv9QDCPfzXfyFrOaCSSoRfqE1Kf1s5an66J5JZC62NewG+mK49jOCtQew==}
engines: {node: '>=4'}
......@@ -3500,7 +3549,7 @@ packages:
/generic-names/4.0.0:
resolution: {integrity: sha512-ySFolZQfw9FoDb3ed9d80Cm9f0+r7qj+HJkWjeD9RBfpxEVTlVhol+gvaQB/78WbwYfbnNh8nWHHBSlg072y6A==}
dependencies:
loader-utils: 3.2.0
loader-utils: 3.2.1
/gensync/1.0.0-beta.2:
resolution: {integrity: sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==}
......@@ -3830,13 +3879,13 @@ packages:
/icss-replace-symbols/1.1.0:
resolution: {integrity: sha512-chIaY3Vh2mh2Q3RGXttaDIzeiPvaVXJ+C4DAh/w3c37SKZ/U6PGMmuicR2EQQp9bKG8zLMCl7I+PtIoOOPp8Gg==}
/icss-utils/5.1.0_postcss@8.4.18:
/icss-utils/5.1.0_postcss@8.4.19:
resolution: {integrity: sha512-soFhflCVWLfRNOPU3iv5Z9VUdT44xFRbzjLsEzSr5AQmgqPMTHdU3PMT1Cf1ssx8fLNJDA1juftYl+PUcv3MqA==}
engines: {node: ^10 || ^12 || >= 14}
peerDependencies:
postcss: ^8.1.0
dependencies:
postcss: 8.4.18
postcss: 8.4.19
/ieee754/1.2.1:
resolution: {integrity: sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==}
......@@ -4126,6 +4175,11 @@ packages:
text-extensions: 1.9.0
dev: true
/is-typedarray/1.0.0:
resolution: {integrity: sha512-cyA56iCMHAh5CdzjJIa4aohJyeO1YbwLi3Jc35MmRU6poroFjIGZzUzupGiRPOjgHg9TLu43xbpwXk523fMxKA==}
dev: false
optional: true
/is-unicode-supported/0.1.0:
resolution: {integrity: sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==}
engines: {node: '>=10'}
......@@ -4341,8 +4395,8 @@ packages:
strip-bom: 3.0.0
dev: true
/loader-utils/3.2.0:
resolution: {integrity: sha512-HVl9ZqccQihZ7JM85dco1MvO9G+ONvxoGa9rkhzFsneGLKSUg1gJf9bWzhRhcvm2qChhWpebQhP44qxjKIUCaQ==}
/loader-utils/3.2.1:
resolution: {integrity: sha512-ZvFw1KWS3GVyYBYb7qkmRM/WwL2TQQBxgCK62rlvm4WpVQ23Nb4tYjApUlfjrEGvOs7KHEsmyUn75OHZrJMWPw==}
engines: {node: '>= 12.13.0'}
/local-pkg/0.4.2:
......@@ -4648,7 +4702,6 @@ packages:
/ms/2.0.0:
resolution: {integrity: sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==}
dev: true
/ms/2.1.2:
resolution: {integrity: sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==}
......@@ -4699,6 +4752,11 @@ packages:
resolution: {integrity: sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==}
dev: true
/next-tick/1.1.0:
resolution: {integrity: sha512-CXdUiJembsNjuToQvxayPZF9Vqht7hewsvy2sOWafLvi2awflj9mOC6bHIg50orX8IJvWKY9wYQ/zB2kogPslQ==}
dev: false
optional: true
/nice-try/1.0.5:
resolution: {integrity: sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==}
dev: true
......@@ -4715,6 +4773,12 @@ packages:
whatwg-url: 5.0.0
dev: true
/node-gyp-build/4.5.0:
resolution: {integrity: sha512-2iGbaQBV+ITgCz76ZEjmhUKAKVf7xfY1sRl4UiKQspfZMH2h06SyhNsnSVy50cwkFQDGLyif6m/6uFXHkOZ6rg==}
hasBin: true
dev: false
optional: true
/node-releases/2.0.6:
resolution: {integrity: sha512-PiVXnNuFm5+iYkLBNeq5211hvO38y63T0i2KKh2KnUs3RpzJ+JtODFjkD8yjLwnDkTYF1eKXheUwdssR+NRZdg==}
......@@ -5120,31 +5184,31 @@ packages:
dependencies:
htmlparser2: 8.0.1
js-tokens: 8.0.0
postcss: 8.4.18
postcss-safe-parser: 6.0.0_postcss@8.4.18
postcss: 8.4.19
postcss-safe-parser: 6.0.0_postcss@8.4.19
dev: true
/postcss-import/14.1.0_postcss@8.4.18:
/postcss-import/14.1.0_postcss@8.4.19:
resolution: {integrity: sha512-flwI+Vgm4SElObFVPpTIT7SU7R3qk2L7PyduMcokiaVKuWv9d/U+Gm/QAd8NDLuykTWTkcrjOeD2Pp1rMeBTGw==}
engines: {node: '>=10.0.0'}
peerDependencies:
postcss: ^8.0.0
dependencies:
postcss: 8.4.18
postcss: 8.4.19
postcss-value-parser: 4.2.0
read-cache: 1.0.0
resolve: 1.22.1
/postcss-less/6.0.0_postcss@8.4.18:
/postcss-less/6.0.0_postcss@8.4.19:
resolution: {integrity: sha512-FPX16mQLyEjLzEuuJtxA8X3ejDLNGGEG503d2YGZR5Ask1SpDN8KmZUMpzCvyalWRywAn1n1VOA5dcqfCLo5rg==}
engines: {node: '>=12'}
peerDependencies:
postcss: ^8.3.5
dependencies:
postcss: 8.4.18
postcss: 8.4.19
dev: true
/postcss-load-config/3.1.4_postcss@8.4.18:
/postcss-load-config/3.1.4_postcss@8.4.19:
resolution: {integrity: sha512-6DiM4E7v4coTE4uzA8U//WhtPwyhiim3eyjEMFCnUpzbrkK9wJHgKDT2mR+HbtSrd/NubVaYTOpSpjUl8NQeRg==}
engines: {node: '>= 10'}
peerDependencies:
......@@ -5157,51 +5221,51 @@ packages:
optional: true
dependencies:
lilconfig: 2.0.6
postcss: 8.4.18
postcss: 8.4.19
yaml: 1.10.2
/postcss-media-query-parser/0.2.3:
resolution: {integrity: sha512-3sOlxmbKcSHMjlUXQZKQ06jOswE7oVkXPxmZdoB1r5l0q6gTFTQSHxNxOrCccElbW7dxNytifNEo8qidX2Vsig==}
dev: true
/postcss-modules-extract-imports/3.0.0_postcss@8.4.18:
/postcss-modules-extract-imports/3.0.0_postcss@8.4.19:
resolution: {integrity: sha512-bdHleFnP3kZ4NYDhuGlVK+CMrQ/pqUm8bx/oGL93K6gVwiclvX5x0n76fYMKuIGKzlABOy13zsvqjb0f92TEXw==}
engines: {node: ^10 || ^12 || >= 14}
peerDependencies:
postcss: ^8.1.0
dependencies:
postcss: 8.4.18
postcss: 8.4.19
/postcss-modules-local-by-default/4.0.0_postcss@8.4.18:
/postcss-modules-local-by-default/4.0.0_postcss@8.4.19:
resolution: {integrity: sha512-sT7ihtmGSF9yhm6ggikHdV0hlziDTX7oFoXtuVWeDd3hHObNkcHRo9V3yg7vCAY7cONyxJC/XXCmmiHHcvX7bQ==}
engines: {node: ^10 || ^12 || >= 14}
peerDependencies:
postcss: ^8.1.0
dependencies:
icss-utils: 5.1.0_postcss@8.4.18
postcss: 8.4.18
icss-utils: 5.1.0_postcss@8.4.19
postcss: 8.4.19
postcss-selector-parser: 6.0.10
postcss-value-parser: 4.2.0
/postcss-modules-scope/3.0.0_postcss@8.4.18:
/postcss-modules-scope/3.0.0_postcss@8.4.19:
resolution: {integrity: sha512-hncihwFA2yPath8oZ15PZqvWGkWf+XUfQgUGamS4LqoP1anQLOsOJw0vr7J7IwLpoY9fatA2qiGUGmuZL0Iqlg==}
engines: {node: ^10 || ^12 || >= 14}
peerDependencies:
postcss: ^8.1.0
dependencies:
postcss: 8.4.18
postcss: 8.4.19
postcss-selector-parser: 6.0.10
/postcss-modules-values/4.0.0_postcss@8.4.18:
/postcss-modules-values/4.0.0_postcss@8.4.19:
resolution: {integrity: sha512-RDxHkAiEGI78gS2ofyvCsu7iycRv7oqw5xMWn9iMoR0N/7mf9D50ecQqUo5BZ9Zh2vH4bCUR/ktCqbB9m8vJjQ==}
engines: {node: ^10 || ^12 || >= 14}
peerDependencies:
postcss: ^8.1.0
dependencies:
icss-utils: 5.1.0_postcss@8.4.18
postcss: 8.4.18
icss-utils: 5.1.0_postcss@8.4.19
postcss: 8.4.19
/postcss-modules/4.3.1_postcss@8.4.18:
/postcss-modules/4.3.1_postcss@8.4.19:
resolution: {integrity: sha512-ItUhSUxBBdNamkT3KzIZwYNNRFKmkJrofvC2nWab3CPKhYBQ1f27XXh1PAPE27Psx58jeelPsxWB/+og+KEH0Q==}
peerDependencies:
postcss: ^8.0.0
......@@ -5209,24 +5273,24 @@ packages:
generic-names: 4.0.0
icss-replace-symbols: 1.1.0
lodash.camelcase: 4.3.0
postcss: 8.4.18
postcss-modules-extract-imports: 3.0.0_postcss@8.4.18
postcss-modules-local-by-default: 4.0.0_postcss@8.4.18
postcss-modules-scope: 3.0.0_postcss@8.4.18
postcss-modules-values: 4.0.0_postcss@8.4.18
postcss: 8.4.19
postcss-modules-extract-imports: 3.0.0_postcss@8.4.19
postcss-modules-local-by-default: 4.0.0_postcss@8.4.19
postcss-modules-scope: 3.0.0_postcss@8.4.19
postcss-modules-values: 4.0.0_postcss@8.4.19
string-hash: 1.1.3
/postcss-resolve-nested-selector/0.1.1:
resolution: {integrity: sha512-HvExULSwLqHLgUy1rl3ANIqCsvMS0WHss2UOsXhXnQaZ9VCc2oBvIpXrl00IUFT5ZDITME0o6oiXeiHr2SAIfw==}
dev: true
/postcss-safe-parser/6.0.0_postcss@8.4.18:
/postcss-safe-parser/6.0.0_postcss@8.4.19:
resolution: {integrity: sha512-FARHN8pwH+WiS2OPCxJI8FuRJpTVnn6ZNFiqAM2aeW2LwTHWWmWgIyKC6cUo0L8aeKiF/14MNvnpls6R2PBeMQ==}
engines: {node: '>=12.0'}
peerDependencies:
postcss: ^8.3.3
dependencies:
postcss: 8.4.18
postcss: 8.4.19
dev: true
/postcss-selector-parser/6.0.10:
......@@ -5236,19 +5300,19 @@ packages:
cssesc: 3.0.0
util-deprecate: 1.0.2
/postcss-sorting/7.0.1_postcss@8.4.18:
/postcss-sorting/7.0.1_postcss@8.4.19:
resolution: {integrity: sha512-iLBFYz6VRYyLJEJsBJ8M3TCqNcckVzz4wFounSc5Oez35ogE/X+aoC5fFu103Ot7NyvjU3/xqIXn93Gp3kJk4g==}
peerDependencies:
postcss: ^8.3.9
dependencies:
postcss: 8.4.18
postcss: 8.4.19
dev: true
/postcss-value-parser/4.2.0:
resolution: {integrity: sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ==}
/postcss/8.4.18:
resolution: {integrity: sha512-Wi8mWhncLJm11GATDaQKobXSNEYGUHeQLiQqDFG1qQ5UTDPTEvKw0Xt5NsTpktGTwLps3ByrWsBrG0rB8YQ9oA==}
/postcss/8.4.19:
resolution: {integrity: sha512-h+pbPsyhlYj6N2ozBmHhHrs9DzGmbaarbLvWipMRO7RLS+v4onj26MPFXA5OBYFxyqYhUJK456SwDcY9H2/zsA==}
engines: {node: ^10 || ^12 || >=14}
dependencies:
nanoid: 3.3.4
......@@ -5795,6 +5859,14 @@ packages:
engines: {node: '>= 0.8'}
dev: true
/stompjs/2.3.3:
resolution: {integrity: sha512-5l/Ogz0DTFW7TrpHF0LAETGqM/so8UxNJvYZjJKqcX31EVprSQgnGkO80tZctPC/lFBDUrSFiTG3xd0R27XAIA==}
optionalDependencies:
websocket: 1.0.34
transitivePeerDependencies:
- supports-color
dev: false
/string-argv/0.3.1:
resolution: {integrity: sha512-a1uQGz7IyVy9YwhqjZIZu1c8JO8dNIe20xBmSS6qu9kv++k3JGzCVmprbNN5Kn+BgzD5E7YYwg1CcjuJMRNsvg==}
engines: {node: '>=0.6.19'}
......@@ -5979,8 +6051,8 @@ packages:
peerDependencies:
stylelint: ^14.0.0
dependencies:
postcss: 8.4.18
postcss-sorting: 7.0.1_postcss@8.4.18
postcss: 8.4.19
postcss-sorting: 7.0.1_postcss@8.4.19
stylelint: 14.14.1
dev: true
......@@ -5989,7 +6061,7 @@ packages:
engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0}
hasBin: true
dependencies:
'@csstools/selector-specificity': 2.0.2_dvkg4kkb622mvceygg47xxdz3a
'@csstools/selector-specificity': 2.0.2_45y636a2vqremknoajyxd5nkzy
balanced-match: 2.0.0
colord: 2.9.3
cosmiconfig: 7.0.1
......@@ -6012,10 +6084,10 @@ packages:
micromatch: 4.0.5
normalize-path: 3.0.0
picocolors: 1.0.0
postcss: 8.4.18
postcss: 8.4.19
postcss-media-query-parser: 0.2.3
postcss-resolve-nested-selector: 0.1.1
postcss-safe-parser: 6.0.0_postcss@8.4.18
postcss-safe-parser: 6.0.0_postcss@8.4.19
postcss-selector-parser: 6.0.10
postcss-value-parser: 4.2.0
resolve-from: 5.0.0
......@@ -6276,6 +6348,23 @@ packages:
mime-types: 2.1.35
dev: true
/type/1.2.0:
resolution: {integrity: sha512-+5nt5AAniqsCnu2cEQQdpzCAh33kVx8n0VoFidKpB1dVVLAN/F+bgVOqOJqOnEnrhp222clB5p3vUlD+1QAnfg==}
dev: false
optional: true
/type/2.7.2:
resolution: {integrity: sha512-dzlvlNlt6AXU7EBSfpAscydQ7gXB+pPGsPnfJnZpiNJBDj7IaJzQlBZYGdEi4R9HmPdBv2XmWJ6YUtoTa7lmCw==}
dev: false
optional: true
/typedarray-to-buffer/3.1.5:
resolution: {integrity: sha512-zdu8XMNEDepKKR+XYOXAVPtWui0ly0NtohUscw+UmaHiAWT8hrV1rr//H6V+0DvJ3OQ19S979M0laLfX8rm82Q==}
dependencies:
is-typedarray: 1.0.0
dev: false
optional: true
/typescript/4.8.4:
resolution: {integrity: sha512-QCh+85mCy+h0IGff8r5XWzOVSbBO+KfeYrMQh7NJ58QujwcE22u+NUSmUxqF+un70P9GXKxa2HCNiTTMJknyjQ==}
engines: {node: '>=4.2.0'}
......@@ -6334,7 +6423,7 @@ packages:
engines: {node: '>= 0.8'}
dev: true
/unplugin-auto-import/0.11.4_@vueuse+core@8.9.4:
/unplugin-auto-import/0.11.4_@vueuse+core@9.5.0:
resolution: {integrity: sha512-lh/bRDRYwgnb9Cm5ur8TlTMGxA1GRZvgzCvBIf0vyuVRy7ebWcWefFElpUDpr8vLl+ZRGsPVCOGiYJ8TCR625Q==}
engines: {node: '>=14'}
peerDependencies:
......@@ -6345,7 +6434,7 @@ packages:
dependencies:
'@antfu/utils': 0.6.3
'@rollup/pluginutils': 5.0.2
'@vueuse/core': 8.9.4_vue@3.2.41
'@vueuse/core': 9.5.0_vue@3.2.41
local-pkg: 0.4.2
magic-string: 0.26.7
unimport: 0.7.0
......@@ -6416,6 +6505,15 @@ packages:
os-homedir: 1.0.2
dev: true
/utf-8-validate/5.0.10:
resolution: {integrity: sha512-Z6czzLq4u8fPOyx7TU6X3dvUZVvoJmxSQ+IcrlmagKhilxlhZgxPK6C5Jqbkw1IDUmFTM+cz9QDnnLTwDz/2gQ==}
engines: {node: '>=6.14.2'}
requiresBuild: true
dependencies:
node-gyp-build: 4.5.0
dev: false
optional: true
/util-deprecate/1.0.2:
resolution: {integrity: sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==}
......@@ -6474,7 +6572,7 @@ packages:
dependencies:
esbuild: 0.15.13
less: 4.1.3
postcss: 8.4.18
postcss: 8.4.19
resolve: 1.22.1
rollup: 2.79.1
sass: 1.56.1
......@@ -6575,6 +6673,22 @@ packages:
resolution: {integrity: sha512-5tyDlKLqPfMqjT3Q9TAqf2YqjwmnUleZwzJi1A5qXnlBCdj2AtOJ6wAWdglTIDOPgOiOrXeBeFcsQ8+aGQ6QbA==}
dev: true
/websocket/1.0.34:
resolution: {integrity: sha512-PRDso2sGwF6kM75QykIesBijKSVceR6jL2G8NGYyq2XrItNC2P5/qL5XeR056GhA+Ly7JMFvJb9I312mJfmqnQ==}
engines: {node: '>=4.0.0'}
requiresBuild: true
dependencies:
bufferutil: 4.0.7
debug: 2.6.9
es5-ext: 0.10.62
typedarray-to-buffer: 3.1.5
utf-8-validate: 5.0.10
yaeti: 0.0.6
transitivePeerDependencies:
- supports-color
dev: false
optional: true
/whatwg-url/5.0.0:
resolution: {integrity: sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==}
dependencies:
......@@ -6681,6 +6795,12 @@ packages:
engines: {node: '>=10'}
dev: true
/yaeti/0.0.6:
resolution: {integrity: sha512-MvQa//+KcZCUkBTIC9blM+CU9J2GzuTytsOUwf2lidtvkx/6gnEp1QvJv34t9vdjhFmha/mUiNDbN0D0mJWdug==}
engines: {node: '>=0.10.32'}
dev: false
optional: true
/yallist/4.0.0:
resolution: {integrity: sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==}
dev: true
......
const Message = {
info: (msg: string) => {
uni.showToast({
title: msg,
icon: 'none',
})
},
warn: (msg: string) => {
uni.showToast({
title: msg,
icon: 'none',
position: 'bottom',
})
},
success: (msg: string) => {
uni.showToast({
title: msg,
......@@ -8,7 +21,7 @@ const Message = {
error: (msg: string) => {
uni.showToast({
title: msg,
icon: 'error',
icon: 'none',
})
},
}
......
......@@ -16,6 +16,8 @@ import { setObjToUrlParams, deepMerge } from '/@/utils'
import { joinTimestamp, formatRequestDate } from './helper'
import { AxiosRetry } from '/@/utils/http/axios/axiosRetry'
import * as HTTP from '/@/api/types'
import { API_URL, API_URL_PREFIX } from '/@/utils/net'
import { handleResponseResource } from '/@/utils/proxy'
const globSetting = useGlobSetting()
const urlPrefix = globSetting.urlPrefix
......@@ -52,7 +54,7 @@ const transform: AxiosTransform = {
// 这里逻辑可以根据项目进行修改
const hasSuccess = data && Reflect.has(data, 'status') && status === HTTP.Status.OK
if (hasSuccess) {
return body
return handleResponseResource(body, options)
}
// 在此处根据自己项目的实际情况对不同的code执行不同的操作
......@@ -248,7 +250,12 @@ function createAxios(opt?: Partial<CreateAxiosOptions>) {
}
// TODO: 实际项目所需的请求配置,可自定义扩展
export const defHttp = createAxios()
export const defHttp = createAxios({
requestOptions: {
apiUrl: API_URL,
urlPrefix: API_URL_PREFIX,
},
})
// other api url
// export const otherHttp = createAxios({
......
import { useGlobSetting } from '/@/hooks/setting'
let HOST = 'localhost'
let API_URL = `${HOST}`
const globSetting = useGlobSetting()
const API_URL_PREFIX = globSetting.urlPrefix
// =============================================================================
// ✨ 生产环境
// HOST = 'https://beta.app.yiring.com'
// API_URL = `${HOST}`
// 📖 开发环境
HOST = globSetting.apiUrl
API_URL = `${HOST}`
// 🔦 检查生产环境,使用对应 env 中的配置,保留原有方式方便开发中调试
API_URL = import.meta.env.MODE !== 'development' ? globSetting.apiUrl : API_URL
// 📢 如果使用代理访问网站,则默认使用代理 API 地址
// API_URL = isProxy(window.location.host) ? `http://proxy.yiring.com` : API_URL
// =============================================================================
export {
/**
* API URL
* eg: https://beta.app.yiring.com
*/
API_URL,
/**
* API URL Prefix
* eg: /api
*/
API_URL_PREFIX,
}
/**
* FIXD: 固定说明,此文件内不允许使用 import.env 之类的环境变量,否则会导致地图模块异常
*/
const PROXY_LIST = [
// eg: 开发环境
// ['http://192.168.1.100:18100', `http://proxy.yiring.com:41180`],
// eg: 测试环境
// ['http://10.111.117.15:18100', `http://proxy.yiring.com:42180`],
// eg: 生产环境
// ['http://192.168.0.100:18100', `https://oss.app.yiring.com`],
]
/**
* 将内部地址(内网)转换成代理/预览地址(公网)
* @param url 内网地址
*/
export const getExtranetUrl = (url: string): string => {
let uri = url
PROXY_LIST.forEach((proxy) => {
uri = uri.replace(new RegExp(proxy[0], 'gi'), proxy[1])
})
return uri
}
/**
* 将代理/预览地址(公网)转换成内部地址(内网)
* eg: 主要用于解决内网文件上传后预览,但是实际上传存储时还是内网地址的问题
* @param url 代理/公网地址
*/
export const getIntranetUrl = (url: string): string => {
let uri = url
PROXY_LIST.forEach((proxy) => {
uri = uri.replace(new RegExp(proxy[1], 'gi'), proxy[0])
})
return uri
}
/**
* 替换处理返回的数据中本地链接
* @param body 接口返回的内容
* @returns 替换本地链接后的数据结果
*/
export const handleResponseResource = <T>(body: T, options: Recordable) => {
if (options.apiUrl.includes('proxy.yiring.com') && typeof body === 'object') {
let text = JSON.stringify(body)
// 处理内网地址的预览问题
text = getExtranetUrl(text)
return JSON.parse(text) as T
}
return body
}
import type { Client, Message, Frame } from 'stompjs'
import Stomp from './uni-stomp'
import UniWebSocket from './uni-websocket'
import { getToken } from '/@/utils/auth'
import { useMessage } from '/@/hooks/app/useMessage'
import { API_URL, API_URL_PREFIX } from '/@/utils/net'
const { createMessage } = useMessage()
// 自定义实现 WebSocket 类
Stomp.WebSocketClass = UniWebSocket
/**
* WebSocket Stomp 实例
*/
class StompInstance {
// 连接地址
private url: string
// 是否开启调试模式
private debug: boolean
// Stomp 实例
private client: Client
// 订阅集合
private subscribes: Recordable
// 重连延时标记
private reconnectId: NodeJS.Timeout
// 重连间隔
private reconnectInterval: number
// 检查订阅延时标记
private checkSubscribeId: NodeJS.Timeout
// 检查订阅的时间间隔
private checkSubscribeInterval = 3000
// 缓存 token
token: string
// 缓存用户信息
info: Recordable
constructor({
url,
debug = false,
reconnectInterval = 10000,
}: {
url: string
debug?: boolean
reconnectInterval?: number
}) {
// 重连间隔
this.reconnectInterval = reconnectInterval
// 是否打印debug信息
this.debug = debug
// ws地址
if (url.indexOf('http://') === 0) {
this.url = url.replace('http://', 'ws://')
} else if (url.indexOf('https://') === 0) {
this.url = url.replace('https://', 'wss://')
} else {
this.url = url
}
// stomp实例
this.client = null
// 重连事件编号
this.reconnectId = null
// 订阅集合
this.subscribes = {}
}
/**
* 创建连接
*/
connect() {
// 如已存在连接则不创建
if (this.client && this.client.connected) {
return
}
// 从缓存中获取token
const token = getToken()
const options = token ? { token } : {}
// TODO: 检查 Token 是否有效
// 创建 Stomp 实例
this.client = Stomp.client(this.url) as Client
// 控制是否打印debug信息
if (!this.debug) {
this.client.debug = () => {}
}
// 连接
this.client.connect(
options,
(frame: Frame) => {
// 缓存连接用户信息
this.token = token
this.info = JSON.parse(frame.body)
if (this.debug) {
console.log(`[Stomp] connected, user: ${this.info.user}`)
}
// 检查消息订阅
this.loopCheckSubscribe()
// 订阅全局通知
this.client.subscribe('/user/topic/notice', (frame) => {
if (this.debug) {
console.debug('STOMP Notice: ', frame.body)
}
const body = JSON.parse(frame.body)
if (body.status === 400) {
createMessage.warn(body.message)
} else if (body.status === 401) {
// TODO: 退出登录
}
// TODO 根据实际情况再行补充
})
// 发送登录消息
this.send('/app/login', { token })
},
(_) => {
// 重连
this.reconnectId = setTimeout(() => {
this.reconnect()
}, this.reconnectInterval)
},
)
}
/**
* 重新连接
*/
reconnect() {
// 停止重连事件
if (this.reconnectId) {
clearTimeout(this.reconnectId)
this.reconnectId = null
}
// 停止订阅状态检查
if (this.checkSubscribeId) {
clearTimeout(this.checkSubscribeId)
this.checkSubscribeId = null
}
// 订阅状态置false
Object.keys(this.subscribes).forEach((key) => {
this.subscribes[key]['subscribed'] = false
})
// 连接
this.connect()
}
/**
* 断开连接
*/
disconnect() {
// 断开连接
if (this.client) {
this.client.disconnect(() => {})
}
// 停止重连事件
if (this.reconnectId) {
clearTimeout(this.reconnectId)
this.reconnectId = null
}
// 停止订阅状态检查
if (this.checkSubscribeId) {
clearTimeout(this.checkSubscribeId)
this.checkSubscribeId = null
}
// 清空所有除订阅缓存
this.subscribes = {}
}
/**
* 订阅
* @param {string} destination 主题
* @param {Function} callback 回调
*/
subscribe(destination: string, callback: (message: Message) => any) {
if (this.subscribes[destination] && this.subscribes[destination]['subscribed']) {
// 已订阅
return
} else if (this.client && this.client.connected) {
// 已连接:调用订阅,缓存订阅信息
const subscribe = this.client.subscribe(destination, (res) => callback(res))
this.subscribes[destination] = { callback: callback, subscribed: true, subscribe: subscribe }
} else {
// 未连接:缓存订阅信息
this.subscribes[destination] = { callback: callback, subscribed: false }
}
}
/**
* 取消订阅
* @param {string} destination 主题
*/
unsubscribe(destination: string) {
if (this.subscribes[destination]) {
// 取消订阅
this.subscribes[destination].subscribe.unsubscribe()
// 删除订阅缓存
delete this.subscribes[destination]
}
}
/**
* 轮询检查订阅状态
*/
loopCheckSubscribe() {
this.checkSubscribeId = setInterval(() => {
Object.keys(this.subscribes).forEach((key) => {
this.subscribe(key, this.subscribes[key].callback)
})
}, this.checkSubscribeInterval)
}
/**
* 向服务器发送消息
* @param {string} destination 主题
* @param {Object | string} message 消息内容
* @param {Object} headers 消息头
*/
send(destination: string, message: Object | string, headers?: Object) {
if (this.client) {
this.client.send(destination, headers, typeof message === 'object' ? JSON.stringify(message) : message)
}
}
}
const baseUrl = API_URL + API_URL_PREFIX
const instance = new StompInstance({
url: `${baseUrl}/stomp/ws`,
debug: false,
})
export default instance
/* eslint-disable */
// @ts-nocheck
// Generated by CoffeeScript 1.7.1
/*
Stomp Over WebSocket http://www.jmesnil.net/stomp-websocket/doc/ | Apache License V2.0
Copyright (C) 2010-2013 [Jeff Mesnil](http://jmesnil.net/)
Copyright (C) 2012 [FuseSource, Inc.](http://fusesource.com)
*/
const uniStomp = function () {
var Byte,
Client,
Frame,
Stomp,
__hasProp = {}.hasOwnProperty,
__slice = [].slice
Byte = {
LF: '\x0A',
NULL: '\x00',
}
Frame = (function () {
var unmarshallSingle
function Frame(command, headers, body) {
this.command = command
this.headers = headers != null ? headers : {}
this.body = body != null ? body : ''
}
Frame.prototype.toString = function () {
var lines, name, skipContentLength, value, _ref
lines = [this.command]
skipContentLength = this.headers['content-length'] === false ? true : false
if (skipContentLength) {
delete this.headers['content-length']
}
_ref = this.headers
for (name in _ref) {
if (!__hasProp.call(_ref, name)) continue
value = _ref[name]
lines.push('' + name + ':' + value)
}
if (this.body && !skipContentLength) {
lines.push('content-length:' + Frame.sizeOfUTF8(this.body))
}
lines.push(Byte.LF + this.body)
return lines.join(Byte.LF)
}
Frame.sizeOfUTF8 = function (s) {
if (s) {
return encodeURI(s).match(/%..|./g).length
} else {
return 0
}
}
unmarshallSingle = function (data) {
var body,
chr,
command,
divider,
headerLines,
headers,
i,
idx,
len,
line,
start,
trim,
_i,
_j,
_len,
_ref,
_ref1
divider = data.search(RegExp('' + Byte.LF + Byte.LF))
headerLines = data.substring(0, divider).split(Byte.LF)
command = headerLines.shift()
headers = {}
trim = function (str) {
return str.replace(/^\s+|\s+$/g, '')
}
_ref = headerLines.reverse()
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
line = _ref[_i]
idx = line.indexOf(':')
headers[trim(line.substring(0, idx))] = trim(line.substring(idx + 1))
}
body = ''
start = divider + 2
if (headers['content-length']) {
len = parseInt(headers['content-length'])
body = ('' + data).substring(start, start + len)
} else {
chr = null
for (
i = _j = start, _ref1 = data.length;
start <= _ref1 ? _j < _ref1 : _j > _ref1;
i = start <= _ref1 ? ++_j : --_j
) {
chr = data.charAt(i)
if (chr === Byte.NULL) {
break
}
body += chr
}
}
return new Frame(command, headers, body)
}
Frame.unmarshall = function (datas) {
var data
return (function () {
var _i, _len, _ref, _results
_ref = datas.split(RegExp('' + Byte.NULL + Byte.LF + '*'))
_results = []
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
data = _ref[_i]
if ((data != null ? data.length : void 0) > 0) {
_results.push(unmarshallSingle(data))
}
}
return _results
})()
}
Frame.marshall = function (command, headers, body) {
var frame
frame = new Frame(command, headers, body)
return frame.toString() + Byte.NULL
}
return Frame
})()
Client = (function () {
var now
function Client(ws) {
this.ws = ws
this.ws.binaryType = 'arraybuffer'
this.counter = 0
this.connected = false
this.heartbeat = {
outgoing: 10000,
incoming: 10000,
}
this.maxWebSocketFrameSize = 16 * 1024
this.subscriptions = {}
}
// Client.prototype.debug = function (message) {
// var _ref
// return typeof window !== 'undefined' && window !== null
// ? (_ref = window.console) != null
// ? _ref.log(message)
// : void 0
// : void 0
// }
Client.prototype.debug = function (message) {
return typeof console !== undefined ? console.log(message) : void 0
}
now = function () {
if (Date.now) {
return Date.now()
} else {
return new Date().valueOf
}
}
Client.prototype._transmit = function (command, headers, body) {
var out
out = Frame.marshall(command, headers, body)
if (typeof this.debug === 'function') {
this.debug('>>> ' + out)
}
while (true) {
if (out.length > this.maxWebSocketFrameSize) {
this.ws.send(out.substring(0, this.maxWebSocketFrameSize))
out = out.substring(this.maxWebSocketFrameSize)
if (typeof this.debug === 'function') {
this.debug('remaining = ' + out.length)
}
} else {
return this.ws.send(out)
}
}
}
Client.prototype._setupHeartbeat = function (headers) {
var serverIncoming, serverOutgoing, ttl, v, _ref, _ref1
if ((_ref = headers.version) !== Stomp.VERSIONS.V1_1 && _ref !== Stomp.VERSIONS.V1_2) {
return
}
;(_ref1 = (function () {
var _i, _len, _ref1, _results
_ref1 = headers['heart-beat'].split(',')
_results = []
for (_i = 0, _len = _ref1.length; _i < _len; _i++) {
v = _ref1[_i]
_results.push(parseInt(v))
}
return _results
})()),
(serverOutgoing = _ref1[0]),
(serverIncoming = _ref1[1])
if (!(this.heartbeat.outgoing === 0 || serverIncoming === 0)) {
ttl = Math.max(this.heartbeat.outgoing, serverIncoming)
if (typeof this.debug === 'function') {
this.debug('send PING every ' + ttl + 'ms')
}
this.pinger = Stomp.setInterval(
ttl,
(function (_this) {
return function () {
_this.ws.send(Byte.LF)
return typeof _this.debug === 'function' ? _this.debug('>>> PING') : void 0
}
})(this),
)
}
if (!(this.heartbeat.incoming === 0 || serverOutgoing === 0)) {
ttl = Math.max(this.heartbeat.incoming, serverOutgoing)
if (typeof this.debug === 'function') {
this.debug('check PONG every ' + ttl + 'ms')
}
return (this.ponger = Stomp.setInterval(
ttl,
(function (_this) {
return function () {
var delta
delta = now() - _this.serverActivity
if (delta > ttl * 2) {
if (typeof _this.debug === 'function') {
_this.debug('did not receive server activity for the last ' + delta + 'ms')
}
return _this.ws.close()
}
}
})(this),
))
}
}
Client.prototype._parseConnect = function () {
var args, connectCallback, errorCallback, headers
args = 1 <= arguments.length ? __slice.call(arguments, 0) : []
headers = {}
switch (args.length) {
case 2:
;(headers = args[0]), (connectCallback = args[1])
break
case 3:
if (args[1] instanceof Function) {
;(headers = args[0]), (connectCallback = args[1]), (errorCallback = args[2])
} else {
;(headers.login = args[0]), (headers.passcode = args[1]), (connectCallback = args[2])
}
break
case 4:
;(headers.login = args[0]),
(headers.passcode = args[1]),
(connectCallback = args[2]),
(errorCallback = args[3])
break
default:
;(headers.login = args[0]),
(headers.passcode = args[1]),
(connectCallback = args[2]),
(errorCallback = args[3]),
(headers.host = args[4])
}
return [headers, connectCallback, errorCallback]
}
Client.prototype.connect = function () {
var args, errorCallback, headers, out
args = 1 <= arguments.length ? __slice.call(arguments, 0) : []
out = this._parseConnect.apply(this, args)
;(headers = out[0]), (this.connectCallback = out[1]), (errorCallback = out[2])
if (typeof this.debug === 'function') {
this.debug('Opening Web Socket...')
}
this.ws.onmessage = (function (_this) {
return function (evt) {
var arr, c, client, data, frame, messageID, onreceive, subscription, _i, _len, _ref, _results
data =
typeof ArrayBuffer !== 'undefined' && evt.data instanceof ArrayBuffer
? ((arr = new Uint8Array(evt.data)),
typeof _this.debug === 'function'
? _this.debug('--- got data length: ' + arr.length)
: void 0,
(function () {
var _i, _len, _results
_results = []
for (_i = 0, _len = arr.length; _i < _len; _i++) {
c = arr[_i]
_results.push(String.fromCharCode(c))
}
return _results
})().join(''))
: evt.data
_this.serverActivity = now()
if (data === Byte.LF) {
if (typeof _this.debug === 'function') {
_this.debug('<<< PONG')
}
return
}
if (typeof _this.debug === 'function') {
_this.debug('<<< ' + data)
}
_ref = Frame.unmarshall(data)
_results = []
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
frame = _ref[_i]
switch (frame.command) {
case 'CONNECTED':
if (typeof _this.debug === 'function') {
_this.debug('connected to server ' + frame.headers.server)
}
_this.connected = true
_this._setupHeartbeat(frame.headers)
_results.push(
typeof _this.connectCallback === 'function' ? _this.connectCallback(frame) : void 0,
)
break
case 'MESSAGE':
subscription = frame.headers.subscription
onreceive = _this.subscriptions[subscription] || _this.onreceive
if (onreceive) {
client = _this
messageID = frame.headers['message-id']
frame.ack = function (headers) {
if (headers == null) {
headers = {}
}
return client.ack(messageID, subscription, headers)
}
frame.nack = function (headers) {
if (headers == null) {
headers = {}
}
return client.nack(messageID, subscription, headers)
}
_results.push(onreceive(frame))
} else {
_results.push(
typeof _this.debug === 'function'
? _this.debug('Unhandled received MESSAGE: ' + frame)
: void 0,
)
}
break
case 'RECEIPT':
_results.push(typeof _this.onreceipt === 'function' ? _this.onreceipt(frame) : void 0)
break
case 'ERROR':
_results.push(typeof errorCallback === 'function' ? errorCallback(frame) : void 0)
break
default:
_results.push(
typeof _this.debug === 'function'
? _this.debug('Unhandled frame: ' + frame)
: void 0,
)
}
}
return _results
}
})(this)
this.ws.onclose = (function (_this) {
return function () {
var msg
msg = 'Whoops! Lost connection to ' + _this.ws.url
if (typeof _this.debug === 'function') {
_this.debug(msg)
}
_this._cleanUp()
return typeof errorCallback === 'function' ? errorCallback(msg) : void 0
}
})(this)
return (this.ws.onopen = (function (_this) {
return function () {
if (typeof _this.debug === 'function') {
_this.debug('Web Socket Opened...')
}
headers['accept-version'] = Stomp.VERSIONS.supportedVersions()
headers['heart-beat'] = [_this.heartbeat.outgoing, _this.heartbeat.incoming].join(',')
return _this._transmit('CONNECT', headers)
}
})(this))
}
Client.prototype.disconnect = function (disconnectCallback, headers) {
if (headers == null) {
headers = {}
}
this._transmit('DISCONNECT', headers)
this.ws.onclose = null
this.ws.close()
this._cleanUp()
return typeof disconnectCallback === 'function' ? disconnectCallback() : void 0
}
Client.prototype._cleanUp = function () {
this.connected = false
if (this.pinger) {
Stomp.clearInterval(this.pinger)
}
if (this.ponger) {
return Stomp.clearInterval(this.ponger)
}
}
Client.prototype.send = function (destination, headers, body) {
if (headers == null) {
headers = {}
}
if (body == null) {
body = ''
}
headers.destination = destination
return this._transmit('SEND', headers, body)
}
Client.prototype.subscribe = function (destination, callback, headers) {
if (headers == null) {
headers = {}
}
if (!headers.id) {
headers.id = 'sub-' + this.counter++
}
headers.destination = destination
this.subscriptions[headers.id] = callback
this._transmit('SUBSCRIBE', headers)
return {
id: headers.id,
unsubscribe: () => {
return this.unsubscribe(headers.id)
},
}
}
Client.prototype.unsubscribe = function (id) {
delete this.subscriptions[id]
return this._transmit('UNSUBSCRIBE', {
id: id,
})
}
Client.prototype.begin = function (transaction) {
var txid = transaction || 'tx-' + this.counter++
this._transmit('BEGIN', {
transaction: txid,
})
return {
id: txid,
commit: () => {
return this.commit(txid)
},
abort: () => {
return this.abort(txid)
},
}
}
Client.prototype.commit = function (transaction) {
return this._transmit('COMMIT', {
transaction: transaction,
})
}
Client.prototype.abort = function (transaction) {
return this._transmit('ABORT', {
transaction: transaction,
})
}
Client.prototype.ack = function (messageID, subscription, headers) {
if (headers == null) {
headers = {}
}
headers['message-id'] = messageID
headers.subscription = subscription
return this._transmit('ACK', headers)
}
Client.prototype.nack = function (messageID, subscription, headers) {
if (headers == null) {
headers = {}
}
headers['message-id'] = messageID
headers.subscription = subscription
return this._transmit('NACK', headers)
}
return Client
})()
Stomp = {
WebSocketClass: undefined,
VERSIONS: {
V1_0: '1.0',
V1_1: '1.1',
V1_2: '1.2',
supportedVersions: function () {
return '1.1,1.0'
},
},
client: function (url, protocols) {
var klass, ws
if (protocols == null) {
protocols = ['v10.stomp', 'v11.stomp']
}
klass = Stomp.WebSocketClass || WebSocket
ws = new klass(url, protocols)
return new Client(ws)
},
over: function (ws) {
return new Client(ws)
},
Frame: Frame,
}
// 兼容uniapp
Stomp.setInterval = function (interval, f) {
return setInterval(f, interval)
}
Stomp.clearInterval = function (id) {
return clearInterval(id)
}
return Stomp
}
export default uniStomp()
/**
* 封装uniapp的WebSocket对象,使其与原生类似,供stomp使用
*/
class UniWebSocket {
ws: UniApp.SocketTask
activeClose: boolean
openListener: Function[]
closeListener: Function[]
errorListener: Function[]
messageListener: Function[]
constructor(url: string, protocols: string[]) {
// 是否主动关闭连接
this.activeClose = false
// 相关事件数组
this.openListener = []
this.closeListener = []
this.errorListener = []
this.messageListener = []
// 创建连接
const ws = uni.connectSocket({
url,
protocols,
complete: () => {},
})
// 连接开启
ws.onOpen((res) => {
this.onopen(res)
for (const i in this.openListener) {
this.openListener[i](res)
}
})
// 连接关闭
ws.onClose((res) => {
// 主动关闭连接不进行回调
if (this.activeClose) {
this.activeClose = false
} else {
this.onclose(res)
}
for (const i in this.closeListener) {
this.closeListener[i](res)
}
})
// 连接异常
ws.onError((res) => {
this.onerror(res)
for (const i in this.errorListener) {
this.errorListener[i](res)
}
})
// 接收消息
ws.onMessage((res) => {
this.onmessage(res)
for (const i in this.messageListener) {
this.messageListener[i](res)
}
})
this.ws = ws
}
/**
* 添加监听
* @param {string} eventName
* @param {Function} callback
*/
addEventListener(eventName: string, callback: Function) {
if (eventName === 'open') {
this.openListener.push(callback)
} else if (eventName === 'close') {
this.closeListener.push(callback)
} else if (eventName === 'error') {
this.errorListener.push(callback)
} else if (eventName === 'message') {
this.messageListener.push(callback)
}
}
/**
* 移除最后一个监听
* @param {string} eventName
*/
removeEventListener(eventName: string) {
if (eventName === 'open') {
this.openListener.pop()
} else if (eventName === 'close') {
this.closeListener.pop()
} else if (eventName === 'error') {
this.errorListener.pop()
} else if (eventName === 'message') {
this.messageListener.pop()
}
}
/**
* 连接开启
* @param {Object} _res
*/
onopen(_res: object) {}
/**
* 连接关闭
* @param {Object} _res
*/
onclose(_res: object) {}
/**
* 连接异常
* @param {Object} _res
*/
onerror(_res: object) {}
/**
* 接收消息
* @param {Object} _res
*/
onmessage(_res: object) {}
/**
* 发送消息
* @param {string | ArrayBuffer} data
*/
send(data: string | ArrayBuffer) {
this.ws.send({
data: data,
})
}
/**
* 关闭连接
*/
close() {
this.activeClose = true
this.ws.close({
complete: () => {},
})
}
}
export default UniWebSocket
......@@ -5,6 +5,7 @@ declare global {
const API: typeof import('@/api/services/mods')['API']
const EffectScope: typeof import('vue')['EffectScope']
const Message: typeof import('@/common')['Message']
const Stomp: typeof import('@/utils/stomp')['default']
const computed: typeof import('vue')['computed']
const createApp: typeof import('vue')['createApp']
const customRef: typeof import('vue')['customRef']
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论