|
|
@ -345,12 +345,18 @@ export default { |
|
|
// 初始化TCP连接监听器 |
|
|
// 初始化TCP连接监听器 |
|
|
this.initTcpListeners() |
|
|
this.initTcpListeners() |
|
|
|
|
|
|
|
|
// 检查用户登录状态,只有已登录才加载自选股数据 |
|
|
|
|
|
if (this.userStore.userInfo) { |
|
|
|
|
|
console.log('用户已登录,加载自选股数据') |
|
|
|
|
|
|
|
|
// 检查用户登录状态,只有已登录并且不是游客才加载自选股数据 |
|
|
|
|
|
if (this.userStore.userInfo && !this.userStore.userInfo.isVisitor) { |
|
|
|
|
|
console.log('是用户登录,加载自选股数据', this.userStore.userInfo) |
|
|
this.loadMySelectionsData() |
|
|
this.loadMySelectionsData() |
|
|
} else { |
|
|
|
|
|
console.log('用户未登录,跳过自选股数据加载') |
|
|
|
|
|
|
|
|
} else if (this.userStore.userInfo && this.userStore.userInfo.isVisitor){ |
|
|
|
|
|
console.log('是游客登录,加载默认自选股',this.userStore.userInfo) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}else { |
|
|
|
|
|
console.log('用户未登录',this.userStore.userInfo) |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
// 页面渲染完成后自动连接两个TCP连接 |
|
|
// 页面渲染完成后自动连接两个TCP连接 |
|
|
|