<> preface

*
As a front-end developer , Now the concept of big front end is popular , Like small programs ,Android and iOS Cross end , front end H5 etc . And it's been used recently uni-app Cross end development App, Share some problems .
<>uni-app Page value transfer

<> Passing basic type data
// A page - Transfer parameters let value = " Parameter value "; uni.navigateTo({
url:`/pages/home/index?data=${value}` }); // B page - Receiving parameters onLoad(options) { let
value = options.data; }
<> Passing connection type data
// A page - Transfer parameters let obj = { value:" Parameter value " }; uni.navigateTo({
url:`/pages/home/index?data=${JSON.stringify(obj)}` }); // B page - Receiving parameters
onLoad(options) { let obj = JSON.parse(options.data); }
<> The passed data is too long or contains special characters

* Pass data when your data is too long ( such as :base64 Picture data for ) Or special data ( such as :?), If you use the above two methods, you will find that the received value is incomplete .
* So we can add it at this time encodeURIComponent and decodeURIComponent method // A page - Transfer parameters let obj = {
value:"???" }; uni.navigateTo({
url:`/pages/home/index?data=${encodeURIComponent(JSON.stringify(obj))}` }); //
B page - Receiving parameters onLoad(options) { let obj =
JSON.parse(decodeURIComponent(options.data)); }
* Um. , That's all for the time being , Keep stepping in the pit …

Technology
©2019-2020 Toolsou All rights reserved,
c Language to achieve mine clearance Games and mine source code Node.js Middle template engine 3 species Python data structure ,13 Creation methods , This is the conclusion , Great ! The situation of receiving and receiving multi-path git It's set correctly ssh, But it still prompts Permission denied (publickey) new iPhone I won't support it 5G Will lead to further decline in shipment C# Sorting method of Chinese Dictionaries 10909 rice ! Chinese fighter successfully landed in Mariana Trench MySQL8.0MGR Single owner / Multi master installation and switching Java Poor reflection performance ?