HarmonyOS 鸿蒙Next应用如何跳转到华为应用市场应用详情页

发布于 1周前 作者 bupafengyu 来自 鸿蒙OS

HarmonyOS 鸿蒙Next应用如何跳转到华为应用市场应用详情页

【关键字】

跳转详情页面

【问题描述】

应用如何跳转到华为应用市场应用详情页?

【解决方案】

应用跳转到详情页面Demo如下:

import { common, Want } from ‘@kit.AbilityKit’;
@Entry
@Component
struct DistributeDemo {
@State appId: string = ‘应用id’;
build() {
Row() {
Column() {
TextInput({ text: this.appId, placeholder: ‘请输入应用的appId’ })
.width(‘90%’)
.onChange((value: string) => {
this.appId = value
})
Button(‘点击跳转到鸿蒙版应用市场详情页面’)
.margin({ top: 50 })
.onClick(() => {
const want: Want = {
uri: store:<span class="hljs-comment"><span class="hljs-comment">//appgallery.huawei.com/app/detail?id=${this.appId}
};
const context = getContext(this) as common.UIAbilityContext;
context.startAbility(want).then(() => {
//拉起成功
}).catch(() => {
// 拉起失败
});
})
}
.width(‘100%’)
}
.height(‘100%’)
}
}<button style="position: absolute; padding: 4px 8px 0px; cursor: pointer; top: 8px; right: 8px; font-size: 14px;">复制</button>


关于HarmonyOS 鸿蒙Next应用如何跳转到华为应用市场应用详情页的问题,您也可以访问:https://www.itying.com/category-93-b0.html 联系官网客服。

5 回复

有要学HarmonyOS AI的同学吗,联系我:https://www.itying.com/goods-1206.html

大佬,知道怎么跳转到测试版本的应用详情吗

大佬,为什么我跳转之后显示了appstore启动页后就白屏了,只有左上角的返回按钮

回到顶部