|
@@ -10,7 +10,7 @@
|
|
|
* 3./front/ajaxPolling {reqType: 1,shareIds: pageshareid+"___"+kopshareid}
|
|
|
*/
|
|
|
import { useWebSocket } from '@vueuse/core'
|
|
|
-import { ajaxGetHasLogin, ajaxGetLoginPolling, ajaxGetLoginNum } from '@/api'
|
|
|
+import { ajaxGetUserInfo, ajaxGetLoginPolling, ajaxGetLoginNum } from '@/api'
|
|
|
|
|
|
|
|
|
/**
|
|
@@ -151,13 +151,19 @@ class ScanCodeLoginDetection {
|
|
|
}
|
|
|
|
|
|
hasLogin() {
|
|
|
- return ajaxGetHasLogin().then(({ data }) => {
|
|
|
- if (!data) {
|
|
|
+ return ajaxGetUserInfo().then(({ data }) => {
|
|
|
+ if (!Object.hasOwnProperty.call(data, 'userId')) {
|
|
|
return
|
|
|
}
|
|
|
|
|
|
this.options.login = true
|
|
|
- this.update('login', data)
|
|
|
+ this.update('login', {
|
|
|
+ result: 'ok',
|
|
|
+ s_headimage: data.headImage,
|
|
|
+ s_nickname: data.name,
|
|
|
+ phone: data.phone,
|
|
|
+ openid: ''
|
|
|
+ })
|
|
|
})
|
|
|
}
|
|
|
|