ai-clone/frontend-ai/main.js
2026-03-05 14:29:21 +08:00

27 lines
529 B
JavaScript

import App from './App'
import { API_BASE } from '@/config/api.js'
// #ifndef VUE3
import Vue from 'vue'
import './uni.promisify.adaptor'
Vue.config.productionTip = false
// 设置全局API_BASE
Vue.prototype.$apiBase = API_BASE
App.mpType = 'app'
const app = new Vue({
...App
})
app.$mount()
// #endif
// #ifdef VUE3
import { createSSRApp } from 'vue'
export function createApp() {
const app = createSSRApp(App)
// 设置全局API_BASE
app.config.globalProperties.$apiBase = API_BASE
return {
app
}
}
// #endif