//index.js
//获取应用实例
const app = getApp();
Page({
    data: {
        qr_url: 'https://testusaoss.4dkankan.com/4dHouse/miniprogram/qr.jpg'
    },
    saveLocalPhoto(e){
        wx.downloadFile({
          url: this.data.qr_url,
          success (res) {
              wx.saveImageToPhotosAlbum({
                filePath: res.tempFilePath,
                fail (err) {
                    console.log(err)
                },
                success: () => {
                    wx.showToast({
                      title: '保存成功',
                    })
                }
              })
          }
        })
    },
    onLoad: function () {
    },
})
