拍照上传

貢獻者:游客86260802 類別:代码 時間:2026-04-22 15:22:19 收藏數:11 評分:0
返回上页 舉報此文章
请选择举报理由:




收藏到我的文章 改錯字
// 相机拍照上传
async openCamera() {
const ctx = this.uiContext.getHostContext()
if (camera.getCameraManager(ctx).getSupportedCameras().length === 0) {
this.uiContext.getPromptAction().showToast({
message: "当前设备不支持拍照"
})
return
}
const profile = this.createPickerProfile(ctx!!)
picker.pick(ctx, [picker.PickerMediaType.PHOTO], profile).then(res => {
if (res.resultCode === 0) {
this.uploadImage(res.resultUri)
}
})
}
声明:以上文章均为用户自行添加,仅供打字交流使用,不代表本站观点,本站不承担任何法律责任,特此声明!如果有侵犯到您的权利,请及时联系我们删除。
文章熱度:
文章難度:
文章質量:
說明:系統根據文章的熱度、難度、質量自動認證,已認證的文章將參與打字排名!

本文打字排名TOP20

登录后可见