| 1234567891011121314151617181920212223242526272829303132333435 |
- import App from './App'
- import uView from './uni_modules/uview-ui'
- import request from './utils/request.js'
- import apiUrl from './utils/apiUrl.js'
- import localStorage from './utils/storage.js'
- // #ifndef VUE3
- import Vue from 'vue'
- Vue.config.productionTip = false
- App.mpType = 'app'
- const app = new Vue({
- ...App,
- })
- Vue.use({
- install(Vue, options) {
- Vue.prototype.$request = request; // 请求
- Vue.prototype.$api = apiUrl; // 请求地址
- Vue.prototype.$storage = localStorage;
- }
- });
- Vue.use(uView)
- app.$mount()
- // #endif
- // #ifdef VUE3
- import { createSSRApp } from 'vue'
- export function createApp() {
- const app = createSSRApp(App)
- return {
- app
- }
- }
- // #endif
|