|
|
|
|
141
|
Init () { // 初始化
|
141
|
Init () { // 初始化
|
142
|
if (this.UserInfo === null) {
|
142
|
if (this.UserInfo === null) {
|
143
|
if (window.localStorage.niucaiusername && window.localStorage.niucaiuserpassword) {
|
143
|
if (window.localStorage.niucaiusername && window.localStorage.niucaiuserpassword) {
|
|
|
144
|
+ console.log('登录-------------------')
|
144
|
this.SignIn({ data: { password: md5(window.localStorage.niucaiuserpassword), userName: window.localStorage.niucaiusername } }).then((res) => { // 登录
|
145
|
this.SignIn({ data: { password: md5(window.localStorage.niucaiuserpassword), userName: window.localStorage.niucaiusername } }).then((res) => { // 登录
|
145
|
- if (this.UserInfo === null || res.data.code - 0 === 1001) {
|
|
|
|
|
146
|
+ console.log('登录成功-------------------')
|
|
|
147
|
+ if (this.UserInfo === null) {
|
146
|
this.$router.push({ name: 'SignIn' })
|
148
|
this.$router.push({ name: 'SignIn' })
|
147
|
} else {
|
149
|
} else {
|
148
|
this.GetFootballKeys() // 获取足彩相关字典
|
150
|
this.GetFootballKeys() // 获取足彩相关字典
|
149
|
this.GetAllLotteryType({ queryData: { pageNum: 1, pageSize: 1000 } })
|
151
|
this.GetAllLotteryType({ queryData: { pageNum: 1, pageSize: 1000 } })
|
|
|
152
|
+ console.log('触发页面请求-------------------')
|
150
|
this.$emit('UserInfoChange')
|
153
|
this.$emit('UserInfoChange')
|
151
|
}
|
154
|
}
|
152
|
}).catch(() => {
|
155
|
}).catch(() => {
|