import App from './App'; import { createSSRApp, getCurrentInstance } from 'vue'; import { setupPinia } from './sheep/store'; import * as utils from './utils/index' import sheep from '@/sheep'; import { fen2yuan } from '@/sheep/hooks/useGoods'; import { debounce } from '@/utils/common' export function createApp() { const app = createSSRApp(App); setupPinia(app); app.config.globalProperties.$url = 'https://sycbuck.oss-cn-hangzhou.aliyuncs.com/app/' app.config.globalProperties.$ygUrl = 'https://swzhyg.oss-cn-hangzhou.aliyuncs.com/static/' app.config.globalProperties.utils = utils; app.config.globalProperties.$sheep = sheep; app.config.globalProperties.$fen2yuan = fen2yuan; app.config.globalProperties.$debounce = debounce; app.config.globalProperties.$proxy = getCurrentInstance(); return { app, }; }