diff --git a/manifest.config.ts b/manifest.config.ts index e53d2fe..3ab58c5 100644 --- a/manifest.config.ts +++ b/manifest.config.ts @@ -5,7 +5,6 @@ import { loadEnv } from 'vite' // 获取环境变量的范例 const env = loadEnv(process.env.NODE_ENV!, path.resolve(process.cwd(), 'env')) -// console.log(env) const { VITE_APP_TITLE, VITE_UNI_APPID, diff --git a/src/hooks/useUpload.ts b/src/hooks/useUpload.ts index 4870a9c..d139570 100644 --- a/src/hooks/useUpload.ts +++ b/src/hooks/useUpload.ts @@ -23,7 +23,7 @@ export default function useUpload(formData: Record = {} uploadFile({ tempFilePath, formData, data, error, loading }) }, fail: (err) => { - console.log('uni.chooseMedia err->', err) + console.error('uni.chooseMedia err->', err) error.value = true }, }) @@ -37,7 +37,7 @@ export default function useUpload(formData: Record = {} uploadFile({ tempFilePath, formData, data, error, loading }) }, fail: (err) => { - console.log('uni.chooseImage err->', err) + console.error('uni.chooseImage err->', err) error.value = true }, }) @@ -57,7 +57,7 @@ function uploadFile({ tempFilePath, formData, data, error, loading }) { data.value = uploadFileRes.data as T }, fail: (err) => { - console.log('uni.uploadFile err->', err) + console.error('uni.uploadFile err->', err) error.value = true }, complete: () => { diff --git a/src/interceptors/request.ts b/src/interceptors/request.ts index 499285e..4cd0204 100644 --- a/src/interceptors/request.ts +++ b/src/interceptors/request.ts @@ -28,7 +28,7 @@ const httpInterceptor = { // 非 http 开头需拼接地址 if (!options.url.startsWith('http')) { // #ifdef H5 - console.log(__VITE_APP_PROXY__) + // console.log(__VITE_APP_PROXY__) if (JSON.parse(__VITE_APP_PROXY__)) { // 啥都不需要做 } else { diff --git a/src/pages/index/index.vue b/src/pages/index/index.vue index c2c1547..893ed8f 100644 --- a/src/pages/index/index.vue +++ b/src/pages/index/index.vue @@ -44,7 +44,7 @@ const author = ref('菲鸽') const description = ref( 'unibest 是一个集成了多种工具和技术的 uniapp 开发模板,由 uniapp + Vue3 + Ts + Vite4 + UnoCss + UniUI + VSCode 构建,模板具有代码提示、自动格式化、统一配置、代码片段等功能,并内置了许多常用的基本组件和基本功能,让你编写 uniapp 拥有 best 体验。', ) - +// 测试 uni API 自动引入 onLoad(() => { console.log(author) }) diff --git a/src/utils/index.ts b/src/utils/index.ts index 2bafaca..1247dc6 100644 --- a/src/utils/index.ts +++ b/src/utils/index.ts @@ -30,7 +30,7 @@ export const currRoute = () => { // console.log('lastPage.options:', (lastPage as any).options) // 经过多端测试,只有 fullPath 靠谱,其他都不靠谱 const { fullPath } = currRoute as { fullPath: string } - console.log(fullPath) + // console.log(fullPath) // eg: /pages/login/index?redirect=%2Fpages%2Fdemo%2Fbase%2Froute-interceptor (小程序) // eg: /pages/login/index?redirect=%2Fpages%2Froute-interceptor%2Findex%3Fname%3Dfeige%26age%3D30(h5) return getUrlObj(fullPath) @@ -96,7 +96,7 @@ export const getAllPages = (key = 'needLogin') => { }) }) const result = [...mainPages, ...subPages] - console.log(`getAllPages by ${key} result: `, result) + // console.log(`getAllPages by ${key} result: `, result) return result }