修复:后台管理文章设置BUG;

修复:友链列表不显示数据BUG;
修复:应用设置点击返回,触发提示BUG;
This commit is contained in:
小莫唐尼 2022-12-09 10:48:00 +08:00
parent 3702cb1618
commit 3fd3b2247a
6 changed files with 13 additions and 15 deletions

View File

@ -26,7 +26,7 @@
<template v-slot:left="{ hdata }">
<tm-translate animation-name="fadeUp">
<view class="round-3 shadow-2 overflow white">
<tm-images :previmage="true" :src="hdata.item.image"></tm-images>
<tm-images :previmage="false" :src="hdata.item.image" @click="fnPreview(hdata.item)"></tm-images>
<view class="pa-10 text-size-s">
<view class="text-overflow-2">
<tm-tags color="bg-gradient-amber-accent" :shadow="0" :dense="true" size="s" model="fill">{{ hdata.item.team }}</tm-tags>
@ -51,7 +51,7 @@
<template v-slot:right="{ hdata }">
<tm-translate animation-name="fadeUp">
<view class="round-3 shadow-2 overflow white">
<tm-images :previmage="true" :src="hdata.item.image"></tm-images>
<tm-images :previmage="false" :src="hdata.item.image" @click="fnPreview(hdata.item)"></tm-images>
<view class="pa-10 text-size-s">
<view class="text-overflow-2">
<tm-tags :shadow="0" :dense="true" color="bg-gradient-amber-accent" size="s" model="fill">{{ hdata.item.team }}</tm-tags>
@ -282,6 +282,9 @@ export default {
},
//
fnPreview(item, index) {
if (!index) {
index = this.dataList.findIndex(x => x.id == item.id);
}
uni.previewImage({
current: index,
urls: this.dataList.map(x => x.image),
@ -293,7 +296,7 @@ export default {
};
</script>
<style lang="scss">
<style lang="scss" scoped>
.app-page {
width: 100vw;
min-height: 100vh;

View File

@ -190,14 +190,12 @@ export default {
};
});
// this.result = _result.reverse();
this.result = _result.reverse();
setTimeout(() => {
this.loading = 'success';
}, 500);
} else {
setTimeout(() => {
this.loading = 'error';
}, 500);
this.loading = 'error';
}
})
.catch(err => {

View File

@ -271,6 +271,7 @@ export default {
fnOnBack() {
if (this.isSaved) {
uni.navigateBack();
return;
}
uni.$eShowModal({
title: '提示',

View File

@ -540,10 +540,10 @@ export default {
if (this.form.id) {
this.$Router.push({
path: '/pagesB/articles/article-setting',
query: { postsId: this.form.id, postTitle: this.form.title, isEdit: true, from: 'edit' }
query: { postsId: this.form.id, postTitle: this.form.title, isEdit: 1, from: 'edit' }
});
} else {
this.$Router.push({ path: '/pagesB/articles/article-setting', query: { postsId: '', postTitle: '', isEdit: false, from: 'edit' } });
this.$Router.push({ path: '/pagesB/articles/article-setting', query: { postsId: '', postTitle: '', isEdit: 0, from: 'edit' } });
}
return;

View File

@ -404,13 +404,10 @@ export default {
const from = this.$Route.query.from;
this.postsId = postsId;
this.postTitle = postTitle || '';
this.isEdit = isEdit;
this.isEdit = isEdit == 1 ? true : false;
this.from = from;
this.createTime = uni.$tm.dayjs(new Date().getTime()).format('YYYY-MM-DD HH:mm:ss');
this.fnGetSettings();
console.log(uni.getStorageSync('posts-content'));
console.log(uni.getStorageSync('posts-content-source'));
},
onPullDownRefresh() {
if (this.isEdit == false) {
@ -591,7 +588,6 @@ export default {
})
.catch(err => {
this.$tm.toast('数据加载失败,请重试!');
console.log(err);
this.loading = 'error';
})
.finally(() => {

View File

@ -306,7 +306,7 @@ export default {
},
//
fnOnSetArticle(article, index) {
this.$Router.push({ path: '/pagesB/articles/article-setting', query: { postsId: article.id, postTitle: article.title, isEdit: true, from: 'list' } });
this.$Router.push({ path: '/pagesB/articles/article-setting', query: { postsId: article.id, postTitle: article.title, isEdit: 1, from: 'list' } });
},
//
fnOnDelArticle(article, index) {