患者相关
This commit is contained in:
@@ -23,8 +23,6 @@ export struct HomePage {
|
||||
@State signData:Record<string,string> = {};
|
||||
|
||||
scroller:Scroller = new Scroller()
|
||||
private hintWindowDialog!: CustomDialogController;
|
||||
private signWindowDialog!:CustomDialogController;
|
||||
|
||||
dialog: CustomDialogController = new CustomDialogController({
|
||||
builder: HdLoadingDialog({ message: '加载中...' }),
|
||||
@@ -32,42 +30,36 @@ export struct HomePage {
|
||||
alignment: DialogAlignment.Center
|
||||
})
|
||||
|
||||
private hintPopWindowDialog() {
|
||||
this.hintWindowDialog = new CustomDialogController({
|
||||
builder:DefaultHintProWindows({
|
||||
controller:this.hintWindowDialog,
|
||||
message:this.hintMessage,
|
||||
cancleTitle:'',
|
||||
confirmTitle:'关闭',
|
||||
confirmTitleColor: '#000000',
|
||||
selectedButton: (index:number)=>{
|
||||
this.hintWindowDialog.close();
|
||||
}
|
||||
}),
|
||||
alignment: DialogAlignment.Center,
|
||||
cornerRadius:24,
|
||||
autoCancel:false,
|
||||
backgroundColor: ('rgba(0,0,0,0.5)'),
|
||||
})
|
||||
}
|
||||
hintWindowDialog: CustomDialogController = new CustomDialogController({
|
||||
builder:DefaultHintProWindows({
|
||||
message:this.hintMessage,
|
||||
cancleTitle:'',
|
||||
confirmTitle:'关闭',
|
||||
confirmTitleColor: '#000000',
|
||||
selectedButton: (index:number)=>{
|
||||
this.hintWindowDialog.close();
|
||||
}
|
||||
}),
|
||||
alignment: DialogAlignment.Center,
|
||||
cornerRadius:24,
|
||||
autoCancel:false,
|
||||
backgroundColor: ('rgba(0,0,0,0.5)'),
|
||||
})
|
||||
|
||||
private signPopWindowDialog(){
|
||||
this.signWindowDialog = new CustomDialogController({
|
||||
builder:SignPopWindow({
|
||||
controller:this.signWindowDialog,
|
||||
signDay:'今天是我们相识的第'+this.signData.gdxzday+'天',
|
||||
signWeek:this.signData.totalDay,
|
||||
signMouth:this.signData.continuous_day,
|
||||
signNews:this.signData.news['title'],
|
||||
signHtml:this.signData.news['path'],
|
||||
}),
|
||||
alignment: DialogAlignment.Center,
|
||||
cornerRadius:8,
|
||||
autoCancel:false,
|
||||
backgroundColor: Color.Transparent,
|
||||
backgroundBlurStyle: BlurStyle.NONE,
|
||||
})
|
||||
}
|
||||
signWindowDialog:CustomDialogController = new CustomDialogController({
|
||||
builder:SignPopWindow({
|
||||
signDay:'今天是我们相识的第'+String(this.signData.gdxzday)+'天',
|
||||
signWeek:String(this.signData.totalDay),
|
||||
signMouth:String(this.signData.continuous_day),
|
||||
signNews:this.signData.news['title'],
|
||||
signHtml:this.signData.news['path'],
|
||||
}),
|
||||
alignment: DialogAlignment.Center,
|
||||
cornerRadius:8,
|
||||
autoCancel:false,
|
||||
backgroundColor: Color.Transparent,
|
||||
backgroundBlurStyle: BlurStyle.NONE,
|
||||
})
|
||||
|
||||
gotoTop() {
|
||||
this.scroller.scrollToIndex(0);
|
||||
@@ -76,8 +68,6 @@ export struct HomePage {
|
||||
|
||||
aboutToAppear(): void {
|
||||
this.initData()
|
||||
this.hintPopWindowDialog();
|
||||
this.signPopWindowDialog();
|
||||
}
|
||||
|
||||
initData() {
|
||||
@@ -100,25 +90,25 @@ export struct HomePage {
|
||||
}
|
||||
|
||||
getSignData() {
|
||||
const hashMap: HashMap<string, string> = new HashMap();
|
||||
const hashMap: HashMap<string, string> = new HashMap()
|
||||
this.dialog.open()
|
||||
hashMap.clear();
|
||||
hashMap.set('score_type','1');
|
||||
hashMap.clear()
|
||||
hashMap.set('score_type','1')
|
||||
hdHttp.httpReq<string>(BasicConstant.addBonusPoints,hashMap).then(async (res: HdResponse<string>) => {
|
||||
logger.info('Response addBonusPoints'+res);
|
||||
this.dialog.close();
|
||||
let json:Record<string,string> = JSON.parse(res+'') as Record<string,string>;
|
||||
logger.info('Response addBonusPoints'+res)
|
||||
this.dialog.close()
|
||||
let json:Record<string,string> = JSON.parse(res+'') as Record<string,string>
|
||||
if (json.code == '1') {
|
||||
this.homeData.sign_in = '1';
|
||||
this.signData = json;
|
||||
this.signWindowDialog.open();
|
||||
this.homeData.sign_in = '1'
|
||||
this.signData = json
|
||||
this.signWindowDialog.open()
|
||||
} else if (json.code == '201') {
|
||||
this.homeData.sign_in = '1';
|
||||
this.hintMessage = '今日已签到,每日只能签到一次。\n请明日继续哦~';
|
||||
this.hintWindowDialog.open();
|
||||
this.homeData.sign_in = '1'
|
||||
this.hintMessage = '今日已签到,每日只能签到一次。\n请明日继续哦~'
|
||||
this.hintWindowDialog.open()
|
||||
}
|
||||
}).catch((err: BusinessError) => {
|
||||
this.dialog.close();
|
||||
this.dialog.close()
|
||||
})
|
||||
}
|
||||
|
||||
@@ -170,9 +160,7 @@ export struct HomePage {
|
||||
searchItemAction:()=>{
|
||||
router.pushUrl({
|
||||
url:'pages/SearchPage/VideoSearchPage',
|
||||
params: {
|
||||
params:{'pageName':'视频'}
|
||||
}
|
||||
params:{'pageName':'视频'}
|
||||
})
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user