|
|
@@ -1,4 +1,7 @@
|
|
|
-import { BasicType, copyText, ShowBannerAd, UserInfo, userInfo, YtAvoid, yTRouter } from 'basic'
|
|
|
+import { BasicType, copyText, IBestToast, ShowBannerAd, UserInfo, userInfo, YtAvoid, YTLog, yTRouter } from 'basic'
|
|
|
+import { common, Want } from '@kit.AbilityKit'
|
|
|
+import { BusinessError } from '@kit.BasicServicesKit'
|
|
|
+import { BUNDLE_NAME } from 'BuildProfile'
|
|
|
|
|
|
@Component
|
|
|
export struct Mine {
|
|
|
@@ -21,7 +24,18 @@ export struct Mine {
|
|
|
{
|
|
|
text: '给个好评',
|
|
|
click: () => {
|
|
|
-
|
|
|
+ const want: Want = {
|
|
|
+ uri: "store://appgallery.huawei.com/app/detail?id=" + BUNDLE_NAME
|
|
|
+ };
|
|
|
+ const context = getContext(this) as common.UIAbilityContext;
|
|
|
+ context.startAbility(want).then(() => {
|
|
|
+ //拉起成功
|
|
|
+ YTLog.info('跳转成功')
|
|
|
+ }).catch((err: BusinessError) => {
|
|
|
+ // 拉起失败
|
|
|
+ YTLog.error(err)
|
|
|
+ IBestToast.show('出现未知错误,请稍后再试')
|
|
|
+ });
|
|
|
},
|
|
|
src: $r('[user].media.right_arrow')
|
|
|
},
|
|
|
@@ -126,7 +140,6 @@ export struct Mine {
|
|
|
.margin({ top: 30 })
|
|
|
}
|
|
|
.padding({ top: this.safeTop + 22, left: 16, right: 16 })
|
|
|
-
|
|
|
.height('100%')
|
|
|
}
|
|
|
}
|