|
@@ -1,6 +1,6 @@
|
|
<template>
|
|
<template>
|
|
<view>
|
|
<view>
|
|
- <!-- 吸顶搜索框 -->
|
|
|
|
|
|
+ <!-- 吸顶搜索框 -->
|
|
<view class="sticky" v-if="flag">
|
|
<view class="sticky" v-if="flag">
|
|
<input type="text" placeholder="请输入搜索内容">
|
|
<input type="text" placeholder="请输入搜索内容">
|
|
</view>
|
|
</view>
|
|
@@ -26,7 +26,7 @@
|
|
2022-12-08
|
|
2022-12-08
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
- <!-- 宫格 -->
|
|
|
|
|
|
+ <!-- 宫格 -->
|
|
<view class="grid">
|
|
<view class="grid">
|
|
<u-grid :col="4" :border="false">
|
|
<u-grid :col="4" :border="false">
|
|
<u-grid-item>
|
|
<u-grid-item>
|
|
@@ -63,7 +63,7 @@
|
|
</u-grid-item>
|
|
</u-grid-item>
|
|
</u-grid>
|
|
</u-grid>
|
|
</view>
|
|
</view>
|
|
- <!-- 新闻资讯 -->
|
|
|
|
|
|
+ <!-- 新闻资讯 -->
|
|
<view class="news">
|
|
<view class="news">
|
|
<view class="title">
|
|
<view class="title">
|
|
<view class="icon">
|
|
<view class="icon">
|
|
@@ -72,7 +72,7 @@
|
|
<view class="text">
|
|
<view class="text">
|
|
新闻资讯
|
|
新闻资讯
|
|
</view>
|
|
</view>
|
|
-
|
|
|
|
|
|
+
|
|
</view>
|
|
</view>
|
|
<view class="news-item" v-for="item in 4">
|
|
<view class="news-item" v-for="item in 4">
|
|
<view class="content">
|
|
<view class="content">
|
|
@@ -86,31 +86,31 @@
|
|
<view class="date">
|
|
<view class="date">
|
|
2020-12-30
|
|
2020-12-30
|
|
</view>
|
|
</view>
|
|
-
|
|
|
|
|
|
+
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
-
|
|
|
|
|
|
+
|
|
<view class="img">
|
|
<view class="img">
|
|
<img src="../../assets/img/newsPic.png" alt="">
|
|
<img src="../../assets/img/newsPic.png" alt="">
|
|
</view>
|
|
</view>
|
|
-
|
|
|
|
|
|
+
|
|
</view>
|
|
</view>
|
|
- </view>
|
|
|
|
- <u-divider bg-color="#F2F4F4" border-color="#CFD2D5">已经到底了</u-divider>
|
|
|
|
- <tabbar current="0"></tabbar>
|
|
|
|
|
|
+ </view>
|
|
|
|
+ <u-divider bg-color="#F2F4F4" border-color="#CFD2D5">已经到底了</u-divider>
|
|
|
|
+ <tabbar current="0"></tabbar>
|
|
</view>
|
|
</view>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script>
|
|
<script>
|
|
import tabbar from "../../components/Tabbar.vue"
|
|
import tabbar from "../../components/Tabbar.vue"
|
|
export default {
|
|
export default {
|
|
- components:{
|
|
|
|
|
|
+ components: {
|
|
tabbar
|
|
tabbar
|
|
},
|
|
},
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
- flag:false,
|
|
|
|
- scrollTop:"",
|
|
|
|
|
|
+ flag: false,
|
|
|
|
+ scrollTop: "",
|
|
list: [{
|
|
list: [{
|
|
image: 'https://cdn.uviewui.com/uview/swiper/1.jpg',
|
|
image: 'https://cdn.uviewui.com/uview/swiper/1.jpg',
|
|
title: '昨夜星辰昨夜风,画楼西畔桂堂东'
|
|
title: '昨夜星辰昨夜风,画楼西畔桂堂东'
|
|
@@ -128,40 +128,42 @@
|
|
}
|
|
}
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
- onPageScroll(e) {
|
|
|
|
- this.scrollTop = e.scrollTop;
|
|
|
|
- console.log(this.scrollTop);
|
|
|
|
- if(this.scrollTop>=200){
|
|
|
|
- this.flag=true;
|
|
|
|
- } else{
|
|
|
|
- this.flag=false;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
-
|
|
|
|
- },
|
|
|
|
-
|
|
|
|
|
|
+ onPageScroll(e) {
|
|
|
|
+ this.scrollTop = e.scrollTop;
|
|
|
|
+ console.log(this.scrollTop);
|
|
|
|
+ if (this.scrollTop >= 200) {
|
|
|
|
+ this.flag = true;
|
|
|
|
+ } else {
|
|
|
|
+ this.flag = false;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ },
|
|
|
|
+
|
|
},
|
|
},
|
|
-
|
|
|
|
-
|
|
|
|
-
|
|
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
}
|
|
}
|
|
</script>
|
|
</script>
|
|
|
|
|
|
<style scoped lang="scss">
|
|
<style scoped lang="scss">
|
|
- page{
|
|
|
|
|
|
+ page {
|
|
padding-bottom: 50px;
|
|
padding-bottom: 50px;
|
|
}
|
|
}
|
|
- .sticky{
|
|
|
|
|
|
+
|
|
|
|
+ .sticky {
|
|
width: 100%;
|
|
width: 100%;
|
|
position: fixed;
|
|
position: fixed;
|
|
top: 0;
|
|
top: 0;
|
|
left: 0;
|
|
left: 0;
|
|
right: 0;
|
|
right: 0;
|
|
z-index: 100;
|
|
z-index: 100;
|
|
- border-bottom:1px solid #fff ;
|
|
|
|
|
|
+ border-bottom: 1px solid #fff;
|
|
padding: 16rpx 40rpx;
|
|
padding: 16rpx 40rpx;
|
|
background-color: #fff;
|
|
background-color: #fff;
|
|
- uni-input{
|
|
|
|
|
|
+
|
|
|
|
+ uni-input {
|
|
background-color: #E8E8E8;
|
|
background-color: #E8E8E8;
|
|
height: 32px;
|
|
height: 32px;
|
|
line-height: 32px;
|
|
line-height: 32px;
|
|
@@ -169,33 +171,34 @@
|
|
text-align: center;
|
|
text-align: center;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
-
|
|
|
|
-
|
|
|
|
|
|
+
|
|
|
|
+
|
|
|
|
|
|
.u-search {
|
|
.u-search {
|
|
-
|
|
|
|
-
|
|
|
|
-/deep/.uni-input-placeholder {
|
|
|
|
- font-weight: bold;
|
|
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ /deep/.uni-input-placeholder {
|
|
|
|
+ font-weight: bold;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ /deep/.uni-input-input {
|
|
|
|
+ color: #ffffff !important;
|
|
|
|
+ font-weight: bold;
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
|
|
- /deep/.uni-input-input {
|
|
|
|
|
|
+ .search-box {
|
|
|
|
+ width: 100%;
|
|
|
|
+ background-color: #4F3C27;
|
|
|
|
+ padding: 16rpx 40rpx;
|
|
|
|
+ position: absolute;
|
|
|
|
+ line-height: 32px;
|
|
color: #ffffff !important;
|
|
color: #ffffff !important;
|
|
- font-weight: bold;
|
|
|
|
- }
|
|
|
|
|
|
+ opacity: 0.4;
|
|
|
|
+ z-index: 999;
|
|
|
|
+ opacity: 0.4;
|
|
}
|
|
}
|
|
-.search-box{
|
|
|
|
- width: 100%;
|
|
|
|
- background-color:#4F3C27;
|
|
|
|
- padding: 16rpx 40rpx;
|
|
|
|
- position: absolute;
|
|
|
|
- line-height: 32px;
|
|
|
|
- color: #ffffff !important;
|
|
|
|
- opacity: 0.4;
|
|
|
|
- z-index: 999;
|
|
|
|
- opacity: 0.4;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
|
|
+
|
|
|
|
|
|
// 公告
|
|
// 公告
|
|
.notice {
|
|
.notice {
|
|
@@ -225,66 +228,74 @@
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
-// 宫格
|
|
|
|
-.grid{
|
|
|
|
- img{
|
|
|
|
- width: 80rpx;
|
|
|
|
- height: 80rpx;
|
|
|
|
- }
|
|
|
|
- .grid-text{
|
|
|
|
- color: rgba(51, 51, 51, 1);
|
|
|
|
- margin-top: 8rpx;
|
|
|
|
- }
|
|
|
|
-}
|
|
|
|
|
|
+ // 宫格
|
|
|
|
+ .grid {
|
|
|
|
+ img {
|
|
|
|
+ width: 80rpx;
|
|
|
|
+ height: 80rpx;
|
|
|
|
+ }
|
|
|
|
|
|
-// 新闻资讯
|
|
|
|
-.news{
|
|
|
|
- padding: 40rpx 32rpx;
|
|
|
|
- background-color: rgba(244, 244, 244, 1);
|
|
|
|
- .title{
|
|
|
|
- display: flex;
|
|
|
|
- align-items: center;
|
|
|
|
- margin-bottom: 40rpx;
|
|
|
|
- img{
|
|
|
|
- width: 40rpx;
|
|
|
|
- height: 40rpx;
|
|
|
|
- margin-right: 8rpx;
|
|
|
|
|
|
+ .grid-text {
|
|
|
|
+ color: rgba(51, 51, 51, 1);
|
|
|
|
+ margin-top: 8rpx;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- .news-item{
|
|
|
|
- display: flex;
|
|
|
|
- justify-content: space-between;
|
|
|
|
- margin-bottom: 40rpx;
|
|
|
|
- .content{
|
|
|
|
- display: flex;
|
|
|
|
- flex-direction: column;
|
|
|
|
- justify-content: space-between;
|
|
|
|
- .news-title{
|
|
|
|
- color: rgba(51, 51, 51, 1);
|
|
|
|
- font-size: 16px;
|
|
|
|
- text-align: justify;
|
|
|
|
- width: 438rpx;
|
|
|
|
- white-space: nowrap;
|
|
|
|
- overflow: hidden;
|
|
|
|
- text-overflow: ellipsis;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- .information{
|
|
|
|
- margin-top: 44rpx;
|
|
|
|
- display: flex;
|
|
|
|
- justify-content: space-between;
|
|
|
|
- color: #777777;
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
-.img{
|
|
|
|
- width: 224rpx;
|
|
|
|
- border-radius: 5px;
|
|
|
|
- overflow: hidden;
|
|
|
|
- img{
|
|
|
|
- width: 100%;
|
|
|
|
- height: 100%;
|
|
|
|
|
|
+
|
|
|
|
+ // 新闻资讯
|
|
|
|
+ .news {
|
|
|
|
+ padding: 40rpx 32rpx;
|
|
|
|
+ background-color: rgba(244, 244, 244, 1);
|
|
|
|
+
|
|
|
|
+ .title {
|
|
|
|
+ display: flex;
|
|
|
|
+ align-items: center;
|
|
|
|
+ margin-bottom: 40rpx;
|
|
|
|
+
|
|
|
|
+ img {
|
|
|
|
+ width: 40rpx;
|
|
|
|
+ height: 40rpx;
|
|
|
|
+ margin-right: 8rpx;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ .news-item {
|
|
|
|
+ display: flex;
|
|
|
|
+ justify-content: space-between;
|
|
|
|
+ margin-bottom: 40rpx;
|
|
|
|
+
|
|
|
|
+ .content {
|
|
|
|
+ display: flex;
|
|
|
|
+ flex-direction: column;
|
|
|
|
+ justify-content: space-between;
|
|
|
|
+
|
|
|
|
+ .news-title {
|
|
|
|
+ color: rgba(51, 51, 51, 1);
|
|
|
|
+ font-size: 16px;
|
|
|
|
+ text-align: justify;
|
|
|
|
+ width: 438rpx;
|
|
|
|
+ white-space: nowrap;
|
|
|
|
+ overflow: hidden;
|
|
|
|
+ text-overflow: ellipsis;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ .information {
|
|
|
|
+ margin-top: 44rpx;
|
|
|
|
+ display: flex;
|
|
|
|
+ justify-content: space-between;
|
|
|
|
+ color: #777777;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ .img {
|
|
|
|
+ width: 224rpx;
|
|
|
|
+ border-radius: 5px;
|
|
|
|
+ overflow: hidden;
|
|
|
|
+
|
|
|
|
+ img {
|
|
|
|
+ width: 100%;
|
|
|
|
+ height: 100%;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
}
|
|
}
|
|
-}
|
|
|
|
-}
|
|
|
|
</style>
|
|
</style>
|