12
This commit is contained in:
parent
231ae8fa37
commit
9051088091
@ -16,7 +16,7 @@ const router = useRouter()
|
|||||||
const route = useRoute()
|
const route = useRoute()
|
||||||
const slideDirection = ref('slide-left')
|
const slideDirection = ref('slide-left')
|
||||||
const { locale } = useI18n()
|
const { locale } = useI18n()
|
||||||
locale.value = 'en-US'
|
// locale.value = 'en-US'
|
||||||
// 记录路由历史
|
// 记录路由历史
|
||||||
const routeHistory = ref([])
|
const routeHistory = ref([])
|
||||||
|
|
||||||
|
@ -44,6 +44,7 @@ const showKeyboard = ref(false);
|
|||||||
// 根据语言获取默认国家
|
// 根据语言获取默认国家
|
||||||
const getDefaultCountry = () => {
|
const getDefaultCountry = () => {
|
||||||
let defaultCode = 'CN' // 默认中国大陆
|
let defaultCode = 'CN' // 默认中国大陆
|
||||||
|
console.log('locale.value',locale.value)
|
||||||
switch (locale.value) {
|
switch (locale.value) {
|
||||||
case 'zh-CN':
|
case 'zh-CN':
|
||||||
defaultCode = 'CN'
|
defaultCode = 'CN'
|
||||||
@ -73,6 +74,7 @@ const defaultCountry = getDefaultCountry()
|
|||||||
|
|
||||||
|
|
||||||
const selectedCountry = ref(route.query.countryName || defaultCountry.name)
|
const selectedCountry = ref(route.query.countryName || defaultCountry.name)
|
||||||
|
console.log('selectedCountry',selectedCountry.value)
|
||||||
onMounted(()=>{
|
onMounted(()=>{
|
||||||
selectedZone.value=route.query.zone || defaultCountry.zone
|
selectedZone.value=route.query.zone || defaultCountry.zone
|
||||||
})
|
})
|
||||||
|
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user