Commit bf7f6ffe by 李伟康

feat(equity/detail): add cache reading logic for page data

先从本地缓存中获取页面数据,优先展示缓存内容再请求最新数据
1 parent 2097745c
......@@ -568,6 +568,7 @@ export default {
}
let storageName = `source_${sceneType}_${shopMerchantId}_${carBrandId}_${carChildsBrandId}`
let data = uni.getStorageSync(storageName)
if(data) this.setViewInfo(data) // 先从缓存中获取数据
try {
let requestData = await uni.$api.systemApi.getSoureData(shopMerchantId, sceneType, params)
if (requestData) this.setViewInfo(requestData)
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!