import Vue from 'vue'; import App from './App'; Vue.config.productionTip = false; App.mpType = 'app'; // 此处为演示Vue.prototype使用,非uView的功能部分 Vue.prototype.vuePrototype = '枣红'; import uWeb from "@/utils/uni.webview.js"; Vue.prototype.$uWeb = uWeb; // 引入全局uView import uView from 'uview-ui'; Vue.use(uView); import Vconsole from "vconsole"; let vConsole = new Vconsole() Vue.use(vConsole) import { hiPrintPlugin } from 'vue-plugin-hiprint'; Vue.use(hiPrintPlugin, '$pluginName'); import jquery from "jquery"; import axios from 'axios' Vue.prototype.$ = jquery; Vue.prototype.$http= axios // new Vue({ // el: '#app', // render: h => h(App) // }); // 此处为演示vuex使用,非uView的功能部分 import wxUtil from './utils/wxUtil' Vue.prototype.$wxUtil = wxUtil; Vue.prototype.$share = wxUtil.setShareInfo; //点击事件防抖 import jiuaiDebounce from './utils/jiuai-debounce.js' Vue.prototype.$jiuaiDebounce = jiuaiDebounce; // 由于微信小程序的运行机制问题,需声明如下一行,H5和APP非必填 const app = new Vue({ ...App, }); // http拦截器,将此部分放在new Vue()和app.$mount()之间,才能App.vue中正常使用 import httpInterceptor from '@/common/http.interceptor.js'; Vue.use(httpInterceptor, app); // http接口API抽离,免于写url或者一些固定的参数 import httpApi from '@/common/http.api.js'; Vue.use(httpApi, app); app.$mount();