main.js 603 B

12345678910111213141516171819202122232425262728293031
  1. import Vue from 'vue'
  2. import App from './App'
  3. import store from './store'
  4. import {
  5. myRequest
  6. } from './util/api.js'
  7. Vue.prototype.$Request = myRequest
  8. Vue.config.productionTip = false
  9. App.mpType = 'app'
  10. // 解决支付宝小程序bug
  11. Vue.config.warnHandler = function(msg) {
  12. if (!msg.includes(
  13. 'Avoid mutating a prop directly since the value will be overwritten whenever the parent component re-renders.'
  14. )) {
  15. // uniApp bug: https://ask.dcloud.net.cn/question/71966
  16. return console.warn && console.warn(msg)
  17. }
  18. }
  19. const app = new Vue({
  20. store,
  21. ...App
  22. })
  23. app.$mount()