This commit is contained in:
weiwei committed 2025-05-19 14:22:36 +08:00
1 parent 79a01f9667
commit 5396e635ed
1 file changed
+8 -8
+8 -8
View File
@@ -57,15 +57,15 @@ async function handleShLogin(): Promise<boolean> {
try {
uni.showLoading({ title: "登录中...", mask: true })
// const userInfo = await (window as any).CP2.getUserInfo()
// if (userInfo.code == 0 || !userInfo.data.accountId || !userInfo.data.sessionId) {
// uni.showToast({ title: "获取诗画用户信息失败", icon: "none" })
// return false
// }
const userInfo = await (window as any).CP2.getUserInfo()
if (userInfo.code == 0 || !userInfo.data.accountId || !userInfo.data.sessionId) {
uni.showToast({ title: "获取诗画用户信息失败", icon: "none" })
return false
}
// const { accountId, sessionId } = userInfo.data
// const response = await userApi.authsh({ accountId, sessionId })
const response = await userApi.authsh({ accountId: "67e790d6a95d5a7b507e53dd", sessionId: "68215b03a95d5a4899d20cb4" }) // 测试
const { accountId, sessionId } = userInfo.data
const response = await userApi.authsh({ accountId, sessionId })
// const response = await userApi.authsh({ accountId: "67e790d6a95d5a7b507e53dd", sessionId: "68215b03a95d5a4899d20cb4" }) // 测试
if (response.code == 0) {
uni.setStorageSync(TOKEN_KEY, { accessToken: response.data.accessToken })