package
This commit is contained in:
1 parent
f7e899b4a1
commit
d0c73edb9c
4 files changed
+8
-26
No files matched your search
@@ -61,7 +61,6 @@ import { getAppInfo } from "@@/utils/app"
|
||||
import { hooks, router, constant } from "@@/index"
|
||||
import { userApi } from "@@/api"
|
||||
import { isDevEnv } from "@/sheep/utils/app"
|
||||
// import dd from "gdt-jsapi"
|
||||
|
||||
const state = reactive<{
|
||||
wallet: any[]
|
||||
|
||||
@@ -78,15 +78,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 })
|
||||
|
||||
Reference in new issue
Block a user