Compare commits

...

2 Commits

Author SHA1 Message Date
XiuYun CHEN
2ad7db0c7b Merge remote-tracking branch 'origin/master'
# Conflicts:
#	features/register/src/main/ets/view/PerfectUserDataComp.ets
2025-06-13 17:40:12 +08:00
XiuYun CHEN
a4c1de3955 bug修改 2025-06-13 17:39:58 +08:00
7 changed files with 199 additions and 80 deletions

View File

@ -16,12 +16,22 @@ class VideoTools {
this.hashMap.clear();
this.hashMap.set('video_uuid', video_uuid)
hdHttp.httpReq<string>(BasicConstant.videoDetail,this.hashMap).then(async (res: HdResponse<string>) => {
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)
})
}

View File

@ -142,7 +142,7 @@ export struct ChangePhoneComp {
// 登录按钮
Button({type:ButtonType.Normal}){
Text('登 录')
Text('确 定')
}
.width('90%')
.height(48)

View File

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

View File

@ -34,7 +34,19 @@ export struct LoginComp {
hashMap: HashMap<string, string> = 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属性传递自定义参数
})
}

View File

@ -1,5 +1,5 @@
import { BasicConstant,ExpertData,perfactAuth,ChangeUtil,authStore,preferenceStore,LoginInfo,
logger,DefaultHintProWindows } from '@itcast/basic'
logger } from '@itcast/basic'
import { LengthMetrics, promptAction, router } from '@kit.ArkUI'
import { EditUserDataItem } from '@itcast/basic/src/main/ets/Views/EditUserDataItem'
import { PerfactInputSheet } from '@itcast/basic/src/main/ets/Views/PerfactInputSheet'
@ -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,8 +85,11 @@ export struct PerfectUserDataComp {
private diseaseSheetDialog!:CustomDialogController;
private sexSheetDilog!:CustomDialogController;
private perfactInputSheet!:CustomDialogController;
private hintWindowDialog!: CustomDialogController;
dialog: CustomDialogController = new CustomDialogController({
builder: HdLoadingDialog({ message: '提交中...' }),
customStyle: true,
alignment: DialogAlignment.Center
})
aboutToAppear() {
this.initSexDialog();
this.initPhotoDialog();
@ -96,7 +99,6 @@ export struct PerfectUserDataComp {
this.initCerficatePhotoDialog();
this.initDiseaseSheetDIalog();
this.handleState()
this.hintPopWindowDialog();
// logger.info("Response this.photoPath "+this.photoPath)
// 收到eventId为1的事件后执行回调函数
@ -128,7 +130,14 @@ export struct PerfectUserDataComp {
if(this.checkInfo!=''||this.checkInfo!=null)
{
this.info=this.checkInfo
this.hintWindowDialog.open();
promptAction.showDialog({ title: '温馨提示', message: this.checkInfo,
buttons: [{ text: '确定', color: $r('app.color.main_color') }],
})
.then(data => {
if (data.index == 1) {
}
})
}
}
@ -141,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:'请选择科室';
@ -293,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({
@ -319,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
@ -470,21 +481,6 @@ export struct PerfectUserDataComp {
})
}
private hintPopWindowDialog() {
this.hintWindowDialog = new CustomDialogController({
builder:DefaultHintProWindows({
controller:this.hintWindowDialog,
message:this.checkInfo,
confirmTitleColor: $r('app.color.main_color'),
selectedButton: (index:number)=>{
this.hintWindowDialog.close();
}
}),
alignment: DialogAlignment.Center,
cornerRadius:24,
backgroundColor: ('rgba(0,0,0,0.5)'),
})
}
build() {

View File

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

View File

@ -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('温馨提示')