main.js 621 B

123456789101112131415161718192021222324252627282930313233
  1. import Vue from 'vue'
  2. import App from './App.vue'
  3. import request from './config/request.js'
  4. import {
  5. gotoPage
  6. } from './common/util.js'
  7. Vue.config.productionTip = false
  8. Vue.prototype.$request = request
  9. Vue.prototype.gotoPage = gotoPage
  10. // 封装登录检查
  11. Vue.prototype.checkLogin = function() {
  12. var token = uni.getStorageSync('rrc.token');
  13. if (token == '') {
  14. return false;
  15. }
  16. return true;
  17. }
  18. // 引入全局uView2.0
  19. import uView from 'uview-ui'
  20. Vue.use(uView);
  21. // 如此配置即可
  22. uni.$u.config.unit = 'rpx'
  23. App.mpType = 'app'
  24. const app = new Vue({
  25. ...App
  26. })
  27. app.$mount()