{"id":185612,"date":"2023-07-09T19:22:58","date_gmt":"2023-07-09T11:22:58","guid":{"rendered":"http:\/\/www.idc.net\/help\/185612\/"},"modified":"2023-07-09T19:22:58","modified_gmt":"2023-07-09T11:22:58","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%8fapi-%e8%ae%be%e5%a4%87%e6%96%b9%e5%90%91","status":"publish","type":"post","link":"https:\/\/idc.net\/help\/185612\/","title":{"rendered":"\u540e\u6d6a\u4e91\u5c0f\u7a0b\u5e8f\u6559\u7a0b\uff1a\u5fae\u4fe1\u5c0f\u7a0b\u5e8fAPI \u8bbe\u5907\u65b9\u5411"},"content":{"rendered":"<h2>wx.stopDeviceMotionListening(Object object)<\/h2>\n<blockquote><p>\n  \u57fa\u7840\u5e93 2.3.0 \u5f00\u59cb\u652f\u6301\uff0c\u4f4e\u7248\u672c\u9700\u505a \u517c\u5bb9\u5904\u7406\u3002\n<\/p><\/blockquote>\n<p>\u505c\u6b62\u76d1\u542c\u8bbe\u5907\u65b9\u5411\u7684\u53d8\u5316\u3002<\/p>\n<h2>\u53c2\u6570<\/h2>\n<h3>Object object<\/h3>\n<table>\n<thead>\n<tr>\n<th>\u5c5e\u6027<\/th>\n<th>\u7c7b\u578b<\/th>\n<th>\u9ed8\u8ba4\u503c<\/th>\n<th>\u5fc5\u586b<\/th>\n<th>\u8bf4\u660e<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>success<\/td>\n<td>function<\/td>\n<td><\/td>\n<td>\u5426<\/td>\n<td>\u63a5\u53e3\u8c03\u7528\u6210\u529f\u7684\u56de\u8c03\u51fd\u6570<\/td>\n<\/tr>\n<tr>\n<td>fail<\/td>\n<td>function<\/td>\n<td><\/td>\n<td>\u5426<\/td>\n<td>\u63a5\u53e3\u8c03\u7528\u5931\u8d25\u7684\u56de\u8c03\u51fd\u6570<\/td>\n<\/tr>\n<tr>\n<td>complete<\/td>\n<td>function<\/td>\n<td><\/td>\n<td>\u5426<\/td>\n<td>\u63a5\u53e3\u8c03\u7528\u7ed3\u675f\u7684\u56de\u8c03\u51fd\u6570\uff08\u8c03\u7528\u6210\u529f\u3001\u5931\u8d25\u90fd\u4f1a\u6267\u884c\uff09<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<hr>\n<h2>wx.startDeviceMotionListening(Object object)<\/h2>\n<blockquote><p>\n  \u57fa\u7840\u5e93 2.3.0 \u5f00\u59cb\u652f\u6301\uff0c\u4f4e\u7248\u672c\u9700\u505a \u517c\u5bb9\u5904\u7406\u3002\n<\/p><\/blockquote>\n<p>\u5f00\u59cb\u76d1\u542c\u8bbe\u5907\u65b9\u5411\u7684\u53d8\u5316\u3002<\/p>\n<h2>\u53c2\u6570<\/h2>\n<h3>Object object<\/h3>\n<table>\n<thead>\n<tr>\n<th>\u5c5e\u6027<\/th>\n<th>\u7c7b\u578b<\/th>\n<th>\u9ed8\u8ba4\u503c<\/th>\n<th>\u5fc5\u586b<\/th>\n<th>\u8bf4\u660e<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>interval<\/td>\n<td>string<\/td>\n<td>normal<\/td>\n<td>\u5426<\/td>\n<td>\u76d1\u542c\u8bbe\u5907\u65b9\u5411\u7684\u53d8\u5316\u56de\u8c03\u51fd\u6570\u7684\u6267\u884c\u9891\u7387<\/td>\n<\/tr>\n<tr>\n<td>success<\/td>\n<td>function<\/td>\n<td><\/td>\n<td>\u5426<\/td>\n<td>\u63a5\u53e3\u8c03\u7528\u6210\u529f\u7684\u56de\u8c03\u51fd\u6570<\/td>\n<\/tr>\n<tr>\n<td>fail<\/td>\n<td>function<\/td>\n<td><\/td>\n<td>\u5426<\/td>\n<td>\u63a5\u53e3\u8c03\u7528\u5931\u8d25\u7684\u56de\u8c03\u51fd\u6570<\/td>\n<\/tr>\n<tr>\n<td>complete<\/td>\n<td>function<\/td>\n<td><\/td>\n<td>\u5426<\/td>\n<td>\u63a5\u53e3\u8c03\u7528\u7ed3\u675f\u7684\u56de\u8c03\u51fd\u6570\uff08\u8c03\u7528\u6210\u529f\u3001\u5931\u8d25\u90fd\u4f1a\u6267\u884c\uff09<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>object.interval \u7684\u5408\u6cd5\u503c<\/p>\n<table>\n<thead>\n<tr>\n<th>\u503c<\/th>\n<th>\u8bf4\u660e<\/th>\n<th>\u6700\u4f4e\u7248\u672c<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>game<\/td>\n<td>\u9002\u7528\u4e8e\u66f4\u65b0\u6e38\u620f\u7684\u56de\u8c03\u9891\u7387\uff0c\u5728 20ms\/\u6b21 \u5de6\u53f3<\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td>ui<\/td>\n<td>\u9002\u7528\u4e8e\u66f4\u65b0 UI \u7684\u56de\u8c03\u9891\u7387\uff0c\u5728 60ms\/\u6b21 \u5de6\u53f3<\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td>normal<\/td>\n<td>\u666e\u901a\u7684\u56de\u8c03\u9891\u7387\uff0c\u5728 200ms\/\u6b21 \u5de6\u53f3<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<hr>\n<h2>wx.onDeviceMotionChange(function callback)<\/h2>\n<blockquote><p>\n  \u57fa\u7840\u5e93 2.3.0 \u5f00\u59cb\u652f\u6301\uff0c\u4f4e\u7248\u672c\u9700\u505a \u517c\u5bb9\u5904\u7406\u3002\n<\/p><\/blockquote>\n<p>\u76d1\u542c\u8bbe\u5907\u65b9\u5411\u53d8\u5316\u4e8b\u4ef6\u3002\u9891\u7387\u6839\u636e&nbsp;wx.startDeviceMotionListening()&nbsp;\u7684 interval \u53c2\u6570\u3002\u53ef\u4ee5\u4f7f\u7528&nbsp;wx.stopDeviceMotionListening()&nbsp;\u505c\u6b62\u76d1\u542c\u3002<\/p>\n<h2>\u53c2\u6570<\/h2>\n<h3>function callback<\/h3>\n<p>\u8bbe\u5907\u65b9\u5411\u53d8\u5316\u4e8b\u4ef6\u7684\u56de\u8c03\u51fd\u6570<\/p>\n<h4>\u53c2\u6570<\/h4>\n<h5>Object res<\/h5>\n<table>\n<thead>\n<tr>\n<th>\u5c5e\u6027<\/th>\n<th>\u7c7b\u578b<\/th>\n<th>\u8bf4\u660e<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>alpha<\/td>\n<td>number<\/td>\n<td>\u5f53 \u624b\u673a\u5750\u6807 X\/Y \u548c \u5730\u7403 X\/Y \u91cd\u5408\u65f6\uff0c\u7ed5\u7740 Z \u8f74\u8f6c\u52a8\u7684\u5939\u89d2\u4e3a alpha\uff0c\u8303\u56f4\u503c\u4e3a [0, 2*PI)\u3002\u9006\u65f6\u9488\u8f6c\u52a8\u4e3a\u6b63\u3002<\/td>\n<\/tr>\n<tr>\n<td>beta<\/td>\n<td>number<\/td>\n<td>\u5f53\u624b\u673a\u5750\u6807 Y\/Z \u548c\u5730\u7403 Y\/Z \u91cd\u5408\u65f6\uff0c\u7ed5\u7740 X \u8f74\u8f6c\u52a8\u7684\u5939\u89d2\u4e3a beta\u3002\u8303\u56f4\u503c\u4e3a [-1*PI, PI) \u3002\u9876\u90e8\u671d\u7740\u5730\u7403\u8868\u9762\u8f6c\u52a8\u4e3a\u6b63\u3002\u4e5f\u6709\u53ef\u80fd\u671d\u7740\u7528\u6237\u4e3a\u6b63\u3002<\/td>\n<\/tr>\n<tr>\n<td>gamma<\/td>\n<td>number<\/td>\n<td>\u5f53\u624b\u673a X\/Z \u548c\u5730\u7403 X\/Z \u91cd\u5408\u65f6\uff0c\u7ed5\u7740 Y \u8f74\u8f6c\u52a8\u7684\u5939\u89d2\u4e3a gamma\u3002\u8303\u56f4\u503c\u4e3a [-1*PI\/2, PI\/2)\u3002\u53f3\u8fb9\u671d\u7740\u5730\u7403\u8868\u9762\u8f6c\u52a8\u4e3a\u6b63\u3002<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<hr>\n<h2>wx.offDeviceMotionChange(function callback)<\/h2>\n<blockquote><p>\n  \u57fa\u7840\u5e93 2.9.3 \u5f00\u59cb\u652f\u6301\uff0c\u4f4e\u7248\u672c\u9700\u505a \u517c\u5bb9\u5904\u7406\u3002\n<\/p><\/blockquote>\n<p>\u53d6\u6d88\u76d1\u542c\u8bbe\u5907\u65b9\u5411\u53d8\u5316\u4e8b\u4ef6\uff0c\u53c2\u6570\u4e3a\u7a7a\uff0c\u5219\u53d6\u6d88\u6240\u6709\u7684\u4e8b\u4ef6\u76d1\u542c\u3002<\/p>\n<h2>\u53c2\u6570<\/h2>\n<h3>function callback<\/h3>\n<p>\u8bbe\u5907\u65b9\u5411\u53d8\u5316\u4e8b\u4ef6\u7684\u56de\u8c03\u51fd\u6570<\/p>\n<p> <\/p>\n<h2>wx.offDeviceMotionChange(function callback)<\/h2>\n<blockquote><p>\n  \u57fa\u7840\u5e93 2.9.3 \u5f00\u59cb\u652f\u6301\uff0c\u4f4e\u7248\u672c\u9700\u505a \u517c\u5bb9\u5904\u7406<br \/>\n <span>\u3002<\/span>\n<\/p><\/blockquote>\n<p>\u53d6\u6d88\u76d1\u542c\u8bbe\u5907\u65b9\u5411\u53d8\u5316\u4e8b\u4ef6\uff0c\u53c2\u6570\u4e3a\u7a7a\uff0c\u5219\u53d6\u6d88\u6240\u6709\u7684\u4e8b\u4ef6\u76d1\u542c\u3002<\/p>\n<h2>\u53c2\u6570<\/h2>\n<h3>function callback<\/h3>\n<p>\u8bbe\u5907\u65b9\u5411\u53d8\u5316\u4e8b\u4ef6\u7684\u56de\u8c03\u51fd\u6570<\/p>\n<p> <\/p>\n<blockquote><p>\n  \u57fa\u7840\u5e93 2.9.3 \u5f00\u59cb\u652f\u6301\uff0c\u4f4e\u7248\u672c\u9700\u505a \u517c\u5bb9\u5904\u7406<br \/>\n <span>\u3002<\/span>\n<\/p><\/blockquote>\n<p>\u53d6\u6d88\u76d1\u542c\u8bbe\u5907\u65b9\u5411\u53d8\u5316\u4e8b\u4ef6\uff0c\u53c2\u6570\u4e3a\u7a7a\uff0c\u5219\u53d6\u6d88\u6240\u6709\u7684\u4e8b\u4ef6\u76d1\u542c\u3002<\/p>\n<h2>\u53c2\u6570<\/h2>\n<h3>function callback<\/h3>\n<p>\u8bbe\u5907\u65b9\u5411\u53d8\u5316\u4e8b\u4ef6\u7684\u56de\u8c03\u51fd\u6570<\/p>\n<p> <\/p>\n","protected":false},"excerpt":{"rendered":"<p>wx.stopDeviceMotionListening(Object object) \u57fa\u7840\u5e93 2.3.0 \u5f00 [&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-185612","post","type-post","status-publish","format-standard","hentry","category-mini-program"],"_links":{"self":[{"href":"https:\/\/idc.net\/help\/wp-json\/wp\/v2\/posts\/185612","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=185612"}],"version-history":[{"count":0,"href":"https:\/\/idc.net\/help\/wp-json\/wp\/v2\/posts\/185612\/revisions"}],"wp:attachment":[{"href":"https:\/\/idc.net\/help\/wp-json\/wp\/v2\/media?parent=185612"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/idc.net\/help\/wp-json\/wp\/v2\/categories?post=185612"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/idc.net\/help\/wp-json\/wp\/v2\/tags?post=185612"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}