Compare commits
2
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
629bb83ca2 | ||
|
|
01910a7a1f |
No files matched your search
@@ -1,6 +0,0 @@
|
|||||||
export interface CreateCarousalsRequest {
|
|
||||||
imageUrl: string
|
|
||||||
targetType: string
|
|
||||||
targetUrl?: string
|
|
||||||
targetId?: string
|
|
||||||
}
|
|
||||||
+21
-77
@@ -26,35 +26,44 @@ const videoSrc = ref(
|
|||||||
muted
|
muted
|
||||||
:controls="false"
|
: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" />
|
<image :src="left_top_logo" class="left-3 w-48 h-6" />
|
||||||
<view
|
<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>制定专业喂养方案</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>
|
</view>
|
||||||
<view class="flex justify-center flex-col w-full items-center">
|
<view class="flex justify-center flex-col w-full items-center h-full mt-[200px] text-[#FFF]">
|
||||||
<view class="content_botton">
|
<view
|
||||||
<button type="primary" class="content_botton_text">
|
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>
|
</button>
|
||||||
</view>
|
</view>
|
||||||
<view class="content_details">
|
<view class="content_details tracking-[1.8px] mt-[40px] text-[12px] font-normal ">
|
||||||
下拉了解详情
|
下拉了解详情
|
||||||
</view>
|
</view>
|
||||||
<view class="content_img">
|
<view class="content_img mt-[15px]">
|
||||||
<image :src="Rectangle" />
|
<image :src="Rectangle" class="w-[15px] h-2 shrink-0 stroke-[2px] fill-white stroke-white" />
|
||||||
<image :src="Rectangle" />
|
<image :src="Rectangle" class="w-[15px] h-2 shrink-0 stroke-[2px] fill-white stroke-white" />
|
||||||
</view>
|
</view>
|
||||||
</view>
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -75,69 +84,4 @@ const videoSrc = ref(
|
|||||||
controlslist: none
|
controlslist: none
|
||||||
aspect-ratio: 16 / 9
|
aspect-ratio: 16 / 9
|
||||||
object-fit: cover
|
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>
|
</style>
|
||||||
@@ -1,5 +1,4 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import type { CreateCarousalsRequest } from '@/model/carousals'
|
|
||||||
import carousalApi from '@/api/carousal'
|
import carousalApi from '@/api/carousal'
|
||||||
import CardList from '@/pages/pet-manual/components/CardList.vue'
|
import CardList from '@/pages/pet-manual/components/CardList.vue'
|
||||||
// const searchValue = ref('')
|
// const searchValue = ref('')
|
||||||
@@ -14,9 +13,9 @@ interface ListItem {
|
|||||||
desc: string
|
desc: string
|
||||||
time: string
|
time: string
|
||||||
}
|
}
|
||||||
// interface Item {
|
interface Item {
|
||||||
// content: string
|
content: string
|
||||||
// }
|
}
|
||||||
interface DotStyle {
|
interface DotStyle {
|
||||||
backgroundColor: string
|
backgroundColor: string
|
||||||
selectedBackgroundColor: string
|
selectedBackgroundColor: string
|
||||||
@@ -75,13 +74,10 @@ const listModel = ref<ListItem[]>([
|
|||||||
const safeHeight = ToolApi.getSafeHeight()
|
const safeHeight = ToolApi.getSafeHeight()
|
||||||
const searchValue = ref<string>('')
|
const searchValue = ref<string>('')
|
||||||
|
|
||||||
const info = ref<CreateCarousalsRequest[] | null>([
|
const info = ref<Item[]>([
|
||||||
{
|
{ content: '内容 A' },
|
||||||
imageUrl: '',
|
{ content: '内容 B' },
|
||||||
targetId: '',
|
{ content: '内容 C' },
|
||||||
targetType: '',
|
|
||||||
targetUrl: '',
|
|
||||||
},
|
|
||||||
])
|
])
|
||||||
|
|
||||||
const current = ref<number>(0)
|
const current = ref<number>(0)
|
||||||
@@ -125,16 +121,8 @@ const findList = ref<{ name: string }[]>([
|
|||||||
{ name: '宠物吃饭慢' },
|
{ name: '宠物吃饭慢' },
|
||||||
{ name: '猫咪尿闭怎么办' },
|
{ name: '猫咪尿闭怎么办' },
|
||||||
])
|
])
|
||||||
async function onLoad() {
|
function onLoad() {
|
||||||
const getCarousalListApi = await carousalApi.getCarousalList()
|
carousalApi.getCarousalList()
|
||||||
info.value = getCarousalListApi
|
|
||||||
}
|
|
||||||
function handleJumpUrl(item: CreateCarousalsRequest) {
|
|
||||||
if (item.targetType === 'url') {
|
|
||||||
uni.navigateTo({
|
|
||||||
url: item.targetUrl,
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
onLoad()
|
onLoad()
|
||||||
</script>
|
</script>
|
||||||
@@ -188,9 +176,9 @@ onLoad()
|
|||||||
<view class="mx-4 mt-4">
|
<view class="mx-4 mt-4">
|
||||||
<uni-swiper-dot :info="info" :current="current" field="content" mode="dot" :dots-styles="dotStyle">
|
<uni-swiper-dot :info="info" :current="current" field="content" mode="dot" :dots-styles="dotStyle">
|
||||||
<swiper class="swiper-box" @change="change">
|
<swiper class="swiper-box" @change="change">
|
||||||
<swiper-item v-for="(item, index) in info" :key="index">
|
<swiper-item v-for="(item, index) in info" :key="index" style="background: rgba(0, 0, 0, 0.20)">
|
||||||
<view class="swiper-item w-full h-full flex items-center justify-center">
|
<view class="swiper-item">
|
||||||
<image :src="item.imageUrl" mode="heightFix" class="w-full h-full" @tap="handleJumpUrl(item)" />
|
{{ item.content }}
|
||||||
</view>
|
</view>
|
||||||
</swiper-item>
|
</swiper-item>
|
||||||
</swiper>
|
</swiper>
|
||||||
|
|||||||
Reference in new issue
Block a user