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.
64 lines
1.3 KiB
64 lines
1.3 KiB
import Vue from 'vue'
|
|
import App from './App'
|
|
import mixin from '@/common/mixin.js';
|
|
import * as API from '@/common/api.js';
|
|
import * as $scene from '@/common/scene.js';
|
|
import * as $shared from '@/common/shared.js';
|
|
import { uploadFile } from '@/common/uploadFile.js'
|
|
|
|
Vue.config.productionTip = false
|
|
|
|
App.mpType = 'app'
|
|
Vue.mixin(mixin);
|
|
|
|
// 将API注入全局
|
|
Vue.prototype.API = API;
|
|
// 场景值
|
|
Vue.prototype.$scene = $scene;
|
|
// 全局共享方法
|
|
Vue.prototype.$shared = $shared;
|
|
|
|
Vue.prototype.uploadFile = uploadFile
|
|
|
|
// 引入全局uView
|
|
import uView from 'uview-ui'
|
|
Vue.use(uView);
|
|
|
|
import { $http } from '@/common/http.js';
|
|
Vue.prototype.$http = $http;
|
|
|
|
// 价格组件
|
|
import lfPrice from './components/lf-price/lf-price.vue';
|
|
Vue.component('lf-price', lfPrice);
|
|
|
|
//骨架屏
|
|
import Skeleton from './components/my-uni-skeleton/index.vue'
|
|
Vue.component('skeleton', Skeleton);
|
|
|
|
// 无数据
|
|
import myNocontent from './components/my-nocontent/my-nocontent.vue';
|
|
Vue.component('my-nocontent', myNocontent);
|
|
|
|
Vue.prototype.$toast=msg=>{
|
|
uni.showToast({
|
|
icon:'none',
|
|
title:msg
|
|
})
|
|
}
|
|
|
|
//路由跳转
|
|
Vue.prototype.$routerGo = (obj) => {
|
|
uni.navigateTo({
|
|
url: obj
|
|
})
|
|
}
|
|
|
|
const app = new Vue({
|
|
...App
|
|
})
|
|
|
|
// 引入http拦截器
|
|
import httpInterceptor from '@/common/http.interceptor.js'
|
|
Vue.use(httpInterceptor, app);
|
|
|
|
app.$mount();
|