From 5a79fd223d862c63c7939b6d0693da7b9d019104 Mon Sep 17 00:00:00 2001 From: mehaotian <490272692@qq.com> Date: Mon, 21 Oct 2024 15:02:31 +0800 Subject: [PATCH] =?UTF-8?q?fix(stat):=20=E6=9A=82=E6=97=B6=E9=9A=90?= =?UTF-8?q?=E8=97=8F=E7=BB=9F=E8=AE=A1=E5=85=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- App.uvue | 74 ++++++++++++++++++++++++++++---------------------------- main.uts | 18 +++++++------- 2 files changed, 46 insertions(+), 46 deletions(-) diff --git a/App.uvue b/App.uvue index 53860b0e..3841b9a9 100644 --- a/App.uvue +++ b/App.uvue @@ -48,15 +48,15 @@ // } as PerformanceObserverOptions) // 统计上报 - 应用启动 - uni.report({ - name: 'uni-app-launch', - options: res, - success(res_data) { - console.log(res_data); - }, fail(err) { - console.log(err); - } - }) + // uni.report({ + // name: 'uni-app-launch', + // options: res, + // success(res_data) { + // console.log(res_data); + // }, fail(err) { + // console.log(err); + // } + // }) // #ifdef APP if (process.env.NODE_ENV !== 'development') { //真机运行可以注释此条件 uni.getPrivacySetting({ @@ -87,14 +87,14 @@ console.log('App Show') // 统计上报 - 应用显示 - uni.report({ - name: 'uni-app-show', - success(res_data) { - console.log(res_data); - }, fail(err) { - console.log(err); - } - }) + // uni.report({ + // name: 'uni-app-show', + // success(res_data) { + // console.log(res_data); + // }, fail(err) { + // console.log(err); + // } + // }) }, onHide: function () { // 自动化测试 @@ -102,14 +102,14 @@ console.log('App Hide') // 统计上报 - 应用进入后台 - uni.report({ - name: 'uni-app-hide', - success(res) { - console.log(res); - }, fail(err) { - console.log(err); - } - }) + // uni.report({ + // name: 'uni-app-hide', + // success(res) { + // console.log(res); + // }, fail(err) { + // console.log(err); + // } + // }) }, // #ifdef APP-ANDROID onLastPageBackPress: function () { @@ -133,18 +133,18 @@ onExit() { console.log('App Exit') }, - onError(err : any) { - // 统计上报 - 应用发生错误 - uni.report({ - name: 'uni-app-error', - options: err, - success(res) { - console.log(res); - }, fail(err) { - console.log(err); - } - }) - }, + // onError(err : any) { + // // 统计上报 - 应用发生错误 + // uni.report({ + // name: 'uni-app-error', + // options: err, + // success(res) { + // console.log(res); + // }, fail(err) { + // console.log(err); + // } + // }) + // }, // #endif methods: { increasetLifeCycleNum() { diff --git a/main.uts b/main.uts index 53f9a895..2fba73c7 100644 --- a/main.uts +++ b/main.uts @@ -1,23 +1,23 @@ // 仅测试 console.log 时机问题 import './test-main-console.uts' -import { uniStat } from '@/uni_modules/uni-stat/plugin.uts' +// import { uniStat } from '@/uni_modules/uni-stat/plugin.uts' import App from './App.uvue' import { createSSRApp } from 'vue' // 统计配置 -const collectItems = { - uniStatPageLog: true -} +// const collectItems = { +// uniStatPageLog: true +// } -const statOptions = { - debug: false, - collectItems: collectItems, -} +// const statOptions = { +// debug: false, +// collectItems: collectItems, +// } export function createApp() { const app = createSSRApp(App) - app.use(uniStat, statOptions) + // app.use(uniStat, statOptions) // app.mixin({ // onReady() { // setTimeout(() => { -- GitLab