This commit is contained in:
Silent YANG 2024-07-28 20:06:52 +08:00
parent 9ba81c36cb
commit d288a54108
4 changed files with 5 additions and 3 deletions

View file

@ -1 +1,2 @@
VITE_API_BASE_URL= 'http://localhost:8080' VITE_API_BASE_URL= 'http://localhost:8080'
VITE_METER_SITE = ''

View file

@ -0,0 +1 @@
VITE_METER_SITE = 'k5.vicicode.com,k5.vicicode.cn,k5.lhw711.cn,mm.md,k5.mm.md'

View file

@ -35,7 +35,7 @@
window.TextDecoder = TextDecoder; window.TextDecoder = TextDecoder;
// //
if(location.hostname == 'k5.vicicode.com' || location.hostname == 'k5.vicicode.cn' || location.hostname == 'k5.lhw711.cn' || location.hostname == 'mm.md' || location.hostname == 'k5.mm.md'){ if(import.meta.env.VITE_METER_SITE.split(',').indexOf(location.hostname) !== -1){
const aegis = new Aegis({ const aegis = new Aegis({
id: 'yr5DeslJkz3Qn20jg0', // id id: 'yr5DeslJkz3Qn20jg0', // id
reportApiSpeed: true, // reportApiSpeed: true, //

View file

@ -39,7 +39,7 @@ app.use(i18n);
app.use(globalComponents); app.use(globalComponents);
app.use(directive); app.use(directive);
if(location.hostname == 'k5.vicicode.com' || location.hostname == 'k5.vicicode.cn' || location.hostname == 'k5.lhw711.cn' || location.hostname == 'mm.md' || location.hostname == 'k5.mm.md'){ if(import.meta.env.VITE_METER_SITE.split(',').indexOf(location.hostname) !== -1){
app.use(VueMatomo, { app.use(VueMatomo, {
host: '//analytics.vicicode.com', host: '//analytics.vicicode.com',
siteId: 2, siteId: 2,