main.js 824 B

12345678910111213141516171819202122232425262728
  1. import App from './App'
  2. import Vue from 'vue'
  3. import uView from "uview-ui";
  4. // import WebIM from './newSDK/Easemob-chat.js'
  5. // import {conn} from './utils/WebIM';
  6. // import WebIM from 'easemob-websdk'
  7. Vue.prototype.$url = 'http://jiaocai.com/'
  8. Vue.prototype.$openimage = function(urls, index) {
  9. uni.previewImage({
  10. urls: urls,
  11. current: index
  12. })
  13. }
  14. Vue.use(uView);
  15. import './uni.promisify.adaptor'
  16. Vue.config.productionTip = false
  17. App.mpType = 'app'
  18. const app = new Vue({
  19. // WebIM,
  20. ...App
  21. })
  22. // http拦截器,此为需要加入的内容,如果不是写在common目录,请自行修改引入路径
  23. import httpInterceptor from '@/common/http.interceptor.js'
  24. // 这里需要写在最后,是为了等Vue创建对象完成,引入"app"对象(也即页面的"this"实例)
  25. Vue.use(httpInterceptor, app)
  26. app.$mount()