You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
58 lines
1.7 KiB
58 lines
1.7 KiB
import { createSSRApp } from 'vue';
|
|
import App from './App';
|
|
import uView from './uni_modules/vk-uview-ui'; // 引入 uView UI
|
|
import store from "./store";
|
|
import { setupHttp } from '@/utils/request.js';
|
|
import { setupTall } from '@/apis/tall.js';
|
|
import { setupProject } from '@/apis/project.js';
|
|
import { setupRole } from '@/apis/role.js';
|
|
import { setupTask } from '@/apis/task.js';
|
|
import { setupWbs } from '@/apis/wbs.js'
|
|
import dayjs from 'dayjs';
|
|
import 'dayjs/locale/zh-cn';
|
|
|
|
import cache from '@/utils/cache.js';
|
|
import cacheAndRequest from '@/utils/cacheAndRequest.js';
|
|
import storage from '@/utils/storage.js';
|
|
import time from '@/utils/time.js';
|
|
import ui from '@/utils/ui.js';
|
|
import upload from '@/utils/upload.js';
|
|
import task from '@/utils/task.js';
|
|
import timeConfig from '@/config/time';
|
|
|
|
export function createApp() {
|
|
const app = createSSRApp(App)
|
|
|
|
app.use(uView); // 使用 uView UI
|
|
app.use(store);
|
|
setupHttp(app);
|
|
setupTall(app);
|
|
setupProject(app);
|
|
setupRole(app);
|
|
setupTask(app);
|
|
setupWbs(app);
|
|
|
|
dayjs.locale('zh-cn');
|
|
|
|
app.config.globalProperties.$cache = cache;
|
|
app.config.globalProperties.$catchReq = cacheAndRequest;
|
|
app.config.globalProperties.$storage = storage;
|
|
app.config.globalProperties.$time = time;
|
|
app.config.globalProperties.$ui = ui;
|
|
app.config.globalProperties.$upload = upload;
|
|
app.config.globalProperties.$task = task;
|
|
app.config.globalProperties.$timeConfig = timeConfig;
|
|
|
|
uni.$cache = cache;
|
|
uni.$catchReq = cacheAndRequest;
|
|
uni.$storage = storage;
|
|
uni.$time = time;
|
|
uni.$ui = ui;
|
|
uni.$upload = upload;
|
|
uni.$task = task;
|
|
uni.$timeConfig = timeConfig;
|
|
|
|
return {
|
|
app
|
|
}
|
|
}
|
|
|