main.js 593 B

12345678910111213141516171819202122232425262728293031323334353637
  1. import Vue from 'vue'
  2. import App from './App'
  3. var getStackTrace = function() {
  4. var obj = {};
  5. Error.captureStackTrace(obj, getStackTrace);
  6. return obj.stack;
  7. };
  8. console.oldLog = console.log;
  9. console.log = function(str) {
  10. uni.$emit("onLog", str);
  11. //这里可以操作给服务器
  12. console.oldLog(str);
  13. }
  14. import store from './util/util-js/store.js'
  15. import testWebSocket from './util/util-js/webSocket.js'
  16. Vue.config.productionTip = false
  17. Vue.prototype.$store = store
  18. Vue.prototype.$testWS = testWebSocket;
  19. App.mpType = 'app'
  20. const app = new Vue({
  21. store,
  22. ...App
  23. })
  24. app.$mount()