From dd773f03c081535eb8ef027b5f91ef727db52e90 Mon Sep 17 00:00:00 2001 From: yixu Date: Mon, 15 Sep 2025 19:30:25 +0800 Subject: [PATCH] update --- src/components/HomePage.vue | 13 +++++++++++++ src/components/PhotoSquare.vue | 11 +++++++++-- 2 files changed, 22 insertions(+), 2 deletions(-) diff --git a/src/components/HomePage.vue b/src/components/HomePage.vue index 38cd33a..b7511d0 100644 --- a/src/components/HomePage.vue +++ b/src/components/HomePage.vue @@ -156,6 +156,19 @@ if (isLogin()) { userStatus(handleLoginSuccess) } +let mergeId = ''; +const urlParams = new URLSearchParams(window.location.search); +mergeId = urlParams.get('merge_id'); + +watch(() => mergeId, async (newVal) => { + if (!newVal) { + return + } + if (newVal) { + isPhotoSquareVisible.value = true; + } +}, {immediate: true}) + diff --git a/src/components/PhotoSquare.vue b/src/components/PhotoSquare.vue index 2d79859..2eea5b4 100644 --- a/src/components/PhotoSquare.vue +++ b/src/components/PhotoSquare.vue @@ -66,12 +66,14 @@ const userinfos = Storage.get("userinfos") // TODO 需要测试邀请进来的情况 let mergeId = ''; +let inviteCode = ''; const rankingInvite = ref(0); const nameInvite = ref(''); const linkCountInvite = ref(0); const urlParams = new URLSearchParams(window.location.search); mergeId = urlParams.get('merge_id'); +inviteCode = urlParams.get('fromid'); const getInviteInfo = ()=> { @@ -99,15 +101,20 @@ watch(() => mergeId, async (newVal) => { if (!newVal) { return } - if (newVal.value) { + if (newVal) { + if (inviteCode === userinfos.invite_code) { + weui.alert("不可以给自己点赞哦!"); + return false; + } getInviteInfo(); } }, {immediate: true}) const displayInviteHelpBtn = ref(true); + const inviteHelp = ()=> { const formData = { - invite_code: userinfos.invite_code, + invite_code: inviteCode, merge_id: mergeId } fetch('https://huodong2.lzlj.com/api/faceFamily/face/like', {