feat(signature): 添加签名功能相关页面
- 新增签名面板页面,用于用户签名 - 新增个人信息页面,用于填写个人相关资料- 新增协议页面,用于展示拍卖规则等协议内容 -优化直播页面竞拍结束提示逻辑 - 修复国家区域选择页面路由问题 - 优化个人主页下拉刷新功能
This commit is contained in:
parent
e8a89b184e
commit
34add8d226
@ -9,6 +9,7 @@ definePageMeta({
|
|||||||
i18n: 'countryRegion.title',
|
i18n: 'countryRegion.title',
|
||||||
})
|
})
|
||||||
const router = useRouter()
|
const router = useRouter()
|
||||||
|
console.log('router',router)
|
||||||
const { t, locale } = useI18n()
|
const { t, locale } = useI18n()
|
||||||
const value = ref('');
|
const value = ref('');
|
||||||
const alphabet = [
|
const alphabet = [
|
||||||
@ -90,10 +91,10 @@ const searchCountry = computed(() => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
const showIndexBar = computed(() => locale.value !== 'ja-JP')
|
const showIndexBar = computed(() => locale.value !== 'ja-JP')
|
||||||
|
const route = useRoute()
|
||||||
const handleCountrySelect = (country) => {
|
const handleCountrySelect = (country) => {
|
||||||
router.push({
|
router.replace({
|
||||||
path: '/login',
|
path: window.history.state.back,
|
||||||
query: {
|
query: {
|
||||||
zone: country.zone,
|
zone: country.zone,
|
||||||
countryName: country.displayName
|
countryName: country.displayName
|
||||||
|
@ -3,6 +3,7 @@ import {userArtworks} from "@/api/goods/index.js";
|
|||||||
import {authStore} from "@/stores/auth/index.js";
|
import {authStore} from "@/stores/auth/index.js";
|
||||||
import xImage from '@/components/x-image/index.vue'
|
import xImage from '@/components/x-image/index.vue'
|
||||||
import {goodStore} from "~/stores/goods/index.js";
|
import {goodStore} from "~/stores/goods/index.js";
|
||||||
|
import {ref} from "vue";
|
||||||
definePageMeta({
|
definePageMeta({
|
||||||
layout: 'default',
|
layout: 'default',
|
||||||
title: '我的',
|
title: '我的',
|
||||||
@ -21,12 +22,11 @@ const groupAndSortByDate=(data)=> {
|
|||||||
acc[curr.userCreatedAt] = {
|
acc[curr.userCreatedAt] = {
|
||||||
userCreatedAt: curr.userCreatedAt,
|
userCreatedAt: curr.userCreatedAt,
|
||||||
list: []
|
list: []
|
||||||
};
|
}
|
||||||
}
|
}
|
||||||
acc[curr.userCreatedAt].list.push(curr);
|
acc[curr.userCreatedAt].list.push(curr)
|
||||||
return acc;
|
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 initData=async ()=>{
|
||||||
const res=await userArtworks({})
|
const res=await userArtworks({})
|
||||||
@ -36,10 +36,17 @@ const initData=async ()=>{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
const router = useRouter()
|
const router = useRouter()
|
||||||
|
const localState = ref({
|
||||||
|
finished: false,
|
||||||
|
refreshing: false,
|
||||||
|
showDetail: false,
|
||||||
|
showHeight: ''
|
||||||
|
})
|
||||||
initData()
|
initData()
|
||||||
const goPay=()=>{
|
const goPay=()=>{
|
||||||
|
router.push({
|
||||||
|
path:'/signature/personal-Info'
|
||||||
|
})
|
||||||
}
|
}
|
||||||
const goDetail=(item)=>{
|
const goDetail=(item)=>{
|
||||||
router.push({
|
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
|
||||||
|
}
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
@ -66,7 +83,10 @@ const goDetail=(item)=>{
|
|||||||
<div class="border-b-1px border-b-#D3D3D3 px-16px flex">
|
<div class="border-b-1px border-b-#D3D3D3 px-16px flex">
|
||||||
<div class="text-#000 text-16px border-b-3 border-b-#2B53AC h-36px">我的拍品</div>
|
<div class="text-#000 text-16px border-b-3 border-b-#2B53AC h-36px">我的拍品</div>
|
||||||
</div>
|
</div>
|
||||||
<van-pull-refresh @refresh="initData">
|
<van-pull-refresh v-model="localState.refreshing"
|
||||||
|
success-text="刷新成功"
|
||||||
|
:success-duration="700"
|
||||||
|
@refresh="onRefresh">
|
||||||
<van-list
|
<van-list
|
||||||
finished-text="没有更多了"
|
finished-text="没有更多了"
|
||||||
>
|
>
|
||||||
@ -83,7 +103,7 @@ const goDetail=(item)=>{
|
|||||||
<div class="text-#575757 text-14px line-height-none mb-5px">起拍价:RMB 1,000</div>
|
<div class="text-#575757 text-14px line-height-none mb-5px">起拍价:RMB 1,000</div>
|
||||||
<div class="text-#B58047 text-14px line-height-none">成交价:RMB 10,000</div>
|
<div class="text-#B58047 text-14px line-height-none">成交价:RMB 10,000</div>
|
||||||
</div>
|
</div>
|
||||||
<div v-if="[1,3,4].includes(item1.status)" @click="goPay">
|
<div v-if="[1,3,4].includes(item1.status)" @click.stop="goPay">
|
||||||
<van-button class="w-73px !h-30px" type="primary"><span class="text-12px">去支付</span></van-button>
|
<van-button class="w-73px !h-30px" type="primary"><span class="text-12px">去支付</span></van-button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
18
app/pages/signature/panel/index.vue
Normal file
18
app/pages/signature/panel/index.vue
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
<script setup>
|
||||||
|
const image = ref('');
|
||||||
|
import { showToast } from 'vant';
|
||||||
|
|
||||||
|
const onSubmit = (data) => {
|
||||||
|
image.value = data.image;
|
||||||
|
};
|
||||||
|
const onClear = () => showToast('clear');
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<van-signature @submit="onSubmit" @clear="onClear" />
|
||||||
|
<van-image v-if="image" :src="image" />
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
|
||||||
|
</style>
|
64
app/pages/signature/personal-Info/index.vue
Normal file
64
app/pages/signature/personal-Info/index.vue
Normal file
@ -0,0 +1,64 @@
|
|||||||
|
<script setup>
|
||||||
|
import {useI18n} from "vue-i18n";
|
||||||
|
import XVanSelect from '@/components/x-van-select/index.vue'
|
||||||
|
import XVanDate from '@/components/x-van-date/index.vue'
|
||||||
|
definePageMeta({
|
||||||
|
name: 'personal-info',
|
||||||
|
|
||||||
|
})
|
||||||
|
const {t} = useI18n()
|
||||||
|
const showPicker = ref(false)
|
||||||
|
const showPicker1 = ref(false)
|
||||||
|
const onConfirm = () => {
|
||||||
|
|
||||||
|
}
|
||||||
|
const router = useRouter()
|
||||||
|
const columns = ref([
|
||||||
|
{text: t('realAuth.male'), value: 1},
|
||||||
|
{text: t('realAuth.female'), value: 2},
|
||||||
|
])
|
||||||
|
const goCountryRegion=()=>{
|
||||||
|
router.push({
|
||||||
|
path:'/countryRegion'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
const adress=ref('')
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<div
|
||||||
|
class="w-[100vw] bg-[url('@/static/images/asdfsdd.png')] h-screen-nav bg-cover pt-77px flex-grow-1 flex flex-col ">
|
||||||
|
<div class="text-16px text-#191919 font-bold mb-40px px-34px">
|
||||||
|
请填写个人相关信息
|
||||||
|
</div>
|
||||||
|
<div class="grow-1 px-34px">
|
||||||
|
<van-field type="tel" :label-width="161" label="文本" class="mb-10px" placeholder="请输入手机号">
|
||||||
|
<template #label>
|
||||||
|
<div class="flex">
|
||||||
|
<div class="mr-41px whitespace-nowrap">手机号</div>
|
||||||
|
<div @click="goCountryRegion">
|
||||||
|
<span class="mr-13px">+ 86</span>
|
||||||
|
<van-icon name="arrow-down" class="text-#777777"/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</van-field>
|
||||||
|
<van-field label="姓名" class="mb-10px" placeholder="请输入姓名"/>
|
||||||
|
<x-van-select label="性别" :columns="columns"/>
|
||||||
|
<x-van-date label="出生日期"/>
|
||||||
|
<van-field v-model="adress" label="家庭住址" class="mb-10px" placeholder="请输入家庭住址"/>
|
||||||
|
<van-field label="所属银行" class="mb-10px" placeholder="请输入所属银行"/>
|
||||||
|
<van-field label="银行卡号码" class="mb-10px" placeholder="请输入银行卡号码"/>
|
||||||
|
</div>
|
||||||
|
<div class="h-81px bg-#fff flex justify-center pt-7px border-t">
|
||||||
|
<van-button color="#2B53AC" class="w-213px van-btn-h-38px">下一步</van-button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<style scoped lang="scss">
|
||||||
|
:deep(.van-cell.van-field){
|
||||||
|
padding-left: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
</style>
|
40
app/pages/signature/protocol/index.vue
Normal file
40
app/pages/signature/protocol/index.vue
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
<script setup>
|
||||||
|
const activeNames = ref(['1']);
|
||||||
|
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<div class="bg-#EBEBEB h-screen-nav flex flex-col">
|
||||||
|
<div class="h-50px text-14px text-#191919 bg-#fff flex items-center px-21px mb-6px">支付前需同意以下内容并签字</div>
|
||||||
|
<van-collapse v-model="activeNames" class="grow-1">
|
||||||
|
<van-collapse-item name="1" class="mb-6px">
|
||||||
|
<template #title>
|
||||||
|
<div class="text-#2B53AC text-14px">《拍卖规则》</div>
|
||||||
|
</template>
|
||||||
|
代码是写出来给人看的,附带能在机器上运行。
|
||||||
|
</van-collapse-item>
|
||||||
|
<van-collapse-item name="2" class="mb-6px">
|
||||||
|
<template #title>
|
||||||
|
<div class="text-#2B53AC text-14px">《拍卖规则》</div>
|
||||||
|
</template>
|
||||||
|
代码是写出来给人看的,附带能在机器上运行。
|
||||||
|
</van-collapse-item>
|
||||||
|
<van-collapse-item name="3" class="mb-6px">
|
||||||
|
<template #title>
|
||||||
|
<div class="text-#2B53AC text-14px">《拍卖规则》</div>
|
||||||
|
</template>
|
||||||
|
代码是写出来给人看的,附带能在机器上运行。
|
||||||
|
</van-collapse-item>
|
||||||
|
</van-collapse>
|
||||||
|
<div class="h-81px bg-#fff flex justify-center pt-7px border-t">
|
||||||
|
<van-button color="#2B53AC" class="w-213px van-btn-h-38px">同意并签字</van-button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
:deep(.van-cell__right-icon){
|
||||||
|
color: #ACACAC;
|
||||||
|
font-size: 12px;
|
||||||
|
}
|
||||||
|
</style>
|
@ -100,10 +100,43 @@ export const liveStore = createGlobalState(() => {
|
|||||||
bottom: '230px'
|
bottom: '230px'
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
}else if (data.data?.tip?.tipType === 'failBid'){
|
||||||
|
message.error({
|
||||||
|
title: {
|
||||||
|
text: '很遗憾,竞拍失败',
|
||||||
|
color: '#CF3050',
|
||||||
|
align: 'center',
|
||||||
|
},
|
||||||
|
icon:false,
|
||||||
|
subTitle:{
|
||||||
|
text:'竞拍结束',
|
||||||
|
color: '#939393',
|
||||||
|
align: 'center',
|
||||||
|
},
|
||||||
|
style: {
|
||||||
|
width: '186px',
|
||||||
|
bottom: '230px'
|
||||||
|
},
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
}else if (data.data?.wsType==='stopArtwor'){
|
}else if (data.data?.wsType==='stopArtwor'){
|
||||||
quoteStatus.value=false
|
quoteStatus.value=false
|
||||||
|
}else if (data.data?.wsType==='over'){
|
||||||
|
message.success({
|
||||||
|
title: {
|
||||||
|
text: '竞拍结束,谢谢参与',
|
||||||
|
color: '#575757',
|
||||||
|
align: 'center',
|
||||||
|
backgroundColor: '#fff',
|
||||||
|
borderColor:'#fff'
|
||||||
|
},
|
||||||
|
icon:false,
|
||||||
|
style: {
|
||||||
|
width: '195px',
|
||||||
|
bottom: '230px'
|
||||||
|
},
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log('onmessage', data)
|
console.log('onmessage', data)
|
||||||
|
Loading…
Reference in New Issue
Block a user