添加友盟的数据埋点

This commit is contained in:
wangxiaowei
2026-04-16 15:42:07 +08:00
parent 83f4ed1d4b
commit bb1cec2762
5 changed files with 24 additions and 1 deletions

View File

@ -135,7 +135,7 @@ export default defineManifestConfig({
'scope.userLocation' : {
desc : "我们需要获取您的位置,以方便推荐附近茶室给您"
}
},
}
},
'mp-alipay': {
usingComponents: true,

View File

@ -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"

9
pnpm-lock.yaml generated
View File

@ -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

View File

@ -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/')

11
src/uma.ts Normal file
View File

@ -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