Author SHA1 Message Date
maek_9090 629bb83ca2 fix:首页样式高度修改为整数 2024-12-09 21:40:41 +08:00
maek_9090 01910a7a1f fix: 首页style 2024-12-05 20:37:17 +08:00
3 changed files with 33 additions and 107 deletions

No files matched your search

-6
View File
@@ -1,6 +0,0 @@
export interface CreateCarousalsRequest {
imageUrl: string
targetType: string
targetUrl?: string
targetId?: string
}
+21 -77
View File
@@ -26,35 +26,44 @@ const videoSrc = ref(
muted
:controls="false"
/>
<view class="content">
<view class="content absolute box-border top-0 left-0 w-full h-full p-[23px]">
<image :src="left_top_logo" class="left-3 w-48 h-6" />
<view
class="content_text flex justify-between flex-col my-8 w-full h-5/6 items-center"
class="content_text flex justify-between flex-col w-full h-full items-center "
>
<view class="flex justify-center flex-col w-full items-center">
<view
class="flex justify-center flex-col text-[29px] w-full items-center mt-[100px]
tracking-[5.45px] text-[#FFF] leading-[37px]"
>
<view>为你的爱宠建档</view>
<view>制定专业喂养方案</view>
<view class="conten_science">
<view class="mt-[15px] text-[12px] text-center font-normal tracking-[1.45px] leading-[16px]">
科学喂养专业有爱
</view>
</view>
<view class="flex justify-center flex-col w-full items-center">
<view class="content_botton">
<button type="primary" class="content_botton_text">
<view class="flex justify-center flex-col w-full items-center h-full mt-[200px] text-[#FFF]">
<view
class="content_botton flex w-[176px] h-[47px] justify-center
items-center bg-[#4545E5] rounded-[69px]"
>
<button
class=" text-[18px] font-normal
tracking-[.36px] leading-[37px] shrink-0" hover-class="bg-[#4545E5]"
>
开始建档
</button>
</view>
<view class="content_details">
<view class="content_details tracking-[1.8px] mt-[40px] text-[12px] font-normal ">
下拉了解详情
</view>
<view class="content_img">
<image :src="Rectangle" />
<image :src="Rectangle" />
<view class="content_img mt-[15px]">
<image :src="Rectangle" class="w-[15px] h-2 shrink-0 stroke-[2px] fill-white stroke-white" />
<image :src="Rectangle" class="w-[15px] h-2 shrink-0 stroke-[2px] fill-white stroke-white" />
</view>
</view>
</view>
</view>
</view>
</view>
</view>
</template>
@@ -75,69 +84,4 @@ const videoSrc = ref(
controlslist: none
aspect-ratio: 16 / 9
object-fit: cover
.content
position: absolute
box-sizing: border-box
top: 0
left: 0
width: 100%
height: 100%
padding: 23px
&_text
color: var(--Color, #fff)
text-align: center
font-family: "Source Han Sans CN"
font-size: 29px
font-style: normal
font-weight: 500
line-height: 37px /* 127.586% */
letter-spacing: 1.45px
.conten_science
color: var(--Color, #fff)
text-align: center
font-family: "Source Han Sans CN"
font-size: 12px
font-style: normal
font-weight: 400
line-height: 16px /* 133.333% */
letter-spacing: 0.6px
.content_botton
display: inline
padding: 5px 51px
justify-content: center
align-items: center
&_text
display: block
width: 176px
border-radius: 69px
background: #4545e5 /* 按钮 */
box-shadow: 0px 4px 12px 0px rgba(69, 69, 229, 0.3)
color: var(--Color, #fff)
text-align: center
font-family: "PingFang SC"
font-size: 18px
font-style: normal
font-weight: 400
line-height: 37px /* 205.556% */
letter-spacing: 0.36px
.content_details
margin-top: 20px
color: var(--Color, #fff)
text-align: center
font-family: "Source Han Sans CN"
font-size: 12px
font-style: normal
font-weight: 400
line-height: 16px /* 133.333% */
letter-spacing: 1.8px
.content_img
width: 16px
height: 16px
& image
background: #4545e5
</style>
+12 -24
View File
@@ -1,5 +1,4 @@
<script setup lang="ts">
import type { CreateCarousalsRequest } from '@/model/carousals'
import carousalApi from '@/api/carousal'
import CardList from '@/pages/pet-manual/components/CardList.vue'
// const searchValue = ref('')
@@ -14,9 +13,9 @@ interface ListItem {
desc: string
time: string
}
// interface Item {
// content: string
// }
interface Item {
content: string
}
interface DotStyle {
backgroundColor: string
selectedBackgroundColor: string
@@ -75,13 +74,10 @@ const listModel = ref<ListItem[]>([
const safeHeight = ToolApi.getSafeHeight()
const searchValue = ref<string>('')
const info = ref<CreateCarousalsRequest[] | null>([
{
imageUrl: '',
targetId: '',
targetType: '',
targetUrl: '',
},
const info = ref<Item[]>([
{ content: '内容 A' },
{ content: '内容 B' },
{ content: '内容 C' },
])
const current = ref<number>(0)
@@ -125,16 +121,8 @@ const findList = ref<{ name: string }[]>([
{ name: '宠物吃饭慢' },
{ name: '猫咪尿闭怎么办' },
])
async function onLoad() {
const getCarousalListApi = await carousalApi.getCarousalList()
info.value = getCarousalListApi
}
function handleJumpUrl(item: CreateCarousalsRequest) {
if (item.targetType === 'url') {
uni.navigateTo({
url: item.targetUrl,
})
}
function onLoad() {
carousalApi.getCarousalList()
}
onLoad()
</script>
@@ -188,9 +176,9 @@ onLoad()
<view class="mx-4 mt-4">
<uni-swiper-dot :info="info" :current="current" field="content" mode="dot" :dots-styles="dotStyle">
<swiper class="swiper-box" @change="change">
<swiper-item v-for="(item, index) in info" :key="index">
<view class="swiper-item w-full h-full flex items-center justify-center">
<image :src="item.imageUrl" mode="heightFix" class="w-full h-full" @tap="handleJumpUrl(item)" />
<swiper-item v-for="(item, index) in info" :key="index" style="background: rgba(0, 0, 0, 0.20)">
<view class="swiper-item">
{{ item.content }}
</view>
</swiper-item>
</swiper>