Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
24814b7dee |
No files matched your search
@@ -0,0 +1,6 @@
|
||||
export interface CreateCarousalsRequest {
|
||||
imageUrl: string
|
||||
targetType: string
|
||||
targetUrl?: string
|
||||
targetId?: string
|
||||
}
|
||||
+77
-21
@@ -26,44 +26,35 @@ const videoSrc = ref(
|
||||
muted
|
||||
:controls="false"
|
||||
/>
|
||||
<view class="content absolute box-border top-0 left-0 w-full h-full p-[23px]">
|
||||
<view class="content">
|
||||
<image :src="left_top_logo" class="left-3 w-48 h-6" />
|
||||
<view
|
||||
class="content_text flex justify-between flex-col w-full h-full items-center "
|
||||
class="content_text flex justify-between flex-col my-8 w-full h-5/6 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 class="flex justify-center flex-col w-full items-center">
|
||||
<view>为你的爱宠建档</view>
|
||||
<view>制定专业喂养方案</view>
|
||||
<view class="mt-[15px] text-[12px] text-center font-normal tracking-[1.45px] leading-[16px]">
|
||||
<view class="conten_science">
|
||||
科学喂养专业有爱
|
||||
</view>
|
||||
</view>
|
||||
<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]"
|
||||
>
|
||||
<view class="flex justify-center flex-col w-full items-center">
|
||||
<view class="content_botton">
|
||||
<button type="primary" class="content_botton_text">
|
||||
开始建档
|
||||
</button>
|
||||
</view>
|
||||
<view class="content_details tracking-[1.8px] mt-[40px] text-[12px] font-normal ">
|
||||
<view class="content_details">
|
||||
下拉了解详情
|
||||
</view>
|
||||
<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 class="content_img">
|
||||
<image :src="Rectangle" />
|
||||
<image :src="Rectangle" />
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
@@ -84,4 +75,69 @@ 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>
|
||||
@@ -1,4 +1,5 @@
|
||||
<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('')
|
||||
@@ -13,9 +14,9 @@ interface ListItem {
|
||||
desc: string
|
||||
time: string
|
||||
}
|
||||
interface Item {
|
||||
content: string
|
||||
}
|
||||
// interface Item {
|
||||
// content: string
|
||||
// }
|
||||
interface DotStyle {
|
||||
backgroundColor: string
|
||||
selectedBackgroundColor: string
|
||||
@@ -74,10 +75,13 @@ const listModel = ref<ListItem[]>([
|
||||
const safeHeight = ToolApi.getSafeHeight()
|
||||
const searchValue = ref<string>('')
|
||||
|
||||
const info = ref<Item[]>([
|
||||
{ content: '内容 A' },
|
||||
{ content: '内容 B' },
|
||||
{ content: '内容 C' },
|
||||
const info = ref<CreateCarousalsRequest[] | null>([
|
||||
{
|
||||
imageUrl: '',
|
||||
targetId: '',
|
||||
targetType: '',
|
||||
targetUrl: '',
|
||||
},
|
||||
])
|
||||
|
||||
const current = ref<number>(0)
|
||||
@@ -121,8 +125,16 @@ const findList = ref<{ name: string }[]>([
|
||||
{ name: '宠物吃饭慢' },
|
||||
{ name: '猫咪尿闭怎么办' },
|
||||
])
|
||||
function onLoad() {
|
||||
carousalApi.getCarousalList()
|
||||
async function onLoad() {
|
||||
const getCarousalListApi = await carousalApi.getCarousalList()
|
||||
info.value = getCarousalListApi
|
||||
}
|
||||
function handleJumpUrl(item: CreateCarousalsRequest) {
|
||||
if (item.targetType === 'url') {
|
||||
uni.navigateTo({
|
||||
url: item.targetUrl,
|
||||
})
|
||||
}
|
||||
}
|
||||
onLoad()
|
||||
</script>
|
||||
@@ -176,9 +188,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" style="background: rgba(0, 0, 0, 0.20)">
|
||||
<view class="swiper-item">
|
||||
{{ item.content }}
|
||||
<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)" />
|
||||
</view>
|
||||
</swiper-item>
|
||||
</swiper>
|
||||
|
||||
Reference in new issue
Block a user