{"id":1528,"date":"2023-03-25T15:09:04","date_gmt":"2023-03-25T07:09:04","guid":{"rendered":"https:\/\/www.appblog.cn\/?p=1528"},"modified":"2023-04-27T21:44:06","modified_gmt":"2023-04-27T13:44:06","slug":"summary-of-common-techniques-for-developing-wechat-mini-programs","status":"publish","type":"post","link":"https:\/\/www.appblog.cn\/index.php\/2023\/03\/25\/summary-of-common-techniques-for-developing-wechat-mini-programs\/","title":{"rendered":"\u5fae\u4fe1\u5c0f\u7a0b\u5e8f\u5f00\u53d1\u5e38\u7528\u6280\u5de7\u603b\u7ed3"},"content":{"rendered":"<h2>\u5706\u5f62\u5934\u50cf<\/h2>\n<pre><code class=\"language-xml\">&lt;image src=&quot;\/images\/avatar.png&quot; style=&#039;width:200rpx; height:200rpx; border-radius: 50%;&#039;&gt;&lt;\/image&gt;<\/code><\/pre>\n<p><!-- more --><\/p>\n<h2>\u62e8\u6253\u7535\u8bdd<\/h2>\n<pre><code class=\"language-xml\">&lt;text bindtap=&#039;call&#039; style=&#039;color:#1c8cff;&#039;&gt;0571-10086&lt;\/text&gt;<\/code><\/pre>\n<pre><code class=\"language-javascript\">call() {\n  wx.makePhoneCall({\n    phoneNumber: &#039;0571-10086&#039;\n  })\n}<\/code><\/pre>\n<h2>\u7a7a\u683c\u53ca\u6362\u884c<\/h2>\n<pre><code class=\"language-xml\">&lt;text decode=&quot;{{true}}&quot;&gt;\n  A&nbsp;p&nbsp;p&nbsp;B&nbsp;l&nbsp;o&nbsp;g&nbsp;.&nbsp;C&nbsp;N&nbsp;\\n\u4f60&nbsp;&nbsp;&nbsp;&nbsp;\u597d\n&lt;\/text&gt;<\/code><\/pre>\n<pre><code class=\"language-xml\">&lt;text&gt;\u4f60\\t\u597d\uff01AppBlog.CN\\n\u8fd9\u662f\u7b2c\u4e8c\u884c&lt;\/text&gt;<\/code><\/pre>\n<blockquote>\n<p>PS\uff1a\u5fc5\u987b\u5728text\u6807\u7b7e\u4e2d\uff01<\/p>\n<p>PS\uff1a\u7ecf\u6d4b\u8bd5\uff0c\u591a\u4e2a\\t\u53ea\u80fd\u663e\u793a\u4e00\u4e2a\u7a7a\u683c<\/p>\n<\/blockquote>\n<h2>\u5bf9\u8c61\u4e0e\u5b57\u7b26\u4e32\u4e92\u8f6c<\/h2>\n<pre><code class=\"language-javascript\">JSON.stringify(user)\nJSON.parse(json)<\/code><\/pre>\n<h2>\u5bf9\u8c61\u4f20\u9012<\/h2>\n<pre><code class=\"language-javascript\">wx.navigateTo({\n  url: &#039;\/pages\/index\/index?from=index&amp;user=&#039; + JSON.stringify(this.data.user)\n})\n\nvar user = JSON.parse(options.user);<\/code><\/pre>\n<h2>\u5143\u7d20\u8986\u76d6\uff1aposition:absolute<\/h2>\n<pre><code class=\"language-xml\">&lt;view style=&quot;position:absolute; left:0rpx; top:0rpx; width:100%; background-color:rgba(0,0,0,.25); visibility:{{visibility}};&quot;&gt;\n  &lt;image src=&quot;\/images\/share_tip.png&quot;&gt;&lt;\/image&gt;\n&lt;\/view&gt;<\/code><\/pre>\n<h2>\u56de\u9000\u81f3\u6700\u524d\u9875\u9762<\/h2>\n<pre><code class=\"language-javascript\">var pages = getCurrentPages(); \/\/\u83b7\u53d6\u5f53\u524d\u9875\u9762\u4fe1\u606f\u6808\nconsole.log(&quot;pages.length: &quot; + pages.length)\nwx.navigateBack({\n  delta: pages.length\n})<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\u5706\u5f62\u5934\u50cf &lt;image src=&quot;\/images\/avatar.png&quot; style [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[46],"tags":[],"class_list":["post-1528","post","type-post","status-publish","format-standard","hentry","category-wechat-mini-program"],"_links":{"self":[{"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/posts\/1528","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/comments?post=1528"}],"version-history":[{"count":0,"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/posts\/1528\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/media?parent=1528"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/categories?post=1528"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/tags?post=1528"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}