You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

59 lines
1.4 KiB
JavaScript

1 year ago
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();