💎一站式轻松地调用各大LLM模型接口,支持GPT4、智谱、星火、月之暗面及文生图 广告
# wx.getWeRunData ### wx.getWeRunData(Object object) > 支持版本 >= 1.2.0 > 调用前需要 [用户授权](https://developers.weixin.qq.com/minigame/dev/tutorial/open-ability/authorize.html) scope.werun 获取用户过去三十天微信运动步数,需要先调用 wx.login 接口。 #### 参数 ##### Object object 属性类型默认值是否必填说明支持版本successfunction否接口调用成功的回调函数failfunction否接口调用失败的回调函数completefunction否接口调用结束的回调函数(调用成功、失败都会执行)###### object.success 回调函数 **参数** **Object res** 属性类型说明支持版本encryptedDatastring包括敏感数据在内的完整用户信息的加密数据,详细见[加密数据解密算法](https://developers.weixin.qq.com/minigame/dev/tutorial/open-ability/signature.html)。解密后得到的数据结构见后文ivstring加密算法的初始向量,详细见[加密数据解密算法](https://developers.weixin.qq.com/minigame/dev/tutorial/open-ability/signature.html)#### encryptedData 解密后 JSON 结构 ``` <pre class="prettyprint"><ol class="linenums"><li class="l"><code class="pcalibre9 pcalibre8 pcalibre7"><span class="pun">{</span></code></li> <li class="l1"><code class="pcalibre9 pcalibre8 pcalibre7"><span class="pln"> </span><span class="str">"stepInfoList"</span><span class="pun">:</span><span class="pln"> </span><span class="pun">[</span></code></li> <li class="l"><code class="pcalibre9 pcalibre8 pcalibre7"><span class="pln"> </span><span class="pun">{</span></code></li> <li class="l1"><code class="pcalibre9 pcalibre8 pcalibre7"><span class="pln"> </span><span class="str">"timestamp"</span><span class="pun">:</span><span class="pln"> </span><span class="lit">1445866601</span><span class="pun">,</span></code></li> <li class="l"><code class="pcalibre9 pcalibre8 pcalibre7"><span class="pln"> </span><span class="str">"step"</span><span class="pun">:</span><span class="pln"> </span><span class="lit">100</span></code></li> <li class="l1"><code class="pcalibre9 pcalibre8 pcalibre7"><span class="pln"> </span><span class="pun">},</span></code></li> <li class="l"><code class="pcalibre9 pcalibre8 pcalibre7"><span class="pln"> </span><span class="pun">{</span></code></li> <li class="l1"><code class="pcalibre9 pcalibre8 pcalibre7"><span class="pln"> </span><span class="str">"timestamp"</span><span class="pun">:</span><span class="pln"> </span><span class="lit">1445876601</span><span class="pun">,</span></code></li> <li class="l"><code class="pcalibre9 pcalibre8 pcalibre7"><span class="pln"> </span><span class="str">"step"</span><span class="pun">:</span><span class="pln"> </span><span class="lit">120</span></code></li> <li class="l1"><code class="pcalibre9 pcalibre8 pcalibre7"><span class="pln"> </span><span class="pun">}</span></code></li> <li class="l"><code class="pcalibre9 pcalibre8 pcalibre7"><span class="pln"> </span><span class="pun">]</span></code></li> <li class="l1"><code class="pcalibre9 pcalibre8 pcalibre7"><span class="pun">}</span></code></li> </ol> ``` stepInfoList 中,每一项结构如下: 属性类型说明timestampnumber时间戳,表示数据对应的时间stepnumber微信运动步数> 原文: <https://developers.weixin.qq.com/minigame/dev/api/open-api/werun/wx.getWeRunData.html>