mirror of
https://github.com/ialley-workshop-open/uni-halo.git
synced 2026-06-12 21:29:31 +08:00
新增:联系博主页面顶部返回按钮;
修复:修复 默认封面图、默认图片、默认头像在使用随机api时候无法显示的BUG; 修复:后台管理新增文章发布失败BUG; 删除:去除联系博主页面中的 联系博主 按钮; 优化:对友链页面进行重写; 优化:对部分页面和功能进行优化。
This commit is contained in:
@@ -16,7 +16,7 @@
|
||||
<view class="load-text">{{ loadMoreText }}</view>
|
||||
</block>
|
||||
|
||||
<tm-flotbutton @click="fnToTopPage" size="m" icon="icon-angle-up"></tm-flotbutton>
|
||||
<tm-flotbutton @click="fnToTopPage" color="light-blue" size="m" icon="icon-angle-up"></tm-flotbutton>
|
||||
</block>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
@@ -2,12 +2,9 @@
|
||||
<view class="app-page flex flex-col felx-center bg-white">
|
||||
<!-- 信息 -->
|
||||
<view class="profile flex flex-col flex-center pa-36">
|
||||
<view class="avatar">
|
||||
<text v-if="false" class="icon flex flex-center"><text class="iconfont icon-check text-size-s"></text></text>
|
||||
<image class="avatar-img" :src="bloggerInfo.avatar" mode="aspectFill"></image>
|
||||
</view>
|
||||
<view class="avatar"><image class="avatar-img" :src="bloggerInfo.avatar" mode="aspectFill"></image></view>
|
||||
<view class="nickname mt-24 text-weight-b text-size-g">{{ bloggerInfo.nickname }}</view>
|
||||
<view class="desc mt-24 text-size-m text-grey-darken-3">{{ bloggerInfo.description }}</view>
|
||||
<view class="desc mt-24 text-size-m text-grey-darken-3">{{ bloggerInfo.description || '这个博主很懒,竟然没写介绍~' }}</view>
|
||||
<!-- 联系图标 -->
|
||||
<view class="mt-24 contact-icons">
|
||||
<!-- 放全部:似乎显得有点拥挤 -->
|
||||
@@ -19,7 +16,7 @@
|
||||
<text class="ml-12 halocoloricon halocoloricon-gitee"></text>
|
||||
<text class="ml-12 halocoloricon halocoloricon-ic_email_round"></text>
|
||||
</view>
|
||||
<view class="mt-24 ">
|
||||
<view v-if="false" class="mt-24 ">
|
||||
<tm-button theme="bg-gradient-light-blue-accent" size="m" openType="contact">在线客服联系</tm-button>
|
||||
<tm-button theme="bg-gradient-orange-accent" size="m" @click="fnOnToWeb">访问PC端博客</tm-button>
|
||||
</view>
|
||||
@@ -129,7 +126,7 @@ export default {
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
this.fnSetPageTitle('❤');
|
||||
this.fnSetPageTitle('联系博主');
|
||||
},
|
||||
created() {
|
||||
this.fnGetData();
|
||||
@@ -185,19 +182,6 @@ export default {
|
||||
border: 6rpx solid #fff;
|
||||
box-shadow: 0rpx 2rpx 24rpx rgba(0, 0, 0, 0.07);
|
||||
overflow: hidden;
|
||||
.icon {
|
||||
width: 42rpx;
|
||||
height: 42rpx;
|
||||
position: absolute;
|
||||
right: 6rpx;
|
||||
bottom: 0rpx;
|
||||
border-radius: 50%;
|
||||
color: #fff;
|
||||
box-sizing: border-box;
|
||||
background-color: #03b0fd;
|
||||
border: 4rpx solid #fff;
|
||||
z-index: 2;
|
||||
}
|
||||
&-img {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
|
||||
@@ -6,10 +6,10 @@
|
||||
<tm-skeleton model="listAvatr"></tm-skeleton>
|
||||
</view>
|
||||
<!-- 内容区域 -->
|
||||
<view v-else class="app-page-content bg-white pa-24">
|
||||
<view v-else class="app-page-content pa-24" :class="{ 'bg-white': dataList.length !== 0 }">
|
||||
<view v-if="dataList.length == 0" class="content-empty flex flex-center">
|
||||
<!-- 空布局 -->
|
||||
<tm-empty icon="icon-shiliangzhinengduixiang-" label="该分类下暂无数据"></tm-empty>
|
||||
<tm-empty icon="icon-shiliangzhinengduixiang-" label="啊偶,博主还没有留言~"></tm-empty>
|
||||
</view>
|
||||
<block v-else>
|
||||
<block v-for="(item, index) in dataList" :key="index">
|
||||
@@ -28,9 +28,9 @@
|
||||
</tm-translate>
|
||||
</block>
|
||||
<tm-flotbutton :offset="[16, 80]" @click="fnToTopPage" size="m" color="light-blue" icon="icon-angle-up"></tm-flotbutton>
|
||||
<tm-flotbutton actions-pos="left" :show-text="true" color="bg-gradient-orange-accent" @click="fnToComment(null)"></tm-flotbutton>
|
||||
<view class="load-text">{{ loadMoreText }}</view>
|
||||
</block>
|
||||
<tm-flotbutton actions-pos="left" :show-text="true" color="bg-gradient-orange-accent" @click="fnToComment(null)"></tm-flotbutton>
|
||||
</view>
|
||||
|
||||
<!-- 评论详情 -->
|
||||
@@ -164,6 +164,7 @@ export default {
|
||||
.then(res => {
|
||||
if (res.status == 200) {
|
||||
this.loading = 'success';
|
||||
// return;
|
||||
this.loadMoreText = res.data.hasNext ? '上拉加载更多' : '呜呜,没有更多数据啦~';
|
||||
// 处理数据
|
||||
this.result = res.data;
|
||||
@@ -252,12 +253,18 @@ export default {
|
||||
width: 100vw;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
background-color: #fafafd;
|
||||
}
|
||||
.app-page-content {
|
||||
box-sizing: border-box;
|
||||
box-shadow: 0rpx 0rpx 24rpx rgba(0, 0, 0, 0.05);
|
||||
// box-shadow: 0rpx 0rpx 24rpx rgba(0, 0, 0, 0.05);
|
||||
}
|
||||
.content-empty {
|
||||
width: 100%;
|
||||
height: 60vh;
|
||||
}
|
||||
.loading-wrap {
|
||||
box-sizing: border-box;
|
||||
padding: 24rpx;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -148,6 +148,8 @@ export default {
|
||||
isBlackTheme: false,
|
||||
loading: true,
|
||||
appSettings: {},
|
||||
isSaved: true,
|
||||
firstLoad: true,
|
||||
homeLayout: {
|
||||
list: [{ name: '一行一列', value: 'h_row_col1' }, { name: '一行两列', value: 'h_row_col2' }],
|
||||
selectDefault: ['一行一列'],
|
||||
@@ -169,15 +171,17 @@ export default {
|
||||
dotPositionList: [{ name: '右边', value: 'right', checked: true }, { name: '下边', value: 'bottom', checked: false }]
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
// 获取设置
|
||||
_appSettings() {
|
||||
return uni.$tm.vx.getters().setting.getSettings;
|
||||
}
|
||||
},
|
||||
|
||||
watch: {
|
||||
_appSettings(val) {
|
||||
this.appSettings = val;
|
||||
appSettings: {
|
||||
deep: true,
|
||||
handler() {
|
||||
if (this.firstLoad) {
|
||||
this.firstLoad = false;
|
||||
} else {
|
||||
this.isSaved = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
@@ -185,7 +189,7 @@ export default {
|
||||
this.fnSetPageTitle('应用设置');
|
||||
},
|
||||
created() {
|
||||
this.appSettings = this._appSettings;
|
||||
this.appSettings = uni.$tm.vx.getters().setting.getSettings;
|
||||
this.fnHandleFormatSelect();
|
||||
uni.showLoading({
|
||||
title: '加载中...',
|
||||
@@ -242,6 +246,7 @@ export default {
|
||||
},
|
||||
// 保存
|
||||
fnOnSave() {
|
||||
this.isSaved = true;
|
||||
this.$tm.vx.commit('setting/setSettings', this.appSettings);
|
||||
uni.$tm.toast('保存成功,部分设置在重启后生效!');
|
||||
},
|
||||
@@ -257,12 +262,16 @@ export default {
|
||||
confirmColor: '#03a9f4'
|
||||
})
|
||||
.then(res => {
|
||||
this.isSaved = true;
|
||||
uni.$tm.vx.actions('setting/updateDefaultAppSettings');
|
||||
uni.$tm.toast('系统设置已恢复为默认配置,部分设置在重启后生效!');
|
||||
})
|
||||
.catch(err => {});
|
||||
},
|
||||
fnOnBack() {
|
||||
if (this.isSaved) {
|
||||
uni.navigateBack();
|
||||
}
|
||||
uni.$eShowModal({
|
||||
title: '提示',
|
||||
content: '您当前可能有未保存的数据,确定返回吗?',
|
||||
@@ -274,6 +283,7 @@ export default {
|
||||
})
|
||||
.then(res => {
|
||||
uni.navigateBack();
|
||||
this.isSaved = true;
|
||||
})
|
||||
.catch(err => {});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user