1
0
réplica de https://github.com/ialley-workshop-open/uni-halo.git synced 2026-06-12 13:19:31 +08:00

新增:联系博主页面顶部返回按钮;

修复:修复 默认封面图、默认图片、默认头像在使用随机api时候无法显示的BUG;
修复:后台管理新增文章发布失败BUG;
删除:去除联系博主页面中的 联系博主 按钮;
优化:对友链页面进行重写;
优化:对部分页面和功能进行优化。
Este commit está contenido en:
小莫唐尼
2022-12-09 00:24:39 +08:00
padre 473655171b
commit 3702cb1618
Se han modificado 15 ficheros con 200 adiciones y 92 borrados
+1 -1
Ver fichero
@@ -5,7 +5,7 @@
<image class="avatar" :src="$utils.checkAvatarUrl(bloggerInfo.avatar)" mode="aspectFill" @click="miniProfileCard.show = true"></image>
<view class="profile">
<view class="author mt-24 text-size-g text-weight-b">{{ bloggerInfo.nickname }}</view>
<view class="desc mt-24 text-size-m">{{ bloggerInfo.description || '一个爱凑热闹的、喜欢捣鼓前端的博主。' }}</view>
<view class="desc mt-24 text-size-m">{{ bloggerInfo.description || '这个博主很懒,竟然没写介绍~' }}</view>
</view>
<image v-if="calcWaveUrl" :src="calcWaveUrl" mode="scaleToFill" class="gif-wave"></image>
</view>
+27 -19
Ver fichero
@@ -16,10 +16,10 @@
<tm-skeleton model="listAvatr"></tm-skeleton>
</view>
<!-- 内容区域 -->
<view class="content" v-else>
<view class="content" v-else :class="{ 'bg-white': dataList.length !== 0 }">
<view v-if="dataList.length == 0" class="content-empty">
<!-- 空布局 -->
<tm-empty icon="icon-shiliangzhinengduixiang-" label="该分类下暂无数据"></tm-empty>
<tm-empty icon="icon-shiliangzhinengduixiang-" label="博主还没有分享图片~"></tm-empty>
</view>
<block v-else>
<tm-flowLayout v-if="globalAppSettings.gallery.useWaterfull" @click="fnOnClick" ref="wafll">
@@ -227,26 +227,32 @@ export default {
this.$httpApi
.getPhotoListByPage(this.queryParams)
.then(res => {
this.loading = 'success';
this.result = res.data;
if (res.data.content.length != 0) {
const _list = res.data.content.map((item, index) => {
item['image'] = this.$utils.checkImageUrl(item.thumbnail);
item['model'] = 'text';
item['takeTime'] = this.$tm.dayjs(item['takeTime']).format('DD/MM/YYYY');
return item;
});
this.fnCacheDataList(_list);
if (this.globalAppSettings.gallery.useWaterfull) {
this.dataList = _list;
this.$nextTick(() => {
this.$refs.wafll.pushData(_list);
if (res.status == 200) {
this.loading = 'success';
this.result = res.data;
if (res.data.content.length != 0) {
const _list = res.data.content.map((item, index) => {
item['image'] = this.$utils.checkImageUrl(item.thumbnail);
item['model'] = 'text';
item['takeTime'] = this.$tm.dayjs(item['takeTime']).format('DD/MM/YYYY');
return item;
});
} else {
this.dataList = this.dataList.concat(_list);
this.fnCacheDataList(_list);
if (this.globalAppSettings.gallery.useWaterfull) {
this.dataList = _list;
this.$nextTick(() => {
this.$refs.wafll.pushData(_list);
});
} else {
this.dataList = this.dataList.concat(_list);
}
}
this.loadMoreText = res.data.hasNext ? '上拉加载更多' : '呜呜,没有更多数据啦~';
} else {
this.loading = 'error';
this.waterfall.loading = 'finish';
this.loadMoreText = '';
}
this.loadMoreText = res.data.hasNext ? '上拉加载更多' : '呜呜,没有更多数据啦~';
})
.catch(err => {
console.error(err);
@@ -301,6 +307,7 @@ export default {
}
}
.content {
box-sizing: border-box;
padding: 0 24rpx;
padding-top: 24rpx;
@@ -312,6 +319,7 @@ export default {
}
}
.loading-wrap {
box-sizing: border-box;
padding: 24rpx;
}
</style>
+11 -4
Ver fichero
@@ -196,7 +196,10 @@ export default {
this.$httpApi
.getCategoryList({ more: true })
.then(res => {
this.categoryList = res.data;
this.categoryList = res.data.sort((a, b) => {
return b.postCount - a.postCount;
});
setTimeout(() => {
this.loading = 'success';
}, 500);
@@ -216,12 +219,16 @@ export default {
fnGetBanner() {
const _this = this;
const _format = function(list, type) {
return list.map(item => {
return list.map((item, index) => {
switch (type) {
case 'list':
return {
id: '',
src: item
id: index,
nickname: _this.bloggerInfo.nickname,
avatar: _this.bloggerInfo.avatar,
address: item.href || '',
title: item.title,
image: _this.$utils.checkImageUrl(item.thumbnail)
};
case 'article':
return {
+14 -7
Ver fichero
@@ -7,9 +7,9 @@
<tm-skeleton model="listAvatr"></tm-skeleton>
<tm-skeleton model="listAvatr"></tm-skeleton>
</view>
<view v-else class="bg-white">
<view v-else class="content">
<!-- 空数据 -->
<view v-if="result.length == 0" class="empty flex flex-center"><tm-empty icon="icon-shiliangzhinengduixiang-" label="啊偶,博主还没有朋友呢~"></tm-empty></view>
<view v-if="result.length == 0" class="content-empty flex flex-center"><tm-empty icon="icon-shiliangzhinengduixiang-" label="啊偶,博主还没有朋友呢~"></tm-empty></view>
<!-- 如果只有一个分组使用列表的形式 result.length == 1 -->
<view v-else-if="result.length == 1" class="flex flex-col pb-24">
@@ -190,7 +190,7 @@ export default {
};
});
this.result = _result.reverse();
// this.result = _result.reverse();
setTimeout(() => {
this.loading = 'success';
}, 500);
@@ -245,17 +245,24 @@ export default {
min-height: 100vh;
display: flex;
flex-direction: column;
background-color: #fafafd;
}
.loading-wrap {
padding: 24rpx;
min-height: 100vh;
}
.empty {
width: 100vw;
height: 60vh;
}
.content {
padding: 0 24rpx;
padding-top: 24rpx;
.content-empty {
height: 60vh;
display: flex;
align-items: center;
justify-content: center;
}
}
.link-card {
border-bottom: 2rpx solid #f5f5f5;
background-color: #ffffff;