diff --git a/src/App.vue b/src/App.vue index e3f007e..4d06e0b 100644 --- a/src/App.vue +++ b/src/App.vue @@ -41,6 +41,8 @@ onLaunch(() => { console.log(res.osName, osName, "System"); }, }); + + uni.setStorageSync("userId", "114514"); }); onShow(() => { console.log("App Show!"); diff --git a/src/pages/login/index.vue b/src/pages/login/index.vue index 49e544c..f708827 100644 --- a/src/pages/login/index.vue +++ b/src/pages/login/index.vue @@ -458,7 +458,15 @@ const handleOpenPrivacyContract = () => { //#region 初始化 const urlUid = ref(""); //通过邀请来的会携带邀请人ID参数 onLoad((options) => { - urlUid.value = options.userId ? options.userId : null; + if (options.userId) { + urlUid.value = options.userId; + uni.showToast({ + title: `Uid获取成功!(${options.userId})`, + icon: "none", + }); + } else { + urlUid.value = null; + } uni.hideHomeButton(); // workId.value = options.id;