Compare commits

...

8 Commits

Author SHA1 Message Date
xingyy
64536663d7 feat(login): 实现手机号登录功能
- 新增手机号登录页面组件
- 添加手机号输入和验证码获取功能
- 实现验证码输入和登录功能
- 优化页面样式和布局
2025-01-10 09:56:19 +08:00
xingyy
9092b59027 refactor(app): 重构应用配置和页面组件
- 更新 AppFooter 组件中的路由名称引用
- 重命名 config 文件夹下的 index.ts 为 index.js
- 删除 NationalMap 组件
- 新增 login 页面组件
- 更新 home 页面组件,移除 masonry 样式
- 更新 nuxt 配置,启用 pages:extend钩子
- 移除 package.json 中的 vue-masonry-wall依赖
2025-01-09 19:57:50 +08:00
xingyy
a8e2faae0f refactor(layouts): 优化默认布局结构
- 移除 AppHeader 组件
- 调整页面主体的样式和布局refactor(components): 优化 XMessage 组件样式

- 调整样式属性顺序
- 优化模板结构

refactor(pages):重构首页布局

- 添加新的 LiveBroadcast 组件
- 实现拍品列表的瀑布流布局
- 优化拍品卡片样式

refactor(config): 更新项目配置

- 移除 pages:extend钩子
- 更新兼容性日期
2025-01-09 19:37:03 +08:00
xingyy
530c5b1026 Merge branch 'main' into xingyy 2025-01-09 19:02:35 +08:00
xingyy
6d815b5adb Merge branch 'main' into xingyy 2025-01-08 16:21:12 +08:00
xingyy
ef5fe41848 Merge branch 'main' into xingyy
# Conflicts:
#	app/components/AppFooter.vue
2025-01-08 15:48:05 +08:00
xingyy
861ba5118d Merge branch 'dev' into xingyy
# Conflicts:
#	app/components/AppFooter.vue
2025-01-08 15:30:34 +08:00
xingyy
dd445ece41 test 2025-01-08 15:30:07 +08:00
16 changed files with 209 additions and 101 deletions

View File

@ -1,5 +1,5 @@
<script setup> <script setup>
import { useAppFooterRouteNames as names } from '~/config' import { useAppFooterRouteNames as names } from '~/config/index.js'
import MyIcon from "~/components/icons/MyIcon.vue"; import MyIcon from "~/components/icons/MyIcon.vue";
import HomeIcon from "~/components/icons/HomeIcon.vue"; import HomeIcon from "~/components/icons/HomeIcon.vue";
const route = useRoute() const route = useRoute()

View File

@ -0,0 +1,11 @@
<script setup lang="ts">
</script>
<template>
</template>
<style scoped>
</style>

View File

@ -7,48 +7,50 @@ const props = defineProps({
type: { type: {
type: String, type: String,
default: 'success', default: 'success',
validator: (value) => ['success', 'error', 'warning'].includes(value) validator: value => ['success', 'error', 'warning'].includes(value),
}, },
text: { text: {
type: String, type: String,
default: '' default: '',
} },
}) })
const typeConfig = { const typeConfig = {
success: { success: {
imgSrc: success, imgSrc: success,
borderColor: '#C5E7D5', borderColor: '#C5E7D5',
bgColor: '#EDF7F2' bgColor: '#EDF7F2',
}, },
error: { error: {
imgSrc: error, imgSrc: error,
borderColor: '#F3CBD3', borderColor: '#F3CBD3',
bgColor: '#FBEEF1' bgColor: '#FBEEF1',
}, },
warning: { warning: {
imgSrc: warning, imgSrc: warning,
borderColor: '#FAE0B5', borderColor: '#FAE0B5',
bgColor: '#FEF7ED' bgColor: '#FEF7ED',
} },
} }
</script> </script>
<template> <template>
<div <div
class="box-border w-[343px] min-h-[46px] rounded-[4px] border flex items-center px-[15px] shadow-sm" class="box-border min-h-[46px] w-[343px] flex items-center border rounded-[4px] px-[15px] shadow-sm"
:style="{ :style="{
borderColor: typeConfig[type].borderColor, borderColor: typeConfig[type].borderColor,
backgroundColor: typeConfig[type].bgColor backgroundColor: typeConfig[type].bgColor,
}" }"
> >
<div class="w-[20px] h-[20px] mr-[9px]"> <div class="mr-[9px] h-[20px] w-[20px]">
<img <img
:src="typeConfig[type].imgSrc" :src="typeConfig[type].imgSrc"
class="w-full h-full" class="h-full w-full"
alt="" alt=""
> >
</div> </div>
<div class="text-[14px] leading-normal text-black">{{ text }}</div> <div class="text-[14px] text-black leading-normal">
{{ text }}
</div>
</div> </div>
</template> </template>

2
app/config/index.js Normal file
View File

@ -0,0 +1,2 @@
export const useAppFooterRouteNames= ['home', 'profile']

View File

@ -1,6 +0,0 @@
import type { RouteRecordName } from 'vue-router'
/**
* Use the AppFooter routing whitelist
*/
export const useAppFooterRouteNames: RouteRecordName[] = ['index', 'profile']

View File

@ -1,7 +1,5 @@
<template> <template>
<main class="flex flex-col min-h-svh"> <main class="flex flex-col min-h-svh">
<AppHeader class="h-[var(--van-nav-bar-height)]" />
<div class="flex-1 pb-[var(--van-nav-bar-height)]"> <div class="flex-1 pb-[var(--van-nav-bar-height)]">
<slot /> <slot />
</div> </div>

View File

@ -1,8 +1,9 @@
<script setup> <script setup>
import liveBroadcast from '@/components/liveBroadcast/index.vue'
const loading = ref(false) const loading = ref(false)
const finished = ref(false) const finished = ref(false)
const refreshing = ref(false) const refreshing = ref(false)
import liveBroadcast from '@/components/liveBroadcast/index.vue'
const list = ref([{ const list = ref([{
image: 'https://e-cdn.fontree.cn/fonchain-main/prod/file/default/setting/637d95b4-2ae9-4a74-bd60-a3a9d2ca2ca0.png', image: 'https://e-cdn.fontree.cn/fonchain-main/prod/file/default/setting/637d95b4-2ae9-4a74-bd60-a3a9d2ca2ca0.png',
title: '张天赐 | 日出而作,日落而息', title: '张天赐 | 日出而作,日落而息',
@ -18,6 +19,21 @@ const list = ref([{
title: '张天赐 | 日出而作,日落而息', title: '张天赐 | 日出而作,日落而息',
startingPrice: 'RMB 1,000', startingPrice: 'RMB 1,000',
transactionPrice: '', transactionPrice: '',
}, {
image: 'https://e-cdn.fontree.cn/fonchain-main/prod/file/default/setting/25c3f03c-9e0b-456b-963f-79b3d812c89a.png',
title: '张天赐 | 日出而作,日落而息',
startingPrice: 'RMB 1,000',
transactionPrice: '',
}, {
image: 'https://e-cdn.fontree.cn/fonchain-main/prod/file/default/setting/25c3f03c-9e0b-456b-963f-79b3d812c89a.png',
title: '张天赐 | 日出而作,日落而息',
startingPrice: 'RMB 1,000',
transactionPrice: '',
}, {
image: 'https://e-cdn.fontree.cn/fonchain-main/prod/file/default/setting/25c3f03c-9e0b-456b-963f-79b3d812c89a.png',
title: '张天赐 | 日出而作,日落而息',
startingPrice: 'RMB 1,000',
transactionPrice: '',
}]) }])
const page = ref(1) const page = ref(1)
@ -54,38 +70,92 @@ function onRefresh() {
refreshing.value = true refreshing.value = true
loadData() loadData()
} }
//
const leftColumn = computed(() => {
return list.value.filter((_, index) => index % 2 === 0)
})
const rightColumn = computed(() => {
return list.value.filter((_, index) => index % 2 === 1)
})
</script> </script>
<template> <template>
<liveBroadcast></liveBroadcast> <liveBroadcast />
<van-tabs animated> <van-tabs sticky animated>
<van-tab title="拍品列表"> <van-tab title="拍品列表">
<div class="px-[16px] pt-[16px]"> <div class="px-[16px] pt-[16px]">
<van-pull-refresh v-model="refreshing" @refresh="onRefresh"> <van-pull-refresh>
<van-list <van-list
v-model:loading="loading" v-model:loading="loading"
:finished="finished" :finished="finished"
finished-text="没有更多了" finished-text="没有更多了"
@load="loadData" @load="loadData"
> >
<!-- 拍品列表 --> <div class="w-full flex gap-[16px]">
<div class="grid grid-cols-2 gap-4"> <div class="flex flex-1 flex-col gap-[16px]">
<div v-for="(item,index) in list" :key="item.id" class="pb-[20px]"> <div
<div class="relative w-[164px]"> v-for="(item, index) in leftColumn"
<van-image width="100%" :src="item.image" fit="contain" /> :key="index"
<div class="align-center absolute left-8px top-8px h-17px w-45px flex justify-center bg-#2B53AC text-12px text-[#fff]"> class="w-full"
LOT{{index+1}} >
<div class="relative w-full">
<van-image
:src="item.image"
:style="{ aspectRatio: item.ratio }"
fit="cover"
class="w-full"
/>
<div class="absolute left-[8px] top-[8px] h-[17px] w-[45px] flex items-center justify-center bg-[#2b53ac] text-[12px] text-[#fff]">
LOT{{ index * 2 + 1 }}
</div> </div>
</div> </div>
<div> <div class="pt-[8px]">
<div class="text-[14px] text-[#000]"> <div class="text-[14px] text-[#000000] leading-[20px]">
{{ item.title }} {{ item.title }}
</div> </div>
<div class="text-[12px] text-[#575757]"> <div class="mt-[4px] text-[12px] text-[#575757]">
起拍价{{ item.startingPrice }} 起拍价{{ item.startingPrice }}
</div> </div>
<div v-if="item.transactionPrice" class="text-[12px] text-[#B58047]"> <div
成交价¥{{ item.transactionPrice }} v-if="item.transactionPrice"
class="mt-[4px] text-[12px] text-[#b58047]"
>
成交价{{ item.transactionPrice }}
</div>
</div>
</div>
</div>
<div class="flex flex-1 flex-col gap-[16px]">
<div
v-for="(item, index) in rightColumn"
:key="index"
class="w-full"
>
<div class="relative w-full">
<van-image
:src="item.image"
:style="{ aspectRatio: item.ratio }"
fit="cover"
class="w-full"
/>
<div class="absolute left-[8px] top-[8px] h-[17px] w-[45px] flex items-center justify-center bg-[#2b53ac] text-[12px] text-[#fff]">
LOT{{ index * 2 + 2 }}
</div>
</div>
<div class="pt-[8px]">
<div class="text-[14px] text-[#000000] leading-[20px]">
{{ item.title }}
</div>
<div class="mt-[4px] text-[12px] text-[#575757]">
起拍价{{ item.startingPrice }}
</div>
<div
v-if="item.transactionPrice"
class="mt-[4px] text-[12px] text-[#b58047]"
>
成交价{{ item.transactionPrice }}
</div>
</div> </div>
</div> </div>
</div> </div>
@ -94,12 +164,10 @@ function onRefresh() {
</van-pull-refresh> </van-pull-refresh>
</div> </div>
</van-tab> </van-tab>
<van-tab title="拍卖说明">内容 2</van-tab> <van-tab title="拍卖说明">
内容 2
</van-tab>
</van-tabs> </van-tabs>
</template> </template>
<style scoped>
</style>

7
app/pages/index.vue Normal file
View File

@ -0,0 +1,7 @@
<script setup>
import Home from './home/index.vue'
</script>
<template>
<Home></Home>
</template>

70
app/pages/login/index.vue Normal file
View File

@ -0,0 +1,70 @@
<script setup>
const phoneNum=ref('')
const code=ref('')
const pane=ref(0)
</script>
<template>
<div class="h-[100vh] w-[100vw] bg-[url('@/static/images/asdfsdd.png')] bg-cover px-[31px] pt-[86px]">
<div class="w-full flex justify-center mb-[100px]">
<img class="h-[105px] w-[189px]" src="@/static/images/ghfggff.png" alt="">
</div>
<div v-if="pane===0">
<div class="">
<div class="w-full flex justify-between">
<div class="text-[16px] text-[#000]">
中国大陆
</div>
<div><van-icon color="#777" name="arrow" size="14" /></div>
</div>
<div class="border-b-[1.7px] mt-[8px]">
<van-field v-model="phoneNum" clearable placeholder="请输入手机号">
<template #label>
<div class="text-[16px] text-[#1A1A1A] flex align-center justify-start">
+86
</div>
</template>
</van-field>
</div>
<div />
</div>
<div class="mt-[55px]">
<van-button v-if="phoneNum" type="primary" block style="height: 48px" >获取验证码</van-button>
<van-button v-else type="primary" color="#D3D3D3" block style="height: 48px" >获取验证码</van-button>
</div>
</div>
<div v-else>
<div class="flex mb-[16px]">
<div class="text-[16px] text-[#BDBDBD] mr-[10px]">已发送验证码至</div>
<div class="text-[16px] text-[#000]">15834362333</div>
</div>
<van-password-input
:value="code"
:gutter="10"
focused
/>
<div class="text-#2B53AC text-14px">
重新发送
</div>
<div class="mt-[17px]">
<van-button v-if="code.length === 6" type="primary" block style="height: 48px" >登录</van-button>
<van-button v-else type="primary" color="#D3D3D3" block style="height: 48px" >登录</van-button>
</div>
</div>
</div>
</template>
<style scoped lang="scss">
:deep(.van-cell.van-field){
padding-left: 0;
}
:deep(.van-password-input){
margin: 0;
}
:deep(.van-password-input__item){
border: 1px solid #E5E5E5;
width: 41px;
height: 41px;
}
</style>

Binary file not shown.

After

Width:  |  Height:  |  Size: 57 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

View File

@ -1,32 +0,0 @@
import type { UserConfig } from '@commitlint/types'
import { RuleConfigSeverity } from '@commitlint/types'
const Configuration: UserConfig = {
extends: ['@commitlint/config-conventional'],
formatter: '@commitlint/format',
rules: {
'type-enum': [
RuleConfigSeverity.Error,
'always',
[
'feat',
'fix',
'perf',
'style',
'docs',
'test',
'refactor',
'build',
'ci',
'chore',
'revert',
'wip',
'workflow',
'types',
'release',
],
],
},
}
export default Configuration

View File

@ -1,9 +0,0 @@
import antfu from '@antfu/eslint-config'
import nuxt from './.nuxt/eslint.config.mjs'
export default nuxt(
antfu({
unocss: true,
formatters: true,
}),
)

View File

@ -146,7 +146,7 @@ export default defineNuxtConfig({
}, },
// 指定 Nuxt 应用程序的兼容性日期,确保应用程序在未来的 Nuxt 版本中保持稳定性 // 指定 Nuxt 应用程序的兼容性日期,确保应用程序在未来的 Nuxt 版本中保持稳定性
compatibilityDate: '2025-01-07', compatibilityDate: '2025-01-09',
devServer: { devServer: {
host: '0.0.0.0', host: '0.0.0.0',

View File

@ -21,11 +21,8 @@
"vue-router": "^4.5.0" "vue-router": "^4.5.0"
}, },
"devDependencies": { "devDependencies": {
"@antfu/eslint-config": "^3.12.1",
"@iconify-json/carbon": "^1.2.5", "@iconify-json/carbon": "^1.2.5",
"@nuxt/eslint": "^0.7.4",
"@pinia/nuxt": "^0.9.0", "@pinia/nuxt": "^0.9.0",
"@unocss/eslint-plugin": "0.65.2",
"@unocss/nuxt": "0.65.2", "@unocss/nuxt": "0.65.2",
"@unocss/preset-rem-to-px": "0.65.2", "@unocss/preset-rem-to-px": "0.65.2",
"@vant/nuxt": "^1.0.6", "@vant/nuxt": "^1.0.6",