Applet cache data

toModify (e) {
console.log ( 'click Edit shipping address is carried in:', e)
const siteInfo = e.currentTarget.dataset
wx.setStorageSync('siteInfo', siteInfo);
this._goToSomePage(`/pages/third/add address/add address`)
},
_goToSomePage(url) {
wx.navigateTo({
url: url,
})
},
 

// // Remove the shipping address information cache
// wx.getStorageSync('siteInfo')
// const siteInfo = wx.getStorageSync('siteInfo')
// this.setData({
// siteInfo
// })

// console.log ( 'acquired site cache:', siteInfo)
// const names = siteInfo.names
// const phone = siteInfo.phone
// const home = siteInfo.address.match(/(\S*)-/)[1];
// const site = siteInfo.address.match(/-(\S*)/)[1];
// console.log('home', home)
// console.log("site", site)
// this.setData({
// names,
// phone,
// site,
// Adress: home,
// })
 
 
note:
First, when a cache, two jump page, if a share, edit and add the values are cached access
two,

Guess you like

Origin www.cnblogs.com/Annely/p/11203056.html