|
|
- <template>
- <!-- 申遗历程 -->
- <view class="apply">
- <navbar title="申遗历程" leftClick @leftClick="$utils.navigateBack" />
- <view class="top-img">
- <uv-swiper
- :list="banner.course"
- indicator
- height="420rpx"
- keyName="imageContent"></uv-swiper>
- </view>
-
- <view class="middle-box">
- <view class="middle-img">
- <view
- :key="index"
- :class="{act : index == articleType}"
- v-for="(item, index) in 3">
- <image src="../static/applyRelic/2.png" mode="aspectFill" />
- </view>
- </view>
- <view class="middle-font">
- <view @click="selectMiddle(0)">
- 申遗历程
- </view>
- <view @click="selectMiddle(1)">
- 申遗缘由
- </view>
- <view @click="selectMiddle(2)">
- 遗产价值
- </view>
- </view>
- </view>
-
- <view class="apply-list">
- <uv-list @scrolltolower="scrolltolower">
- <uv-list-item
- :title="item.articleTitle"
- :note="$dayjs(item.createTime).format('YYYY-MM-DD')"
- :border="true"
- v-for="(item,index) in list"
- :key="index"
- :clickable="true"
- @click="toUrl(item)"
- >
- <template #footer>
- <uv-image :src="item.articleImage" radius="10rpx" width="240rpx"
- height="160rpx" />
- </template>
- </uv-list-item>
- </uv-list>
- </view>
-
- <uv-empty
- v-if="total == 0"
- text="没有找到你需要的哦!"
- textSize="30rpx"
- iconSize="200rpx"
- icon="list"></uv-empty>
-
- <tabber />
- </view>
- </template>
-
- <script>
- import { mapState } from 'vuex'
- export default {
- data() {
- return {
- queryParams: {
- pageNo: 1,
- pageSize: 10,
- },
- total : 0,
- list : [],
- articleType : -1,
- keyword : '',
- }
- },
- computed : {
- ...mapState(['banner']),
- },
- onShow() {
- this.queryArticleListByType()
- },
- onReachBottom() {
- this.loadMoreData()
- },
- onPullDownRefresh(){
- this.queryArticleListByType()
- },
- onLoad(args) {
- this.keyword = args.keyword
- },
- methods: {
- queryArticleListByType(){
-
- let query = {
- ...this.queryParams,
- }
-
- if(this.articleType != -1){
- query.articleType = this.articleType
- }
-
- if(this.keyword){
- query.articleTitle = this.keyword
- }
-
- this.$api(this.keyword ? 'queryArticleListByTitle' :
- 'queryArticleListByType', query, res => {
- uni.stopPullDownRefresh()
- if(res.code == 200){
- this.list = res.result.records
- this.total = res.result.total
- }
- })
- },
- loadMoreData(){
- if(this.queryParams.pageSize < this.total){
- this.queryParams.pageSize += 10
- this.queryArticleListByType()
- }
- },
- toUrl(item){
- console.log(item);
- this.$utils.navigateTo(`/pages_order/service/articleDetail?id=${item.id}&type=course`)
- },
- selectMiddle(e){
- console.log(e);
- if(this.articleType != e){
- this.articleType = e
- }else{
- this.articleType = -1
- }
- this.queryArticleListByType()
- },
- }
- }
- </script>
-
- <style scoped lang="scss">
- .apply {
-
- .top-img {
- }
-
- .middle-box {
- display: flex;
- position: relative;
- height: 220rpx;
- align-items: center;
- justify-content: space-around;
- background-color: #fff;
-
- .middle-img {
- display: flex;
- align-items: center;
- justify-content: space-around;
- width: 100%;
- view {
- width: 160rpx;
- height: 160rpx;
- border-radius: 50%;
- image {
- width: 100%;
- height: 100%;
- }
- }
- }
- .act{
- box-shadow: 0 0 18rpx 14rpx #ff000042;
- }
-
- .middle-font {
- position: absolute;
- display: flex;
- width: 100%;
- justify-content: space-around;
-
- view {
- width: 60rpx;
- color: #FFFDF6;
- font-weight: 600;
- }
- }
- }
-
- .apply-list {
- width: 94%;
- margin-left: 3%;
- /deep/ .uv-list-item{
- background-color: #FFFDF6 !important;
- }
- }
- }
- </style>
|