1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950 |
- import Vue from 'vue'
- import App from './App'
- import * as filters from './common/filters.js' // global filters
- import urls from './common/config.js'
- import utils from './common/utils.js'
- // 注册
- const toReg =()=>{
- uni.redirectTo({
- url: '/pages/login/reg'
- });
- }
- // 登录
- const toLogin =()=>{
- uni.redirectTo({
- url: '/pages/login/login'
- });
- }
- // 找回密码
- const toForgot =()=>{
- uni.redirectTo({
- url: '/pages/login/forgot'
- });
- }
- // 公共跳转
- Vue.prototype.$navs={toReg, toLogin, toForgot};
- // 通用工具类
- Vue.prototype.$utils = utils
- // 注册全局过滤器
- Object.keys(filters).forEach(key => {
- Vue.filter(key, filters[key])
- })
- // 地址配置
- Vue.prototype.$urls = urls
- Vue.config.productionTip = false
- App.mpType = 'app'
- const app = new Vue({
- ...App
- })
- app.$mount()
|