Uni-app stepping on the pit notes
2. Normal page jump. The page configured by tabbar requires uni.switchTab (), and the url cannot pass a value.
3.uni.reLaunch () jumps to any page (overcoming the problem that ordinary page jumps cannot pass the page url configured by tabbar). )
4. The midButton that highlights the middle button can only be displayed in even numbers, but it only supports the real machine environment, and the browser has no influence.
6. Page life cycle (considering the impact of page refresh):
Online, online presentation, online reading
The application lifecycle refers to these three in app.vue.
7. The arrow function does not point to this (use with caution). If printing this on the console is undefined, it proves that the arrow function is working. Don't be greedy for convenience on special occasions. Sometimes scratching the scalp can't find the problem. This is the ghost with arrow function.
8. University. Request ({, success: function (res) {}) requests that the successfully returned data be directly assigned with this, which is invalid because it is an asynchronous function and needs a pointer: let that = this.
9.setStorageSync data cache is used for interaction between two pages, data transfer and value transfer, and is written in onLoad.
5. In breezy weather, the API provided by official website is free, with 1000 times per person per day, which is enough for practice.