yearning
19 小时以前 80944f86705180ee52c7a4d273efae153e06fcb3
优化
3个文件已修改
19 ■■■■■ 已修改文件
src/main.js 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/utils/wxjssdk.js 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
vite.config.js 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main.js
@@ -24,9 +24,13 @@
  app.component(key, component)
}
// ?qxydebug2=true 触发
const urlParams = new URLSearchParams(window.location.search);
if (urlParams.get('qxydebug2') === 'true') {
import('vconsole').then((module) => {
  new module.default()
})
    new module.default();
  });
}
app.config.globalProperties.$rules = ruleGenerator
app.config.globalProperties.$property = property
@@ -43,7 +47,6 @@
app.use(ElementPlus, {
  locale: zhCn,
})
const pinia = createPinia()
pinia.use(piniaPluginPersistedstate)
src/utils/wxjssdk.js
@@ -61,11 +61,11 @@
            resolve(localData)
          })
        } else {
          store.commit('snack/error', `微信上传图片失败:${res}`)
          ElMessage.error(`微信上传图片失败:${res}`)
        }
      },
      fail:function(e) {
        store.commit('snack/error', `微信上传图片异常:${JSON.stringify(e)}`)
        ElMessage.error(`微信上传图片异常:${JSON.stringify(e)}`)
      }
    })
  })
vite.config.js
@@ -8,9 +8,9 @@
export default defineConfig({
  base: '/examination/verify',
  plugins: [vue(), vueDevTools()],
  // esbuild: {
  //   drop: ['console', 'debugger']
  // },
  esbuild: {
    drop: ['console', 'debugger']
  },
  define: {
    // 注入构建时间戳到代码中
    '__BUILD_TIME__': JSON.stringify(timestamp)