From bb1cec276208f0b433b5fed7a6814818b590b062 Mon Sep 17 00:00:00 2001 From: wangxiaowei <1121133807@qq.com> Date: Thu, 16 Apr 2026 15:42:07 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=8F=8B=E7=9B=9F=E7=9A=84?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E5=9F=8B=E7=82=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- manifest.config.ts | 2 +- package.json | 1 + pnpm-lock.yaml | 9 +++++++++ src/main.ts | 2 ++ src/uma.ts | 11 +++++++++++ 5 files changed, 24 insertions(+), 1 deletion(-) create mode 100644 src/uma.ts diff --git a/manifest.config.ts b/manifest.config.ts index 6860238..ee0fe97 100644 --- a/manifest.config.ts +++ b/manifest.config.ts @@ -135,7 +135,7 @@ export default defineManifestConfig({ 'scope.userLocation' : { desc : "我们需要获取您的位置,以方便推荐附近茶室给您" } - }, + } }, 'mp-alipay': { usingComponents: true, diff --git a/package.json b/package.json index 8a33ba6..20a13d1 100644 --- a/package.json +++ b/package.json @@ -103,6 +103,7 @@ "js-cookie": "^3.0.5", "pinia": "2.0.36", "pinia-plugin-persistedstate": "3.2.1", + "umtrack-wx": "^2.8.0", "vue": "3.4.21", "wot-design-uni": "^1.9.1", "z-paging": "2.8.7" diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 6636981..0297363 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -97,6 +97,9 @@ importers: pinia-plugin-persistedstate: specifier: 3.2.1 version: 3.2.1(pinia@2.0.36(typescript@5.9.2)(vue@3.4.21(typescript@5.9.2))) + umtrack-wx: + specifier: ^2.8.0 + version: 2.8.0 vue: specifier: 3.4.21 version: 3.4.21(typescript@5.9.2) @@ -5285,6 +5288,7 @@ packages: phin@3.7.1: resolution: {integrity: sha512-GEazpTWwTZaEQ9RhL7Nyz0WwqilbqgLahDM3D0hxWwmVDI52nXEybHqiN6/elwpkJBhcuj+WbBu+QfT0uhPGfQ==} engines: {node: '>= 8'} + deprecated: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info. picocolors@1.1.1: resolution: {integrity: sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==} @@ -6040,6 +6044,9 @@ packages: ufo@1.6.1: resolution: {integrity: sha512-9a4/uxlTWJ4+a5i0ooc1rU7C7YOw3wT+UGqdeNNHWnOF9qcMBgLRS+4IYUqbczewFx4mLEig6gawh7X6mFlEkA==} + umtrack-wx@2.8.0: + resolution: {integrity: sha512-F5ul+Q7bDJ6MDrn9ysPAyB9nyP1vCxLGUBkSJ4uvknt8rjmX4tqy1IUnJuWKj9ZH2BtkjRFpldQXJSlLDOYfhQ==} + unconfig@0.5.5: resolution: {integrity: sha512-VQZ5PT9HDX+qag0XdgQi8tJepPhXiR/yVOkn707gJDKo31lGjRilPREiQJ9Z6zd/Ugpv6ZvO5VxVIcatldYcNQ==} @@ -13746,6 +13753,8 @@ snapshots: ufo@1.6.1: {} + umtrack-wx@2.8.0: {} + unconfig@0.5.5: dependencies: '@antfu/utils': 0.7.10 diff --git a/src/main.ts b/src/main.ts index 411eec0..fc538d5 100644 --- a/src/main.ts +++ b/src/main.ts @@ -10,6 +10,7 @@ import '@/style/index.scss' import 'virtual:uno.css' import { getNavBarHeight, getCapsuleOffset } from '@/utils/index' +import uma from './uma'; export function createApp() { const app = createSSRApp(App) @@ -19,6 +20,7 @@ export function createApp() { app.use(store) app.use(routeInterceptor) app.use(requestInterceptor) + app.use(uma) app.use(VueQueryPlugin) app.provide('OSS', 'https://chaz.oss-cn-shanghai.aliyuncs.com/fronted/') diff --git a/src/uma.ts b/src/uma.ts new file mode 100644 index 0000000..85bc8e2 --- /dev/null +++ b/src/uma.ts @@ -0,0 +1,11 @@ +// #ifdef MP-WEIXIN +import uma from 'umtrack-wx'; +uma.init({ + appKey: '69e081af6f259537c799f90c', + useOpenid: false, + autoGetOpenid: false, + debug: true +}); +// #endif + +export default uma \ No newline at end of file