1
0
mirror of https://github.com/ialley-workshop-open/uni-halo.git synced 2026-06-12 21:29:31 +08:00

修复:后台管理文章设置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
+6 -3
View File
@@ -26,7 +26,7 @@
<template v-slot:left="{ hdata }"> <template v-slot:left="{ hdata }">
<tm-translate animation-name="fadeUp"> <tm-translate animation-name="fadeUp">
<view class="round-3 shadow-2 overflow white"> <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="pa-10 text-size-s">
<view class="text-overflow-2"> <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> <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 }"> <template v-slot:right="{ hdata }">
<tm-translate animation-name="fadeUp"> <tm-translate animation-name="fadeUp">
<view class="round-3 shadow-2 overflow white"> <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="pa-10 text-size-s">
<view class="text-overflow-2"> <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> <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) { fnPreview(item, index) {
if (!index) {
index = this.dataList.findIndex(x => x.id == item.id);
}
uni.previewImage({ uni.previewImage({
current: index, current: index,
urls: this.dataList.map(x => x.image), urls: this.dataList.map(x => x.image),
@@ -293,7 +296,7 @@ export default {
}; };
</script> </script>
<style lang="scss"> <style lang="scss" scoped>
.app-page { .app-page {
width: 100vw; width: 100vw;
min-height: 100vh; min-height: 100vh;
+2 -4
View File
@@ -190,14 +190,12 @@ export default {
}; };
}); });
// this.result = _result.reverse(); this.result = _result.reverse();
setTimeout(() => { setTimeout(() => {
this.loading = 'success'; this.loading = 'success';
}, 500); }, 500);
} else { } else {
setTimeout(() => { this.loading = 'error';
this.loading = 'error';
}, 500);
} }
}) })
.catch(err => { .catch(err => {
+1
View File
@@ -271,6 +271,7 @@ export default {
fnOnBack() { fnOnBack() {
if (this.isSaved) { if (this.isSaved) {
uni.navigateBack(); uni.navigateBack();
return;
} }
uni.$eShowModal({ uni.$eShowModal({
title: '提示', title: '提示',
+2 -2
View File
@@ -540,10 +540,10 @@ export default {
if (this.form.id) { if (this.form.id) {
this.$Router.push({ this.$Router.push({
path: '/pagesB/articles/article-setting', 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 { } 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; return;
+1 -5
View File
@@ -404,13 +404,10 @@ export default {
const from = this.$Route.query.from; const from = this.$Route.query.from;
this.postsId = postsId; this.postsId = postsId;
this.postTitle = postTitle || ''; this.postTitle = postTitle || '';
this.isEdit = isEdit; this.isEdit = isEdit == 1 ? true : false;
this.from = from; this.from = from;
this.createTime = uni.$tm.dayjs(new Date().getTime()).format('YYYY-MM-DD HH:mm:ss'); this.createTime = uni.$tm.dayjs(new Date().getTime()).format('YYYY-MM-DD HH:mm:ss');
this.fnGetSettings(); this.fnGetSettings();
console.log(uni.getStorageSync('posts-content'));
console.log(uni.getStorageSync('posts-content-source'));
}, },
onPullDownRefresh() { onPullDownRefresh() {
if (this.isEdit == false) { if (this.isEdit == false) {
@@ -591,7 +588,6 @@ export default {
}) })
.catch(err => { .catch(err => {
this.$tm.toast('数据加载失败,请重试!'); this.$tm.toast('数据加载失败,请重试!');
console.log(err);
this.loading = 'error'; this.loading = 'error';
}) })
.finally(() => { .finally(() => {
+1 -1
View File
@@ -306,7 +306,7 @@ export default {
}, },
// 设置文章信息 // 设置文章信息
fnOnSetArticle(article, index) { 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) { fnOnDelArticle(article, index) {