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