Commit e1d3dab1 by 杨北旺

横屏

1 parent 5e75b129
...@@ -4,7 +4,8 @@ Component({ ...@@ -4,7 +4,8 @@ Component({
properties: { properties: {
listItem: Object, listItem: Object,
noResult: Boolean noResult: Boolean,
isMaxScreen:Boolean
}, },
data: { data: {
......
.list-item-container { .list-item-container {
width: 100%; width: 100%;
box-sizing: border-box; box-sizing: border-box;
padding: 0 20rpx; padding: 0 var(--fontSize20);
display: flex; display: flex;
flex-direction: row; flex-direction: row;
flex-wrap: wrap; flex-wrap: wrap;
...@@ -12,68 +12,69 @@ ...@@ -12,68 +12,69 @@
.list-item-container .left, .list-item-container .right { .list-item-container .left, .list-item-container .right {
display: inline-block; display: inline-block;
vertical-align: top; vertical-align: top;
width: calc(50% - 10rpx); width: calc(50% - var(--fontSize10));
} }
.element { .element {
width: 100%; width: 100%;
background: #FFFFFF; background: #FFFFFF;
border-radius: 16rpx; border-radius: var(--fontSize16);
margin-bottom: 20rpx; margin-bottom: var(--fontSize20);
padding-bottom: 20rpx; padding-bottom: var(--fontSize20);
.cover{ .cover{
height: 344rpx; height: var(--fontSize344);
background: #FFFFFF; background: #FFFFFF;
border-radius: 16rpx; border-radius: var(--fontSize16);
position: relative; position: relative;
.icon{ .icon{
width: 100%; width: 100%;
height: 344rpx; height: var(--fontSize344);
} }
.play-icon{ .play-icon{
width: 48rpx; width: var(--fontSize48);
height: 48rpx; height: var(--fontSize48);
position: absolute; position: absolute;
left: 16rpx; left: var(--fontSize16);
bottom: 16rpx; bottom: var(--fontSize16);
} }
.cover_icon{ .cover_icon{
height: 344rpx; height: var(--fontSize344);
border-radius: var(--fontSize16) var(--fontSize16) 0 0;
} }
} }
.title{ .title{
width: 344rpx; width: var(--fontSize344);
box-sizing: border-box; box-sizing: border-box;
padding: 0 18rpx; padding: 0 var(--fontSize18);
font-weight: 400; font-weight: 400;
font-size: 28rpx; font-size: var(--fontSize28);
color: #292D33; color: #292D33;
display: inline-block; display: inline-block;
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
-webkit-line-clamp: 2; -webkit-line-clamp: 2;
-webkit-box-orient: vertical; -webkit-box-orient: vertical;
margin-top: 20rpx; margin-top: var(--fontSize20);
margin-bottom: 16rpx margin-bottom: var(--fontSize16)
} }
.footer{ .footer{
box-sizing: border-box; box-sizing: border-box;
padding: 0 18rpx; padding: 0 var(--fontSize18);
.view-box{ .view-box{
.icon{ .icon{
width: 32rpx; width: var(--fontSize32);
height: 32rpx; height: var(--fontSize32);
margin-right: 8rpx; margin-right: var(--fontSize8);
} }
.text{ .text{
font-weight: 400; font-weight: 400;
font-size: 24rpx; font-size: var(--fontSize24);
color: #5A5E66; color: #5A5E66;
} }
} }
.date-box{ .date-box{
font-weight: 400; font-weight: 400;
font-size: 20rpx; font-size: var(--fontSize20);
color: #5A5E66; color: #5A5E66;
} }
} }
...@@ -91,11 +92,11 @@ ...@@ -91,11 +92,11 @@
} }
.no_data{ .no_data{
font-weight: 400; font-weight: 400;
font-size: 28rpx; font-size: var(--fontSize28);
color: #999; color: #999;
text-align: center; text-align: center;
width: 100%; width: 100%;
padding-top: 220rpx; padding-top: var(--fontSize220);
display: flex; display: flex;
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;
...@@ -104,3 +105,87 @@ ...@@ -104,3 +105,87 @@
height: var(--fontSize160); height: var(--fontSize160);
} }
} }
// 平板
.maxScreen-container{
display: flex;
flex-direction: row;
flex-wrap: wrap;
justify-content: flex-start;
padding: 0 var(--fontSize10);
.element{
box-sizing: border-box;
width: var(--fontSize162);
margin: 0 var(--fontSize6) var(--fontSize12);
border-radius: var(--fontSize8);
.cover{
height: var(--fontSize162);
background: #FFFFFF;
position: relative;
.icon,.cover_icon{
width: var(--fontSize162);
height: var(--fontSize162);
border-radius: var(--fontSize8) var(--fontSize8) 0 0;
}
.max-play-icon{
width: var(--fontSize53);
height: var(--fontSize53);
position: absolute;
left: 50%;
top: 50%;
transform: translate(-50%,-50%)
}
}
.title{
width: var(--fontSize162);
box-sizing: border-box;
padding: 0 var(--fontSize9);
font-weight: 400;
font-size: var(--fontSize14);
color: #292D33;
display: inline-block;
overflow: hidden;
text-overflow: ellipsis;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
margin-top: var(--fontSize10);
margin-bottom: var(--fontSize8)
}
.footer{
box-sizing: border-box;
padding: 0 var(--fontSize9);
.view-box{
.icon{
width: var(--fontSize16);
height: var(--fontSize16);
margin-right: var(--fontSize4);
}
.text{
font-weight: 400;
font-size: var(--fontSize12);
color: #5A5E66;
}
}
.date-box{
font-weight: 400;
font-size: var(--fontSize10);
color: #5A5E66;
}
}
}
.no_data{
font-weight: 400;
font-size: var(--fontSize14);
color: #999;
text-align: center;
width: 100%;
padding-top: var(--fontSize110);
display: flex;
flex-direction: column;
align-items: center;
.no_icon{
width: var(--fontSize80);
height: var(--fontSize80);
}
}
}
<view class="list-item-container"> <view class="list-item-container {{isMaxScreen?'maxScreen-container':''}}">
<block wx:if="{{!noResult}}"> <block wx:if="{{!onResult&&!isMaxScreen}}">
<view class="left"> <view class="left">
<block wx:for="{{listItem.list}}" wx:for-index="idx" wx:key="idx" wx:for-item="item"> <block wx:for="{{listItem.list}}" wx:for-index="idx" wx:key="idx" wx:for-item="item">
<template is="item" data="{{item,...templateInfo,listItem}}" wx:if="{{idx%2==0}}" /> <template is="item" data="{{item,...templateInfo,listItem,isMaxScreen}}" wx:if="{{idx%2==0}}" />
</block> </block>
</view> </view>
<view class="right"> <view class="right">
<block wx:for="{{listItem.list}}" wx:for-index="idx" wx:key="idx" wx:for-item="item"> <block wx:for="{{listItem.list}}" wx:for-index="idx" wx:key="idx" wx:for-item="item">
<template is="item" data="{{item,...templateInfo,listItem}}" wx:if="{{idx%2==1}}" /> <template is="item" data="{{item,...templateInfo,listItem,isMaxScreen}}" wx:if="{{idx%2==1}}" />
</block> </block>
</view> </view>
</block> </block>
<block wx:elif="{{!onResult&&isMaxScreen}}">
<block wx:for="{{listItem.list}}" wx:for-index="idx" wx:key="idx" wx:for-item="item">
<template is="item" data="{{item,...templateInfo,listItem,isMaxScreen}}" />
</block>
</block>
<block wx:if="{{noResult}}"> <block wx:if="{{noResult}}">
<view class="no_data"> <view class="no_data">
<image class="no_icon" src="/packageEquity/images/noData.png" /> <image class="no_icon" src="/packageEquity/images/noData.png" />
...@@ -22,7 +27,7 @@ ...@@ -22,7 +27,7 @@
<view class="cover flex_cc"> <view class="cover flex_cc">
<image wx:if="{{!item.cover}}" class="icon" src="{{IMG_URL}}peixun/{{listItem.icon}}.png?v=1" /> <image wx:if="{{!item.cover}}" class="icon" src="{{IMG_URL}}peixun/{{listItem.icon}}.png?v=1" />
<image wx:if="{{item.cover}}" mode="aspectFill" class="cover_icon" src="{{item.cover}}" /> <image wx:if="{{item.cover}}" mode="aspectFill" class="cover_icon" src="{{item.cover}}" />
<image wx:if="{{listItem.name=='video'}}" class="play-icon" src="{{IMG_URL}}peixun/play_icon.png" /> <image wx:if="{{listItem.name=='video'}}" class="{{isMaxScreen?'max-':''}}play-icon" src="{{IMG_URL}}peixun/play_icon.png" />
</view> </view>
<view class="title two-text">{{item.title}}</view> <view class="title two-text">{{item.title}}</view>
<view class="footer flex_scb"> <view class="footer flex_scb">
......
page { page {
background: #F7F8FA; background: #F7F8FA;
} }
.min-screen-close{
display: none;
}
.pos-container { .pos-container {
position: absolute; position: absolute;
left: 0; left: 0;
...@@ -17,16 +19,25 @@ page { ...@@ -17,16 +19,25 @@ page {
background: url('https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/peixun/bg_banner.png'); background: url('https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/peixun/bg_banner.png');
background-size: 100% 100%; background-size: 100% 100%;
background-color: #fff; background-color: #fff;
// position: absolute;
// left: 0;
// top: 0;
// z-index: -1;
} }
// .main{ @media screen and (min-device-width: 600px) and (-webkit-min-device-pixel-ratio: 1) {
// position: relative; .max-screen-close{
// z-index: 2; display: none;
// background: #F7F8FA; }
// } .max-screen-open{
.fixedBox{ display: block;
opacity: 0; }
.max-bg {
width: 100%;
height: var(--fontSize140);
background: url('https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/peixun/max-banner.png');
background-size: cover;
background-repeat: no-repeat;
background-position: center;
}
.tab-class{
flex: 0 0 var(--fontSize120);
}
} }
<view class="pos-container"> <view class="pos-container .max-screen-close">
<!-- <scroll-view upper-threshold="{{navBarHeight}}" bindscrolltolower="scrolltoupper" style="height:100%" bindscroll="bindscroll" scroll-y="{{!isNeedFixed}}"> --> <view class="bg scroll_height_d_part"></view>
<view class="bg scroll_height_d_part"></view> <view wx:if="{{showPage}}" class="main">
<view wx:if="{{showPage}}" class="main"> <view class="main-box">
<view class="main-box"> <van-tabs wrap-class="scroll_height_d_part" sticky bind:change="onChangeTab" border title-inactive-color="#5A5E66" title-active-color="#347BFF" color="#347BFF" active="video">
<van-tabs wrap-class="scroll_height_d_part" sticky bind:change="onChangeTab" border title-inactive-color="#5A5E66" title-active-color="#347BFF" color="#347BFF" active="video"> <van-search left-icon="/images/search.png" shape="round" bind:clear="onCancel" bind:change="onChangeSearch" bind:search="onSearch" class="scroll_height_d_part" value="{{ searchKey }}" placeholder="标题" />
<van-search left-icon="/images/search.png" shape="round" bind:clear="onCancel" bind:change="onChangeSearch" bind:search="onSearch" class="scroll_height_d_part" value="{{ searchKey }}" placeholder="标题" /> <block wx:for="{{menuList}}" wx:key="index">
<block wx:for="{{menuList}}" wx:key="index"> <van-tab title="{{item.title}}" name="{{item.name}}">
<van-tab title="{{item.title}}" name="{{item.name}}"> <view class="content-box">
<view class="content-box"> <scroll-view style="height:calc(100vh - 180px - var(--fontSize300))" scroll-y class="list">
<scroll-view style="height:calc(100vh - 180px - var(--fontSize300))" scroll-y class="list"> <list-item noResult="{{noResult}}" listItem="{{item}}"></list-item>
<list-item noResult="{{noResult}}" listItem="{{item}}"></list-item> </scroll-view>
</scroll-view> </view>
</view> </van-tab>
</van-tab> </block>
</block> </van-tabs>
</van-tabs>
</view>
</view> </view>
<!-- </scroll-view> --> </view>
</view> </view>
<!-- <view class="bg"></view> <!-- 平板 -->
<view wx:if="{{showPage}}" class="main" style="margin-top:{{222-navBarHeight}}px"> <view class="pos-container min-screen-close .max-screen-open">
<view class="main-box"> <view class="max-bg scroll_height_d_part"></view>
<van-tabs sticky bind:change="onChangeTab" border title-inactive-color="#5A5E66" title-active-color="#347BFF" color="#347BFF" active="video"> <view wx:if="{{showPage}}" class="main">
<van-search shape="round" bind:clear="onCancel" bind:change="onChangeSearch" bind:search="onSearch" class="scroll_height_d_part" value="{{ searchKey }}" placeholder="标题" /> <view class="main-box">
<block wx:for="{{menuList}}" wx:key="index"> <van-tabs line-width="34px" tab-class="tab-class" wrap-class="scroll_height_d_part" sticky bind:change="onChangeTab" border title-inactive-color="#5A5E66" title-active-color="#347BFF" color="#347BFF" active="video">
<van-tab title="{{item.title}}" name="{{item.name}}"> <van-search left-icon="/images/search.png" shape="round" bind:clear="onCancel" bind:change="onChangeSearch" bind:search="onSearch" class="scroll_height_d_part" value="{{ searchKey }}" placeholder="标题" />
<view class="content-box"> <block wx:for="{{menuList}}" wx:key="index">
<scroll-view style="height:calc(100vh - 222px)" scroll-y class="list"> <van-tab title="{{item.title}}" name="{{item.name}}">
<list-item noResult="{{noResult}}" listItem="{{item}}"></list-item> <view class="content-box">
</scroll-view> <scroll-view style="height:calc(100vh - var(--fontSize300))" scroll-y class="list">
</view> <list-item noResult="{{noResult}}" isMaxScreen="{{true}}" listItem="{{item}}"></list-item>
</van-tab> </scroll-view>
</block> </view>
</van-tabs> </van-tab>
</block>
</van-tabs>
</view>
</view> </view>
</view> -->
\ No newline at end of file \ No newline at end of file
</view>
\ No newline at end of file \ No newline at end of file
page{ page{
background: #F7F8FA; background: #F7F8FA;
} }
.min-screen-close{
display: none;
}
.main-box { .main-box {
.content-box{
.element{
width: 344rpx;
height: 564rpx;
background: #FFFFFF;
border-radius: 16rpx;
}
}
.list{ .list{
box-sizing: border-box; box-sizing: border-box;
width: 100%; width: 100%;
padding-bottom: 0; padding-bottom: 0;
height: 636rpx; padding-top: var(--fontSize20);
padding-top: 20rpx
} }
} }
.filter{ .filter{
width: 188rpx; width: var(--fontSize188);
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
} }
.filter-text{ .filter-text{
font-weight: 400; font-weight: 400;
font-size: 28rpx; font-size: var(--fontSize28);
color: #181A1F; color: #181A1F;
} }
.filter-icon{ .filter-icon{
width: 40rpx; width: var(--fontSize40);
height: 40rpx; height: var(--fontSize40);
} }
.filter-text-active{ .filter-text-active{
color: #347BFF; color: #347BFF;
} }
.van-tabs__line{ .van-tabs__line{
border-radius: 2rpx 2rpx 0 0 !important;
}
\ No newline at end of file \ No newline at end of file
border-radius: var(--fontSize2) var(--fontSize2) 0 0 !important;
}
@media screen and (min-device-width: 600px) and (-webkit-min-device-pixel-ratio: 1) {
.max-screen-close{
display: none;
}
.max-screen-open{
display: block;
.filter{
width: var(--fontSize99);
display: flex;
align-items: center;
justify-content: center;
}
.filter-text{
font-size: var(--fontSize14);
}
.filter-icon{
width: var(--fontSize20);
height: var(--fontSize20);
}
}
.tab-class{
flex: 0 0 var(--fontSize120) !important;
}
}
<view class="main-box"> <!-- 非大屏 -->
<view class="main-box .max-screen-close">
<van-tabs bind:change="onChangeTab" sticky border title-inactive-color="#5A5E66" title-active-color="#347BFF" color="#347BFF" active="video"> <van-tabs bind:change="onChangeTab" sticky border title-inactive-color="#5A5E66" title-active-color="#347BFF" color="#347BFF" active="video">
<van-search shape="round" left-icon="/images/search.png" bind:clear="onCancel" use-action-slot bind:change="onChangeSearch" bind:search="onSearch" class="scroll_height_d_part" value="{{ searchKey }}" placeholder="标题" > <van-search shape="round" left-icon="/images/search.png" bind:clear="onCancel" use-action-slot bind:change="onChangeSearch" bind:search="onSearch" class="scroll_height_d_part" value="{{ searchKey }}" placeholder="标题" >
<view bind:tap="toFilterSort" slot="action" class="filter"> <view bind:tap="toFilterSort" slot="action" class="filter">
...@@ -16,4 +17,24 @@ ...@@ -16,4 +17,24 @@
</van-tab> </van-tab>
</block> </block>
</van-tabs> </van-tabs>
</view>
<!-- 平板 -->
<view class="main-box min-screen-close .max-screen-open">
<van-tabs line-width="34px" tab-class="tab-class" bind:change="onChangeTab" sticky border title-inactive-color="#5A5E66" title-active-color="#347BFF" color="#347BFF" active="video">
<van-search shape="round" left-icon="/images/search.png" bind:clear="onCancel" use-action-slot bind:change="onChangeSearch" bind:search="onSearch" class="scroll_height_d_part" value="{{ searchKey }}" placeholder="标题" >
<view bind:tap="toFilterSort" slot="action" class="filter">
<view class="filter-text {{sortValue?'filter-text-active':''}}">浏览量</view>
<image class="filter-icon" src="./images/{{sortMap[sortValue]}}.png" />
</view>
</van-search>
<block wx:for="{{menuList}}" wx:key="index">
<van-tab title="{{item.title}}" name="{{item.name}}">
<view class="content-box">
<scroll-view style="height:{{scroll_height}}px" scroll-y class="list">
<list-item noResult="{{noResult}}" isMaxScreen="{{true}}" listItem="{{item}}"></list-item>
</scroll-view>
</view>
</van-tab>
</block>
</van-tabs>
</view> </view>
\ No newline at end of file \ No newline at end of file
...@@ -4,7 +4,8 @@ Component({ ...@@ -4,7 +4,8 @@ Component({
properties: { properties: {
listItem: Object, listItem: Object,
onResult: Boolean onResult: Boolean,
isMaxScreen:Boolean
}, },
data: { data: {
......
.list-item-container { .list-item-container {
width: 100%; width: 100%;
box-sizing: border-box; box-sizing: border-box;
padding: 20rpx; padding: var(--fontSize20);
display: flex; display: flex;
flex-direction: row; flex-direction: row;
flex-wrap: wrap; flex-wrap: wrap;
...@@ -13,68 +13,69 @@ ...@@ -13,68 +13,69 @@
.list-item-container .left, .list-item-container .right { .list-item-container .left, .list-item-container .right {
display: inline-block; display: inline-block;
vertical-align: top; vertical-align: top;
width: calc(50% - 10rpx); width: calc(50% - var(--fontSize10));
} }
.element { .element {
width: 100%; width: var(--fontSize344);
background: #FFFFFF; background: #FFFFFF;
border-radius: 16rpx; border-radius: var(--fontSize16);
margin-bottom: 20rpx; margin-bottom: var(--fontSize20);
padding-bottom: 20rpx; padding-bottom: var(--fontSize20);
.cover{ .cover{
height: 344rpx; height: var(--fontSize344);
background: #FFFFFF; background: #FFFFFF;
border-radius: 16rpx;
position: relative; position: relative;
.icon{ .icon{
width: 100%; width: var(--fontSize344);
height: 344rpx; height: var(--fontSize344);
border-radius: var(--fontSize16) var(--fontSize16) 0 0;
} }
.play-icon{ .play-icon{
width: 48rpx; width: var(--fontSize48);
height: 48rpx; height: var(--fontSize48);
position: absolute; position: absolute;
left: 16rpx; left: var(--fontSize16);
bottom: 16rpx; bottom: var(--fontSize16);
} }
.cover_icon{ .cover_icon{
height: 344rpx; height: var(--fontSize344);
border-radius: var(--fontSize16) var(--fontSize16) 0 0;
} }
} }
.title{ .title{
width: 344rpx; width: var(--fontSize344);
box-sizing: border-box; box-sizing: border-box;
padding: 0 18rpx; padding: 0 var(--fontSize18);
font-weight: 400; font-weight: 400;
font-size: 28rpx; font-size: var(--fontSize28);
color: #292D33; color: #292D33;
display: inline-block; display: inline-block;
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
-webkit-line-clamp: 2; -webkit-line-clamp: 2;
-webkit-box-orient: vertical; -webkit-box-orient: vertical;
margin-top: 20rpx; margin-top: var(--fontSize20);
margin-bottom: 16rpx margin-bottom: var(--fontSize16)
} }
.footer{ .footer{
box-sizing: border-box; box-sizing: border-box;
padding: 0 18rpx; padding: 0 var(--fontSize18);
.view-box{ .view-box{
.icon{ .icon{
width: 32rpx; width: var(--fontSize32);
height: 32rpx; height: var(--fontSize32);
margin-right: 8rpx; margin-right: var(--fontSize8);
} }
.text{ .text{
font-weight: 400; font-weight: 400;
font-size: 24rpx; font-size: var(--fontSize24);
color: #5A5E66; color: #5A5E66;
} }
} }
.date-box{ .date-box{
font-weight: 400; font-weight: 400;
font-size: 20rpx; font-size: var(--fontSize20);
color: #5A5E66; color: #5A5E66;
} }
} }
...@@ -92,11 +93,11 @@ ...@@ -92,11 +93,11 @@
} }
.no_data{ .no_data{
font-weight: 400; font-weight: 400;
font-size: 28rpx; font-size: var(--fontSize28);
color: #999; color: #999;
text-align: center; text-align: center;
width: 100%; width: 100%;
padding-top: 220rpx; padding-top: var(--fontSize220);
display: flex; display: flex;
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;
...@@ -105,12 +106,84 @@ ...@@ -105,12 +106,84 @@
height: var(--fontSize160); height: var(--fontSize160);
} }
} }
@media screen and (min-device-width: 600px) and (-webkit-min-device-pixel-ratio: 1) { .maxScreen-container{
.element{ display: flex;
width: 324rpx; flex-direction: row;
.cover{ flex-wrap: wrap;
width: 324rpx; justify-content: flex-start;
height: 324rpx; .element{
box-sizing: border-box;
width: var(--fontSize162);
margin: 0 var(--fontSize6) var(--fontSize12);
border-radius: var(--fontSize8);
.cover{
height: var(--fontSize162);
background: #FFFFFF;
position: relative;
.icon,.cover_icon{
width: var(--fontSize162);
height: var(--fontSize162);
border-radius: var(--fontSize8) var(--fontSize8) 0 0;
}
.max-play-icon{
width: var(--fontSize53);
height: var(--fontSize53);
position: absolute;
left: 50%;
top: 50%;
transform: translate(-50%,-50%)
}
}
.title{
width: var(--fontSize162);
box-sizing: border-box;
padding: 0 var(--fontSize9);
font-weight: 400;
font-size: var(--fontSize14);
color: #292D33;
display: inline-block;
overflow: hidden;
text-overflow: ellipsis;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
margin-top: var(--fontSize10);
margin-bottom: var(--fontSize8)
}
.footer{
box-sizing: border-box;
padding: 0 var(--fontSize9);
.view-box{
.icon{
width: var(--fontSize16);
height: var(--fontSize16);
margin-right: var(--fontSize4);
}
.text{
font-weight: 400;
font-size: var(--fontSize12);
color: #5A5E66;
}
}
.date-box{
font-weight: 400;
font-size: var(--fontSize10);
color: #5A5E66;
}
}
}
.no_data{
font-weight: 400;
font-size: var(--fontSize14);
color: #999;
text-align: center;
width: 100%;
padding-top: var(--fontSize110);
display: flex;
flex-direction: column;
align-items: center;
.no_icon{
width: var(--fontSize80);
height: var(--fontSize80);
}
} }
}
} }
\ No newline at end of file \ No newline at end of file
<view class="list-item-container"> <view class="list-item-container {{isMaxScreen?'maxScreen-container':''}}">
<block wx:if="{{!onResult}}"> <block wx:if="{{!onResult&&!isMaxScreen}}">
<view class="left"> <view class="left">
<block wx:for="{{listItem.list}}" wx:for-index="idx" wx:key="idx" wx:for-item="item"> <block wx:for="{{listItem.list}}" wx:for-index="idx" wx:key="idx" wx:for-item="item">
<template is="item" data="{{item,...templateInfo,listItem}}" wx:if="{{idx%2==0}}" /> <template is="item" data="{{item,...templateInfo,listItem,isMaxScreen}}" wx:if="{{idx%2==0}}" />
</block> </block>
</view> </view>
<view class="right"> <view class="right">
<block wx:for="{{listItem.list}}" wx:for-index="idx" wx:key="idx" wx:for-item="item"> <block wx:for="{{listItem.list}}" wx:for-index="idx" wx:key="idx" wx:for-item="item">
<template is="item" data="{{item,...templateInfo,listItem}}" wx:if="{{idx%2==1}}" /> <template is="item" data="{{item,...templateInfo,listItem,isMaxScreen}}" wx:if="{{idx%2==1}}" />
</block> </block>
</view> </view>
</block> </block>
<block wx:elif="{{!onResult&&isMaxScreen}}">
<block wx:for="{{listItem.list}}" wx:for-index="idx" wx:key="idx" wx:for-item="item">
<template is="item" data="{{item,...templateInfo,listItem,isMaxScreen}}" />
</block>
</block>
<block wx:if="{{onResult}}"> <block wx:if="{{onResult}}">
<view class="no_data"> <view class="no_data">
<image class="no_icon" src="../../images/noData.png" /> <image class="no_icon" src="../../images/noData.png" />
...@@ -22,7 +27,7 @@ ...@@ -22,7 +27,7 @@
<view class="cover flex_cc"> <view class="cover flex_cc">
<image wx:if="{{!item.cover}}" class="icon" src="{{IMG_URL}}peixun/{{listItem.icon}}.png?v=1" /> <image wx:if="{{!item.cover}}" class="icon" src="{{IMG_URL}}peixun/{{listItem.icon}}.png?v=1" />
<image wx:if="{{item.cover}}" mode="aspectFill" class="cover_icon" src="{{item.cover}}" /> <image wx:if="{{item.cover}}" mode="aspectFill" class="cover_icon" src="{{item.cover}}" />
<image wx:if="{{listItem.name=='video'}}" class="play-icon" src="{{IMG_URL}}peixun/play_icon.png" /> <image wx:if="{{listItem.name=='video'}}" class="{{isMaxScreen?'max-':''}}play-icon" src="{{IMG_URL}}peixun/play_icon.png" />
</view> </view>
<view class="title two-text">{{item.title}}</view> <view class="title two-text">{{item.title}}</view>
<view class="footer flex_scb"> <view class="footer flex_scb">
......
// page {
// background: #F7F8FA;
// }
// .pagedetail {
// position: relative;
// }
// .bg {
// width: 100%;
// height: 444rpx;
// background: url('https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/peixun/bg_banner.png');
// background-size: 100% 100%;
// background-color: #fff;
// position: absolute;
// left: 0;
// top: 0;
// z-index: -1;
// }
// .main-box{
// position: sticky;
// left: 0;
// z-index: 2;
// }
// .scroll_height_d_part{
// background: #fff;
// z-index: 2;
// position: relative;
// }
// .search-box{
// position: sticky;
// left: 0;
// z-index: 2;
// }
page { page {
background: #F7F8FA; background: #F7F8FA;
} }
.min-screen-close{
display: none;
}
.pos-container { .pos-container {
position: absolute; position: absolute;
...@@ -47,9 +16,30 @@ page { ...@@ -47,9 +16,30 @@ page {
.bg { .bg {
width: 100%; width: 100%;
height: 444rpx; height: var(--fontSize444);
background: url('https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/peixun/bg_banner.png'); background: url('https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/peixun/bg_banner.png');
background-size: 100% 100%; background-size: cover;
background-color: #fff; background-repeat: no-repeat;
background-position: center;
}
@media screen and (min-device-width: 600px) and (-webkit-min-device-pixel-ratio: 1) {
.max-screen-close{
display: none;
}
.max-screen-open{
display: block;
}
.max-bg {
width: 100%;
height: var(--fontSize140);
background: url('https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/peixun/max-banner.png');
background-size: cover;
background-repeat: no-repeat;
background-position: center;
}
.tab-class{
flex: 0 0 var(--fontSize120);
}
} }
<!-- <view class="bg"></view> <!-- 非大屏 -->
<view wx:if="{{showPage}}" class="main" style="margin-top:222px"> <view class="pos-container .max-screen-close">
<view class="main-box"> <view class="bg"></view>
<view wx:if="{{!navStyle&&scrollTop>178}}" style="top:{{navBarHeight+44}}px" class="search-box"> <view wx:if="{{showPage}}" class="main">
<van-search left-icon="/images/search.png" shape="round" bind:clear="onCancel" bind:change="onChangeSearch" bind:search="onSearch" custom-class="scroll_height_d_part" value="{{ searchKey }}" placeholder="标题" /> <view class="main-box">
<van-tabs sticky bind:change="onChangeTab" border title-inactive-color="#5A5E66" title-active-color="#347BFF" color="#347BFF" active="video">
<van-search left-icon="/images/search.png" shape="round" bind:clear="onCancel" bind:change="onChangeSearch" bind:search="onSearch" class="scroll_height_d_part" value="{{ searchKey }}" placeholder="标题" />
<block wx:for="{{menuList}}" wx:key="index">
<van-tab title="{{item.title}}" name="{{item.name}}">
<view class="content-box">
<scroll-view style="height:calc(100vh - 180px - var(--fontSize300))" scroll-y class="list">
<list-item onResult="{{onResult}}" isMaxScreen="{{false}}" listItem="{{item}}"></list-item>
</scroll-view>
</view>
</van-tab>
</block>
</van-tabs>
</view> </view>
<van-tabs sticky offset-top="{{navBarHeight}}" bind:change="onChangeTab" border title-inactive-color="#5A5E66" title-active-color="#347BFF" color="#347BFF" active="video">
<van-search left-icon="/images/search.png" wx:if="{{navStyle || scrollTop<178}}" shape="round" bind:clear="onCancel" bind:change="onChangeSearch" bind:search="onSearch" custom-class="scroll_height_d_part" value="{{ searchKey }}" placeholder="标题" />
<block wx:for="{{menuList}}" wx:key="index">
<van-tab title="{{item.title}}" name="{{item.name}}">
<view class="content-box">
<list-item onResult="{{onResult}}" listItem="{{item}}"></list-item>
</view>
</van-tab>
</block>
</van-tabs>
</view> </view>
</view> --> </view>
<view class="pos-container"> <!-- 平板 -->
<view class="bg scroll_height_d_part"></view> <view class="pos-container min-screen-close .max-screen-open">
<view class="max-bg"></view>
<view wx:if="{{showPage}}" class="main"> <view wx:if="{{showPage}}" class="main">
<view class="main-box"> <view class="main-box">
<van-tabs wrap-class="scroll_height_d_part" sticky bind:change="onChangeTab" border title-inactive-color="#5A5E66" title-active-color="#347BFF" color="#347BFF" active="video"> <van-tabs line-width="34px" tab-class="tab-class" sticky bind:change="onChangeTab" border title-inactive-color="#5A5E66" title-active-color="#347BFF" color="#347BFF" active="video">
<van-search left-icon="/images/search.png" shape="round" bind:clear="onCancel" bind:change="onChangeSearch" bind:search="onSearch" class="scroll_height_d_part" value="{{ searchKey }}" placeholder="标题" /> <van-search left-icon="/images/search.png" shape="round" bind:clear="onCancel" bind:change="onChangeSearch" bind:search="onSearch" class="scroll_height_d_part" value="{{ searchKey }}" placeholder="标题" />
<block wx:for="{{menuList}}" wx:key="index"> <block wx:for="{{menuList}}" wx:key="index">
<van-tab title="{{item.title}}" name="{{item.name}}"> <van-tab title="{{item.title}}" name="{{item.name}}">
<view class="content-box"> <view class="content-box">
<scroll-view style="height:calc(100vh - 180px - var(--fontSize300))" scroll-y class="list"> <scroll-view style="height:calc(100vh - var(--fontSize300))" scroll-y class="list">
<list-item onResult="{{onResult}}" listItem="{{item}}"></list-item> <list-item onResult="{{onResult}}" isMaxScreen="{{true}}" listItem="{{item}}"></list-item>
</scroll-view> </scroll-view>
</view> </view>
</van-tab> </van-tab>
......
...@@ -112,7 +112,7 @@ ...@@ -112,7 +112,7 @@
} }
}, },
"setting": { "setting": {
"compileHotReLoad": false "compileHotReLoad": true
}, },
"projectname": "%E7%B2%BE%E5%93%81%E5%8D%87%E7%BA%A7", "projectname": "%E7%B2%BE%E5%93%81%E5%8D%87%E7%BA%A7",
"libVersion": "3.2.5" "libVersion": "3.2.5"
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!