main.js 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. import App from './App'
  2. // main.js 文件
  3. import uView from "uview-ui";
  4. import './ajax/bootstrap';
  5. import JSEncrypt from 'components/jsencrypt/bin/jsencrypt.js'
  6. uni.$jsencrypt = JSEncrypt;
  7. Vue.use(uView);
  8. // #ifndef VUE3
  9. import Vue from 'vue'
  10. Vue.config.productionTip = false
  11. App.mpType = 'app'
  12. const app = new Vue({
  13. ...App
  14. })
  15. app.$mount()
  16. // #endif
  17. import '@/ajax/lcsign.js'
  18. //全局公用函数
  19. import {api} from "common.js"
  20. Vue.prototype.$api=api
  21. Vue.prototype.href=api.to
  22. Vue.prototype.rdt=api.rdt
  23. Vue.prototype.back=api.back
  24. Vue.prototype.totabar=api.totabar
  25. Vue.prototype.link=api.link
  26. //挂在vuex
  27. import store from "./store/index.js"
  28. Vue.prototype.$store=store
  29. // 引用request
  30. import request from "./ajax/index.js"
  31. Vue.prototype.$request = request
  32. // api接口管理
  33. import api1 from "./ajax/api.js"
  34. Vue.prototype.api = api1
  35. // 下载APP
  36. import down from '@/components/my/download.vue'
  37. Vue.component('down', down);
  38. // #ifdef VUE3
  39. import { createSSRApp } from 'vue'
  40. export function createApp() {
  41. const app = createSSRApp(App)
  42. return {
  43. app,
  44. store
  45. }
  46. }
  47. // #endif