update
This commit is contained in:
@@ -65,20 +65,18 @@ const disableInviteHelp = ref(false);
|
|||||||
const userinfos = Storage.get("userinfos")
|
const userinfos = Storage.get("userinfos")
|
||||||
|
|
||||||
// TODO 需要测试邀请进来的情况
|
// TODO 需要测试邀请进来的情况
|
||||||
const mergeId = ref();
|
let mergeId = '';
|
||||||
const rankingInvite = ref(0);
|
const rankingInvite = ref(0);
|
||||||
const nameInvite = ref('');
|
const nameInvite = ref('');
|
||||||
const linkCountInvite = ref(0);
|
const linkCountInvite = ref(0);
|
||||||
|
|
||||||
const urlParams = new URLSearchParams(window.location.search);
|
const urlParams = new URLSearchParams(window.location.search);
|
||||||
mergeId.value = urlParams.get('merge_id');
|
mergeId = urlParams.get('merge_id');
|
||||||
|
|
||||||
|
|
||||||
const getInviteInfo = ()=> {
|
const getInviteInfo = ()=> {
|
||||||
disableInviteHelp.value = true;
|
disableInviteHelp.value = true;
|
||||||
const urlParams = new URLSearchParams(window.location.search);
|
fetch(`https://huodong2.lzlj.com/api/faceFamily/face/merge/${mergeId}`, {
|
||||||
mergeId.value = urlParams.get('merge_id');
|
|
||||||
fetch(`https://huodong2.lzlj.com/api/faceFamily/face/merge/${mergeId.value}`, {
|
|
||||||
method: 'GET',
|
method: 'GET',
|
||||||
headers: {
|
headers: {
|
||||||
'Authorization': `Bearer ${Storage.get("userinfos").api_token}`
|
'Authorization': `Bearer ${Storage.get("userinfos").api_token}`
|
||||||
@@ -104,13 +102,13 @@ watch(() => mergeId, async (newVal) => {
|
|||||||
if (newVal.value) {
|
if (newVal.value) {
|
||||||
getInviteInfo();
|
getInviteInfo();
|
||||||
}
|
}
|
||||||
})
|
}, {immediate: true})
|
||||||
|
|
||||||
const displayInviteHelpBtn = ref(true);
|
const displayInviteHelpBtn = ref(true);
|
||||||
const inviteHelp = ()=> {
|
const inviteHelp = ()=> {
|
||||||
const formData = {
|
const formData = {
|
||||||
invite_code: userinfos.invite_code,
|
invite_code: userinfos.invite_code,
|
||||||
merge_id: mergeId.value
|
merge_id: mergeId
|
||||||
}
|
}
|
||||||
fetch('https://huodong2.lzlj.com/api/faceFamily/face/like', {
|
fetch('https://huodong2.lzlj.com/api/faceFamily/face/like', {
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
@@ -234,7 +232,7 @@ markers.value = [
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="ranking-title" @click="inviteHelp">
|
<div v-if="displayInviteHelpBtn" class="ranking-title" @click="inviteHelp">
|
||||||
<img src="/src/assets/images/dianzan.webp" alt="点赞">
|
<img src="/src/assets/images/dianzan.webp" alt="点赞">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user