import { createApp } from 'vue'
import App from './App.vue'
import { createPinia } from "pinia"
import 'vant/lib/index.css';
import { isMobile } from '@/plugins';
import { wxShare } from '@/plugins/wxshare';
import VConsole from 'vconsole';

const app = createApp(App)

// 定义引入图片地址的全局方法
app.config.globalProperties.imgUrl = (url) => {
    return new URL(`./assets/images/${url}`, import.meta.url).href
}


// 初始化我的方法
// app.config.globalProperties.myPlugin = h5plugin

// 微信分享配置
wxShare({
    title: '打卡理想假期 五一好礼等你',
    desc: '穿越城市地标，解锁你的财富基因',
})

// 测试环境开vconsole
if (import.meta.env.VITE_MODE != 'dev') {
    const vConsole = new VConsole();
}




app.use(createPinia())
app.mount('#app')
console.log('Mode:', import.meta.env.VITE_MODE);
