根据默认获取区号

This commit is contained in:
luyuan 2020-11-18 09:55:25 +08:00
parent c73f45d27e
commit 97a5090e0f
Signed by: theluyuan
GPG Key ID: A7972FD973317FF3
3 changed files with 5 additions and 4 deletions

View File

@ -21,7 +21,7 @@ export default defineComponent({
setup(){
console.log(i18ninit)
const len = provideI18n(i18ninit);
len.locale.value = !getValue("Lanvuage") ? 'zh' : getValue("Lanvuage");
// len.locale.value = !getValue("Lanvuage") ? 'zh' : getValue("Lanvuage");
if(getValue('token')){
store.commit("login", true)
store.dispatch("setUserInfo");

View File

@ -893,7 +893,8 @@ export async function register(data: any){
name: data.name,
email: data.emil,
mtongue: data.muyu,
tlanguage: data.jiaoshou
tlanguage: data.jiaoshou,
language: getValue("Lanvuage") || 'zh'
})
if(res.code == 0){
message.success(res.msg)

View File

@ -99,8 +99,8 @@ export default createStore({
state.userinfo.languageValue = data.yy // 'en' 'zh'
state.userinfo.zoneStr = timeZoneFormatted;
state.userinfo.currency = data.hb;
saveValue("Lanvuage", data.yx);
if( data.yx != geti18n().$s()){
saveValue("Lanvuage", data.yy);
if( data.yy != geti18n().$s()){
location.reload()
}
// setLanvuage(data[0]);