diff --git a/component/item-bottom/item-bottom.js b/component/item-bottom/item-bottom.js index 908c6d9..ea868f3 100644 --- a/component/item-bottom/item-bottom.js +++ b/component/item-bottom/item-bottom.js @@ -17,9 +17,12 @@ export const itemBottom = defineComponent({ setup(props) { let valueUrl = ref(""); + let isMobile = ref(false) + onMounted(() => { const valueA = document.querySelector(".valueA"); valueUrl.value = valueA.innerText; + isMobile.value = window.isMobile }); let item = ref({ ...props.itemdata }); @@ -47,7 +50,7 @@ export const itemBottom = defineComponent({ const token = item.value.token || ""; - if (["offer", "offer_summary", "interviewexperience"].includes(item.value["type"]) && item.value["is_like"]) { + if (["offer", "offer_summary", "interviewexperience"].includes(itemvalue["type"]) && item.value["is_like"]) { creationAlertBox("error", "不可取消点赞"); return; } @@ -108,9 +111,7 @@ export const itemBottom = defineComponent({ }); }; - const copyLinkClick = () => { - copyForumUid(`${location.origin}/details/${item.value.uniqid}`); - }; + const copyLinkClick = () => copyForumUid(`${location.origin}/details/${item.value.uniqid}`); let QRcode = ref(""); const showQRcode = () => { @@ -146,12 +147,12 @@ export const itemBottom = defineComponent({ const shareBoxRef = ref(null); - return { valueUrl, isright, shareBoxRef, share, QRcode, showQRcode, copyLinkClick, collectClick, item, likeClick, isLogin, isLikeGif }; + return { isMobile, valueUrl, isright, shareBoxRef, share, QRcode, showQRcode, copyLinkClick, collectClick, item, likeClick, isLogin, isLikeGif }; }, components: { like, }, - template: `
{{ item?.commentreviews?.content || "[图]" }}
{{ item.likes || "赞" }}
{{ item.collections || "收藏" }}
{{ item.comments || "讨论" }}
{{ item.coins || "投币" }}
{{ item.shares || '转发'}}
`, + 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 076b65b..f8d7dd5 100644 --- a/component/item-bottom/item-bottom.txt +++ b/component/item-bottom/item-bottom.txt @@ -32,7 +32,7 @@ -
+
{{ item.shares || '转发'}}