This commit is contained in:
XiuYun CHEN 2025-08-05 09:56:53 +08:00
parent 92b91dd65e
commit ad584a9860
2 changed files with 10 additions and 4 deletions

View File

@ -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);

View File

@ -32,9 +32,13 @@ struct Home {
this.activeIndex = e.data.activeIndex
}
})
if(AppConfig.userId!='')
{
this.login(AppConfig.userId, AppConfig.userToken)//暂时隐蔽云信登录
}
}
onChangeIndex() {
if (this.activeIndex === 3) themeManager.settingStatusBarWhite()
else themeManager.settingStatusBarBlack()