mirror of
https://github.com/ialley-workshop-open/uni-halo.git
synced 2025-05-19 01:50:15 +09:00
update: 调整审核模式隐藏部分内容,修复分类显示控制不生效
This commit is contained in:
parent
341670adcf
commit
40dd4f4b7f
@ -190,7 +190,7 @@
|
||||
path: '/pagesA/archives/archives',
|
||||
isAdmin: false,
|
||||
type: 'page',
|
||||
show: true
|
||||
show: !this.haloConfigs.basicConfig.auditModeEnabled
|
||||
}, {
|
||||
key: 'love',
|
||||
title: '恋爱日记',
|
||||
|
@ -1,33 +1,42 @@
|
||||
<template>
|
||||
<view class="app-page">
|
||||
<view v-if="loading != 'success'" class="loading-wrap">
|
||||
<tm-skeleton model="listAvatr"></tm-skeleton>
|
||||
<tm-skeleton model="listAvatr"></tm-skeleton>
|
||||
<tm-skeleton model="listAvatr"></tm-skeleton>
|
||||
</view>
|
||||
<!-- 内容区域 -->
|
||||
<view v-else class="app-page-content">
|
||||
<view v-if="dataList.length == 0" class="content-empty flex flex-center" style="height: 70vh;">
|
||||
<!-- 空布局 -->
|
||||
<tm-empty icon="icon-shiliangzhinengduixiang-" label="暂无数据"></tm-empty>
|
||||
<view class="auditModeEnabled" v-if="haloConfigs.basicConfig.auditModeEnabled">
|
||||
<view>你好呀,很开心认识你!</view>
|
||||
<view style="margin-top: 36rpx;">
|
||||
{{haloConfigs.appConfig.appInfo.name}}
|
||||
</view>
|
||||
<block v-else>
|
||||
<tm-translate v-for="(item, index) in dataList" :key="index"
|
||||
style="box-sizing: border-box;width: 50%;padding: 0 8rpx;" animation-name="fadeUp"
|
||||
:wait="calcAniWait(index)">
|
||||
<view class="catgory-card" :style="{backgroundImage:`url(${item.spec.cover})`}">
|
||||
<view class="content" @click="handleToCategory(item)">
|
||||
<view style="font-size: 32rpx;color: #ffffff;">{{ item.spec.displayName }}</view>
|
||||
<view style="font-size: 24rpx;color: #ffffff;margin-top: 6rpx;">共
|
||||
{{ item.postCount }} 篇文章
|
||||
</view>
|
||||
<block v-else>
|
||||
<view v-if="loading != 'success'" class="loading-wrap">
|
||||
<tm-skeleton model="listAvatr"></tm-skeleton>
|
||||
<tm-skeleton model="listAvatr"></tm-skeleton>
|
||||
<tm-skeleton model="listAvatr"></tm-skeleton>
|
||||
</view>
|
||||
<!-- 内容区域 -->
|
||||
<view v-else class="app-page-content">
|
||||
<view v-if="dataList.length == 0" class="content-empty flex flex-center" style="height: 70vh;">
|
||||
<!-- 空布局 -->
|
||||
<tm-empty icon="icon-shiliangzhinengduixiang-" label="暂无数据"></tm-empty>
|
||||
</view>
|
||||
<block v-else>
|
||||
<tm-translate v-for="(item, index) in dataList" :key="index"
|
||||
style="box-sizing: border-box;width: 50%;padding: 0 8rpx;" animation-name="fadeUp"
|
||||
:wait="calcAniWait(index)">
|
||||
<view class="catgory-card" :style="{backgroundImage:`url(${item.spec.cover})`}">
|
||||
<view class="content" @click="handleToCategory(item)">
|
||||
<view style="font-size: 32rpx;color: #ffffff;">{{ item.spec.displayName }}</view>
|
||||
<view style="font-size: 24rpx;color: #ffffff;margin-top: 6rpx;">共
|
||||
{{ item.postCount }} 篇文章
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</tm-translate>
|
||||
<tm-flotbutton @click="fnToTopPage" size="m" color="light-blue" icon="icon-angle-up"></tm-flotbutton>
|
||||
<view class="load-text">{{ loadMoreText }}</view>
|
||||
</block>
|
||||
</view>
|
||||
</tm-translate>
|
||||
<tm-flotbutton @click="fnToTopPage" size="m" color="light-blue"
|
||||
icon="icon-angle-up"></tm-flotbutton>
|
||||
<view class="load-text">{{ loadMoreText }}</view>
|
||||
</block>
|
||||
</view>
|
||||
</block>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
@ -62,11 +71,11 @@
|
||||
loadMoreText: '加载中...'
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
haloConfigs() {
|
||||
return this.$tm.vx.getters().getConfigs;
|
||||
},
|
||||
},
|
||||
computed: {
|
||||
haloConfigs() {
|
||||
return this.$tm.vx.getters().getConfigs;
|
||||
},
|
||||
},
|
||||
onLoad() {
|
||||
this.fnGetData();
|
||||
},
|
||||
@ -90,9 +99,12 @@
|
||||
},
|
||||
methods: {
|
||||
fnGetData() {
|
||||
if (this.haloConfigs.basicConfig.auditModeEnabled) {
|
||||
return;
|
||||
}
|
||||
if (this.haloConfigs.basicConfig.auditModeEnabled) {
|
||||
uni.setNavigationBarTitle({
|
||||
title: "你好,很高兴认识你!"
|
||||
})
|
||||
return;
|
||||
}
|
||||
uni.showLoading({
|
||||
mask: true,
|
||||
title: '加载中...'
|
||||
@ -159,6 +171,15 @@
|
||||
padding: 24rpx 0;
|
||||
}
|
||||
|
||||
.auditModeEnabled {
|
||||
width: 100%;
|
||||
height: 80vh;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.loading-wrap {
|
||||
padding: 24rpx;
|
||||
}
|
||||
|
@ -170,7 +170,7 @@
|
||||
},
|
||||
|
||||
fnGetCategoryList() {
|
||||
if (this.haloConfigs.pageConfig.homeConfig.useCategory) {
|
||||
if (!this.haloConfigs.pageConfig.homeConfig.useCategory) {
|
||||
return;
|
||||
}
|
||||
this.$httpApi.v2
|
||||
|
@ -1,78 +1,86 @@
|
||||
<template>
|
||||
<view class="app-page">
|
||||
<view class="e-fixed">
|
||||
<tm-tabs color="light-blue" v-model="tab.activeIndex" :list="tab.list" align="center"
|
||||
@change="fnOnTabChange"></tm-tabs>
|
||||
</view>
|
||||
<!-- 占位区域 -->
|
||||
<view style="width: 100vw;height: 90rpx;"></view>
|
||||
|
||||
<!-- 骨架屏:加载区域 -->
|
||||
<view v-if="loading != 'success'" class="loading-wrap">
|
||||
<tm-skeleton model="listAvatr"></tm-skeleton>
|
||||
<tm-skeleton model="listAvatr"></tm-skeleton>
|
||||
<tm-skeleton model="listAvatr"></tm-skeleton>
|
||||
</view>
|
||||
|
||||
<!-- 加载完成区域 -->
|
||||
<block v-else>
|
||||
<view v-if="dataList.length == 0" class="list-empty flex flex-center">
|
||||
<tm-empty icon="icon-shiliangzhinengduixiang-" label="暂无归档的文章"></tm-empty>
|
||||
<view class="auditModeEnabled" v-if="haloConfigs.basicConfig.auditModeEnabled">
|
||||
<view>你好呀,很开心认识你!</view>
|
||||
<view style="margin-top: 36rpx;">
|
||||
{{haloConfigs.appConfig.appInfo.name}}
|
||||
</view>
|
||||
<view v-else class="e-timeline tm-timeline mt-24">
|
||||
<block v-for="(item, index) in dataList" :key="index">
|
||||
<view class="tm-timeline-item tm-timeline-item--leftDir">
|
||||
<view style="width: 160rpx;">
|
||||
<view :style="{ width: '24rpx', height: '24rpx' }" :class="[black_tmeme ? 'bk' : '']"
|
||||
class="flex-center rounded tm-timeline-jidian border-white-a-2 grey-lighten-2 light-blue shadow-primary-4">
|
||||
</view>
|
||||
<view :style="{ marginTop: '-24rpx' }"
|
||||
:class="[index !== dataList.length - 1 ? 'tm-timeline-item-boder' : '', black_tmeme ? 'bk' : '']"
|
||||
class="grey-lighten-2"></view>
|
||||
</view>
|
||||
<view class="tm-timeline-item-content relative">
|
||||
<view class="tm-timeline-item-left">
|
||||
<view class="flex time text-weight-b mb-24">
|
||||
<text>{{ item.year }}年</text>
|
||||
<text v-if="tab.activeIndex == 0">{{ item.month }}月</text>
|
||||
<view class="text-size-s text-grey-darken-1 ml-12">
|
||||
(共 {{ item.posts.length }} 篇文章)
|
||||
</view>
|
||||
</view>
|
||||
<block v-else>
|
||||
<view class="e-fixed">
|
||||
<tm-tabs color="light-blue" v-model="tab.activeIndex" :list="tab.list" align="center"
|
||||
@change="fnOnTabChange"></tm-tabs>
|
||||
</view>
|
||||
<!-- 占位区域 -->
|
||||
<view style="width: 100vw;height: 90rpx;"></view>
|
||||
|
||||
<!-- 骨架屏:加载区域 -->
|
||||
<view v-if="loading != 'success'" class="loading-wrap">
|
||||
<tm-skeleton model="listAvatr"></tm-skeleton>
|
||||
<tm-skeleton model="listAvatr"></tm-skeleton>
|
||||
<tm-skeleton model="listAvatr"></tm-skeleton>
|
||||
</view>
|
||||
|
||||
<!-- 加载完成区域 -->
|
||||
<block v-else>
|
||||
<view v-if="dataList.length == 0" class="list-empty flex flex-center">
|
||||
<tm-empty icon="icon-shiliangzhinengduixiang-" label="暂无归档的文章"></tm-empty>
|
||||
</view>
|
||||
<view v-else class="e-timeline tm-timeline mt-24">
|
||||
<block v-for="(item, index) in dataList" :key="index">
|
||||
<view class="tm-timeline-item tm-timeline-item--leftDir">
|
||||
<view style="width: 160rpx;">
|
||||
<view :style="{ width: '24rpx', height: '24rpx' }" :class="[black_tmeme ? 'bk' : '']"
|
||||
class="flex-center rounded tm-timeline-jidian border-white-a-2 grey-lighten-2 light-blue shadow-primary-4">
|
||||
</view>
|
||||
<block v-if="item.posts.length != 0">
|
||||
<block v-for="(post, postIndex) in item.posts" :key="post.metadata.name">
|
||||
<view class="flex post shadow-3 pa-24 mb-24"
|
||||
:class="[globalAppSettings.layout.cardType]"
|
||||
@click="fnToArticleDetail(post)">
|
||||
<image class="post-thumbnail"
|
||||
:src="$utils.checkThumbnailUrl(post.spec.cover)" mode="aspectFill">
|
||||
</image>
|
||||
<view class="post-info pl-20">
|
||||
<view class="post-info_title text-overflow">{{ post.spec.title }}
|
||||
</view>
|
||||
<view
|
||||
class="post-info_summary text-overflow-2 mt-12 text-size-s text-grey-darken-1">
|
||||
{{ post.status.excerpt }}
|
||||
</view>
|
||||
<view class="post-info_time mt-12 text-size-s text-grey-darken-1">
|
||||
<text class="iconfont icon-clock text-size-s mr-6"></text>
|
||||
<text class="time-label">发布时间:</text>
|
||||
{{ {d: post.spec.publishTime, f: 'yyyy年MM月dd日 星期w'} | formatTime }}
|
||||
<view :style="{ marginTop: '-24rpx' }"
|
||||
:class="[index !== dataList.length - 1 ? 'tm-timeline-item-boder' : '', black_tmeme ? 'bk' : '']"
|
||||
class="grey-lighten-2"></view>
|
||||
</view>
|
||||
<view class="tm-timeline-item-content relative">
|
||||
<view class="tm-timeline-item-left">
|
||||
<view class="flex time text-weight-b mb-24">
|
||||
<text>{{ item.year }}年</text>
|
||||
<text v-if="tab.activeIndex == 0">{{ item.month }}月</text>
|
||||
<view class="text-size-s text-grey-darken-1 ml-12">
|
||||
(共 {{ item.posts.length }} 篇文章)
|
||||
</view>
|
||||
</view>
|
||||
<block v-if="item.posts.length != 0">
|
||||
<block v-for="(post, postIndex) in item.posts" :key="post.metadata.name">
|
||||
<view class="flex post shadow-3 pa-24 mb-24"
|
||||
:class="[globalAppSettings.layout.cardType]"
|
||||
@click="fnToArticleDetail(post)">
|
||||
<image class="post-thumbnail"
|
||||
:src="$utils.checkThumbnailUrl(post.spec.cover)" mode="aspectFill">
|
||||
</image>
|
||||
<view class="post-info pl-20">
|
||||
<view class="post-info_title text-overflow">{{ post.spec.title }}
|
||||
</view>
|
||||
<view
|
||||
class="post-info_summary text-overflow-2 mt-12 text-size-s text-grey-darken-1">
|
||||
{{ post.status.excerpt }}
|
||||
</view>
|
||||
<view class="post-info_time mt-12 text-size-s text-grey-darken-1">
|
||||
<text class="iconfont icon-clock text-size-s mr-6"></text>
|
||||
<text class="time-label">发布时间:</text>
|
||||
{{ {d: post.spec.publishTime, f: 'yyyy年MM月dd日 星期w'} | formatTime }}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</block>
|
||||
</block>
|
||||
</block>
|
||||
<view v-else class="post-empty text-size-m text-grey-darken-1">该日期下暂无归档文章!</view>
|
||||
<view v-else class="post-empty text-size-m text-grey-darken-1">该日期下暂无归档文章!</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</block>
|
||||
</view>
|
||||
<view class="load-text mt-12">{{ loadMoreText }}</view>
|
||||
<!-- 返回顶部 -->
|
||||
<tm-flotbutton @click="fnToTopPage" size="m" color="bg-gradient-light-blue-accent"
|
||||
icon="icon-angle-up"></tm-flotbutton>
|
||||
</block>
|
||||
</view>
|
||||
<view class="load-text mt-12">{{ loadMoreText }}</view>
|
||||
<!-- 返回顶部 -->
|
||||
<tm-flotbutton @click="fnToTopPage" size="m" color="bg-gradient-light-blue-accent"
|
||||
icon="icon-angle-up"></tm-flotbutton>
|
||||
</block>
|
||||
</block>
|
||||
</view>
|
||||
</template>
|
||||
@ -117,6 +125,9 @@
|
||||
},
|
||||
color_tmeme: function() {
|
||||
return this.$tm.vx.state().tmVuetify.color;
|
||||
},
|
||||
haloConfigs() {
|
||||
return this.$tm.vx.getters().getConfigs;
|
||||
}
|
||||
},
|
||||
created() {
|
||||
@ -147,6 +158,9 @@
|
||||
this.fnToTopPage();
|
||||
},
|
||||
fnGetData() {
|
||||
if (this.haloConfigs.basicConfig.auditModeEnabled) {
|
||||
return;
|
||||
}
|
||||
if (this.isLoadMore) {
|
||||
uni.showLoading({
|
||||
title: "加载中..."
|
||||
@ -317,6 +331,15 @@
|
||||
background-color: #fafafd;
|
||||
}
|
||||
|
||||
.auditModeEnabled {
|
||||
width: 100%;
|
||||
height: 80vh;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.loading-wrap {
|
||||
padding: 24rpx;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user