WeChat applet local storage and call

One, local storage

wx.setStorage({
                  key: 'Imgs',//The key name you want to go to, must be there, because
                  data: tempFilePaths will be used when calling. //And the variable that receives the image or file address
                })
2. Local call //Suggestion: call immediately upon a click event or as soon as the page is entered
wx.getStorage({
            key: 'Imgs',//corresponding to the stored key name
            success: function (res) {
              //For successful operations, it is recommended to print res first to find what you need
            }
          })

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325942176&siteId=291194637