diff --git a/component/item-bottom/item-bottom.js b/component/item-bottom/item-bottom.js index 2c6b511..46df583 100644 --- a/component/item-bottom/item-bottom.js +++ b/component/item-bottom/item-bottom.js @@ -51,7 +51,7 @@ export const itemBottom = defineComponent({ creationAlertBox("error", res.message); return; } - + let data = res.data; creationAlertBox("success", res.message); @@ -105,7 +105,7 @@ export const itemBottom = defineComponent({ let QRcode = ref(""); const showQRcode = () => { - if (QRcode.value) return + if (QRcode.value) return; // return ajaxGet(`/v2/api/forum/getQrcode?token=${item.value.token}`).then((res) => { if (res.code != 200) return; @@ -114,12 +114,16 @@ export const itemBottom = defineComponent({ }); }; - return { QRcode, showQRcode, copyLinkClick, collectClick, item, likeClick, isLogin, isLikeGif }; + const share = () => { + ajax(`/v2/api/forum/postTopicShare`, {token}); + }; + + return { share, QRcode, showQRcode, copyLinkClick, collectClick, item, likeClick, isLogin, isLikeGif }; }, components: { like, }, - template: `
{{ item?.commentreviews?.content || "[图]" }}
{{ item.likes || "赞" }}
{{ item.collections || "收藏" }}
{{ item.comments || "讨论" }}
{{ item.coins || "投币" }}
转发
`, + template: `
{{ item?.commentreviews?.content || "[图]" }}
{{ item.likes || "赞" }}
{{ item.collections || "收藏" }}
{{ item.comments || "讨论" }}
{{ item.coins || "投币" }}
{{ item.shares || '转发'}}
`, }); diff --git a/component/item-bottom/item-bottom.txt b/component/item-bottom/item-bottom.txt index 667290e..08b5cb2 100644 --- a/component/item-bottom/item-bottom.txt +++ b/component/item-bottom/item-bottom.txt @@ -31,9 +31,10 @@
{{ item.coins || "投币" }}
-
+ +
-
转发
+
{{ item.shares || '转发'}}