Procházet zdrojové kódy

修复:后台管理文章设置BUG;
修复:友链列表不显示数据BUG;
修复:应用设置点击返回,触发提示BUG;

小莫唐尼 před 3 roky
rodič
revize
3fd3b2247a

+ 6 - 3
pages/tabbar/gallery/gallery.vue

@@ -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;

+ 2 - 4
pages/tabbar/links/links.vue

@@ -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 => {

+ 1 - 0
pagesA/setting/setting.vue

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

+ 2 - 2
pagesB/articles/article-edit.vue

@@ -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;

+ 1 - 5
pagesB/articles/article-setting.vue

@@ -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(() => {

+ 1 - 1
pagesB/articles/articles.vue

@@ -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) {