Browse Source

新增公众号端调试功能

master
朱耘稷 4 years ago
parent
commit
0225154ffd
  1. 9
      App.vue
  2. 1
      package.json
  3. 10
      utils/vconsole.min.js

9
App.vue

@ -1,5 +1,8 @@
<script> <script>
import Vue from 'vue' import Vue from 'vue'
// #ifdef H5
var VConsole = require('@/utils/vconsole.min.js');
// #endif
export default { export default {
onLaunch: function() { onLaunch: function() {
const updateManager = uni.getUpdateManager() const updateManager = uni.getUpdateManager()
@ -37,7 +40,11 @@ export default {
console.log("App Hide"); console.log("App Hide");
}, },
mounted() { mounted() {
this.setAppInfo() // #ifdef H5
var vConsole = new VConsole();
console.log('开启调试');
// #endif
this.setAppInfo()
}, },
methods: { methods: {
// //

1
package.json

@ -16,6 +16,7 @@
"jweixin-module": "^1.6.0", "jweixin-module": "^1.6.0",
"miniapp-color-thief": "^1.0.5", "miniapp-color-thief": "^1.0.5",
"vue-ydui": "^1.2.6", "vue-ydui": "^1.2.6",
"vconsole": "^3.3.4",
"wechat-jssdk": "^5.0.4" "wechat-jssdk": "^5.0.4"
}, },
"devDependencies": { "devDependencies": {

10
utils/vconsole.min.js vendored

File diff suppressed because one or more lines are too long
Loading…
Cancel
Save