diff --git a/app/pages/countryRegion/index.vue b/app/pages/countryRegion/index.vue index cba249c..d6dacf5 100644 --- a/app/pages/countryRegion/index.vue +++ b/app/pages/countryRegion/index.vue @@ -9,6 +9,7 @@ definePageMeta({ i18n: 'countryRegion.title', }) const router = useRouter() +console.log('router',router) const { t, locale } = useI18n() const value = ref(''); const alphabet = [ @@ -90,10 +91,10 @@ const searchCountry = computed(() => { }); const showIndexBar = computed(() => locale.value !== 'ja-JP') - +const route = useRoute() const handleCountrySelect = (country) => { - router.push({ - path: '/login', + router.replace({ + path: window.history.state.back, query: { zone: country.zone, countryName: country.displayName diff --git a/app/pages/profile/index.vue b/app/pages/profile/index.vue index 9a70b14..47c440e 100644 --- a/app/pages/profile/index.vue +++ b/app/pages/profile/index.vue @@ -3,6 +3,7 @@ import {userArtworks} from "@/api/goods/index.js"; import {authStore} from "@/stores/auth/index.js"; import xImage from '@/components/x-image/index.vue' import {goodStore} from "~/stores/goods/index.js"; +import {ref} from "vue"; definePageMeta({ layout: 'default', title: '我的', @@ -21,12 +22,11 @@ const groupAndSortByDate=(data)=> { acc[curr.userCreatedAt] = { userCreatedAt: curr.userCreatedAt, list: [] - }; + } } - acc[curr.userCreatedAt].list.push(curr); + acc[curr.userCreatedAt].list.push(curr) return acc; - }, {})) - .sort((a, b) => new Date(b.userCreatedAt) - new Date(a.userCreatedAt)); + }, {})).sort((a, b) => new Date(b.userCreatedAt) - new Date(a.userCreatedAt)); } const initData=async ()=>{ const res=await userArtworks({}) @@ -36,10 +36,17 @@ const initData=async ()=>{ } } const router = useRouter() - +const localState = ref({ + finished: false, + refreshing: false, + showDetail: false, + showHeight: '' +}) initData() const goPay=()=>{ - + router.push({ + path:'/signature/personal-Info' + }) } const goDetail=(item)=>{ router.push({ @@ -49,6 +56,16 @@ const goDetail=(item)=>{ } }) } +const onRefresh = async () => { + try { + localState.value.refreshing = true + localState.value.finished = false + const { finished } = await getArtworkList(true) + localState.value.finished = finished + } finally { + localState.value.refreshing = false + } +}