12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879 |
- // #ifndef VUE3
- import Vue from 'vue'
- import App from './App'
- // import navBar from '@/components/navBar/index.vue'
- // Vue.component('navBar', navBar)
- import uView from '@/uni_modules/uview-ui'
- Vue.use(uView)
- import navBar from '@/components/navBar/index.vue'
- Vue.component('navBar', navBar)
- import store from 'store/index.js'
- Vue.prototype.$store = store
- // 常见功能函数封装
- Vue.prototype.$toast = (title, icon = "none", duration = 1500) => {
- uni.showToast({
- title,
- icon,
- duration
- })
- }
- // console.log('uploadUrl----', uploadUrl);
- import uploadUrl from '@/common/config.js'
- Vue.prototype.$picUrl = uploadUrl.picUrl
- Vue.prototype.$picBase = uploadUrl.picBase
- Vue.prototype.$baseUrl = uploadUrl.baseUrl
- Vue.prototype.$appId = uploadUrl.appId
- Vue.prototype.$shareType = uploadUrl.shareModel
- // 常见功能函数封装
- Vue.prototype.$toast = (title, icon = "none", duration = 1500) => {
- uni.showToast({
- title,
- icon,
- duration
- })
- }
- // 引入请求封装
- require('./utils/request/index')(app)
- Vue.config.productionTip = false
- App.mpType = 'app'
- const app = new Vue({
- ...App
- })
- app.$mount()
- // #endif
- // #ifdef VUE3
- import {
- createSSRApp
- } from 'vue'
- import App from './App.vue'
- export function createApp() {
- const app = createSSRApp(App)
- return {
- app
- }
- }
- // #endif
|