优化平台数据获取逻辑
This commit is contained in:
parent
a7ff964d4b
commit
83e5f71419
|
@ -6,6 +6,7 @@ export default {
|
||||||
getTabIndex: 0,
|
getTabIndex: 0,
|
||||||
orderTabIndex: 0,
|
orderTabIndex: 0,
|
||||||
platformData: {
|
platformData: {
|
||||||
|
loaded: false,
|
||||||
about: "",
|
about: "",
|
||||||
privacy: "",
|
privacy: "",
|
||||||
register: "",
|
register: "",
|
||||||
|
@ -37,8 +38,12 @@ export default {
|
||||||
},
|
},
|
||||||
actions: {
|
actions: {
|
||||||
async platformData(context, data) {
|
async platformData(context, data) {
|
||||||
|
if (context.state.platformData.loaded) return;
|
||||||
await system.platformData().then(data => {
|
await system.platformData().then(data => {
|
||||||
context.commit('platformData', data);
|
context.commit('platformData', {
|
||||||
|
...data,
|
||||||
|
loaded: true
|
||||||
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue