优化d代码

This commit is contained in:
java110 2022-07-15 19:19:17 +08:00
parent 14499e7ee4
commit 6d6a17432c

View File

@ -1007,7 +1007,7 @@
successCallback(res.bodyText, res);
if (vcFramework.constant.GET_CACHE_URL.includes(_getPath) && res.status == 200) {
vcFramework.saveData(_getPath, JSON.parse(res.bodyText));
vcFramework.saveData('/nav/getUserInfo', JSON.parse(res.bodyText));
}
} catch (e) {
console.error(e);
@ -1095,6 +1095,8 @@
let _getPath = '';
if (api.indexOf('/') != 0) {
_getPath = '/' + api;
} else {
_getPath = api;
}
if (vcFramework.constant.GET_CACHE_URL.includes(_getPath)) {
let _cacheData = vcFramework.getData(_getPath);
@ -1134,8 +1136,9 @@
try {
successCallback(res.bodyText, res);
if (vcFramework.constant.GET_CACHE_URL.includes(_getPath) && res.status == 200) {
vcFramework.saveData(_getPath, JSON.parse(res.bodyText));
vcFramework.saveData('/nav/getUserInfo', JSON.parse(res.bodyText));
}
} catch (e) {
console.error(e);