How does WeChat Mini Programs get the number of Wechat sports steps?
This article "how WeChat Mini Programs gets the Wechat Movement steps" is not quite understood by most people except programmers. Today, in order to make you better understand "how WeChat Mini Programs gets the Wechat Movement steps", the editor summarizes the following contents. It has a certain reference value, the detailed steps are clear, and the details are handled properly. I hope you can gain something through this article. Now let's take a look at the details.
Wx.getWeRunData (OBJECT
To obtain the number of Wechat movement steps of users in the past 30 days, you need to call the API wx.login first.
OBJECT parameter description:
The parameter name type is required to indicate whether successFunction API calls successful callback function failFunction No API call failed callback function completeFunction No API call ends callback function (both successful and failed calls will be executed)
Success return parameter description:
The parameter name type describes the encrypted data of the errMsgString call result encryptedDataString complete user information, including sensitive data. For more information, please see the initial vector of the encrypted data decryption algorithm ivString encryption algorithm, and the encrypted data decryption algorithm for details.
Sample code:
Wx.getWeRunData ({success (res) {const encryptedData = res.encryptedData}})
The decrypted encryptedData has the following json structure. For more information, please see the encrypted data decryption algorithm.
The attribute type indicates the number of Wechat movement steps of stepInfoListObjectArray users in the past 30 days.
The stepInfo structure is as follows
Property type description timestampNumber timestamp Indicates the corresponding time stepNumber Wechat movement steps {"stepInfoList": [{"timestamp": 1445866601, "step": 100}, {"timestamp": 1445866602, "step": 100}]} what does Mini Program mean? Mini Program is an application that can be used without download or installation. By scanning the QR code or searching it for immediate use, it is easy to operate and easy to spread, and can achieve seven functions such as message notification, offline code scanning, official account association and so on. It is based on Wechat, similar to APP. You can use it whenever you want. After using it, you will leave without taking up memory.
Thank you for your reading. I hope you have a certain understanding of the key issue of "how to get the Wechat movement steps". The specific usage still needs to be understood by everyone through hands-on experiments. Go and try it. If you want to read more articles on relevant knowledge points, welcome to follow the industry information channel!