main.js 696 B

12345678910111213141516171819202122232425262728293031323334353637
  1. import App from './App'
  2. import appPush from '@/js_sdk/levine-APPPush/levine-APPPush/plugins/APPPush/index.js'
  3. import Print from 'vue3-print-nb'
  4. // #ifndef VUE3
  5. import Vue from 'vue'
  6. import './uni.promisify.adaptor'
  7. Vue.config.productionTip = false
  8. App.mpType = 'app'
  9. const app = new Vue({
  10. ...App
  11. })
  12. app.$mount()
  13. // #endif
  14. // 封装弹框的方法
  15. uni.$showMsg = (title = '数据请求失败!', duration = 1500) => {
  16. uni.showToast({
  17. title,
  18. duration,
  19. icon: 'none'
  20. })
  21. }
  22. uni.$appPush = appPush
  23. // #ifdef VUE3
  24. import { createSSRApp } from 'vue'
  25. export function createApp() {
  26. const app = createSSRApp(App)
  27. app.use(Print)
  28. // app.use(appPush)
  29. return {
  30. app
  31. }
  32. }
  33. // #endif