|
@@ -124,8 +124,12 @@ const createGuestAccount = async () => {
|
|
|
try {
|
|
try {
|
|
|
const urlParams = new URLSearchParams(window.location.search);
|
|
const urlParams = new URLSearchParams(window.location.search);
|
|
|
const inviteCode = urlParams.get("code");
|
|
const inviteCode = urlParams.get("code");
|
|
|
|
|
+ const refString = urlParams.get("ref");
|
|
|
|
|
|
|
|
- await userStore.createGuest(inviteCode || undefined);
|
|
|
|
|
|
|
+ await userStore.createGuest(
|
|
|
|
|
+ inviteCode || undefined,
|
|
|
|
|
+ refString || undefined
|
|
|
|
|
+ );
|
|
|
console.log("游客账号创建成功", userStore.userInfo);
|
|
console.log("游客账号创建成功", userStore.userInfo);
|
|
|
} catch (error) {
|
|
} catch (error) {
|
|
|
console.error("创建游客账号失败", error);
|
|
console.error("创建游客账号失败", error);
|