更新视频跳转逻辑和精选

This commit is contained in:
XiuYun CHEN
2025-05-30 17:11:58 +08:00
parent 0c2b6c096c
commit db44d85747
13 changed files with 392 additions and 216 deletions
@@ -305,9 +305,31 @@ export struct EditUserDataComp {
this.certificatePhotoSheetDialog = new CustomDialogController({
builder: PhotoActionSheet({
controller: this.certificatePhotoSheetDialog,
onPhotoSelected: (url: string) => {
onPhotoSelected: async (url: string) => {
this.certificatePhoto = url;
console.log('Selected image URI:', url);
const base64String = await ChangeUtil.convertUriToBase64(url);
const updateDataUrl:string = BasicConstant.urlExpert + 'modify';
// 定义content,请根据实际情况选择
const postContent = new rcp.MultipartForm({
'uuid': authStore.getUser().uuid,
'userName': authStore.getUser().userName,
'certificateImg': base64String,
'type':'2'
})
// 创建session
const session = rcp.createSession();
// 使用post发起请求,使用Promise进行异步回调;其中content以及destination为可选参数,可根据实际情况选择
session.post(updateDataUrl, postContent)
.then((response) => {
console.info(`Response succeeded66: ${JSON.stringify(response.headers)}`);
console.info(`Response succeeded: ${JSON.stringify(response.statusCode)}`);
console.info(`Response succeeded22: ${JSON.stringify(response)}`);
// console.info(`Response succeeded: ${JSON.stringify(postContent)}`);
})
.catch((err: BusinessError) => {
console.error(`Response err: Code is ${JSON.stringify(err.code)}, message is ${JSON.stringify(err)}`);
})
}
}),
alignment: DialogAlignment.Bottom,
@@ -434,12 +456,11 @@ export struct EditUserDataComp {
.height('auto')
}
.width('100%')
.height('100%')
.layoutWeight(1)// 占据剩余空间
}
.height('auto')
.scrollBar(BarState.Off)
.scrollable(ScrollDirection.Vertical)
.backgroundColor('#ffffff')
.height('calc(100% - 100vp)')
}
}