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