|
|
@@ -90,6 +90,8 @@ import { onMounted, ref } from 'vue';
|
|
|
import { useAppInit } from '@/common/composeabe/AppInit';
|
|
|
import { useAuthStore } from '@/store/auth';
|
|
|
import { useLoadQuerys } from '@/components/composeabe/LoadQuerys';
|
|
|
+import { useVillageStore } from '@/store/village';
|
|
|
+import { useShareLink } from '../composeabe/ShareLink';
|
|
|
import { UserApi } from '@/api/auth/UserApi';
|
|
|
import { waitTimeOut } from '@imengyu/imengyu-utils';
|
|
|
import { fillClaimFromVolunteer, getClaimVillageForm } from './form/claim';
|
|
|
@@ -109,7 +111,6 @@ import CommonTopBanner from '@/common/components/CommonTopBanner.vue';
|
|
|
import PrimaryButton from '@/common/components/PrimaryButton.vue';
|
|
|
import ProvideVar from '@/components/theme/ProvideVar.vue';
|
|
|
import BoxMid from '@/common/components/box/BoxMid.vue';
|
|
|
-import { useVillageStore } from '@/store/village';
|
|
|
|
|
|
/**
|
|
|
* 点亮村社页面
|
|
|
@@ -118,6 +119,8 @@ import { useVillageStore } from '@/store/village';
|
|
|
const authStore = useAuthStore();
|
|
|
const villageStore = useVillageStore();
|
|
|
const { init } = useAppInit();
|
|
|
+const { recommendUserId } = useShareLink();
|
|
|
+
|
|
|
|
|
|
const { querys } = useLoadQuerys({
|
|
|
villageId: 0,
|
|
|
@@ -177,7 +180,7 @@ async function loginWechat() {
|
|
|
uni.login({ provider: 'weixin' }),
|
|
|
uni.getUserProfile({ desc: '用于完善会员资料' }),
|
|
|
]);
|
|
|
- await authStore.loginWechart(res[0].code, res[1]);
|
|
|
+ await authStore.loginWechart(res[0].code, res[1], recommendUserId.value);
|
|
|
toast({
|
|
|
type: 'success',
|
|
|
content: '登录成功',
|
|
|
@@ -239,7 +242,7 @@ async function addSubmit() {
|
|
|
try {
|
|
|
addFormLoading.value = true;
|
|
|
addFormModel.value.villageId = querys.value.villageId;
|
|
|
- await VillageApi.claimVallage(addFormModel.value as VillageClaimInfo);
|
|
|
+ await VillageApi.claimVallage(addFormModel.value as VillageClaimInfo, recommendUserId.value);
|
|
|
await suscribePassMessage();
|
|
|
toast({ content: '提交成功' });
|
|
|
finishedMode.value = 'claim';
|