Commit d9e87981 authored by spc's avatar spc

Merge branch 'feihesanqi_20251014' of http://gitlab.dui88.com/fh/20250528_FHQ1...

Merge branch 'feihesanqi_20251014' of http://gitlab.dui88.com/fh/20250528_FHQ1 into feihesanqi_2025101
parents bdedda22 c49a50e3
<template>
<view class="sharepage_container" @click="handlePageClick">
<view class="sharepage_container">
<view class="background_image_container">
<!-- 背景图片 -->
<image class="background_image" :src="$baseUrl + 'homepage/shareImg_jf1.jpg'" mode="aspectFit" />
......@@ -152,7 +152,7 @@ const initPage = async () => {
if(isLogin.value) {
// 获取邀请码参数
const { inviteCode: ivtCode, unionId: uid } = initInviteParams();
// 如果有邀请码,调用助力接口
if (ivtCode && isLogin.value) {
callAssistInvite(ivtCode, uid);
......@@ -199,6 +199,7 @@ const onGetPhoneNumber = async (e) => {
// 获取邀请码参数
const { inviteCode: ivtCode, unionId: uid } = initInviteParams();
isLogin.value = true;
// 如果有邀请码,调用助力接口
if (ivtCode && isLogin.value) {
callAssistInvite(ivtCode, uid);
......@@ -222,13 +223,22 @@ const onGetPhoneNumber = async (e) => {
// 调用助力接口
const callAssistInvite = async (ivtCode,unionId) => {
showLoading('助力中...');
try {
// 获取用户unionId
const res = await integralStore.assistInvite(ivtCode, unionId);
if(res.success && res.data.newUser) {
globalStore.invateUseType = 'new';
} else {
globalStore.invateUseType = 'old';
gotoIntegral();
}
console.log('助力接口返回:', res);
hideLoading();
} catch (error) {
console.error('调用助力接口失败:', error);
hideLoading();
}
};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment