Toggle navigation
Toggle navigation
This project
Loading...
Sign in
developOne
/
harmonyPool
Go to a project
Toggle navigation
Projects
Groups
Snippets
Help
Toggle navigation pinning
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
陈剑华
2024-10-11 16:40:04 +0800
Browse Files
Options
Browse Files
Download
Plain Diff
Commit
39d7796c07411e830578efffe45d4717b485cfa6
39d7796c
2 parents
a14fd3a3
4c4d8195
Merge remote-tracking branch 'origin/main'
Show whitespace changes
Inline
Side-by-side
Showing
42 changed files
with
241 additions
and
102 deletions
sight_harmony/AppScope/app.json5
sight_harmony/commons/wdConstant/oh-package.json5
sight_harmony/commons/wdJsBridge/oh-package.json5
sight_harmony/commons/wdKit/oh-package.json5
sight_harmony/commons/wdNetwork/oh-package.json5
sight_harmony/commons/wdRouter/oh-package.json5
sight_harmony/commons/wdRouter/src/main/ets/utils/AppInnerLink.ets
sight_harmony/commons/wdShareBase/oh-package.json5
sight_harmony/commons/wdWebComponent/oh-package.json5
sight_harmony/commons/wdWebComponent/src/main/ets/pages/JsBridgeBiz.ets
sight_harmony/features/wdBean/oh-package.json5
sight_harmony/features/wdComponent/oh-package.json5
sight_harmony/features/wdComponent/src/main/ets/components/H5NewsWebPageComponent.ets
sight_harmony/features/wdComponent/src/main/ets/components/MorningEveningPaper/MorningEveningPaperComponent.ets
sight_harmony/features/wdComponent/src/main/ets/components/mine/home/ChildCommentComponent.ets
sight_harmony/features/wdComponent/src/main/ets/components/mine/message/MessageListItemUI.ets
sight_harmony/features/wdComponent/src/main/ets/components/mine/message/MessageListUI.ets
sight_harmony/features/wdComponent/src/main/ets/components/page/PageComponent.ets
sight_harmony/features/wdComponent/src/main/ets/components/page/PrivacySettingPage.ets
sight_harmony/features/wdComponent/src/main/ets/components/page/TopNavigationComponentNew.ets
sight_harmony/features/wdComponent/src/main/ets/components/setting/AccountAndSecurityLayout.ets
sight_harmony/features/wdComponent/src/main/ets/components/setting/MineSettingComponent.ets
sight_harmony/features/wdComponent/src/main/ets/components/view/UserGradeTextSpan.ets
sight_harmony/features/wdComponent/src/main/ets/components/view/span/GradeSpan.ets
sight_harmony/features/wdComponent/src/main/ets/pages/MineHomePage.ets
sight_harmony/features/wdComponent/src/main/ets/pages/OtherNormalUserHomePage.ets
sight_harmony/features/wdComponent/src/main/ets/viewmodel/AudioSuspensionModel.ets
sight_harmony/features/wdDetailPlayApi/oh-package.json5
sight_harmony/features/wdDetailPlayLive/oh-package.json5
sight_harmony/features/wdDetailPlayShortVideo/oh-package.json5
sight_harmony/features/wdHwAbility/oh-package.json5
sight_harmony/features/wdHwAbility/src/main/ets/getuiPush/GetuiPush.ets
sight_harmony/features/wdLogin/oh-package.json5
sight_harmony/features/wdLogin/src/main/ets/pages/login/SettingPasswordPage.ets
sight_harmony/features/wdPlayer/oh-package.json5
sight_harmony/features/wdPlayer/src/main/ets/controller/BackgroundAudioController.ets
sight_harmony/features/wdShare/oh-package.json5
sight_harmony/features/wdTracking/oh-package.json5
sight_harmony/products/phone/src/main/ets/dailynewspaperformability/DailyNewspaperFormAbility.ets
sight_harmony/products/phone/src/main/ets/pages/view/VideoChannelPage.ets
sight_harmony/products/phone/src/main/ets/pages/web/H5TipsPage.ets
sight_harmony/products/phone/src/main/module.json5
sight_harmony/AppScope/app.json5
View file @
39d7796
...
...
@@ -2,8 +2,8 @@
"app"
:
{
"bundleName"
:
"com.peopledailychina.hosactivity"
,
"vendor"
:
"$string:app_vendor"
,
"versionCode"
:
7399
,
"versionName"
:
"7.3.9.9"
,
"versionCode"
:
7401
,
"versionName"
:
"7.4.0.1"
,
"icon"
:
"$media:app_icon"
,
"label"
:
"$string:app_name"
}
...
...
sight_harmony/commons/wdConstant/oh-package.json5
View file @
39d7796
...
...
@@ -2,7 +2,7 @@
"license"
:
"Apache-2.0"
,
"devDependencies"
:
{},
"author"
:
""
,
"name"
:
"wd
c
onstant"
,
"name"
:
"wd
C
onstant"
,
"description"
:
"Please describe the basic information."
,
"main"
:
"Index.ets"
,
"version"
:
"1.0.0"
,
...
...
sight_harmony/commons/wdJsBridge/oh-package.json5
View file @
39d7796
...
...
@@ -2,7 +2,7 @@
"license"
:
"Apache-2.0"
,
"devDependencies"
:
{},
"author"
:
""
,
"name"
:
"wd
jsb
ridge"
,
"name"
:
"wd
JsB
ridge"
,
"description"
:
"Please describe the basic information."
,
"main"
:
"Index.ets"
,
"version"
:
"1.0.0"
,
...
...
sight_harmony/commons/wdKit/oh-package.json5
View file @
39d7796
...
...
@@ -2,7 +2,7 @@
"license"
:
"Apache-2.0"
,
"devDependencies"
:
{},
"author"
:
""
,
"name"
:
"wd
k
it"
,
"name"
:
"wd
K
it"
,
"description"
:
"Please describe the basic information."
,
"main"
:
"Index.ets"
,
"version"
:
"1.0.0"
,
...
...
sight_harmony/commons/wdNetwork/oh-package.json5
View file @
39d7796
...
...
@@ -2,7 +2,7 @@
"license"
:
"Apache-2.0"
,
"devDependencies"
:
{},
"author"
:
""
,
"name"
:
"wd
n
etwork"
,
"name"
:
"wd
N
etwork"
,
"description"
:
"Please describe the basic information."
,
"main"
:
"Index.ets"
,
"version"
:
"1.0.0"
,
...
...
sight_harmony/commons/wdRouter/oh-package.json5
View file @
39d7796
...
...
@@ -2,7 +2,7 @@
"license"
:
"Apache-2.0"
,
"devDependencies"
:
{},
"author"
:
""
,
"name"
:
"wd
r
outer"
,
"name"
:
"wd
R
outer"
,
"description"
:
"Please describe the basic information."
,
"main"
:
"Index.ets"
,
"version"
:
"1.0.0"
,
...
...
sight_harmony/commons/wdRouter/src/main/ets/utils/AppInnerLink.ets
View file @
39d7796
...
...
@@ -3,7 +3,7 @@ import { RetryHolderManager } from '@ohos/imageknife/src/main/ets/components/ima
import App from '@system.app'
import { Action, Params } from 'wdBean/Index'
import { ExtraDTO } from 'wdBean/src/main/ets/bean/component/extra/ExtraDTO'
import { Logger } from 'wdKit/Index'
import { Logger
, SPHelper
} from 'wdKit/Index'
import { ContentType } from '../common/ContentType'
import { WDRouterRule } from '../router/WDRouterRule'
import HomeChannelUtils from './HomeChannelUtils'
...
...
@@ -127,6 +127,8 @@ export class AppInnerLink {
if (params.type == "topic" && params.subType == "audio_news") {
}
if (params.type == "topic" && params.subType == "moring_evening_news") {
///解决早晚报切换不更新问题,内部更新id
SPHelper.default.deleteSync('dailyPaperTopicPageId');
ProcessUtils.gotoMorningEveningPaper()
}
...
...
sight_harmony/commons/wdShareBase/oh-package.json5
View file @
39d7796
{
"name"
:
"wd
shareb
ase"
,
"name"
:
"wd
ShareB
ase"
,
"version"
:
"1.0.0"
,
"description"
:
"Please describe the basic information."
,
"main"
:
"Index.ets"
,
...
...
sight_harmony/commons/wdWebComponent/oh-package.json5
View file @
39d7796
...
...
@@ -2,7 +2,7 @@
"license"
:
"Apache-2.0"
,
"devDependencies"
:
{},
"author"
:
""
,
"name"
:
"wd
webc
omponent"
,
"name"
:
"wd
WebC
omponent"
,
"description"
:
"Please describe the basic information."
,
"main"
:
"Index.ets"
,
"version"
:
"1.0.0"
,
...
...
sight_harmony/commons/wdWebComponent/src/main/ets/pages/JsBridgeBiz.ets
View file @
39d7796
...
...
@@ -197,6 +197,8 @@ function handleJsCallAppInnerLinkMethod(data: Message) {
ProcessUtils.processPage(content)
}
if (urlParams.get('subType') === 'moring_evening_news') {
///解决早晚报切换不更新问题,内部更新id
SPHelper.default.deleteSync('dailyPaperTopicPageId');
ProcessUtils.gotoMorningEveningPaper()
}
if (urlParams.get('subType') === 'electronic_newspapers') {
...
...
sight_harmony/features/wdBean/oh-package.json5
View file @
39d7796
...
...
@@ -2,7 +2,7 @@
"license"
:
"Apache-2.0"
,
"devDependencies"
:
{},
"author"
:
""
,
"name"
:
"wd
b
ean"
,
"name"
:
"wd
B
ean"
,
"description"
:
"Please describe the basic information."
,
"main"
:
"Index.ets"
,
"version"
:
"1.0.0"
,
...
...
sight_harmony/features/wdComponent/oh-package.json5
View file @
39d7796
...
...
@@ -2,7 +2,7 @@
"license"
:
"Apache-2.0"
,
"devDependencies"
:
{},
"author"
:
""
,
"name"
:
"wd
c
omponent"
,
"name"
:
"wd
C
omponent"
,
"description"
:
"Please describe the basic information."
,
"main"
:
"Index.ets"
,
"version"
:
"1.0.0"
,
...
...
sight_harmony/features/wdComponent/src/main/ets/components/H5NewsWebPageComponent.ets
View file @
39d7796
...
...
@@ -30,7 +30,7 @@ import { WDRouterPage, WDRouterRule } from 'wdRouter/Index';
import { PageRepository } from '../repository/PageRepository';
import { OperRowListView } from './view/OperRowListView';
import { CommentDialogView } from './CommentDialogView';
import { CustomTitleUI } from '
wdcomponent/ets/components
/reusable/CustomTitleUI';
import { CustomTitleUI } from '
.
/reusable/CustomTitleUI';
const TAG = 'H5NewsWebPageComponent'
...
...
sight_harmony/features/wdComponent/src/main/ets/components/MorningEveningPaper/MorningEveningPaperComponent.ets
View file @
39d7796
...
...
@@ -452,7 +452,7 @@ export struct MorningEveningPaperComponent {
})
}
.height('100%')
.width(
'20%'
)
.width(
63
)
.onClick(() => {
})
}
...
...
sight_harmony/features/wdComponent/src/main/ets/components/mine/home/ChildCommentComponent.ets
View file @
39d7796
import { ContentDTO } from 'wdBean/Index'
import { DateTimeUtils, StringUtils, UserDataLocal } from 'wdKit/Index'
import { DateTimeUtils, S
PHelper, S
tringUtils, UserDataLocal } from 'wdKit/Index'
import MinePageDatasModel from '../../../model/MinePageDatasModel'
import { CommentLikeOperationRequestItem } from '../../../viewmodel/CommentLikeOperationRequestItem'
import { CommentListItem } from '../../../viewmodel/CommentListItem'
import measure from '@ohos.measure'
import { TrackConstants, TrackingContent, TrackParamConvert } from 'wdTracking/Index'
import { ProcessUtils } from 'wdRouter/Index'
import { ProcessUtils, WDRouterPage, WDRouterRule } from 'wdRouter/Index'
import { SpConstants } from 'wdConstant'
@Component
export struct ChildCommentComponent {
...
...
@@ -221,6 +222,11 @@ export struct ChildCommentComponent {
}
commentLikeOperation() {
let userid = SPHelper.default.getSync(SpConstants.USER_ID,"") as string
if (!userid) {
WDRouterRule.jumpWithPage(WDRouterPage.loginPage)
return
}
let item = new CommentLikeOperationRequestItem(this.data.targetId, this.data.id + "", this.data.targetType + "", UserDataLocal.getUserName(), UserDataLocal.getUserHeaderUrl(), this.data.like_status === 0 ? 1 : 0)
MinePageDatasModel.getCommentLikeOperation(item, getContext(this)).then((value) => {
if (value != null) {
...
...
sight_harmony/features/wdComponent/src/main/ets/components/mine/message/MessageListItemUI.ets
View file @
39d7796
...
...
@@ -82,7 +82,7 @@ export struct MessageListItemUI {
Text().backgroundColor($r('app.color.color_EDEDED'))
.width('100%')
.height(1)
.visibility(this.index != 3 ?Visibility.Visible:Visibility.None)
//
.visibility(this.index != 3 ?Visibility.Visible:Visibility.None)
}
}
...
...
sight_harmony/features/wdComponent/src/main/ets/components/mine/message/MessageListUI.ets
View file @
39d7796
...
...
@@ -202,7 +202,7 @@ export struct MessageListUI {
break;
}
})
.height(8
0
)
.height(8
1
)
.width("100%")
})
}
...
...
sight_harmony/features/wdComponent/src/main/ets/components/page/PageComponent.ets
View file @
39d7796
import { CommonConstants, ViewType } from 'wdConstant';
import {
BottomNavi,
CommonConstants, ViewType } from 'wdConstant';
import { EmitterEventId, EmitterUtils, Logger, NetworkUtil } from 'wdKit';
import { EmptyComponent } from '../view/EmptyComponent';
import PageModel from '../../viewmodel/PageModel';
...
...
@@ -43,7 +43,7 @@ export struct PageComponent {
// 国殇灰度管理
GrayManage: SubscribedAbstractProperty<GrayManageModel> = AppStorage.link<GrayManageModel>('GrayManage')
@State netStatus: number | undefined = undefined // 存储网络状态
isRMH:boolean = false
bottomNavi:BottomNavi = BottomNavi.NEWS
build() {
Column() {
...
...
@@ -286,7 +286,7 @@ export struct PageComponent {
//人民号推荐 监听登录事件(刷新页面)
EmitterUtils.receiveEvent(EmitterEventId.LOGIN_SUCCESS, () => {
if(this.navIndex === this.currentTopNavSelectedIndex && this.
isRMH
){
if(this.navIndex === this.currentTopNavSelectedIndex && this.
bottomNavi == BottomNavi.PEOPLE
){
this.listScroller.scrollEdge(Edge.Top)
this.pageModel.viewType = ViewType.LOADING;
this.getData()
...
...
@@ -298,6 +298,7 @@ export struct PageComponent {
onChange() {
// console.log(TAG, `onChangezz id: ${this.pageId} , ${this.channelId} , ${this.navIndex} , navIndex: ${this.currentTopNavSelectedIndex}`);
// 注册监听网络连接
if(this.bottomNavi == BottomNavi.VIDEO){
this.netStatus = undefined
let netStatus = NetworkUtil.isNetConnected()
if (netStatus) {
...
...
@@ -311,6 +312,16 @@ export struct PageComponent {
} else {
this.pageModel.viewType = ViewType.NoNetwork;
}
}else{
if (this.navIndex === this.currentTopNavSelectedIndex) {
// console.log(TAG, 'page onAutoRefresh111 ' + this.needload)
if (this.needload) {
this.getData();
}
this.needload = false;
}
}
}
async onAutoRefresh() {
...
...
sight_harmony/features/wdComponent/src/main/ets/components/page/PrivacySettingPage.ets
View file @
39d7796
...
...
@@ -7,7 +7,7 @@ import { TrackingPageBrowse, TrackConstants, TrackingButton } from 'wdTracking/I
import { TitleBackComponent } from '../setting/TitleBackComponent';
const TAG = 'PrivacySettingPage';
const DiyString = '开启个性
化
推荐'
const DiyString = '开启个性推荐'
const DiyCloseTipsString = '关闭后,将不会使用你的偏好进行内容推荐'
@Entry
...
...
sight_harmony/features/wdComponent/src/main/ets/components/page/TopNavigationComponentNew.ets
View file @
39d7796
...
...
@@ -15,6 +15,7 @@ import { GrayManageModel } from '../../viewmodel/GrayManageModel';
import { ColorUtils } from '../../utils/ColorUtils';
import { ImageKnifeComponent } from '@ohos/imageknife';
import { CommonUtils } from '../../utils/CommonUtils';
import { BottomNavi } from 'wdConstant';
const TAG = 'TopNavigationComponent';
...
...
@@ -97,10 +98,10 @@ export struct TopNavigationComponentNew {
if (!this.isBroadcast(navItem) && !this.isLayout(navItem)) {
if (CompUtils.isNews(this.navItem)) {
this.createPageComponent(navItem, index,
(channelId) => this.GrayManage.get().isNewsMourning(channelId),
false
);
(channelId) => this.GrayManage.get().isNewsMourning(channelId),
BottomNavi.NEWS
);
} else if (CompUtils.isRMH(this.navItem)) {
this.createPageComponent(navItem, index,
(channelId) => this.GrayManage.get().isRmhMourning(channelId),
true
);
(channelId) => this.GrayManage.get().isRmhMourning(channelId),
BottomNavi.PEOPLE
);
}
} else {
...
...
@@ -165,7 +166,7 @@ export struct TopNavigationComponentNew {
}
@Builder
createPageComponent(navItem: TopNavDTO, index: number, mourningCheckFn: (channelId: string) => boolean,
isRMH:boolean = false
) {
createPageComponent(navItem: TopNavDTO, index: number, mourningCheckFn: (channelId: string) => boolean,
bottomNavi:BottomNavi = BottomNavi.NEWS
) {
PageComponent({
currentTopNavSelectedIndex: this.currentTopNavSelectedIndex,
navIndex: index,
...
...
@@ -173,7 +174,7 @@ export struct TopNavigationComponentNew {
channelId: navItem?.channelId + '',
autoRefresh: this.autoRefresh2Page,
isMourning: mourningCheckFn(`${navItem.channelId}`),
isRMH:isRMH
bottomNavi:bottomNavi
})
// .margin({
// left: 6,
...
...
sight_harmony/features/wdComponent/src/main/ets/components/setting/AccountAndSecurityLayout.ets
View file @
39d7796
...
...
@@ -363,14 +363,6 @@ export struct AccountAndSecurityLayout {
.padding({ top: 32, left: "31lpx", right: "31lpx" })
.width('100%')
}
Text('请注意:注销后7天内不能再次注册人民日报客户端,需要等到账号冷静期结束才能再次登录注册')
.fontColor('#ED2800')
.fontSize(14)
.fontWeight(400)
.lineHeight(20)
.padding({ top: 32, left: 16, right: 16 })
.width('100%')
}.alignRules({
top: { anchor: "__container__", align: VerticalAlign.Top },
left: { anchor: "__container__", align: HorizontalAlign.Start },
...
...
sight_harmony/features/wdComponent/src/main/ets/components/setting/MineSettingComponent.ets
View file @
39d7796
...
...
@@ -96,7 +96,7 @@ export struct MineSettingComponent {
Column(){
TitleBackComponent({title:"设置"})
this.settingList()
}
}
.height('100%').backgroundColor(Color.White)
}
// 页面布局
...
...
@@ -122,7 +122,7 @@ export struct MineSettingComponent {
Divider()
.color('#f0f0f0')
.strokeWidth(5)
} else
if(index !== this.listData.length - 1)
{
} else {
Divider()
.color('#f0f0f0')
.strokeWidth(1)
...
...
sight_harmony/features/wdComponent/src/main/ets/components/view/UserGradeTextSpan.ets
0 → 100644
View file @
39d7796
import { GradeSpan } from './span/GradeSpan';
import { image } from '@kit.ImageKit';
import { LengthMetrics } from '@kit.ArkUI';
import { StringUtils } from 'wdKit';
@Component
export struct UserGradeTextSpan{
@Watch('contentChange') @Prop nameContent:string = ""
@Watch('contentChange') @Prop gradeContent:string = ""
@Watch('contentChange') @Prop gradeWidth:number = 50
taskId:number = -1
customSpan3: GradeSpan | undefined = undefined;
style1: MutableStyledString | undefined = undefined;
imagePixelMap: image.PixelMap | undefined = undefined;
textController: TextController = new TextController();
private async getPixmapFromMedia(resource: Resource) {
let unit8Array = await getContext(this)?.resourceManager?.getMediaContent({
bundleName: resource.bundleName,
moduleName: resource.moduleName,
id: resource.id
});
let imageSource = image.createImageSource(unit8Array.buffer.slice(0, unit8Array.buffer.byteLength));
let createPixelMap: image.PixelMap = await imageSource.createPixelMap({
desiredPixelFormat: image.PixelMapFormat.RGBA_8888,
desiredSize: { width: vp2px(this.gradeWidth), height: vp2px(18) }
});
await imageSource.release();
return createPixelMap;
}
contentChange(){
if(this.taskId != -1){
clearTimeout(this.taskId)
}
this.taskId = setTimeout(() => {
this.createSpan()
}, 100);
}
async createSpan(){
if(StringUtils.isEmpty(this.nameContent)){
return
}
this.imagePixelMap = await this.getPixmapFromMedia($r('app.media.my_grade_bg'))
this.customSpan3 = new GradeSpan(this.gradeContent, this.gradeWidth, 18,this.imagePixelMap);
this.style1 = new MutableStyledString(this.customSpan3);
let name:MutableStyledString = new MutableStyledString(this.nameContent, [
{
start: 0,
length: 100,
styledKey: StyledStringKey.FONT,
styledValue: new TextStyle({ fontColor: Color.White,fontWeight: 500,fontSize: LengthMetrics.px(vp2px(20)) })
}])
name.appendStyledString(new StyledString(this.customSpan3))
this.textController.setStyledString(name)
}
aboutToAppear() {
this.createSpan()
}
build() {
Text(undefined, { controller: this.textController })
.copyOption(CopyOptions.InApp)
.maxLines(2)
}
}
\ No newline at end of file
...
...
sight_harmony/features/wdComponent/src/main/ets/components/view/span/GradeSpan.ets
0 → 100644
View file @
39d7796
import { drawing } from '@kit.ArkGraphics2D';
import { image } from '@kit.ImageKit';
export class GradeSpan extends CustomSpan {
width: number = 160;
word: string = "";
height: number = 10;
imagePixelMap: image.PixelMap | undefined = undefined;
constructor(word: string, width: number, height: number,imagePixelMap: image.PixelMap) {
super();
this.word = word;
this.width = width;
this.height = height;
this.imagePixelMap = imagePixelMap;
}
onMeasure(measureInfo: CustomSpanMeasureInfo): CustomSpanMetrics {
return { width: this.width, height: this.height };
}
onDraw(context: DrawContext, options: CustomSpanDrawInfo) {
let canvas = context.canvas;
const brush = new drawing.Brush();
canvas.attachBrush(brush);
let options2 = new drawing.SamplingOptions(drawing.FilterMode.FILTER_MODE_NEAREST);
if (this.imagePixelMap) {
canvas.drawImage(this.imagePixelMap, options.x , options.lineBottom - vp2px(this.height) - 10, options2);
}
brush.setColor({ alpha: 255, red: 237, green: 40, blue: 0 });
canvas.attachBrush(brush);
const font = new drawing.Font();
font.setSize(vp2px(12));
const textBlob = drawing.TextBlob.makeFromString(this.word, font, drawing.TextEncoding.TEXT_ENCODING_UTF8);
// canvas.drawTextBlob(textBlob, options.x + 20, options.lineBottom - 15);
canvas.drawTextBlob(textBlob, options.x + vp2px(9), options.lineBottom - vp2px(7.5));
canvas.detachBrush();
}
setWord(word: string) {
this.word = word;
}
}
\ No newline at end of file
...
...
sight_harmony/features/wdComponent/src/main/ets/pages/MineHomePage.ets
View file @
39d7796
...
...
@@ -8,6 +8,7 @@ import MinePageDatasModel from '../model/MinePageDatasModel';
import { EmptyComponent } from '../components/view/EmptyComponent';
import { CustomTitleUI } from '../components/reusable/CustomTitleUI';
import { TrackingPageBrowse, TrackConstants, TrackingButton, ParamType, Tracking } from 'wdTracking/Index';
import { UserGradeTextSpan } from '../components/view/UserGradeTextSpan';
const TAG = "MineHomePage"
...
...
@@ -121,14 +122,11 @@ struct MineHomePage {
Column() {
Row() {
Text(`${this.userName}`)
.fontColor($r('app.color.white'))
.maxLines(2)
.textOverflow({ overflow: TextOverflow.Ellipsis })
.fontSize(20)
.lineHeight(26)
.fontWeight(500)
.constraintSize({maxWidth:180})
UserGradeTextSpan({nameContent:`${this.userName}`,gradeContent:`等级${this.levelId}`,gradeWidth:this.levelId >9 ? 50 : 45})
}.constraintSize({maxWidth:`calc(100% - 16vp - 90vp)`})
.padding({top:8})
.onClick(()=>{
let params: editModelParams = {
editContent: this.userName
...
...
@@ -136,23 +134,6 @@ struct MineHomePage {
WDRouterRule.jumpWithPage(WDRouterPage.editUserNikeNamePage,params)
})
if(this.levelId>0){
Text(`等级${this.levelId}`)
.fontColor($r('app.color.color_ED2800'))
.fontSize(12)
.lineHeight(18)
.fontWeight(500)
.margin({ left: 6 })
.backgroundImage($r("app.media.my_grade_bg"))
.backgroundImageSize(ImageSize.Cover)
.padding({left: 6,right: 6})
.height(18)
.borderRadius({topRight:2,bottomRight:2})
}
Blank()
}
Row() {
Row() {
Text(`${NumberFormatterUtils.formatNumberWithWan(this.browseNum)}`)
...
...
sight_harmony/features/wdComponent/src/main/ets/pages/OtherNormalUserHomePage.ets
View file @
39d7796
...
...
@@ -205,9 +205,10 @@ struct OtherNormalUserHomePage {
.justifyContent(FlexAlign.Center)
.width('100%')
.backgroundColor($r('app.color.white'))
}
//间隔符
Divider().width('100%').height('12lpx').color($r('app.color.color_F5F5F5')).strokeWidth('12lpx')
}
//tab 页面
Stack({ alignContent: Alignment.Top }){
...
...
@@ -367,12 +368,10 @@ struct OtherNormalUserHomePage {
.lineHeight('38lpx')
if(this.currentIndex === index){
Divider()
.width('31lpx')
.height('4lpx')
.color('#ED2800')
.strokeWidth('4lpx')
.margin({top:'50lpx'})
Image($r('app.media.icon_channel_active'))//.colorFilter(ColorUtils.getDrawingColorFilter(this.getBothColor("")))
.width(16)
.height(2)
.margin({top: 30})
.id("divTag")
}
}.onClick(()=>{
...
...
sight_harmony/features/wdComponent/src/main/ets/viewmodel/AudioSuspensionModel.ets
View file @
39d7796
...
...
@@ -46,6 +46,7 @@ export class AudioSuspensionModel {
// BackgroundAudioController.sharedController().startContinuousTask()
BackgroundAudioController.sharedController().listenPlayEvents()
await BackgroundAudioController.sharedController().setSessionMetaData(srcContentId ?? "", srcTitle, $r("app.media.system_audio_icon_bk_center"), srcSource ?? "")
BackgroundAudioController.sharedController().activateSession()
BackgroundAudioController.sharedController().stopUseFeatures()
if (this.playerController.get().getUrl() === url) {
...
...
sight_harmony/features/wdDetailPlayApi/oh-package.json5
View file @
39d7796
...
...
@@ -2,7 +2,7 @@
"license"
:
"Apache-2.0"
,
"devDependencies"
:
{},
"author"
:
""
,
"name"
:
"wd
detailplaya
pi"
,
"name"
:
"wd
DetailPlayA
pi"
,
"description"
:
"Please describe the basic information."
,
"main"
:
"Index.ets"
,
"version"
:
"1.0.0"
,
...
...
sight_harmony/features/wdDetailPlayLive/oh-package.json5
View file @
39d7796
...
...
@@ -2,7 +2,7 @@
"license"
:
"Apache-2.0"
,
"devDependencies"
:
{},
"author"
:
""
,
"name"
:
"wd
detailplayl
ive"
,
"name"
:
"wd
DetailPlayL
ive"
,
"description"
:
"Please describe the basic information."
,
"main"
:
"Index.ets"
,
"version"
:
"1.0.0"
,
...
...
sight_harmony/features/wdDetailPlayShortVideo/oh-package.json5
View file @
39d7796
...
...
@@ -2,7 +2,7 @@
"license"
:
"Apache-2.0"
,
"devDependencies"
:
{},
"author"
:
""
,
"name"
:
"wd
detailplayshortv
ideo"
,
"name"
:
"wd
DetailPlayShortV
ideo"
,
"description"
:
"Please describe the basic information."
,
"main"
:
"Index.ets"
,
"version"
:
"1.0.0"
,
...
...
sight_harmony/features/wdHwAbility/oh-package.json5
View file @
39d7796
{
"name"
:
"wd
hwa
bility"
,
"name"
:
"wd
HwA
bility"
,
"version"
:
"1.0.0"
,
"description"
:
"Please describe the basic information."
,
"main"
:
"Index.ets"
,
...
...
@@ -7,7 +7,7 @@
"license"
:
"Apache-2.0"
,
"packageType"
:
"InterfaceHar"
,
"dependencies"
:
{
"
library
"
:
"file:./src/main/ets/getuiPush/GT-HM-1.0.4.har"
,
"
GtSDK
"
:
"file:./src/main/ets/getuiPush/GT-HM-1.0.4.har"
,
"neonui"
:
"file:./src/main/ets/voiceRecognizer/neonui.har"
,
"wdConstant"
:
"file:../../commons/wdConstant"
,
"wdLogin"
:
"file:../../features/wdLogin"
,
...
...
sight_harmony/features/wdHwAbility/src/main/ets/getuiPush/GetuiPush.ets
View file @
39d7796
...
...
@@ -4,7 +4,7 @@ import PushManager, {
GTCmdMessage, GTNotificationMessage, GTTransmitMessage, PushConst,
SetTagCmdMessage,
Tag,
UnBindAliasCmdMessage } from '
library
';
UnBindAliasCmdMessage } from '
GtSDK
';
import { AppUtils, DeviceUtil, EmitterEventId, EmitterUtils, Logger, SPHelper } from 'wdKit/Index';
import { HostEnum, HostManager, HttpBizUtil, HttpUrlUtils, HttpUtils, ResponseDTO } from 'wdNetwork/Index';
import { notificationManager } from '@kit.NotificationKit';
...
...
sight_harmony/features/wdLogin/oh-package.json5
View file @
39d7796
...
...
@@ -2,7 +2,7 @@
"license"
:
"Apache-2.0"
,
"devDependencies"
:
{},
"author"
:
""
,
"name"
:
"wd
l
ogin"
,
"name"
:
"wd
L
ogin"
,
"description"
:
"Please describe the basic information."
,
"main"
:
"Index.ets"
,
"version"
:
"1.0.0"
,
...
...
sight_harmony/features/wdLogin/src/main/ets/pages/login/SettingPasswordPage.ets
View file @
39d7796
import ArrayList from '@ohos.util.ArrayList';
import { Params } from '../../../../../../../commons/wdRouter/oh_modules/wdBean/Index';
import router from '@ohos.router';
import { LoginViewModel } from './LoginViewModel';
import { BreakpointSystem, CustomToast, DateTimeUtils, Logger, SPHelper, ToastUtils } from 'wdKit';
import {
SpConstants
} from '../../../../../../../commons/wdNetwork/oh_modules/wdConstant/src/main/ets/constants/SpConstants'
import data_preferences from '@ohos.data.preferences';
import { WDRouterPage, WDRouterRule } from 'wdRouter';
import { TrackingPageBrowse, TrackConstants, TrackingButton } from 'wdTracking/Index';
import { Params } from 'wdBean'
import router from '@ohos.router'
import { LoginViewModel } from './LoginViewModel'
import { BreakpointSystem, CustomToast, DateTimeUtils, Logger, SPHelper, ToastUtils } from 'wdKit'
import { SpConstants } from 'wdConstant'
import { WDRouterPage, WDRouterRule } from 'wdRouter'
import { TrackingPageBrowse, TrackConstants, TrackingButton } from 'wdTracking'
const TAG = "SettingPasswordLayout"
...
...
sight_harmony/features/wdPlayer/oh-package.json5
View file @
39d7796
...
...
@@ -2,7 +2,7 @@
"license"
:
"Apache-2.0"
,
"devDependencies"
:
{},
"author"
:
""
,
"name"
:
"wd
p
layer"
,
"name"
:
"wd
P
layer"
,
"description"
:
"Please describe the basic information."
,
"main"
:
"Index.ets"
,
"version"
:
"1.0.0"
,
...
...
sight_harmony/features/wdPlayer/src/main/ets/controller/BackgroundAudioController.ets
View file @
39d7796
...
...
@@ -53,13 +53,18 @@ export class BackgroundAudioController {
}
// 激活接口要在元数据、控制命令注册完成之后再执行
await this.lastSession?.activate();
//
await this.lastSession?.activate();
Logger.debug(TAG, `session create done : sessionId : ${this.lastSession?.sessionId}`);
this.lastProgress = 0
this.hasSetupProgress = false
}
async activateSession() {
await this.lastSession?.activate();
Logger.debug(TAG, `session activate done : sessionId : ${this.lastSession?.sessionId}`);
}
destorySession() {
if (this.lastSession) {
this.lastSession.deactivate();
...
...
@@ -74,6 +79,21 @@ export class BackgroundAudioController {
this.lastItemTitle = title || ""
this.lastItemMediaImage = mediaImage
this.lastItemArtist = artist || ""
let metadata: AVSessionManager.AVMetadata = {
assetId: assetId.length > 0 ? assetId : "fake-asset-id",
title: title.length > 0 ? title : " ",
mediaImage: "https://cdnjdphoto.aikan.pdnews.cn/WapApi/800/launcher_icon.png" ,//pixelMapImage ?? ("file://" + mediaImage.id),
artist: artist.length > 0 ? artist : "人日日报"
// duration: duration
};
try {
await this.lastSession?.setAVMetadata(metadata)
Logger.debug(TAG, `SetAVMetadata successfully`);
} catch (err) {
Logger.error(TAG, `Failed to set AVMetadata. Code: ${err.code}, message: ${err.message}`);
} finally {}
}
async setSessionMetaDataWithDuration(assetId: string, title: string, mediaImage: Resource, artist: string, duration: number) {
...
...
sight_harmony/features/wdShare/oh-package.json5
View file @
39d7796
{
"name"
:
"wd
s
hare"
,
"name"
:
"wd
S
hare"
,
"version"
:
"1.0.0"
,
"description"
:
"Please describe the basic information."
,
"main"
:
"Index.ets"
,
...
...
sight_harmony/features/wdTracking/oh-package.json5
View file @
39d7796
{
"name"
:
"wd
t
racking"
,
"name"
:
"wd
T
racking"
,
"version"
:
"1.0.0"
,
"description"
:
"Please describe the basic information."
,
"main"
:
"Index.ets"
,
...
...
sight_harmony/products/phone/src/main/ets/dailynewspaperformability/DailyNewspaperFormAbility.ets
View file @
39d7796
...
...
@@ -20,11 +20,11 @@ export default class DailyNewspaperFormAbility extends FormExtensionAbility {
if (want.parameters) {
let formId = want.parameters[formInfo.FormParam.IDENTITY_KEY] as string
let isTempCard = want.parameters[formInfo.FormParam.TEMPORARY_KEY] as boolean
if (isTempCard === false) { // 如果为常态卡片,直接进行信息持久化
// let isTempCard = want.parameters[formInfo.FormParam.TEMPORARY_KEY] as boolean
// if (isTempCard === false) { // 如果为常态卡片,直接进行信息持久化
this.fetchAndRefreshData(formId)
}
//
}
}
let obj: FormNewspaperData = {} as FormNewspaperData
...
...
sight_harmony/products/phone/src/main/ets/pages/view/VideoChannelPage.ets
View file @
39d7796
...
...
@@ -5,7 +5,7 @@
import { BottomNavDTO, TopNavDTO } from 'wdBean/Index';
import { VideoChannelDetail } from 'wdDetailPlayShortVideo/Index';
import { WDRouterPage, WDRouterRule } from 'wdRouter';
import { DisplayDirection } from 'wdConstant/Index';
import { DisplayDirection
,BottomNavi
} from 'wdConstant/Index';
import { CompUtils, GrayManageModel, PageComponent } from 'wdComponent/Index';
import { TrackingButton, TrackConstants } from 'wdTracking/Index';
import { ParamType, Tracking } from 'wdTracking/Index';
...
...
@@ -335,6 +335,7 @@ export struct VideoChannelPage {
channelId: item.channelId + '',
autoRefresh: this.autoRefresh,
isMourning: this.GrayManage.get().isVideoMourning(`${item.channelId}`),
bottomNavi:BottomNavi.VIDEO
}).backgroundColor(Color.White)
}
...
...
sight_harmony/products/phone/src/main/ets/pages/web/H5TipsPage.ets
View file @
39d7796
import router from '@ohos.router';
import { Params } from '
../../../../../../../commons/wdRouter/oh_modules/wdBean/src/main/ets/bean/content/Params
';
import { Params } from '
wdBean/Index
';
import { Logger, ToastUtils } from 'wdKit';
import { CustomTitleUI } from 'wdComponent/src/main/ets/components/reusable/CustomTitleUI';
import {BusinessError, pasteboard} from '@kit.BasicServicesKit';
...
...
sight_harmony/products/phone/src/main/module.json5
View file @
39d7796
...
...
@@ -18,6 +18,7 @@
"abilities"
:
[
{
"name"
:
"EntryAbility"
,
//
"launchType"
:
"singleton"
,
//
这里不能改动,和后台推送有绑定
"srcEntry"
:
"./ets/entryability/EntryAbility.ets"
,
"description"
:
"$string:app_desc"
,
...
...
@@ -143,11 +144,11 @@
},
{
//
默认的
"entities"
:
[
"entity.system.home"
,
"entity.system.home"
],
"actions"
:
[
"action.system.home"
,
],
"action.system.home"
]
},
{
//
H5换端
...
...
@@ -159,7 +160,7 @@
"scheme"
:
"rmrbapp"
,
"host"
:
"rmrb.app"
,
"path"
:
"openwith"
}
,
}
]},
{
//
推送
"actions"
:
[
...
...
@@ -173,7 +174,7 @@
"path"
:
'openwith'
}
]
}
,
}
]
}
],
...
...
@@ -216,7 +217,7 @@
},
{
"name"
:
"ohos.permission.INTERNET"
}
,
}
],
"extensionAbilities"
:
[
{
...
...
@@ -230,7 +231,7 @@
"name"
:
"ohos.extension.form"
,
"resource"
:
"$profile:form_config"
}
]
,
]
}
]
...
...
Please
register
or
login
to post a comment