{"id":185821,"date":"2022-09-09T19:48:16","date_gmt":"2022-09-09T11:48:16","guid":{"rendered":"http:\/\/www.idc.net\/help\/185821\/"},"modified":"2022-09-09T19:48:16","modified_gmt":"2022-09-09T11:48:16","slug":"%e5%90%8e%e6%b5%aa%e4%ba%91%e5%b0%8f%e7%a8%8b%e5%ba%8f%e6%95%99%e7%a8%8b%ef%bc%9a%e5%be%ae%e4%bf%a1%e5%b0%8f%e7%a8%8b%e5%ba%8f-qa","status":"publish","type":"post","link":"https:\/\/idc.net\/help\/185821\/","title":{"rendered":"\u540e\u6d6a\u4e91\u5c0f\u7a0b\u5e8f\u6559\u7a0b\uff1a\u5fae\u4fe1\u5c0f\u7a0b\u5e8f Q&#038;A"},"content":{"rendered":"<\/p>\n<h2>\u4e0d\u80fd\u76f4\u63a5\u64cd\u4f5c Page.data <\/p>\n<hr>\n<\/h2>\n<p>\u907f\u514d\u5728\u76f4\u63a5\u5bf9 Page.data \u8fdb\u884c\u8d4b\u503c\u4fee\u6539\uff0c\u8bf7\u4f7f\u7528 Page.setData \u8fdb\u884c\u64cd\u4f5c\u624d\u80fd\u5c06\u6570\u636e\u540c\u6b65\u5230\u9875\u9762\u4e2d\u8fdb\u884c\u6e32\u67d3<\/p>\n<h2>\u600e\u4e48\u83b7\u53d6\u7528\u6237\u8f93\u5165<\/h2>\n<hr>\n<p>\u80fd\u591f\u83b7\u53d6\u7528\u6237\u8f93\u5165\u7684\u7ec4\u4ef6\uff0c\u9700\u8981\u4f7f\u7528\u7ec4\u4ef6\u7684\u5c5e\u6027bindchange\u5c06\u7528\u6237\u7684\u8f93\u5165\u5185\u5bb9\u540c\u6b65\u5230AppService<\/p>\n<pre><code>&lt;input id=\"myInput\" bindblur=\"bindBlur\" \/&gt;\n<\/code><\/pre>\n<pre><code>var inputContent = {}\n\nPage({\n    data:{\n      inputContent: {}\n    },\n    bindChange:function(e){\n        inputContent[e.currentTarget.id] = e.detail.value\n    }\n})<\/code><\/pre>\n<h2>\u4e3a\u4ec0\u4e48\u811a\u672c\u5185\u4e0d\u80fd\u4f7f\u7528window\u5bf9\u8c61<\/h2>\n<hr>\n<p>\u9875\u9762\u7684\u811a\u672c\u903b\u8f91\u662f\u5728<code>JsCore<\/code>\u4e2d\u8fd0\u884c\uff0c<code>JsCore<\/code>\u662f\u4e00\u4e2a\u6ca1\u6709\u7a97\u53e3\u5bf9\u8c61\u7684\u73af\u5883\uff0c\u6240\u4ee5\u4e0d\u80fd\u5728\u811a\u672c\u4e2d\u4f7f\u7528<code>window<\/code>\uff0c\u4e5f\u65e0\u6cd5\u5728\u811a\u672c\u4e2d\u64cd\u4f5c\u7ec4\u4ef6<\/p>\n<h2>\u4e3a\u4ec0\u4e48zepto\/jquery\u65e0\u6cd5\u4f7f\u7528<\/h2>\n<hr>\n<p>zepto\/jquery\u4f1a\u4f7f\u7528\u5230window\u5bf9\u8c61\u548cdocument\u5bf9\u8c61\uff0c\u6240\u4ee5\u65e0\u6cd5\u4f7f\u7528\u3002<\/p>\n<h2>wx.navigateTo\u65e0\u6cd5\u6253\u5f00\u9875\u9762<\/h2>\n<hr>\n<p>\u4e00\u4e2a\u5e94\u7528\u540c\u65f6\u53ea\u80fd\u6253\u5f005\u4e2a\u9875\u9762\uff0c\u5f53\u5df2\u7ecf\u6253\u5f00\u4e865\u4e2a\u9875\u9762\u4e4b\u540e\uff0cwx.navigateTo\u4e0d\u80fd\u6b63\u5e38\u6253\u5f00\u65b0\u9875\u9762\u3002\u8bf7\u907f\u514d\u591a\u5c42\u7ea7\u7684\u4ea4\u4e92\u65b9\u5f0f\uff0c\u6216\u8005\u4f7f\u7528wx.redirectTo<\/p>\n<h2>\u6837\u5f0f\u8868\u4e0d\u652f\u6301\u7ea7\u8054\u9009\u62e9\u5668<\/h2>\n<hr>\n<p>WXSS\u652f\u6301\u4ee5<code>.<\/code>\u5f00\u59cb\u7684\u7c7b\u9009\u62e9\u5668\u3002\u5982\uff1a<\/p>\n<pre><code>  .normal_view{\n    color: #000000;\n    padding: 10px;\n  }<\/code><\/pre>\n<p>\u53ef\u4ee5\u4f7f\u7528\u6807\u7b7e\u9009\u62e9\u5668\uff0c\u63a7\u5236\u540c\u4e00\u7c7b\u7ec4\u4ef6\u7684\u6837\u5f0f\u3002\u5982\uff1a\u4f7f\u7528input\u6807\u7b7e\u9009\u62e9\u5668\u63a7\u5236<code>&lt;input\/&gt;<\/code>\u7684\u9ed8\u8ba4\u6837\u5f0f\u3002<\/p>\n<pre><code>  input{\n    width: 100px;\n  }<\/code><\/pre>\n<h2>\u672c\u5730\u8d44\u6e90\u65e0\u6cd5\u901a\u8fc7WXSS\u83b7\u53d6<\/h2>\n<hr>\n<p>background-image\uff1a\u53ef\u4ee5\u4f7f\u7528\u7f51\u7edc\u56fe\u7247\uff0c\u6216\u8005base64\uff0c\u6216\u8005\u4f7f\u7528<code>&lt;image\/&gt;<\/code>\u6807\u7b7e<\/p>\n<h2>\u5982\u4f55\u4fee\u6539\u7a97\u53e3\u7684\u80cc\u666f\u8272<\/h2>\n<hr>\n<p>\u4f7f\u7528page\u6807\u7b7e\u9009\u62e9\u5668\uff0c\u53ef\u4ee5\u4fee\u6539\u9876\u5c42\u8282\u70b9\u7684\u6837\u5f0f<\/p>\n<pre><code>page{\n  display:block;\n  min-height:100%;\n  background-color:red;\n}<\/code><\/pre>\n<\/p>\n<h2>HTTPS \u8bf7\u6c42\u4e0d\u6210\u529f <\/p>\n<hr>\n<\/h2>\n<ol>\n<li>tls \u4ec5\u652f\u6301 1.2 \u53ca\u4ee5\u4e0a\u7248\u672c<\/li>\n<li>\u90e8\u5206 Android \u673a\u578b\u9700\u8981 tls1.0 \u6216\u8005 tls1.1\uff0c\u6240\u4ee5\u8bf7\u786e\u4fdd\u670d\u52a1\u5668\u7684 tls \u7248\u672c\u4e3a 1.0\u30011.1\u30011.2<\/li>\n<\/ol>\n<h2>\u7f51\u7edc\u8bf7\u6c42\u7684 referer <\/p>\n<hr>\n<\/h2>\n<p>\u7f51\u7edc\u8bf7\u6c42\u7684 referer \u662f\u4e0d\u53ef\u4ee5\u8bbe\u7f6e\u7684\uff0c\u683c\u5f0f\u56fa\u5b9a\u4e3a <code>https:\/\/servicewechat.com\/{appid}\/{version}\/page-frame.html<\/code>\uff0c\u5176\u4e2d<code>{appid}<\/code>\u4e3a\u5c0f\u7a0b\u5e8f\u7684 appid\uff0c<code>{version}<\/code>\u4e3a\u5c0f\u7a0b\u5e8f\u7684\u7248\u672c\u53f7\uff0c\u7248\u672c\u53f7\u4e3a 0 \u8868\u793a\u4e3a\u5f00\u53d1\u7248\u3001\u4f53\u9a8c\u7248\u4ee5\u53ca\u5ba1\u6838\u7248\u672c\uff0c\u7248\u672c\u53f7\u4e3a devtools \u8868\u793a\u4e3a\u5f00\u53d1\u8005\u5de5\u5177\uff0c\u5176\u4f59\u4e3a\u6b63\u5f0f\u7248\u672c\u3002<\/p>\n<h2>\u4e3a\u4ec0\u4e48 map \u7ec4\u4ef6\u603b\u662f\u5728\u6700\u4e0a\u5c42 <\/p>\n<hr>\n<\/h2>\n<p><code>map<\/code>\u3001<code>canvas<\/code>\u3001<code>video<\/code>\u3001<code>textarea<\/code>\u662f\u7531\u5ba2\u6237\u7aef\u521b\u5efa\u7684\u539f\u751f\u7ec4\u4ef6\uff0c\u539f\u751f\u7ec4\u4ef6\u7684\u5c42\u7ea7\u662f\u6700\u9ad8\u7684\uff0c\u6240\u4ee5\u9875\u9762\u4e2d\u7684\u5176\u4ed6\u7ec4\u4ef6\u65e0\u8bba\u8bbe\u7f6e<code>z-index<\/code>\u4e3a\u591a\u5c11\uff0c\u90fd\u65e0\u6cd5\u76d6\u5728\u539f\u751f\u7ec4\u4ef6\u4e0a\u3002 \u539f\u751f\u7ec4\u4ef6\u6682\u65f6\u8fd8\u65e0\u6cd5\u653e\u5728<code>scroll-view<\/code>\u4e0a\uff0c\u4e5f\u65e0\u6cd5\u5bf9\u539f\u751f\u7ec4\u4ef6\u8bbe\u7f6e<code>css<\/code>\u52a8\u753b\u3002<\/p>\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u4e0d\u80fd\u76f4\u63a5\u64cd\u4f5c Page.data \u907f\u514d\u5728\u76f4\u63a5\u5bf9 Page.data \u8fdb\u884c\u8d4b\u503c\u4fee\u6539\uff0c\u8bf7\u4f7f\u7528 Page.setDa [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[182398],"tags":[],"class_list":["post-185821","post","type-post","status-publish","format-standard","hentry","category-mini-program"],"_links":{"self":[{"href":"https:\/\/idc.net\/help\/wp-json\/wp\/v2\/posts\/185821","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/idc.net\/help\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/idc.net\/help\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/idc.net\/help\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/idc.net\/help\/wp-json\/wp\/v2\/comments?post=185821"}],"version-history":[{"count":0,"href":"https:\/\/idc.net\/help\/wp-json\/wp\/v2\/posts\/185821\/revisions"}],"wp:attachment":[{"href":"https:\/\/idc.net\/help\/wp-json\/wp\/v2\/media?parent=185821"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/idc.net\/help\/wp-json\/wp\/v2\/categories?post=185821"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/idc.net\/help\/wp-json\/wp\/v2\/tags?post=185821"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}