feat(goods): 添加 fddCheck 接口并优化多个组件- 在 goods API 中添加 fddCheck 接口
- 优化 waterfallFlow 组件样式 - 修改 login 页面中 pane 切换逻辑 - 重构 profile 页面数据获取和展示逻辑 - 更新 realAuth 页面逻辑,集成 fddCheck接口 - 在 i18n 文件中添加 profile 页面相关翻译
This commit is contained in:
parent
0e80600f51
commit
df16ec5855
@ -61,4 +61,12 @@ export async function signOffline(data) {
|
||||
method: 'POST',
|
||||
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;
|
||||
}
|
||||
|
||||
/* 默认样式可以移到使用组件时自定义 */
|
||||
</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>
|
||||
<van-swipe ref="vanSwipeRef" :show-indicators="false" :touchable="false" :lazy-render="true" :loop="false">
|
||||
<van-swipe-item >
|
||||
<div v-show="pane===0">
|
||||
<div v-if="pane===0">
|
||||
<div class="">
|
||||
<div class="w-full flex justify-between" @click="goToPage">
|
||||
<div class="text-[16px] text-[#000]">
|
||||
@ -170,7 +170,7 @@ const goLogin =async () => {
|
||||
</div>
|
||||
</van-swipe-item>
|
||||
<van-swipe-item>
|
||||
<div v-show="pane===1">
|
||||
<div v-if="pane===1">
|
||||
<div class="flex mb-[16px]">
|
||||
<div class="text-[16px] text-[#BDBDBD] mr-[10px]">{{ $t('login.hasSendTo') }}</div>
|
||||
<div class="text-[16px] text-[#000]">+{{ selectedZone }} {{ phoneNum }}</div>
|
||||
|
@ -17,7 +17,6 @@ const localState = ref({
|
||||
refreshing: false
|
||||
})
|
||||
|
||||
// 简化分组排序函数
|
||||
const groupByDate = (data) => {
|
||||
if (!Array.isArray(data)) return []
|
||||
|
||||
@ -31,7 +30,6 @@ const groupByDate = (data) => {
|
||||
}, {})).sort((a, b) => new Date(b.userCreatedAt) - new Date(a.userCreatedAt))
|
||||
}
|
||||
|
||||
// 获取数据
|
||||
const fetchData = async () => {
|
||||
try {
|
||||
const res = await userArtworks({})
|
||||
@ -43,18 +41,15 @@ const fetchData = async () => {
|
||||
}
|
||||
}
|
||||
|
||||
// 刷新处理
|
||||
const onRefresh = async () => {
|
||||
localState.value.refreshing = true
|
||||
await fetchData()
|
||||
localState.value.refreshing = false
|
||||
}
|
||||
|
||||
// 导航函数
|
||||
const goPay = () => router.push('/signature/protocol')
|
||||
const goDetail = (item) => router.push({ path: '/artDetail', query: { uuid: item.uuid } })
|
||||
|
||||
// 初始化
|
||||
fetchData()
|
||||
</script>
|
||||
|
||||
@ -88,8 +83,8 @@ fetchData()
|
||||
<!-- 空状态 -->
|
||||
<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="">
|
||||
<div class="text-14px text-#575757">您暂无拍品</div>
|
||||
<div class="text-14px text-#575757">快去竞拍吧</div>
|
||||
<div class="text-14px text-#575757">{{$t('profile.text1')}}</div>
|
||||
<div class="text-14px text-#575757">{{$t('profile.text2')}}</div>
|
||||
</div>
|
||||
|
||||
<!-- 列表内容 -->
|
||||
|
@ -7,6 +7,7 @@ import detail from './components/detail.vue'
|
||||
import {authStore} from "@/stores/auth/index.js";
|
||||
import XVanDate from '@/components/x-van-date/index.vue'
|
||||
import XVanSelect from '@/components/x-van-select/index.vue'
|
||||
import {fddCheck} from "~/api/goods/index.js";
|
||||
const router = useRouter();
|
||||
const { locale } = useI18n()
|
||||
const {userInfo}= authStore()
|
||||
@ -43,6 +44,7 @@ function isFormComplete(obj) {
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
const statusCode=ref(0)
|
||||
const confirm=async ()=>{
|
||||
const thatForm=active.value===0?form1.value:form.value
|
||||
@ -52,7 +54,11 @@ const confirm=async ()=>{
|
||||
if (res.status===0){
|
||||
userInfo.value=res.data
|
||||
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 {
|
||||
message.error(t('realAuth.cnTabDesc'))
|
||||
|
@ -34,7 +34,9 @@
|
||||
},
|
||||
"profile": {
|
||||
"name": "姓名",
|
||||
"phone": "手机号"
|
||||
"phone": "手机号",
|
||||
"text1": "您暂无拍品",
|
||||
"text2": "快去竞拍吧"
|
||||
},
|
||||
"error_page": {
|
||||
"back_btn": "返回",
|
||||
|
Loading…
Reference in New Issue
Block a user