{"id":20,"date":"2021-06-22T22:26:53","date_gmt":"2021-06-22T14:26:53","guid":{"rendered":"http:\/\/www.tysql.com\/?p=20"},"modified":"2021-06-22T22:26:53","modified_gmt":"2021-06-22T14:26:53","slug":"uni-app%e6%95%b0%e6%8d%ae%e7%bc%93%e5%ad%98","status":"publish","type":"post","link":"https:\/\/www.tysql.com\/index.php\/2021\/06\/22\/uni-app%e6%95%b0%e6%8d%ae%e7%bc%93%e5%ad%98\/","title":{"rendered":"uni-app\u6570\u636e\u7f13\u5b58"},"content":{"rendered":"\n<p>\u540c\u6b65<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:false,&quot;languageLabel&quot;:false,&quot;fullScreenButton&quot;:false,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;apl&quot;,&quot;mime&quot;:&quot;text\/apl&quot;,&quot;theme&quot;:&quot;darcula&quot;,&quot;lineNumbers&quot;:true,&quot;styleActiveLine&quot;:true,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;APL&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;apl&quot;}\">\u8bfb\u53d6: const value = uni.getStorageSync('storage_key');\n\u5199\u5165: uni.setStorageSync('storage_key', 'hello');<\/pre><\/div>\n\n\n\n<p>\u5f02\u6b65<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:false,&quot;languageLabel&quot;:false,&quot;fullScreenButton&quot;:false,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;apl&quot;,&quot;mime&quot;:&quot;text\/apl&quot;,&quot;theme&quot;:&quot;darcula&quot;,&quot;lineNumbers&quot;:true,&quot;styleActiveLine&quot;:true,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;APL&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;apl&quot;}\">\u8bfb\u53d6:\nuni.getStorage({\n    key: 'storage_key',\n    success: function (res) {\n        console.log(res.data);\n    }\n});\n\u5199\u5165:\n  uni.setStorage({\n    key: 'storage_key',\n    data: 'hello',\n    success: function () {\n        console.log('success');\n    }\n});<\/pre><\/div>\n","protected":false},"excerpt":{"rendered":"<p>\u540c\u6b65 \u5f02\u6b65<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7],"tags":[],"class_list":["post-20","post","type-post","status-publish","format-standard","hentry","category-uni-app"],"_links":{"self":[{"href":"https:\/\/www.tysql.com\/index.php\/wp-json\/wp\/v2\/posts\/20","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.tysql.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.tysql.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.tysql.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.tysql.com\/index.php\/wp-json\/wp\/v2\/comments?post=20"}],"version-history":[{"count":1,"href":"https:\/\/www.tysql.com\/index.php\/wp-json\/wp\/v2\/posts\/20\/revisions"}],"predecessor-version":[{"id":21,"href":"https:\/\/www.tysql.com\/index.php\/wp-json\/wp\/v2\/posts\/20\/revisions\/21"}],"wp:attachment":[{"href":"https:\/\/www.tysql.com\/index.php\/wp-json\/wp\/v2\/media?parent=20"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.tysql.com\/index.php\/wp-json\/wp\/v2\/categories?post=20"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.tysql.com\/index.php\/wp-json\/wp\/v2\/tags?post=20"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}