登录
This commit is contained in:
parent
92b91dd65e
commit
ad584a9860
@ -7,7 +7,9 @@ import { deviceInfo } from '@kit.BasicServicesKit';
|
||||
@Preview
|
||||
@Component
|
||||
export struct LoginComp {
|
||||
@Link loginstatus: boolean;
|
||||
@Link YX_accid:string
|
||||
@Link YX_token:string
|
||||
|
||||
@State
|
||||
mobile: string = ''
|
||||
@State
|
||||
@ -93,6 +95,8 @@ export struct LoginComp {
|
||||
console.info(`Response login succeeded: ${res}`);
|
||||
let json:LoginInfo = JSON.parse(res+'') as LoginInfo;
|
||||
if(json.code=='1'||json.code=='200') {
|
||||
this.YX_token=json.YX_token
|
||||
this.YX_accid=json.YX_accid
|
||||
preferenceStore.setItemString(BasicConstant.YX_accid,json.YX_accid)
|
||||
preferenceStore.setItemString(BasicConstant.YX_token,json.YX_token)
|
||||
this.arrToStringSpecialy(json.special)
|
||||
@ -122,8 +126,6 @@ export struct LoginComp {
|
||||
})
|
||||
} else {
|
||||
|
||||
|
||||
this.loginstatus=true
|
||||
authStore.setUser(objs.data)
|
||||
// emitter.emit({ eventId: 100401 })
|
||||
logger.info('Response state'+state);
|
||||
|
||||
@ -32,7 +32,11 @@ struct Home {
|
||||
this.activeIndex = e.data.activeIndex
|
||||
}
|
||||
})
|
||||
this.login(AppConfig.userId, AppConfig.userToken)//暂时隐蔽云信登录
|
||||
if(AppConfig.userId!='')
|
||||
{
|
||||
this.login(AppConfig.userId, AppConfig.userToken)//暂时隐蔽云信登录
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
onChangeIndex() {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user