对接接口
This commit is contained in:
@ -1,6 +1,5 @@
|
||||
<route lang="jsonc" type="page">
|
||||
{
|
||||
"needLogin": true,
|
||||
"layout": "tabbar",
|
||||
"style": {
|
||||
"navigationStyle": "custom"
|
||||
@ -182,6 +181,7 @@
|
||||
import {OrderStatus} from '@/utils/order'
|
||||
import {toast} from '@/utils/toast'
|
||||
import { useUserStore } from '@/store'
|
||||
import {snsapiBaseAuthorize} from '@/hooks/useWeiXin'
|
||||
|
||||
const OSS = inject('OSS')
|
||||
const navbarHeight = inject('navbarHeight')
|
||||
@ -254,15 +254,23 @@
|
||||
},
|
||||
|
||||
// 跳转到个人信息
|
||||
handleToProfile: () => {
|
||||
handleToProfile: async () => {
|
||||
if (isLogin.value) {
|
||||
uni.navigateTo({
|
||||
url: '/bundle/profile/profile'
|
||||
})
|
||||
} else {
|
||||
uni.navigateTo({
|
||||
url: '/pages/login/mobile'
|
||||
})
|
||||
// 登录操作
|
||||
await snsapiBaseAuthorize()
|
||||
const userStore = useUserStore()
|
||||
if (!userStore.userInfo.mobile) {
|
||||
uni.navigateTo({
|
||||
url: '/pages/login/mobile'
|
||||
})
|
||||
} else {
|
||||
userInfo.value = userStore.userInfo
|
||||
isLogin.value = true
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user