This commit is contained in:
2020-12-11 14:09:16 +08:00
parent 6c1c6ad95a
commit 7941a974f2
6 changed files with 94 additions and 30 deletions

View File

@@ -1,4 +1,4 @@
import { getaddr, getarticle, userinfo } from '@/api';
import { getaddr, getarticle, personalCenterData, userinfo } from '@/api';
import { setLanvuage } from '@/api/base';
import { getValue, saveValue } from '@/utils/common';
import { geti18n } from '@/utils/i18n';
@@ -73,7 +73,8 @@ export default createStore({
ename: "",
name: "",
},
infotext:[{title:"",content:""},{title:"",content:""}]
infotext:[{title:"",content:""},{title:"",content:""}],
indexarr:{countries:{},willsay:{},timezones:{},phonecodes:{},currencys:{},interests:{},language:{}}
},
mutations: {
setseting(state, info){
@@ -124,6 +125,9 @@ export default createStore({
},
setinfotext(state, data){
state.infotext = data;
},
setindexarr(state, data){
state.indexarr = data
}
},
actions: {
@@ -152,6 +156,10 @@ export default createStore({
const info = await getarticle();
commit("setinfotext", info)
},
async getindexarr({ commit }){
const info = await personalCenterData();
commit("setindexarr", info)
}
},
modules: {