康巴易测肤/伤疤uniapp小程序类
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

53 lignes
1.1KB

  1. import App from './App'
  2. import Vue from 'vue'
  3. import './uni.promisify.adaptor'
  4. Vue.config.productionTip = false
  5. App.mpType = 'app'
  6. // 引入uView2.0
  7. import uView from "uview-ui"
  8. Vue.use(uView)
  9. // 引入router
  10. import {
  11. router,
  12. RouterMount
  13. } from '@/router'
  14. Vue.use(router)
  15. // 引入vuex
  16. import store from '@/store'
  17. // 引入全局api
  18. import api from '@/api'
  19. import urls from '@/utils/pictureUrls.js'
  20. Vue.prototype.$api = api.api
  21. Vue.prototype.$baseUrl = api.baseUrl
  22. Vue.prototype.$themeColor = '#F3D4A3'
  23. Vue.prototype.$themeDeepColor = '#E19F4B'
  24. Vue.prototype.$urls = urls
  25. import util from 'utils/index.js'
  26. Vue.prototype.$util = util
  27. // #ifdef APP-PLUS
  28. // 请勿删除此代码块
  29. plus.runtime.quit = () => {
  30. };
  31. plus.nativeUI.toast = () => {
  32. return false;
  33. };
  34. // 请勿删除此代码块
  35. // #endif
  36. const app = new Vue({
  37. ...App,
  38. store
  39. })
  40. // uni-simple-router v1.3.5起 H5端 你应该去除原有的app.$mount();使用路由自带的渲染方式
  41. // #ifdef H5
  42. RouterMount(app, router, '#app')
  43. // #endif
  44. // #ifndef H5
  45. app.$mount(); //为了兼容小程序及app端必须这样写才有效果
  46. // #endif