123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101 |
- import Vue from 'vue'
- import App from './App'
- import store from "store";
- import uView from "uview-ui";
- Vue.use(uView);
- Vue.config.productionTip = false
- import {
- Base64
- } from 'js-base64'
- Vue.prototype.$Base64 = Base64
- import {
- toast,
- successToast,
- showLoading,
- tipLoading,
- hideLoading,
- modal,
- navPage,
- redPage,
- backPage,
- callPhone,
- copy,
- getLocation,
- getAddress,
- } from "common/utils/common"
- import {
- navToPage
- } from "common/utils/navPag"
- Vue.prototype.$navToPage = navToPage;
- Vue.prototype.$H5Href = process.env.VUE_APP_HREF;
- Vue.prototype.$toast = toast;
- Vue.prototype.$successToast = successToast;
- Vue.prototype.$showLoading = showLoading;
- Vue.prototype.$tipLoading = tipLoading;
- Vue.prototype.$hideLoading = hideLoading;
- Vue.prototype.$modal = modal;
- Vue.prototype.$navPage = navPage;
- Vue.prototype.$redPage = redPage;
- Vue.prototype.$backPage = backPage;
- Vue.prototype.$callPhone = callPhone;
- Vue.prototype.$copy = copy;
- Vue.prototype.$getLocation = getLocation;
- Vue.prototype.$getAddress = getAddress;
- // 注入全局
- import pages from 'mixins';
- Vue.mixin(pages);
- App.mpType = 'app'
- import api from '@/common/http/'
- Vue.prototype.$api = api
- import * as filters from './filters/index.js' // global filters
- // register global utility filters
- Object.keys(filters).forEach(key => {
- Vue.filter(key, filters[key])
- })
- import custom from '@/components/custom.vue';
- import Loading from '@/components/Loading.vue';
- import zjPageLayout from "@/components/zj-container/zj-page-layout.vue"
- Vue.component('custom', custom);
- Vue.component('Loading', Loading);
- Vue.component('zjPageLayout', zjPageLayout);
- import {
- getUserInfo
- } from "@/common/utils/util.js";
- Vue.prototype.$getUserInfo = getUserInfo;
- // #ifdef H5
- import {
- router,
- RouterMount
- } from 'router'
- Vue.use(router)
- import Mylink from 'uni-simple-router/dist/link.vue'
- // 组件式导航
- Vue.component('my-link', Mylink)
- // #endif
- // 渲染图片文件
- Vue.prototype.$imageUrl = process.env.VUE_APP_BASE_URL + process.env.VUE_APP_BASE_API + '/img/get?key=';
- const app = new Vue({
- ...App,
- store
- })
- //v1.3.5起 H5端 你应该去除原有的app.$mount();使用路由自带的渲染方式
- // #ifdef H5
- RouterMount(app, router, '#app')
- // #endif
- // #ifndef H5
- app.$mount(); //为了兼容小程序及app端必须这样写才有效果
- // #endif
|