Commit 75373f68 authored by Smile's avatar Smile Committed by wux

fix:解决切换语言,刷新页面或切换页面,语言选择被重置,不是选择的语言。以及picker选择框的确认取消按钮多语言不跟随系统问题

parent 8cd53113
......@@ -196,12 +196,17 @@ export default {
this.watchWork()
this.Country()
this.getLeviteData()
this.showLangView()
//#ifdef APP-PLUS
this.getVersion()
this.getVeData()
//#endif
},
methods: {
showLangView() {
const lang=uni.getStorageSync('locale')||'zh';
this.index=this.languages.findIndex(item => item.value === lang);
},
showUser() {
this.$refs.userment.open()
},
......@@ -230,6 +235,7 @@ export default {
this.locale = data
this.getLeviteData()
uni.setStorageSync('locale', data)
uni.setLocale(data);
this.$lang.setLang(data)
},
getLeviteData() {
......
......@@ -273,6 +273,7 @@ export default {
onLoad() {
this.getVersion()
this.getStatusData()
this.showLangView()
//#ifdef APP-PLUS
this.getAdData(2)
//#endif
......@@ -285,6 +286,10 @@ export default {
}, 500)
},
methods: {
showLangView() {
const lang=uni.getStorageSync('locale')||'zh';
this.index=this.languages.findIndex(item => item.value === lang);
},
toupdate() {
let that = this
if (that.showdownLine) return
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment