import Vue from 'vue' import App from './App' var getStackTrace = function() { var obj = {}; Error.captureStackTrace(obj, getStackTrace); return obj.stack; }; console.oldLog = console.log; console.log = function(str) { uni.$emit("onLog", str); //这里可以操作给服务器 console.oldLog(str); } import store from './util/util-js/store.js' import testWebSocket from './util/util-js/webSocket.js' Vue.config.productionTip = false Vue.prototype.$store = store Vue.prototype.$testWS = testWebSocket; App.mpType = 'app' const app = new Vue({ store, ...App }) app.$mount()