解决缓存无法正常访问
This commit is contained in:
@@ -11,15 +11,7 @@ Page({
|
||||
},
|
||||
onLoad(e) {
|
||||
var that = this
|
||||
wx.getStorage({
|
||||
key: 'company_id',
|
||||
success(res) {
|
||||
that.company(e.companyId)
|
||||
that.setData({
|
||||
company_id:res.data
|
||||
})
|
||||
}
|
||||
})
|
||||
that.company()
|
||||
},
|
||||
onUnload: function () {
|
||||
wx.removeStorageSync('company_id')
|
||||
@@ -68,7 +60,7 @@ Page({
|
||||
title: 'title',
|
||||
mask: 'true'
|
||||
})
|
||||
wx.$api.companyModule.company(id, this.data.page).then(res => {
|
||||
wx.$api.companyModule.company(wx.getStorageSync('company_id'), this.data.page).then(res => {
|
||||
this.setData({
|
||||
info: res,
|
||||
loaded: true,
|
||||
|
||||
Reference in New Issue
Block a user