|
@@ -2,7 +2,7 @@ import { common, ConfigurationConstant } from '@kit.AbilityKit';
|
|
|
import { CommonConstants } from '../common/constants/CommonConstants';
|
|
import { CommonConstants } from '../common/constants/CommonConstants';
|
|
|
import { VideoItem } from '../viewmodel/VideoItem';
|
|
import { VideoItem } from '../viewmodel/VideoItem';
|
|
|
import { LazyDataSource } from '../common/util/LazyDataSource';
|
|
import { LazyDataSource } from '../common/util/LazyDataSource';
|
|
|
-import { LogUtil, PreferencesUtil, StrUtil, ToastUtil } from '@pura/harmony-utils';
|
|
|
|
|
|
|
+import { AppUtil, LogUtil, PreferencesUtil, StrUtil, ToastUtil } from '@pura/harmony-utils';
|
|
|
import fs from '@ohos.file.fs';
|
|
import fs from '@ohos.file.fs';
|
|
|
import { changeMusicCover, findLocalCoverImage, getApiLyric, repairAudioMetadata,
|
|
import { changeMusicCover, findLocalCoverImage, getApiLyric, repairAudioMetadata,
|
|
|
searchCover,
|
|
searchCover,
|
|
@@ -21,6 +21,7 @@ export struct TagsContentCover {
|
|
|
@State isLyric:boolean = true
|
|
@State isLyric:boolean = true
|
|
|
@State isCover:boolean = true
|
|
@State isCover:boolean = true
|
|
|
@Link isShowDrawer: boolean;
|
|
@Link isShowDrawer: boolean;
|
|
|
|
|
+ @State bundleName: string = ''
|
|
|
@State dataSource: LazyDataSource<VideoItem> = new LazyDataSource([])
|
|
@State dataSource: LazyDataSource<VideoItem> = new LazyDataSource([])
|
|
|
@Prop selectedFiles: Array<VideoItem>
|
|
@Prop selectedFiles: Array<VideoItem>
|
|
|
@StorageProp('topRectHeight') topRectHeight: number = 0;
|
|
@StorageProp('topRectHeight') topRectHeight: number = 0;
|
|
@@ -47,6 +48,7 @@ export struct TagsContentCover {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
async aboutToAppear() {
|
|
async aboutToAppear() {
|
|
|
|
|
+ this.bundleName = AppUtil.getBundleName()
|
|
|
// 确保 selectedFiles 有默认值后再初始化 dataSource
|
|
// 确保 selectedFiles 有默认值后再初始化 dataSource
|
|
|
if (this.selectedFiles && this.selectedFiles.length > 0) {
|
|
if (this.selectedFiles && this.selectedFiles.length > 0) {
|
|
|
this.dataSource = new LazyDataSource(this.selectedFiles)
|
|
this.dataSource = new LazyDataSource(this.selectedFiles)
|
|
@@ -236,7 +238,7 @@ export struct TagsContentCover {
|
|
|
autoCancel: false,
|
|
autoCancel: false,
|
|
|
backCancel: true,
|
|
backCancel: true,
|
|
|
contentBuilder: () => {
|
|
contentBuilder: () => {
|
|
|
- this.customVipBuilder("该功能需开通会员,非常感谢您的支持!")
|
|
|
|
|
|
|
+ this.customVipBuilder("该功能限时免费,麻烦到市场给个五星好评。非常感谢您的支持!")
|
|
|
},
|
|
},
|
|
|
buttons: [],
|
|
buttons: [],
|
|
|
})
|
|
})
|
|
@@ -260,6 +262,11 @@ export struct TagsContentCover {
|
|
|
.margin({ left: 6 })
|
|
.margin({ left: 6 })
|
|
|
.onClick(() => {
|
|
.onClick(() => {
|
|
|
DialogHelper.closeDialog('vip');
|
|
DialogHelper.closeDialog('vip');
|
|
|
|
|
+ Utility.gotoMarket(getContext(this) as common.UIAbilityContext, this.bundleName)
|
|
|
|
|
+ setTimeout(()=>{
|
|
|
|
|
+ PreferencesUtil.putSync('IS_HAO_PING',true)
|
|
|
|
|
+ },10000)
|
|
|
|
|
+
|
|
|
})
|
|
})
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
@@ -287,7 +294,11 @@ export struct TagsContentCover {
|
|
|
ToastUtil.showToast('请到设置界面配置歌词Api')
|
|
ToastUtil.showToast('请到设置界面配置歌词Api')
|
|
|
return
|
|
return
|
|
|
}
|
|
}
|
|
|
- if (!Utility.isNoble()) {
|
|
|
|
|
|
|
+ // if (!Utility.isNoble()) {
|
|
|
|
|
+ // this.showVipDialog();
|
|
|
|
|
+ // return;
|
|
|
|
|
+ // }
|
|
|
|
|
+ if (!PreferencesUtil.getBooleanSync('IS_HAO_PING', false)) {
|
|
|
this.showVipDialog();
|
|
this.showVipDialog();
|
|
|
return;
|
|
return;
|
|
|
}
|
|
}
|