feat(goods): 添加 fddCheck 接口并优化多个组件- 在 goods API 中添加 fddCheck 接口
- 优化 waterfallFlow 组件样式 - 修改 login 页面中 pane 切换逻辑 - 重构 profile 页面数据获取和展示逻辑 - 更新 realAuth 页面逻辑,集成 fddCheck接口 - 在 i18n 文件中添加 profile 页面相关翻译
This commit is contained in:
parent
0e80600f51
commit
df16ec5855
@ -62,3 +62,11 @@ export async function signOffline(data) {
|
|||||||
data
|
data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
export async function fddCheck(data) {
|
||||||
|
|
||||||
|
return await request( {
|
||||||
|
url:'/api/v1/m/user/fdd/check',
|
||||||
|
method: 'POST',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
@ -69,5 +69,4 @@ onMounted(() => {
|
|||||||
break-inside: avoid;
|
break-inside: avoid;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 默认样式可以移到使用组件时自定义 */
|
|
||||||
</style>
|
</style>
|
@ -1,15 +0,0 @@
|
|||||||
# Layouts
|
|
||||||
|
|
||||||
Vue components in this dir are used as layouts.
|
|
||||||
|
|
||||||
By default, `default.vue` will be used unless an alternative is specified in the route meta.
|
|
||||||
|
|
||||||
```vue
|
|
||||||
<script setup lang="ts">
|
|
||||||
definePageMeta({
|
|
||||||
layout: 'goods',
|
|
||||||
})
|
|
||||||
</script>
|
|
||||||
```
|
|
||||||
|
|
||||||
Learn more on <https://nuxt.com/docs/guide/directory-structure/layouts>
|
|
@ -142,7 +142,7 @@ const goLogin =async () => {
|
|||||||
</div>
|
</div>
|
||||||
<van-swipe ref="vanSwipeRef" :show-indicators="false" :touchable="false" :lazy-render="true" :loop="false">
|
<van-swipe ref="vanSwipeRef" :show-indicators="false" :touchable="false" :lazy-render="true" :loop="false">
|
||||||
<van-swipe-item >
|
<van-swipe-item >
|
||||||
<div v-show="pane===0">
|
<div v-if="pane===0">
|
||||||
<div class="">
|
<div class="">
|
||||||
<div class="w-full flex justify-between" @click="goToPage">
|
<div class="w-full flex justify-between" @click="goToPage">
|
||||||
<div class="text-[16px] text-[#000]">
|
<div class="text-[16px] text-[#000]">
|
||||||
@ -170,7 +170,7 @@ const goLogin =async () => {
|
|||||||
</div>
|
</div>
|
||||||
</van-swipe-item>
|
</van-swipe-item>
|
||||||
<van-swipe-item>
|
<van-swipe-item>
|
||||||
<div v-show="pane===1">
|
<div v-if="pane===1">
|
||||||
<div class="flex mb-[16px]">
|
<div class="flex mb-[16px]">
|
||||||
<div class="text-[16px] text-[#BDBDBD] mr-[10px]">{{ $t('login.hasSendTo') }}</div>
|
<div class="text-[16px] text-[#BDBDBD] mr-[10px]">{{ $t('login.hasSendTo') }}</div>
|
||||||
<div class="text-[16px] text-[#000]">+{{ selectedZone }} {{ phoneNum }}</div>
|
<div class="text-[16px] text-[#000]">+{{ selectedZone }} {{ phoneNum }}</div>
|
||||||
|
@ -17,7 +17,6 @@ const localState = ref({
|
|||||||
refreshing: false
|
refreshing: false
|
||||||
})
|
})
|
||||||
|
|
||||||
// 简化分组排序函数
|
|
||||||
const groupByDate = (data) => {
|
const groupByDate = (data) => {
|
||||||
if (!Array.isArray(data)) return []
|
if (!Array.isArray(data)) return []
|
||||||
|
|
||||||
@ -31,7 +30,6 @@ const groupByDate = (data) => {
|
|||||||
}, {})).sort((a, b) => new Date(b.userCreatedAt) - new Date(a.userCreatedAt))
|
}, {})).sort((a, b) => new Date(b.userCreatedAt) - new Date(a.userCreatedAt))
|
||||||
}
|
}
|
||||||
|
|
||||||
// 获取数据
|
|
||||||
const fetchData = async () => {
|
const fetchData = async () => {
|
||||||
try {
|
try {
|
||||||
const res = await userArtworks({})
|
const res = await userArtworks({})
|
||||||
@ -43,18 +41,15 @@ const fetchData = async () => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 刷新处理
|
|
||||||
const onRefresh = async () => {
|
const onRefresh = async () => {
|
||||||
localState.value.refreshing = true
|
localState.value.refreshing = true
|
||||||
await fetchData()
|
await fetchData()
|
||||||
localState.value.refreshing = false
|
localState.value.refreshing = false
|
||||||
}
|
}
|
||||||
|
|
||||||
// 导航函数
|
|
||||||
const goPay = () => router.push('/signature/protocol')
|
const goPay = () => router.push('/signature/protocol')
|
||||||
const goDetail = (item) => router.push({ path: '/artDetail', query: { uuid: item.uuid } })
|
const goDetail = (item) => router.push({ path: '/artDetail', query: { uuid: item.uuid } })
|
||||||
|
|
||||||
// 初始化
|
|
||||||
fetchData()
|
fetchData()
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
@ -88,8 +83,8 @@ fetchData()
|
|||||||
<!-- 空状态 -->
|
<!-- 空状态 -->
|
||||||
<div v-if="showMyList?.length < 1" class="flex flex-col items-center pt-100px">
|
<div v-if="showMyList?.length < 1" class="flex flex-col items-center pt-100px">
|
||||||
<img class="w-103px h-88px mb-19px" src="@/static/images/zu5512@2x.png" alt="">
|
<img class="w-103px h-88px mb-19px" src="@/static/images/zu5512@2x.png" alt="">
|
||||||
<div class="text-14px text-#575757">您暂无拍品</div>
|
<div class="text-14px text-#575757">{{$t('profile.text1')}}</div>
|
||||||
<div class="text-14px text-#575757">快去竞拍吧</div>
|
<div class="text-14px text-#575757">{{$t('profile.text2')}}</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- 列表内容 -->
|
<!-- 列表内容 -->
|
||||||
|
@ -7,6 +7,7 @@ import detail from './components/detail.vue'
|
|||||||
import {authStore} from "@/stores/auth/index.js";
|
import {authStore} from "@/stores/auth/index.js";
|
||||||
import XVanDate from '@/components/x-van-date/index.vue'
|
import XVanDate from '@/components/x-van-date/index.vue'
|
||||||
import XVanSelect from '@/components/x-van-select/index.vue'
|
import XVanSelect from '@/components/x-van-select/index.vue'
|
||||||
|
import {fddCheck} from "~/api/goods/index.js";
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const { locale } = useI18n()
|
const { locale } = useI18n()
|
||||||
const {userInfo}= authStore()
|
const {userInfo}= authStore()
|
||||||
@ -43,6 +44,7 @@ function isFormComplete(obj) {
|
|||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
const statusCode=ref(0)
|
const statusCode=ref(0)
|
||||||
const confirm=async ()=>{
|
const confirm=async ()=>{
|
||||||
const thatForm=active.value===0?form1.value:form.value
|
const thatForm=active.value===0?form1.value:form.value
|
||||||
@ -52,7 +54,11 @@ const confirm=async ()=>{
|
|||||||
if (res.status===0){
|
if (res.status===0){
|
||||||
userInfo.value=res.data
|
userInfo.value=res.data
|
||||||
message.success(t('realAuth.success_mess'))
|
message.success(t('realAuth.success_mess'))
|
||||||
statusCode.value=1
|
/*statusCode.value=1*/
|
||||||
|
const res1=await fddCheck()
|
||||||
|
if (res1.status===0){
|
||||||
|
console.log('res1',res1)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}else {
|
}else {
|
||||||
message.error(t('realAuth.cnTabDesc'))
|
message.error(t('realAuth.cnTabDesc'))
|
||||||
|
@ -34,7 +34,9 @@
|
|||||||
},
|
},
|
||||||
"profile": {
|
"profile": {
|
||||||
"name": "姓名",
|
"name": "姓名",
|
||||||
"phone": "手机号"
|
"phone": "手机号",
|
||||||
|
"text1": "您暂无拍品",
|
||||||
|
"text2": "快去竞拍吧"
|
||||||
},
|
},
|
||||||
"error_page": {
|
"error_page": {
|
||||||
"back_btn": "返回",
|
"back_btn": "返回",
|
||||||
|
Loading…
Reference in New Issue
Block a user