diff --git a/pets-fe/pages/community/community.js b/pets-fe/pages/community/community.js
index 001371b..c487a37 100644
--- a/pets-fe/pages/community/community.js
+++ b/pets-fe/pages/community/community.js
@@ -132,6 +132,13 @@ Page({
onCreatePost() {
this.setData({ sheetType: 'createPost', sheetShow: true });
},
+ // 点缩略图放大预览。只取 http 图(机器人帖的 emoji 占位不参与)
+ onPreviewImage(e) {
+ const { urls, cur } = e.currentTarget.dataset;
+ const list = (urls || []).filter((u) => typeof u === 'string' && u.indexOf('http') === 0);
+ if (!list.length) return;
+ wx.previewImage({ current: cur, urls: list });
+ },
// 长按自己的帖子可删除
onLongPressPost(e) {
const p = this.data.posts[e.currentTarget.dataset.index];
diff --git a/pets-fe/pages/community/community.wxml b/pets-fe/pages/community/community.wxml
index e68084c..aaf8166 100644
--- a/pets-fe/pages/community/community.wxml
+++ b/pets-fe/pages/community/community.wxml
@@ -25,7 +25,8 @@ module.exports.isUrl = function (s) { return s && s.indexOf('http') === 0; }
{{item.content}}
-
+
{{img}}