上传视频,页面调整
This commit is contained in:
@@ -3,12 +3,23 @@
|
||||
|
||||
<!-- 幻灯片 -->
|
||||
<view class="swiper">
|
||||
<u-swiper :list="swiperList" :height="250" :radius="0" @change="e => currentNum = e.current"
|
||||
indicatorStyle="right: 20px; bottom: 50px" @click="click">
|
||||
<view slot="indicator" class="indicator-num">
|
||||
<text class="indicator-num__text">{{ currentNum + 1 }}/{{ swiperList.length }}</text>
|
||||
</view>
|
||||
</u-swiper>
|
||||
<view v-show="swiperType == 'image'">
|
||||
<u-swiper :list="swiperList" height="500rpx" :radius="0" @change="e => currentNum = e.current"
|
||||
indicatorStyle="right: 20px; bottom: 50px" @click="click">
|
||||
<view slot="indicator" class="indicator-num">
|
||||
<text class="indicator-num__text">{{ currentNum + 1 }}/{{ swiperList.length }}</text>
|
||||
</view>
|
||||
</u-swiper>
|
||||
</view>
|
||||
|
||||
<view class="video-box" v-show="swiperType == 'video'">
|
||||
<video loop class="swiper-video" muted :autoplay="true" :src="form.videoUrl"></video>
|
||||
</view>
|
||||
<view class="swiper-switch">
|
||||
<view @click="swiperType = 'video'" :class="{active: swiperType == 'video'}" class="swiper-switch-item">视频</view>
|
||||
<view @click="swiperType = 'image'" :class="{active: swiperType == 'image'}" class="swiper-switch-item">图片</view>
|
||||
</view>
|
||||
|
||||
|
||||
<!-- 房源参数 -->
|
||||
<view class="house-info">
|
||||
@@ -16,14 +27,16 @@
|
||||
{{ form.houseTitle || '' }}
|
||||
<!-- 五象航洋城三室一厅采光好新房精装修三房一厅 采光好,乘诚意出售 -->
|
||||
</view>
|
||||
<view class="label">
|
||||
<view class="u-page__tag-item" v-for="tag in form.houseLabel">
|
||||
<u-tag :text="tag" type="primary" plain size="mini"></u-tag>
|
||||
<scroll-view scroll-x class="">
|
||||
<view class="label">
|
||||
<view class="u-page__tag-item" :key="index" v-for="(tag, index) in form.houseLabel">
|
||||
<u-tag :text="tag" type="primary" plain size="mini"></u-tag>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
<view class="dict">
|
||||
<view class="dict-item">
|
||||
<text class="title">{{ form.monthlyRent || 0 }}元/月</text>
|
||||
<text class="title">{{ form.videoUrl.monthlyRent || 0 }}元/月</text>
|
||||
<text class="desc">月租</text>
|
||||
</view>
|
||||
<view class="dict-item">
|
||||
@@ -290,6 +303,7 @@
|
||||
borderRadius: '12rpx'
|
||||
},
|
||||
heart: false,
|
||||
swiperType: 'video',
|
||||
latitude: 39.909,
|
||||
longitude: 116.39742,
|
||||
covers: [{
|
||||
@@ -413,7 +427,6 @@
|
||||
.label {
|
||||
margin: 10rpx 0;
|
||||
display: flex;
|
||||
|
||||
.u-page__tag-item {
|
||||
margin-bottom: 10rpx;
|
||||
margin-right: 10rpx;
|
||||
@@ -587,4 +600,37 @@
|
||||
.demo-layout {
|
||||
color: #ff0000;
|
||||
}
|
||||
.video-box{
|
||||
width: 750rpx;
|
||||
height: 500rpx;
|
||||
text-align: center;
|
||||
.swiper-video {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
margin: auto;
|
||||
}
|
||||
}
|
||||
.swiper-switch{
|
||||
position: absolute;
|
||||
display: flex;
|
||||
border-radius: 20rpx;
|
||||
height: 40rpx;
|
||||
width: 200rpx;
|
||||
background-color: rgba(0, 0, 0, 0.35);
|
||||
left: 30rpx;
|
||||
bottom: 100rpx;
|
||||
&-item {
|
||||
color: #FFFFFF;
|
||||
flex: 1;
|
||||
text-align: center;
|
||||
font-size: 24rpx;
|
||||
line-height: 40rpx;
|
||||
border-radius: 20rpx;
|
||||
&.active {
|
||||
background-color: #FFFFFF;
|
||||
color: #333333;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user