diff --git a/features/Home/src/main/ets/polyv/VideoUtil.ets b/features/Home/src/main/ets/polyv/VideoUtil.ets index 09e9c17..609bcb0 100644 --- a/features/Home/src/main/ets/polyv/VideoUtil.ets +++ b/features/Home/src/main/ets/polyv/VideoUtil.ets @@ -16,12 +16,22 @@ class VideoTools { this.hashMap.clear(); this.hashMap.set('video_uuid', video_uuid) hdHttp.httpReq(BasicConstant.videoDetail,this.hashMap).then(async (res: HdResponse) => { + logger.info('Response videoDetail'+res); let json:VideoDetailModel = JSON.parse(res+'') as VideoDetailModel; - this.goPLVMediaPlayerSingleVideoPage(json.video.polyv_uuid,video_uuid) + if(json.video.polyv_uuid==null||json.video.polyv_uuid==undefined) + { + promptAction.showToast({ message: '视频信息错误' }) + this.goPLVMediaPlayerSingleVideoPage('',video_uuid) + } + else + { + this.goPLVMediaPlayerSingleVideoPage(json.video.polyv_uuid,video_uuid) + } + }).catch((err: BusinessError) => { - this.goPLVMediaPlayerSingleVideoPage('','') + this.goPLVMediaPlayerSingleVideoPage('',video_uuid) }) } diff --git a/features/mypage/src/main/ets/view/ChangePhoneComp.ets b/features/mypage/src/main/ets/view/ChangePhoneComp.ets index c63c2ec..2dff813 100644 --- a/features/mypage/src/main/ets/view/ChangePhoneComp.ets +++ b/features/mypage/src/main/ets/view/ChangePhoneComp.ets @@ -142,7 +142,7 @@ export struct ChangePhoneComp { // 登录按钮 Button({type:ButtonType.Normal}){ - Text('登 录') + Text('确 定') } .width('90%') .height(48) diff --git a/features/mypage/src/main/ets/view/FourSection.ets b/features/mypage/src/main/ets/view/FourSection.ets index 76a1916..70309df 100644 --- a/features/mypage/src/main/ets/view/FourSection.ets +++ b/features/mypage/src/main/ets/view/FourSection.ets @@ -75,7 +75,7 @@ export struct FourSection { abilityName: 'com.huawei.hmos.settings.MainAbility', uri: 'application_info_entry', parameters: { - pushParams: 'cn.shangyu.gdxzExprt' + pushParams: 'cn.shangyu.gdxzExprts' } }; const context = getContext(this) as common.UIAbilityContext; diff --git a/features/register/src/main/ets/view/LoginComp.ets b/features/register/src/main/ets/view/LoginComp.ets index 391ea9e..95c7d30 100644 --- a/features/register/src/main/ets/view/LoginComp.ets +++ b/features/register/src/main/ets/view/LoginComp.ets @@ -34,7 +34,19 @@ export struct LoginComp { hashMap: HashMap = new HashMap(); + dialog = new CustomDialogController({ + builder: PrivacyDialog({ + isPassLogin:this.isPassLogin, + okCallBack:()=> + { + this.isAgree=true + this.login() + } + }), + cornerRadius: 4, + autoCancel:false + }) login() { if (this.loading) return; @@ -58,7 +70,9 @@ export struct LoginComp { } if (!this.isAgree) { - return promptAction.showToast({ message: '请勾选已阅读并同意' }) + // return promptAction.showToast({ message: '请勾选已阅读并同意' }) + this.dialog.open() + return; } this.loading = true this.hashMap.clear(); @@ -88,6 +102,7 @@ export struct LoginComp { }) } + getSaveUserInfor(type:number,objs:LoginInfo) { let state:number=objs.data.state let checkInfo:string=objs.data.checkInfo @@ -274,61 +289,74 @@ export struct LoginComp { } }.width('100%') - - Row() { - Checkbox() - .shape(CheckBoxShape.CIRCLE) - .selectedColor($r('app.color.top_title')) - .size({ width: 22, height: 22 }) - .select(this.isAgree) - .alignSelf((ItemAlign.Start)) - .onChange((val) => { - this.isAgree = val - }) - if(this.isPassLogin) - { - Text() { - Span('登录即代表同意').fontColor($r('app.color.common_gray_03')) - Span('《肝胆相照隐私政策》').fontColor($r('app.color.top_title')).onClick(() => { - this.ToWeb(BasicConstant.getyyzc,'《肝胆相照隐私政策》') + Column() + { + Blank() + Row() { + Checkbox() + .shape(CheckBoxShape.CIRCLE) + .selectedColor($r('app.color.top_title')) + .size({ width: 22, height: 22 }) + .select(this.isAgree) + .alignSelf(ItemAlign.Start) + // .margin({bottom:20}) + .onChange((val) => { + this.isAgree = val }) - Span('和').fontColor($r('app.color.common_gray_03')) - Span('《肝胆相照用户服务协议》').fontColor($r('app.color.top_title')) - .onClick(() => { - this.ToWeb(BasicConstant.getzcxy,'《肝胆相照用户服务协议》') + + if(this.isPassLogin) + { + Text() { + Span('登录即代表同意').fontColor($r('app.color.common_gray_03')) + Span('《肝胆相照隐私政策》').fontColor($r('app.color.top_title')).onClick(() => { + ToWeb(BasicConstant.getyyzc,'《肝胆相照隐私政策》') }) + Span('和').fontColor($r('app.color.common_gray_03')) + Span('《肝胆相照用户服务协议》').fontColor($r('app.color.top_title')) + .onClick(() => { + ToWeb(BasicConstant.getzcxy,'《肝胆相照用户服务协议》') + }) + + } + .fontSize(14) + .padding({ left: 4 ,right:20}) + } + else + { + + Text() { + Span('未注册的手机号验证登录后将自动创建肝胆相照账号,登录即代表同意').fontColor($r('app.color.common_gray_03')) + Span('《肝胆相照隐私政策》').fontColor($r('app.color.top_title')).onClick(() => { + ToWeb(BasicConstant.getyyzc,'《肝胆相照隐私政策》') + }) + Span('和').fontColor($r('app.color.common_gray_03')) + Span('《肝胆相照用户服务协议》').fontColor($r('app.color.top_title')) + .onClick(() => { + ToWeb(BasicConstant.getzcxy,'《肝胆相照用户服务协议》') + }) + + } + .fontSize(14) + .padding({ left: 4 ,right:20}) } - .fontSize(14) - .padding({ left: 4 ,right:20}) - } - else - { - Text() { - Span('未注册的手机号验证登录后将自动创建肝胆相照账号,登录即代表同意').fontColor($r('app.color.common_gray_03')) - Span('《肝胆相照隐私政策》').fontColor($r('app.color.top_title')).onClick(() => { - this.ToWeb(BasicConstant.getyyzc,'《肝胆相照隐私政策》') - }) - Span('和').fontColor($r('app.color.common_gray_03')) - Span('《肝胆相照用户服务协议》').fontColor($r('app.color.top_title')) - .onClick(() => { - this.ToWeb(BasicConstant.getzcxy,'《肝胆相照用户服务协议》') - }) - - } - .fontSize(14) - .padding({ left: 4 ,right:20}) } + .padding({bottom:20}) + + } + .layoutWeight(1) + .justifyContent(FlexAlign.End) - }.padding({bottom:20}).alignSelf(ItemAlign.End) } - .height("100%") + .layoutWeight(1) + .padding({ left: 20, right: 20, top: 30 }) } + .height('100%') } startTime() { this.time=60 @@ -343,18 +371,7 @@ export struct LoginComp { }, 1000) } - ToWeb(u:string,t:string) - { - let paramsInfo: DataWebModel = { - url:u , - title:t - }; - router.pushUrl({ - url: 'pages/WebView/WebPage', // 目标url - params: paramsInfo // 添加params属性,传递自定义参数 - }) - } } @Extend(TextInput) function customStyle() { @@ -366,4 +383,91 @@ function customStyle() { .margin({right:30}) } +@CustomDialog +struct PrivacyDialog { + // 添加回调函数属性 + private okCallBack: () => void = () => {}; + controller: CustomDialogController + @Prop isPassLogin:boolean = false; + + build() { + Column() { + Text('请阅读并同意以下条款') + .fontSize(18) + .margin({bottom:10}) + if(this.isPassLogin) + { + Text() { + Span('登录即代表同意').fontColor($r('app.color.common_gray_03')) + Span('《肝胆相照隐私政策》').fontColor($r('app.color.top_title')).onClick(() => { + ToWeb(BasicConstant.getyyzc,'《肝胆相照隐私政策》') + }) + Span('和').fontColor($r('app.color.common_gray_03')) + Span('《肝胆相照用户服务协议》').fontColor($r('app.color.top_title')) + .onClick(() => { + ToWeb(BasicConstant.getzcxy,'《肝胆相照用户服务协议》') + }) + + } + .fontSize(16) + .padding({ left: 4 ,right:20}) + } + else + { + + Text() { + Span('未注册的手机号验证登录后将自动创建肝胆相照账号,登录即代表同意').fontColor($r('app.color.common_gray_03')) + Span('《肝胆相照隐私政策》').fontColor($r('app.color.top_title')).onClick(() => { + ToWeb(BasicConstant.getyyzc,'《肝胆相照隐私政策》') + }) + Span('和').fontColor($r('app.color.common_gray_03')) + Span('《肝胆相照用户服务协议》').fontColor($r('app.color.top_title')) + .onClick(() => { + ToWeb(BasicConstant.getzcxy,'《肝胆相照用户服务协议》') + }) + + } + .fontSize(16) + .padding({ left: 4 ,right:20}) + + } + + Column() { + Button('同意并继续', { type: ButtonType.Normal }) + .backgroundColor($r('app.color.top_title')) + .width(200) + .borderRadius(4) + .height(44) + .onClick(() => { + this.okCallBack() + this.controller.close() + }).fontColor($r('app.color.white')) + .margin({bottom:10}) + Button('不同意') + .width(200) + .height(44) + .onClick(() => { + this.controller.close() + + }).backgroundColor(0xffffff).fontColor($r('app.color.common_gray_03')) + }.margin({ bottom: 10,top:10 }) + } + .width('100%') + .justifyContent(FlexAlign.Center) + .backgroundColor($r('app.color.white')) + .padding(20) + } +} +function ToWeb(u:string,t:string) +{ + let paramsInfo: DataWebModel = { + url:u , + title:t + + }; + router.pushUrl({ + url: 'pages/WebView/WebPage', // 目标url + params: paramsInfo // 添加params属性,传递自定义参数 + }) +} diff --git a/features/register/src/main/ets/view/PerfectUserDataComp.ets b/features/register/src/main/ets/view/PerfectUserDataComp.ets index 842d2ba..e159e0d 100644 --- a/features/register/src/main/ets/view/PerfectUserDataComp.ets +++ b/features/register/src/main/ets/view/PerfectUserDataComp.ets @@ -11,7 +11,7 @@ import { SpecialitySelectedSheet } from '@itcast/basic/src/main/ets/Views/Specia import { emitter } from '@kit.BasicServicesKit' import { BusinessError } from '@kit.BasicServicesKit'; import { rcp } from '@kit.RemoteCommunicationKit'; -import { HdNav } from '@itcast/basic' +import { HdNav,HdLoadingDialog } from '@itcast/basic' interface extraData { uuid: string } @@ -85,7 +85,11 @@ export struct PerfectUserDataComp { private diseaseSheetDialog!:CustomDialogController; private sexSheetDilog!:CustomDialogController; private perfactInputSheet!:CustomDialogController; - + dialog: CustomDialogController = new CustomDialogController({ + builder: HdLoadingDialog({ message: '提交中...' }), + customStyle: true, + alignment: DialogAlignment.Center + }) aboutToAppear() { this.initSexDialog(); this.initPhotoDialog(); @@ -146,7 +150,7 @@ export struct PerfectUserDataComp { { this.photoPath = BasicConstant.urlImage+authStore.getUser().photo this.name = authStore.getUser().realName?authStore.getUser().realName:'请输入姓名' - this.sex = authStore.getUser().sex?'请选择性别':authStore.getUser().sex == 0 ? '男' : '女'; + this.sex = authStore.getUser().sex?authStore.getUser().sex == 0 ? '男' : '女':'请选择性别'; this.sexnum = authStore.getUser().sex; this.hospatilName = authStore.getUser().hospitalName?authStore.getUser().hospitalName:'请选择所在医院' this.officeName = authStore.getUser().officeName?authStore.getUser().officeName:'请选择科室'; @@ -298,6 +302,7 @@ export struct PerfectUserDataComp { promptAction.showToast({ message: "请选择专长" , duration: 1000 }) return } + this.dialog.open() const updateDataUrl:string = BasicConstant.urlExpert + 'modify'; // 定义content,请根据实际情况选择 const postContent = new rcp.MultipartForm({ @@ -324,6 +329,7 @@ export struct PerfectUserDataComp { const session = rcp.createSession(); session.post(updateDataUrl, postContent) .then((response) => { + this.dialog.close() let json:LoginInfo = JSON.parse(response+'') as LoginInfo; if(json.code=='1') { this.state=-1 diff --git a/features/register/src/main/ets/view/SelectedHospitalComp.ets b/features/register/src/main/ets/view/SelectedHospitalComp.ets index d2b6b01..5d926c5 100644 --- a/features/register/src/main/ets/view/SelectedHospitalComp.ets +++ b/features/register/src/main/ets/view/SelectedHospitalComp.ets @@ -174,6 +174,7 @@ export struct SelectedHospitalComp { ForEach(this.provinces, (item: ProvinceOrCiry) => { ListItem() { Text(item.name) + .width('100%') .fontColor(item.name == this.provincerSelectedName ? $r('app.color.main_color') : '#666666') .fontSize(17) .height(40) @@ -202,6 +203,7 @@ export struct SelectedHospitalComp { ForEach(this.cities, (item : ProvinceOrCiry) => { ListItem() { Text(item.name) + .width('100%') .fontColor(item.name == this.citySelectedName?$r('app.color.main_color'):'#666666') .fontSize(17) .height(40) @@ -228,6 +230,7 @@ export struct SelectedHospitalComp { ForEach(this.hospitals, (item: Hospital) => { ListItem() { Text(item.name) + .width('100%') // .fontColor(item.name == this.districtsSelectedName?$r('app.color.main_color'):'#666666') .fontSize(17) .height(40) @@ -254,6 +257,7 @@ export struct SelectedHospitalComp { ForEach(this.districts, (item: ProvinceOrCiry) => { ListItem() { Text(item.name) + .width('100%') .fontColor(item.name == this.districtsSelectedName?$r('app.color.main_color'):'#666666') .fontSize(17) .height(40) @@ -279,6 +283,7 @@ export struct SelectedHospitalComp { ForEach(this.hospitals, (item:Hospital) => { ListItem() { Text(item.name) + .width('100%') .fontSize(17) .height(40) .margin({left:20}) @@ -324,11 +329,13 @@ export struct SelectedHospitalComp { ForEach(this.searchHospitals, (item: Hospital) => { ListItem() { Text(item.name) + .width('100%') .fontSize(17) .height(40) .margin({ left: 20 }) .onClick(() => { //医院点击 + this.backtoEdit(item) }) } }) diff --git a/products/expert/src/main/ets/pages/BootPage.ets b/products/expert/src/main/ets/pages/BootPage.ets index e357937..72bfcfa 100644 --- a/products/expert/src/main/ets/pages/BootPage.ets +++ b/products/expert/src/main/ets/pages/BootPage.ets @@ -39,6 +39,7 @@ struct BootPage { dialog = new CustomDialogController({ builder: PrivacyDialog(), cornerRadius: 4, + autoCancel:false }) startTick() @@ -191,6 +192,7 @@ struct PrivacyDialog { controller: CustomDialogController + build() { Column({ space: 10 }) { Text('温馨提示')