This commit is contained in:
2020-12-11 10:12:31 +08:00
parent bf97b34a01
commit 864caf9a54
4 changed files with 26 additions and 12 deletions

View File

@@ -1,4 +1,4 @@
import { getaddr, userinfo } from '@/api';
import { getaddr, getarticle, userinfo } from '@/api';
import { setLanvuage } from '@/api/base';
import { getValue, saveValue } from '@/utils/common';
import { geti18n } from '@/utils/i18n';
@@ -72,7 +72,8 @@ export default createStore({
code: "",
ename: "",
name: "",
}
},
infotext:[{title:"",content:""},{title:"",content:""}]
},
mutations: {
setseting(state, info){
@@ -120,6 +121,9 @@ export default createStore({
state.userinfo.languageValue = !getValue("Lanvuage") ? 'zh' : getValue("Lanvuage");
state.userinfo.language = (!getValue("Lanvuage") ? 'zh' : getValue("Lanvuage")) == 'zh' ? '中文' : 'English';
}
},
setinfotext(state, data){
state.infotext = data;
}
},
actions: {
@@ -143,6 +147,11 @@ export default createStore({
const info = await getaddr();
console.log(info,11256445);
commit("setquhao", info)
},
async getinfotext({ commit }){
const info = await getarticle();
commit("setinfotext", info)
}
},
modules: {