wangliang_wd

Merge branch 'main' of http://192.168.1.42/developOne/harmonyPool into main

* 'main' of http://192.168.1.42/developOne/harmonyPool:
  -fix 多图跳转号主页bug修复
  fix:bug[18576] 登录账户-忘记密码-进入找回密码界面跳转时有页面残留
  fix: 18381 搜索结果页-无法加载出动态图片
  fix: 1、18558 我的频道下默认选中的推荐和热点频道按钮未能使用圆角; 2、18559 更多频道”和“地方频道”下的频道按钮未能使用圆角
  feat: 18047 搜索结果-号主动态视频-竖屏,号主信息展示不全
  feat: 直播横划卡右滑展示更多逻辑
  feat: 直播预告横划卡右滑展示更多逻辑
  feat: 直播横划卡右滑展示更多逻辑
  feat:横屏直播详情页面添加垫片逻辑
  ref |> 解决未登录状态无法保存设置中的开关状态问题
  ref |> 处理稿件分享功能暂时调用华为分享组件
  feat:竖屏直播,进入竖屏直播,未设置垫片-竖屏流直播详情页,后台点击切换到垫片,主播暂时离开,马上回来 缺省图没有显示,看图
  fix(规范):本地字段重命名
Showing 28 changed files with 362 additions and 202 deletions
import data_preferences from '@ohos.data.preferences';
import { Logger } from './Logger';
import { JSON } from '@kit.ArkTS';
const TAG = 'SPHelper'
const logEnable = false
/**
* sp存储,单条数据,value<1k;业务数据超过1k的,建议使用KVStoreHelper
*/
... ... @@ -12,10 +15,14 @@ export class SPHelper {
static init(context: Context) {
SPHelper.context = context;
if (context) {
Logger.debug(TAG, '初始化context')
}
}
static setSpFilename(spFilename: string) {
SPHelper.spFilename = spFilename;
Logger.debug(TAG, '设置文件名: ' + spFilename)
}
// 静态属性
... ... @@ -37,47 +44,75 @@ export class SPHelper {
}
async save(key: string, value: data_preferences.ValueType) {
const preferences: data_preferences.Preferences = await this.getVideoPreferences();
await preferences.put(key, value)
await preferences.flush()
try {
const preferences: data_preferences.Preferences = await this.getVideoPreferences();
await preferences.put(key, value)
await preferences.flush()
if (logEnable) {
Logger.debug(TAG, '保存 key: ' + key + " value => " + value)
}
} catch (e) {
Logger.error(TAG, '保存 key: ' + key + " value => " + value + " 报错:" + JSON.stringify(e))
}
}
saveSync(key: string, value: data_preferences.ValueType) {
const preferences: data_preferences.Preferences = this.getVideoPreferencesSync();
preferences.putSync(key, value)
preferences.flush().then(() => {
Logger.debug(TAG, 'saveSync flush success')
if (logEnable) {
Logger.debug(TAG, 'sync保存 key: ' + key + " value => " + value)
}
}).catch((error: object) => {
Logger.debug(TAG, 'saveSync flush failed: ' + JSON.stringify(error))
Logger.error(TAG, 'sync保存 key: ' + key + " value => " + value + " 报错:" + JSON.stringify(error))
});
}
async get(key: string, defValue: data_preferences.ValueType): Promise<data_preferences.ValueType> {
const preferences: data_preferences.Preferences = await this.getVideoPreferences();
return await preferences.get(key, defValue);
const data = await preferences.get(key, defValue);
if (logEnable) {
Logger.debug(TAG, '获取 key: ' + key + " value => " + data + "| 默认值:" + defValue)
}
return data
}
getSync(key: string, defValue: data_preferences.ValueType): data_preferences.ValueType {
const preferences: data_preferences.Preferences = this.getVideoPreferencesSync();
return preferences.getSync(key, defValue);
const data = preferences.getSync(key, defValue);
if (logEnable) {
Logger.debug(TAG, 'sync获取 key: ' + key + " value => " + data + "| 默认值:" + defValue)
}
return data
}
async has(key: string): Promise<boolean> {
const preferences: data_preferences.Preferences = await this.getVideoPreferences();
return await preferences.has(key);
const data = await preferences.has(key);
if (logEnable) {
Logger.debug(TAG, 'has key: ' + key + ' => ' + data)
}
return data
}
hasSync(key: string): boolean {
const preferences: data_preferences.Preferences = this.getVideoPreferencesSync();
return preferences.hasSync(key);
const data = preferences.hasSync(key);
if (logEnable) {
Logger.debug(TAG, 'synchas key: ' + key + ' => ' + data)
}
return data
}
async delete(key: string) {
const preferences: data_preferences.Preferences = await this.getVideoPreferences();
preferences.delete(key).then(async () => {
await preferences.flush();
if (logEnable) {
Logger.debug(TAG, '删除 key: ' + key)
}
}).catch((err: Error) => {
// Logger.error(TAG, 'Failed to delete the key. Cause: ' + err);
Logger.error(TAG, '删除 key失败:' + JSON.stringify(err));
});
}
... ... @@ -85,9 +120,11 @@ export class SPHelper {
const preferences: data_preferences.Preferences = this.getVideoPreferencesSync();
preferences.deleteSync(key)
preferences.flush().then(() => {
Logger.debug(TAG, 'deleteSync flush success')
if (logEnable) {
Logger.debug(TAG, 'sync删除 key: ' + key)
}
}).catch((error: object) => {
Logger.debug(TAG, 'deleteSync flush failed: ' + JSON.stringify(error))
Logger.error(TAG, 'sync删除 key失败:' + JSON.stringify(error));
});
}
... ... @@ -95,8 +132,9 @@ export class SPHelper {
this.getVideoPreferences().then(async (preferences: data_preferences.Preferences) => {
preferences.clearSync()
await preferences.flush()
Logger.debug(TAG, 'sync清除所有数据');
}).catch((err: Error) => {
// Logger.error(TAG, 'get the preferences failed, Cause: ' + err);
Logger.error(TAG, 'sync清除所有数据,失败:' + JSON.stringify(err));
});
}
... ...
... ... @@ -9,6 +9,16 @@ import { commentInfo } from './commentInfo';
import { BaseDTO } from '../component/BaseDTO';
import { LiveRoomDataBean } from '../live/LiveRoomDataBean';
export class ContentShareInfoDTO {
shareTitle: string = ''
shareUrl: string = ''
shareSummary: string = ''
shareCoverUrl: string = ''
sharePosterCoverUrl: string = ''
shareOpen: number = 0
sharePosterOpen: number = 0
}
@Observed
export class ContentDTO implements BaseDTO {
seoTags: string = '';
... ... @@ -70,6 +80,7 @@ export class ContentDTO implements BaseDTO {
fullColumnImgUrls: FullColumnImgUrlDTO[] = [];
liveInfo: LiveInfoDTO = {} as LiveInfoDTO; // 直播新闻信息【BFF聚合】
videoInfo: VideoInfoDTO = {} as VideoInfoDTO; // 视频新闻信息【BFF聚合】,视频非原片+清晰度最高的
shareInfo: ContentShareInfoDTO = {} as ContentShareInfoDTO
newsSummary: string = ''; //appstyle:2 ,新闻详情
contentText?: string = '';
... ... @@ -154,6 +165,7 @@ export class ContentDTO implements BaseDTO {
content.fullColumnImgUrls = old.fullColumnImgUrls;
content.liveInfo = old.liveInfo;
content.videoInfo = old.videoInfo;
content.shareInfo = old.shareInfo
content.newsSummary = old.newsSummary;
content.interactData = old.interactData;
content.hasMore = old.hasMore;
... ...
... ... @@ -14,37 +14,37 @@ export interface ShareInfoDTO {
//分享链接
shareUrl: string;
//首发时间
publishTime:string;
appCustomPublishTime:string;
//图片
imageUrl:string;
appCustomImageUrl:string;
//直播和内容的举报,仅针对人民号发布的才能举报,cms创建的没有举报按钮
showReport:boolean;
appCustomShowReport:boolean;
//点赞按钮显示 -1:不展示 0:未点赞 1:已点赞
showLike:number;
appCustomShowLike:number;
//0 分享海报关闭,1 分享海报开启
posterShareControl:string;
appCustomPosterShareControl:string;
//是否展示海报 -1-不展示图标
showPoster:number;
appCustomShowPoster:number;
//海报展示类型 1:专题、文章、图文、视频、直播 2:人民号 3:评论 4:电子报海报 5:音频专题海报 6:早晚报专题海报 7:榜单H5 8:H5普通文章专题,包含时间链
showPosterType:number;
appCustomShowPosterType:number;
//接口返回: 内容id、内容类型
contentId:string;
appCustomContentId:string;
//内容类型,分享的类型 0:不跳转 1:点播,2:直播,3:活动,4:广告,5:专题,6:链接,7:榜单,8:图文,9:组图,10:H5新闻,11:频道,12:组件,13:音频,14动态图文,15动态视频
contentType:string;
appCustomContentType:string;
//关系id
targetRelId:string;
appCustomTargetRelId:string;
//关系类型,1.频道关系;2.专题关系
targetRelType:string;
appCustomTargetRelType:string;
//21:文章专题,22:音频专题,23:直播专题,24:话题专题,25:早晚报专题
topicType:string;
appCustomTopicType:string;
//早晚报;1-早报;2-午报;3-晚报
topicPattern:number;
appCustomTopicPattern:number;
//是否有头版
isFrontDaily:boolean;
appCustomIsFrontDaily:boolean;
//分享海报简介
posterSummary:string;
sharePosterItemList: SharePosterItemBean[]
appCustomPosterSummary:string;
appCustomSharePosterItemList: SharePosterItemBean[]
//分享海报标题
posterTitle:string;
appCustomPosterTitle:string;
}
... ...
... ... @@ -444,17 +444,17 @@ export struct ENewspaperPageComponent {
let contentDetailData: ContentDetailDTO = {
shareInfo:{
shareTitle:this.newspaperListBean?.list[this.swiperIndex].pageName,
publishTime:this.newspaperListBean?.list[this.swiperIndex].periodNum,
imageUrl:this.newspaperListBean?.list[this.swiperIndex].pagePic,
appCustomPublishTime:this.newspaperListBean?.list[this.swiperIndex].periodNum,
appCustomImageUrl:this.newspaperListBean?.list[this.swiperIndex].pagePic,
shareUrl:this.newspaperListBean?.list[this.swiperIndex].sharePagePic.shareUrl,
sharePosterCoverUrl:this.newspaperListBean?.list[this.swiperIndex].sharePagePic.sharePosterCoverUrl,
showReport:false,
showLike:-1,
appCustomShowReport:false,
appCustomShowLike:-1,
shareOpen:1,
sharePosterOpen:1,
posterShareControl:'-1',
showPoster:-1,
showPosterType:4,
appCustomPosterShareControl:'-1',
appCustomShowPoster:-1,
appCustomShowPosterType:4,
}
} as ContentDetailDTO
WDShare.shareContent(contentDetailData,TrackConstants.PageName.NewsPaperPage,TrackConstants.PageName.NewsPaperPage)
... ...
... ... @@ -157,20 +157,20 @@ export struct PaperTitleComponent {
let contentDetailData: ContentDetailDTO = {
newsId:Number.parseInt(this.topicInfo.topicId),
shareInfo:{
contentId:this.topicInfo.topicId,
contentType:this.topicInfo.topicType+'',
appCustomContentId:this.topicInfo.topicId,
appCustomContentType:this.topicInfo.topicType+'',
shareTitle:this.topicInfo.shareTitle,
shareSummary:this.topicInfo.shareSummary,
imageUrl:this.topicInfo.shareCoverUrl,
appCustomImageUrl:this.topicInfo.shareCoverUrl,
sharePosterCoverUrl:this.topicInfo.sharePosterCoverUrl,
shareUrl:this.topicInfo.shareUrl,
targetRelId:this.topicInfo.relId,
targetRelType:this.topicInfo.relType,
showReport:false,
showLike:-1,
appCustomTargetRelId:this.topicInfo.relId,
appCustomTargetRelType:this.topicInfo.relType,
appCustomShowReport:false,
appCustomShowLike:-1,
shareOpen:1,
sharePosterOpen:this.topicInfo.posterFlag,
showPoster:this.topicInfo.posterFlag>0?1:-1,
appCustomShowPoster:this.topicInfo.posterFlag>0?1:-1,
}
} as ContentDetailDTO
WDShare.setTopicBeanToShareBean(contentDetailData.shareInfo,this.topicInfo)
... ...
... ... @@ -146,7 +146,7 @@ export struct RmhTitle {
.height(16)
}
}
Text(this.rmhInfo?.rmhDesc)
Text(this.rmhInfo?.rmhDesc.replaceAll('\n', ''))
.fontSize($r("app.float.font_size_12"))
.fontColor($r("app.color.color_B0B0B0"))
.maxLines(1)
... ...
... ... @@ -112,6 +112,8 @@ interface picProps {
struct createImg {
@Prop fullColumnImgUrls: FullColumnImgUrlDTO[]
@State loadImg: boolean = false;
@State onePicW: number = 0; // 只有一张图时候图片的宽度
@State onePicH: number = 0; // 只有一张图时候图片的高度
async aboutToAppear(): Promise<void> {
if (this.fullColumnImgUrls.length === 4) { // 为了使用栅格布局以便于占用三分之二的宽度,加一个占位
... ... @@ -177,7 +179,7 @@ struct createImg {
Image(this.loadImg ? item.fullUrl || item.url : '')
.backgroundColor(0xf5f5f5)
.width('100%')
.height(172)
.height(198)
.autoResize(true)
.borderRadius(this.caclImageRadius(index))
} else if (this.getPicType(item.weight, item.height) === 2) {
... ... @@ -215,14 +217,18 @@ struct createImg {
}
} else {
GridCol({
span: item.landscape === 1 ? 12 : 8
span: this.onePicW > this.onePicH ? 12 : 8
}) {
Image(this.loadImg ? item.fullUrl : '')
.backgroundColor(0xf5f5f5)
.aspectRatio(item.landscape === 1 ? 343 / 172 : 228 / 305)
.aspectRatio(this.onePicW > this.onePicH ? 343 / 198 : 228 / 305)
.autoResize(true)
.borderRadius(this.caclImageRadius(index))
.opacity(!item.weight && !item.height ? 0 : 1)
.onComplete((event?) => {
this.onePicW = event?.width || 0;
this.onePicH = event?.height || 0;
})
}
}
} else if (this.fullColumnImgUrls.length === 4) {
... ...
... ... @@ -401,7 +401,7 @@ export struct ZhSingleRow03 {
.fontWeight(600)
}
if (this.compDTO?.objectType === '0' || this.compDTO?.objectType === '') {
if (!(this.compDTO?.objectType === '0' || this.compDTO?.objectType === '')) {
Row() {
Text("更多")
.fontSize($r("app.float.font_size_14"))
... ...
... ... @@ -6,6 +6,7 @@ import { ProcessUtils, WDRouterRule } from 'wdRouter';
import { TrackConstants,
TrackingButton,
TrackingContent, TrackingPageBrowse, TrackParamConvert } from 'wdTracking/Index';
import { WDShare } from 'wdShare/Index';
const TAG: string = 'CardView';
... ... @@ -588,7 +589,7 @@ export struct PaperSingleColumn999CardView {
right: { anchor: '__container__', align: HorizontalAlign.End }
})
.onClick(() => {
ToastUtils.showToast('分享为公共方法,待开发', 1000)
WDShare.shareProgram(this.item)
})
}.width(CommonConstants.FULL_PARENT)
.justifyContent(FlexAlign.SpaceBetween)
... ...
... ... @@ -40,7 +40,7 @@ struct ChannelSubscriptionLayout {
aboutToAppear() {
this.currentTopNavSelectedItem = this.myChannelList[this.currentTopNavSelectedIndex]
this.myChannelList.forEach(item=>{
this.myChannelList.forEach(item => {
this.channelIds.push(item.channelId)
})
}
... ... @@ -53,8 +53,9 @@ struct ChannelSubscriptionLayout {
this.channelIds.splice(index2, 0, channelIdTmp[0])
AppStorage.setOrCreate('channelIds', this.channelIds.join(','))
}
//删除频道
delChannelItem(index: number){
delChannelItem(index: number) {
let item = this.myChannelList.splice(index, 1)[0]
this.channelIds.splice(index, 1)
AppStorage.setOrCreate('channelIds', JSON.stringify(this.channelIds))
... ... @@ -65,8 +66,9 @@ struct ChannelSubscriptionLayout {
this.localChannelList.unshift(item)
}
}
// 添加频道
addChannelItem(item: TopNavDTO){
addChannelItem(item: TopNavDTO) {
this.channelIds.push(item.channelId)
this.myChannelList.push(item)
AppStorage.setOrCreate('channelIds', this.channelIds.join(','))
... ... @@ -323,9 +325,10 @@ struct ChannelSubscriptionLayout {
}
.width('23%')
.height(40)
.borderRadius(3)
.border({
width: item.headlinesOn === 1 || item.movePermitted === 0 ? 0 : 1,
color: '#EDEDED',
width: 0.7,
color: item.headlinesOn === 1 || item.movePermitted === 0 ? '#F5F5F5' : '#EDEDED',
radius: 3
})
.zIndex(this.dragItem == item.num ? 1 : 0)
... ... @@ -427,8 +430,9 @@ struct ChannelSubscriptionLayout {
.width(80)
.height(40)
.border({
width: 1,
color: '#EDEDED'
width: 0.7,
color: '#EDEDED',
radius: 3
})
}, (item: TopNavDTO) => JSON.stringify(item))
}
... ... @@ -471,8 +475,9 @@ struct ChannelSubscriptionLayout {
.width(80)
.height(40)
.border({
width: 1,
color: '#EDEDED'
width: 0.7,
color: '#EDEDED',
radius: 3
})
}, (item: TopNavDTO) => JSON.stringify(item))
}
... ...
... ... @@ -203,7 +203,6 @@ export struct TopNavigationComponentNew {
moreChannelList: $moreChannelList,
localChannelList: $localChannelList,
changeTab: (index) => {
this.changePage(index)
}
})
... ...
import { SpConstants } from 'wdConstant';
import { Logger, SPHelper, ToastUtils, EmitterEventId, EmitterUtils, DateTimeUtils, CustomToast } from 'wdKit';
import {MineMainSettingFunctionItem} from '../../viewmodel/MineMainSettingFunctionItem';
import MineSettingDatasModel from '../../model/MineSettingDatasModel';
import { MineSettingDatasModel } from '../../model/MineSettingDatasModel';
import router from '@ohos.router';
import { WDRouterPage, WDRouterRule } from 'wdRouter';
import { Params } from 'wdBean';
... ...
... ... @@ -9,13 +9,15 @@ import { Params } from 'wdBean';
// import { common } from '@kit.AbilityKit';
import fs from '@ohos.file.fs';
import { CustomCacheDialog } from './CustomCacheDialog';
import MineSettingDatasModel from '../../model/MineSettingDatasModel';
import { MineSettingDatasModel } from '../../model/MineSettingDatasModel';
import { MineMainSettingFunctionItem } from '../../viewmodel/MineMainSettingFunctionItem';
import common from '@ohos.app.ability.common';
import dataPreferences from '@ohos.data.preferences';
import { TitleBackComponent } from './TitleBackComponent';
import { MyCustomDialog } from '../reusable/MyCustomDialog';
import { TrackingButton, TrackConstants } from 'wdTracking/Index';
import { JSON } from '@kit.ArkTS';
import { HttpUtils } from 'wdNetwork/Index';
@Component
export struct MineSettingComponent {
... ... @@ -82,10 +84,9 @@ export struct MineSettingComponent {
async getSettingPageData() {
let oldList = MineSettingDatasModel.getMineMainSettingFunctionItemData();
let userId=await SPHelper.default.get(SpConstants.USER_ID,'') as string
if(userId==''){
this.listData=oldList.slice(1,oldList.length)
}else {
if (!HttpUtils.isLogin()) {
this.listData = oldList.slice(1,oldList.length)
} else {
this.listData = oldList;
}
... ... @@ -167,6 +168,7 @@ export struct MineSettingComponent {
.margin({ left: `${this.calcHeight(81)}lpx`, right: `${this.calcHeight(29)}lpx` })
.selectedColor("#ED2800")
.onChange((isOn: boolean) => {
Logger.debug("SPHelper", "数据 : " + JSON.stringify(item))
if(item.itemType=='push_switch'){
trackButtonClick("settingPagePushSwitch")
//推送
... ...
... ... @@ -50,6 +50,16 @@ export struct HorizontalStrokeCardThreeTwoRadioForMoreComponent {
toMore() {
if (this.moreWidth > this.initMoreWidth * 2) {
this.liveToMore();
}
}
liveToMore() {
if (!!this.compDTO.dataSourceType) {
if (this.compDTO.dataSourceType === 'OBJECT_POS') {
ProcessUtils.jumpChannelTab(this.compDTO.objectId, this.compDTO.pageId as string, this.compDTO.objectTitle)
return;
}
if (this.compDTO.linkUrl) {
let taskAction: Action = {
type: 'JUMP_H5_BY_WEB_VIEW',
... ... @@ -61,9 +71,24 @@ export struct HorizontalStrokeCardThreeTwoRadioForMoreComponent {
} else {
this.jumpToLiveMorePage()
}
} else {
if (this.compDTO?.objectType === '11') {
} else {
const contentDTO: ContentDTO = {
objectId: this.compDTO.objectId,
objectType: this.compDTO.objectType,
linkUrl: this.compDTO.linkUrl,
pageId: this.compDTO.pageId
} as ContentDTO
ProcessUtils.processPage(contentDTO)
}
}
}
showMore() {
return !!this.compDTO.dataSourceType || !(this.compDTO?.objectType === '0' || this.compDTO?.objectType === '')
}
build() {
Column() {
Row() {
... ... @@ -87,19 +112,9 @@ export struct HorizontalStrokeCardThreeTwoRadioForMoreComponent {
.width(14)
.height(14)
}
.visibility(this.compDTO?.objectType === '0' || this.compDTO?.objectType === '' ? Visibility.None : Visibility.Visible)
.visibility(this.showMore() ? Visibility.Visible : Visibility.None)
.onClick(() => {
if (this.compDTO.linkUrl) {
let taskAction: Action = {
type: 'JUMP_H5_BY_WEB_VIEW',
params: {
url: this.compDTO.linkUrl
} as Params,
};
WDRouterRule.jumpWithAction(taskAction)
} else {
this.jumpToLiveMorePage()
}
this.liveToMore();
})
}.justifyContent(FlexAlign.SpaceBetween)
... ... @@ -141,7 +156,7 @@ export struct HorizontalStrokeCardThreeTwoRadioForMoreComponent {
})
}
if (this.compDTO.operDataList.length >= 2 && !(this.compDTO?.objectType === '0' || this.compDTO?.objectType === '')) {
if (this.compDTO.operDataList.length >= 2 && this.showMore()) {
Row() {
Ellipse()
.width(2* (this.moreWidth - this.initMoreWidth - 1))
... ...
... ... @@ -99,6 +99,10 @@ export struct LiveHorizontalCardComponent {
this.loadImg = await onlyWifiLoadImg();
}
showMore() {
return !!this.compDTO.dataSourceType || !(this.compDTO?.objectType === '0' || this.compDTO?.objectType === '')
}
build() {
Column() {
... ... @@ -114,7 +118,7 @@ export struct LiveHorizontalCardComponent {
.fontWeight(600)
}
if (this.compDTO.dataSourceType === 'LIVE_HORIZONTAL_CARD' || this.compDTO.dataSourceType === 'LIVE_MONTHLY_RANKING' || this.compDTO.dataSourceType === 'OBJECT_POS') {
if (this.showMore()) {
Row() {
Text("更多")
.fontSize($r("app.float.font_size_14"))
... ... @@ -175,7 +179,7 @@ export struct LiveHorizontalCardComponent {
})
})
}
if (this.compDTO.operDataList.length >= 2 && !(this.compDTO?.objectType === '0' || this.compDTO?.objectType === '')) {
if (this.compDTO.operDataList.length >= 2 && this.showMore()) {
Row() {
Ellipse()
.width(2* (this.moreWidth - this.initMoreWidth - 1))
... ...
... ... @@ -296,7 +296,6 @@ export struct LiveOperRowListView {
.aspectRatio(1)
.interpolation(ImageInterpolation.High)
.onClick((event: ClickEvent) => {
// ToastUtils.showToast('分享为公共方法,待开发', 1000);
this.share()
})
}
... ...
... ... @@ -391,7 +391,6 @@ export struct OperRowListView {
.aspectRatio(1)
.interpolation(ImageInterpolation.High)
.onClick((event: ClickEvent) => {
// ToastUtils.showToast('分享为公共方法,待开发', 1000);
this.share()
})
}
... ...
... ... @@ -12,74 +12,49 @@ const TAG = "MineSettingDatasModel"
/**
* 我的设置页面 所有数据 获取封装类
*/
class MineSettingDatasModel{
private static instance: MineSettingDatasModel;
mainSettingData:Array<MineMainSettingFunctionItem> = []
accountAndSecurityData:Array<MineMainSettingFunctionItem> = []
private constructor() { }
/**
* 单例模式
* @returns
*/
public static getInstance(): MineSettingDatasModel {
if (!MineSettingDatasModel.instance) {
MineSettingDatasModel.instance = new MineSettingDatasModel();
}
return MineSettingDatasModel.instance;
}
export class MineSettingDatasModel {
/**
* 评论 关注 收藏 等7个数据
* 包含名字和图标
*/
getMineMainSettingFunctionItemData():MineMainSettingFunctionItem[]{
if(this.mainSettingData.length === 7){
return this.mainSettingData
}
this.mainSettingData = []
this.mainSettingData.push(new MineMainSettingFunctionItem(null, '账户与安全', '18888888888', 0, false,"account"))
static getMineMainSettingFunctionItemData() {
let mainSettingData: MineMainSettingFunctionItem[] = []
mainSettingData.push(new MineMainSettingFunctionItem(null, '账户与安全', '18888888888', 0, false,"account"))
let pushState=SPHelper.default.getSync(SpConstants.SETTING_PUSH_SWITCH,false) as boolean
this.mainSettingData.push(new MineMainSettingFunctionItem(null, '接收推送', null, 1, pushState,"push_switch"))
this.mainSettingData.push(new MineMainSettingFunctionItem(null, '隐私设罝', null, 0, false,"private_setting"))
mainSettingData.push(new MineMainSettingFunctionItem(null, '接收推送', null, 1, pushState,"push_switch"))
mainSettingData.push(new MineMainSettingFunctionItem(null, '隐私设罝', null, 0, false,"private_setting"))
let wifiState=SPHelper.default.getSync(SpConstants.SETTING_WIFI_IMAGE_SWITCH,false) as boolean
this.mainSettingData.push(new MineMainSettingFunctionItem(null, '仅wifi网络加载图片', null, 1, wifiState,"wifi_switch"))
mainSettingData.push(new MineMainSettingFunctionItem(null, '仅wifi网络加载图片', null, 1, wifiState,"wifi_switch"))
let videoState=SPHelper.default.getSync(SpConstants.SETTING_WIFI_VIDEO_SWITCH,false) as boolean
this.mainSettingData.push(new MineMainSettingFunctionItem(null, 'wifi网络情况下自动播放视频', null, 1, videoState,"video_switch"))
mainSettingData.push(new MineMainSettingFunctionItem(null, 'wifi网络情况下自动播放视频', null, 1, videoState,"video_switch"))
let suspensionState=SPHelper.default.getSync(SpConstants.SETTING_SUSPENSION_SWITCH,false) as boolean
this.mainSettingData.push(new MineMainSettingFunctionItem(null, '开启播放器悬浮窗', null, 1, suspensionState,"suspensionState_switch"))
mainSettingData.push(new MineMainSettingFunctionItem(null, '开启播放器悬浮窗', null, 1, suspensionState,"suspensionState_switch"))
// this.mainSettingData.push(new MineMainSettingFunctionItem(null, null, null, 2, null,""))
this.mainSettingData.push(new MineMainSettingFunctionItem(null, '清理缓存', '32MB', 0, false,"clear_cache"))
mainSettingData.push(new MineMainSettingFunctionItem(null, '清理缓存', '32MB', 0, false,"clear_cache"))
// this.mainSettingData.push(new MineMainSettingFunctionItem(null, '评价我们', null, 0, false,""))
return this.mainSettingData
return mainSettingData
}
/**
* 评论 关注 收藏 等7个数据
* 包含名字和图标
*/
getAccountAndSecuritySettingData():MineMainSettingFunctionItem[]{
if(this.accountAndSecurityData.length === 7){
return this.accountAndSecurityData
}
this.accountAndSecurityData = []
this.accountAndSecurityData.push(new MineMainSettingFunctionItem(null, '更换手机号', '18888888888', 0, false,""))
this.accountAndSecurityData.push(new MineMainSettingFunctionItem(null, '设置密码', null, 0, false,""))
this.accountAndSecurityData.push(new MineMainSettingFunctionItem(null, null, null, 2, null,""))
static getAccountAndSecuritySettingData():MineMainSettingFunctionItem[]{
let accountAndSecurityData: MineMainSettingFunctionItem[] = []
accountAndSecurityData.push(new MineMainSettingFunctionItem(null, '更换手机号', '18888888888', 0, false,""))
accountAndSecurityData.push(new MineMainSettingFunctionItem(null, '设置密码', null, 0, false,""))
accountAndSecurityData.push(new MineMainSettingFunctionItem(null, null, null, 2, null,""))
// this.accountAndSecurityData.push(new MineMainSettingFunctionItem($r('app.media.account_qqicon'), '绑定QQ', '立即绑定', 0, false,""))
// this.accountAndSecurityData.push(new MineMainSettingFunctionItem($r('app.media.account_wechaticon'), '绑定微信', '立即绑定', 0, false,""))
// this.accountAndSecurityData.push(new MineMainSettingFunctionItem($r('app.media.account_weiboicon'), '绑定新浪微博', '立即绑定', 0, false,""))
// this.accountAndSecurityData.push(new MineMainSettingFunctionItem($r('app.media.account_appleicon'), 'Apple ID', null, 0, false,""))
// this.accountAndSecurityData.push(new MineMainSettingFunctionItem(null, null, null, 2, null,""))
this.accountAndSecurityData.push(new MineMainSettingFunctionItem(null, '注销账号', null, 0, false,""))
accountAndSecurityData.push(new MineMainSettingFunctionItem(null, '注销账号', null, 0, false,""))
return this.accountAndSecurityData
return accountAndSecurityData
}
... ... @@ -113,10 +88,10 @@ class MineSettingDatasModel{
/**
* 判断是否设置过密码
*/
checkSetPassword(): Promise<CheckSetPasswordItem> {
static checkSetPassword(): Promise<CheckSetPasswordItem> {
return new Promise<CheckSetPasswordItem>((success, error) => {
Logger.info(TAG, `checkSetPassword start`);
this.fetchCheckSetPassword().then((navResDTO: ResponseDTO<CheckSetPasswordItem>) => {
MineSettingDatasModel.fetchCheckSetPassword().then((navResDTO: ResponseDTO<CheckSetPasswordItem>) => {
if (!navResDTO || navResDTO.code != 0) {
error(null)
return
... ... @@ -131,13 +106,9 @@ class MineSettingDatasModel{
})
}
fetchCheckSetPassword() {
static fetchCheckSetPassword() {
let url = HttpUrlUtils.checkSetPassword()
return WDHttp.get<ResponseDTO<CheckSetPasswordItem>>(url)
};
}
const mineSettingDatasModel = MineSettingDatasModel.getInstance()
export default mineSettingDatasModel as MineSettingDatasModel
// export default MineMainSettingFunctionItem as MineMainSettingFunctionItem
... ...
... ... @@ -7,7 +7,7 @@ import { DetailPlayVLivePage } from './DetailPlayVLivePage';
import { DateTimeUtils, Logger, ToastUtils } from 'wdKit/Index';
import { publishCommentModel } from 'wdComponent/src/main/ets/components/comment/model/PublishCommentModel';
import { PictureLoading } from '../widgets/vertical/PictureLoading';
import { TrackConstants, TrackingButton, TrackingPageBrowse } from 'wdTracking/Index';
import { TrackConstants, TrackingPageBrowse } from 'wdTracking/Index';
import { LiveDetailPageLogic } from '../viewModel/LiveDetailPageLogic';
const TAG = 'DetailPlayLiveCommon'
... ... @@ -36,8 +36,7 @@ export struct DetailPlayLiveCommon {
@Provide liveStyle: number = -1
// 直播地址
@Provide playUrl: string = ''
// // 直播间背景图
// @Provide imgUrl: string = ''
// 全屏展示
@Provide pageShow: number = -1
// 关闭全屏
... ... @@ -45,7 +44,6 @@ export struct DetailPlayLiveCommon {
// 返回功能
@Provide pageBackPress: number = -1
@Provide liveDetailPageLogic :LiveDetailPageLogic = new LiveDetailPageLogic
// 直播详情内容
@Provide contentDetailData: ContentDetailDTO = {} as ContentDetailDTO
... ... @@ -106,20 +104,22 @@ export struct DetailPlayLiveCommon {
let m3u8uUrl = pullStreamAddressData.transCode[0].m3u8Url
detailData.liveInfo.vlive[0].liveUrl = m3u8uUrl
this.playUrl = m3u8uUrl
// console.log(TAG, ' GetPullAddressBean:', m3u8uUrl)
}
}
this.liveState = detailData.liveInfo?.liveState
this.contentDetailData = data[0]
this.liveDetailPageLogic.contentDetailData = this.contentDetailData
this.liveDetailPageLogic.liveLandscape = detailData?.liveInfo?.liveLandScape
this.liveDetailPageLogic.liveState = detailData.liveInfo?.liveState
this.liveDetailPageLogic.resolvingRoomBackgroundImgUrl()
this.liveDetailPageLogic.resolvingRoomImgSource()
this.liveDetailPageLogic.resolvingRoomVliveData(0)
this.publishCommentModel.targetId = String(detailData?.newsId || '')
this.publishCommentModel.targetRelId = String(detailData?.reLInfo?.relId || '')
... ... @@ -131,13 +131,6 @@ export struct DetailPlayLiveCommon {
this.publishCommentModel.visitorComment = String(detailData?.visitorComment || '')
this.publishCommentModel.commentContent = ''
this.liveStyle = detailData.liveInfo?.liveStyle
//
// if (this.contentDetailData.liveInfo && this.contentDetailData.liveInfo.previewUrl &&
// this.contentDetailData.liveInfo.previewUrl.length > 0) {
// this.imgUrl = this.contentDetailData.liveInfo.previewUrl
// } else if (detailData.fullColumnImgUrls && detailData.fullColumnImgUrls.length > 0) {
// this.imgUrl = detailData.fullColumnImgUrls[0].url
// }
if (detailData.liveInfo.liveState == 'end') {
this.playUrl = detailData.liveInfo.vlive[0].replayUri
... ...
... ... @@ -7,9 +7,10 @@ import mediaquery from '@ohos.mediaquery';
import { Logger, WindowModel } from 'wdKit/Index';
import { router, window } from '@kit.ArkUI';
import { WDAliPlayerController } from 'wdPlayer/Index';
import { LiveOperRowListView } from 'wdComponent';
import { LiveEmptyComponent, LiveOperRowListView } from 'wdComponent';
import { publishCommentModel } from 'wdComponent/src/main/ets/components/comment/model/PublishCommentModel';
import { TrackConstants, TrackingContent, TrackParamConvert } from 'wdTracking/Index';
import { LiveDetailPageLogic } from '../viewModel/LiveDetailPageLogic';
let TAG: string = 'DetailPlayLivePage';
... ... @@ -39,6 +40,8 @@ export struct DetailPlayLivePage {
@State lastInputedLiveComment: LiveRoomItemBean = {} as LiveRoomItemBean // 上次输入的直播间消息
@State lastInputedChatComment: LiveRoomItemBean = {} as LiveRoomItemBean // 上次输入的大家聊消息
aboutToAppear(): void {
Logger.info(TAG, `wyj-aboutToAppear`)
... ... @@ -66,8 +69,9 @@ export struct DetailPlayLivePage {
build() {
Column() {
TopPlayComponent({ playerController: this.playerController })
.height(this.displayDirection == DisplayDirection.VERTICAL ? 211 : '100%')
TopPlayComponent({ playerController: this.playerController })
.height(this.displayDirection == DisplayDirection.VERTICAL ? 211 : '100%')
TabComponent({
tabs: this.tabs,
... ...
... ... @@ -30,13 +30,12 @@ export struct DetailPlayVLivePage {
@Consume liveState: string
@Consume liveStyle: number
@Consume playUrl: string
// @Consume imgUrl: string
// @Consume imgUrl: string
@Consume @Watch('openFullScreen') pageShow: number
@Consume @Watch('closeFullScreen') pageHide: number
@Consume contentId: string
@State swiperIndex: number = 1
@Consume liveDetailPageLogic :LiveDetailPageLogic
@Consume liveDetailPageLogic: LiveDetailPageLogic
aboutToAppear(): void {
this.openFullScreen()
... ... @@ -62,7 +61,7 @@ export struct DetailPlayVLivePage {
build() {
Stack() {
Stack({ alignContent: Alignment.Top }) {
// 直播背景图,模糊处理
Image(this.liveDetailPageLogic.imgUrl)
.height('100%')
... ... @@ -79,13 +78,33 @@ export struct DetailPlayVLivePage {
LiveEmptyComponent({
emptyType: WDLiveViewDefaultType.WDViewDefaultType_NoLiveSuspend
})
.height('60%')
.height('30%').margin({top:this.topSafeHeight })
} else {
PlayerComponent({
playerController: this.playerController
})
if (this.liveDetailPageLogic.showPad) {
// 有垫片
if(this.liveDetailPageLogic.padImageUri.length > 0){
// 配置了垫片资源
Image(this.liveDetailPageLogic.padImageUri).objectFit(ImageFit.Fill).width('100%').height('100%')
}else {
// 没有配置垫片资源
LiveEmptyComponent({
emptyType: WDLiveViewDefaultType.WDViewDefaultType_NoLiveSuspend
})
.height('30%').margin({top:this.topSafeHeight })
}
} else {
// 播放器
PlayerComponent({
playerController: this.playerController
})
}
}
// 直播详情 左右滑动业务数据
PlayerInfoComponent({
playerController: this.playerController,
swiperController: this.swiperController,
... ...
import { ContentDetailDTO } from 'wdBean/Index'
const TAG = 'LiveDetailPageLogic'
/**
* 直播信息对象逻辑加工处理的工具类
*/
... ... @@ -14,6 +14,10 @@ export class LiveDetailPageLogic {
// 预告片图片/视频url
imgUrl: string = ''
// 垫片资源
padImageUri:string = ''
// 垫片是否开启
showPad:boolean = false
/**
... ... @@ -42,15 +46,42 @@ export class LiveDetailPageLogic {
/**
* 解析背景图片资源
* 解析直播间的图片资源
*/
resolvingRoomBackgroundImgUrl() {
resolvingRoomImgSource() {
// 背景图资源
if (this.contentDetailData.liveInfo && this.contentDetailData.liveInfo.previewUrl &&
this.contentDetailData.liveInfo.previewUrl.length > 0) {
this.imgUrl = this.contentDetailData.liveInfo.previewUrl
} else if (this.contentDetailData.fullColumnImgUrls && this.contentDetailData.fullColumnImgUrls.length > 0) {
this.imgUrl = this.contentDetailData.fullColumnImgUrls[0].url
}
// 垫图资源
if (this.contentDetailData.liveInfo){
if(this.contentDetailData.liveInfo.padImageUri.length > 0){
this.padImageUri =this.contentDetailData.liveInfo.padImageUri
}
//this.padImageUri = 'https://uatjdcdnphoto.aikan.pdnews.cn/sjbj-20240515/image/display/cdb84fe86b1440d58f3fc585841b928d.jpg'
}
console.log(TAG, ' this.imgUrl===>', this.imgUrl)
}
/**
* 解析直播详情里面的 vlive资源
* @param index
*/
resolvingRoomVliveData(index:number){
// 只有直播中的才会有垫片
if(this.liveState === 'running'){
this.showPad = this.contentDetailData.liveInfo.vlive[index].showPad
}
}
}
\ No newline at end of file
... ...
... ... @@ -4,6 +4,8 @@ import { PlayerConstants, WDAliPlayerController, WDPlayerRenderLiveView } from '
import { PlayUIComponent } from './PlayUIComponent';
import { PictureLoading } from '../../vertical/PictureLoading';
import { TrackConstants } from 'wdTracking/Index';
import { LiveDetailPageLogic } from '../../../viewModel/LiveDetailPageLogic';
import { LiveEmptyComponent, WDLiveViewDefaultType } from 'wdComponent/Index';
const TAG: string = 'TopPlayComponent'
... ... @@ -32,6 +34,7 @@ export struct TopPlayComponent {
@Provide playSourceState: number = 0
private playUrl: string = ""
private xComponentIsLoaded: boolean = false
@Consume liveDetailPageLogic: LiveDetailPageLogic
aboutToAppear(): void {
if (this.playerController) {
... ... @@ -66,6 +69,15 @@ export struct TopPlayComponent {
* 更新直播播放数据
*/
updateData() {
// 检测垫片
if (this.liveDetailPageLogic.showPad){
this.isHideLoading = true
this.isWait = true
this.previewUrl = this.liveDetailPageLogic.imgUrl
return
}
// 检测直播等待状态的直播预告是否视频资源
if (this.contentDetailData.liveInfo && this.contentDetailData.liveInfo.previewType === 1
&& this.contentDetailData?.liveInfo?.liveState == 'wait'
... ... @@ -113,7 +125,6 @@ export struct TopPlayComponent {
} else {
Logger.debug(TAG, `---0------>${playUrl}`)
if (StringUtils.isNotEmpty(playUrl)) {
Logger.debug(TAG, `---isNotEmpty------>`)
this.playUrl = playUrl
this.tryToPlay()
}
... ... @@ -140,7 +151,8 @@ export struct TopPlayComponent {
this.previewUrl = ''
}
}
// Logger.debug(TAG, `---0------>` + this.isWait + ' ->' + this.isHideLoading + ' ->' + this.isEnd+' -->'+this.isVideoSource)
// Logger.debug(TAG,
// `---0------>` + this.isWait + ' ->' + this.isHideLoading + ' ->' + this.isEnd + ' -->' + this.isVideoSource)
}
tryToPlay() {
... ... @@ -163,22 +175,29 @@ export struct TopPlayComponent {
build() {
Stack() {
// 视频资源播放
WDPlayerRenderLiveView({
playerController: this.playerController,
onLoad: async () => {
if (StringUtils.isNotEmpty(this.playUrl)) {
this.isHideLoading = false
this.isError = false
this.xComponentIsLoaded = true
Logger.debug(TAG, `---onLoad------>`)
this.tryToPlay()
if (this.liveDetailPageLogic.showPad) {
} else {
// 视频资源播放
WDPlayerRenderLiveView({
playerController: this.playerController,
onLoad: async () => {
if (StringUtils.isNotEmpty(this.playUrl)) {
this.isHideLoading = false
this.isError = false
this.xComponentIsLoaded = true
Logger.debug(TAG, `---onLoad------>`)
this.tryToPlay()
}
}
}
})
.height('100%')
.width('100%')
.visibility(this.isWait ? Visibility.None : Visibility.Visible)
})
.height('100%')
.width('100%')
.visibility(this.isWait ? Visibility.None : Visibility.Visible)
}
if (this.isVideoSource) {
... ... @@ -187,10 +206,25 @@ export struct TopPlayComponent {
Image(this.previewUrl)
.objectFit(ImageFit.Cover)
.alt($r('app.media.live_room_image_fail'))
.visibility(this.isWait || this.isEnd ? Visibility.Visible : Visibility.None)
// .contrast(this.isEnd ? 0.4 : 1)
.visibility(this.isWait || this.isEnd ? Visibility.Visible :
Visibility.None)// .contrast(this.isEnd ? 0.4 : 1)
.blur(this.isEnd ? 20 : 0)
.width('100%')
if (this.liveDetailPageLogic.showPad) {
// 有垫片
if (this.liveDetailPageLogic.padImageUri.length > 0) {
// 配置了垫片资源
Image(this.liveDetailPageLogic.padImageUri).objectFit(ImageFit.Fill).width('100%').height('100%')
} else {
// 没有配置垫片资源
LiveEmptyComponent({
emptyType: WDLiveViewDefaultType.WDViewDefaultType_NoLiveSuspend
}).width('100%').height('100%')
}
}
}
// loading
... ...
... ... @@ -13,6 +13,7 @@ import { HttpUrlUtils } from 'wdNetwork/Index';
import { WDPlayerController } from 'wdPlayer/Index';
import { WDRouterPage, WDRouterRule } from 'wdRouter/Index';
import { SpConstants } from 'wdConstant/Index'
import { WDShare } from 'wdShare/Index';
export interface OperationItem {
icon: Resource;
... ... @@ -282,7 +283,7 @@ export struct OperationListView {
.width(32)
.aspectRatio(1)
.onClick((event: ClickEvent) => {
ToastUtils.showToast('分享为公共方法,待开发', 1000);
WDShare.shareContent(this.contentDetailData)
})
Text(item.text)
.width('100%')// .margin({ top: 4, left: 6, right: 6 })// .backgroundColor(Color.Brown)
... ...
... ... @@ -74,7 +74,10 @@ struct ForgetPasswordPage {
})
}.padding({ left: 25, right: 25 }).width('100%')
}.width('100%').height('100%').alignItems(HorizontalAlign.Start)
}.width('100%')
.height('100%')
.alignItems(HorizontalAlign.Start)
.backgroundColor(Color.White)
}
aboutToAppear() {
... ...
... ... @@ -241,7 +241,8 @@ struct LoginPage {
.visibility(this.isProtocol ? Visibility.Visible : Visibility.None)
}.width('100%')
.height('100%').backgroundColor(Color.White)
.height('100%')
.backgroundColor(Color.White)
}
@Builder
... ... @@ -280,6 +281,7 @@ struct LoginPage {
.width('100%')
}.padding({ left: 25, right: 25 }).width('100%').margin({ top: 36 })
.visibility(this.checkCodePage ? Visibility.None : Visibility.Visible)
.backgroundColor(Color.White)
}
... ...
... ... @@ -22,7 +22,18 @@ export class WDShare {
}
static shareProgram(program: ContentDTO, pageName: string ="", pageId: string = "") {
//TODO: 处理分享弹框交互和 海报逻辑
WDShareBase.getInstance().share({
to: ShareType.System,
scene: ShareScene.System,
type: ShareContentType.Link,
obj: {
title: program.shareInfo.shareTitle,
desc: program.shareInfo.shareSummary,
link: program.shareInfo.shareUrl,
}
})
}
static shareSubject(subject: PageInfoDTO) {
... ... @@ -32,21 +43,21 @@ export class WDShare {
//专题分享数据转换
static setTopicBeanToShareBean(shareBean: ShareInfoDTO, topicInfoBean: TopicInfo){
shareBean.topicType = topicInfoBean.topicType+''
shareBean.appCustomTopicType = topicInfoBean.topicType+''
//21:文章专题,22:音频专题,23:直播专题,24:话题专题,25:早晚报专题,26:时间链
if(25 == topicInfoBean.topicType){
shareBean.showPosterType = 6
shareBean.topicPattern = topicInfoBean.topicPattern
shareBean.publishTime = topicInfoBean.topicDate
shareBean.appCustomShowPosterType = 6
shareBean.appCustomTopicPattern = topicInfoBean.topicPattern
shareBean.appCustomPublishTime = topicInfoBean.topicDate
if(topicInfoBean.frontLinkObject == null){
shareBean.isFrontDaily = false
shareBean.appCustomIsFrontDaily = false
if(topicInfoBean.shareContentList != null && topicInfoBean.shareContentList.length>0){
shareBean.sharePosterItemList = [] as SharePosterItemBean[]
shareBean.sharePosterItemList.length = topicInfoBean.shareContentList.length
shareBean.appCustomSharePosterItemList = [] as SharePosterItemBean[]
shareBean.appCustomSharePosterItemList.length = topicInfoBean.shareContentList.length
for (let index = 0; index < topicInfoBean.shareContentList.length; index++) {
let element = topicInfoBean.shareContentList[index]
if(element != null){
shareBean.sharePosterItemList[index] = {
shareBean.appCustomSharePosterItemList[index] = {
title:topicInfoBean.shareContentList[index].newsTitle,
imageUrl:topicInfoBean.shareContentList[index].coverUrl,
} as SharePosterItemBean
... ... @@ -54,25 +65,25 @@ export class WDShare {
}
}
}else{
shareBean.isFrontDaily = true
shareBean.appCustomIsFrontDaily = true
shareBean.sharePosterCoverUrl = topicInfoBean.frontLinkObject.coverUrl
shareBean.posterSummary = topicInfoBean.frontLinkObject.summary
shareBean.appCustomPosterSummary = topicInfoBean.frontLinkObject.summary
}
}else{
//文章/直播/话题专题(H5普通文章专题,包含时间链)
shareBean.showPosterType = 8
shareBean.appCustomShowPosterType = 8
//海报的头图
shareBean.sharePosterCoverUrl = topicInfoBean.backgroundImgUrl
shareBean.isFrontDaily = false
shareBean.posterTitle = topicInfoBean.title
shareBean.posterSummary = topicInfoBean.summary
shareBean.appCustomIsFrontDaily = false
shareBean.appCustomPosterTitle = topicInfoBean.title
shareBean.appCustomPosterSummary = topicInfoBean.summary
if(topicInfoBean.shareContentList != null && topicInfoBean.shareContentList.length>0){
shareBean.sharePosterItemList = [] as SharePosterItemBean[]
shareBean.sharePosterItemList.length = topicInfoBean.shareContentList.length
shareBean.appCustomSharePosterItemList = [] as SharePosterItemBean[]
shareBean.appCustomSharePosterItemList.length = topicInfoBean.shareContentList.length
for (let index = 0; index < topicInfoBean.shareContentList.length; index++) {
let element = topicInfoBean.shareContentList[index]
if(element != null){
shareBean.sharePosterItemList[index] = {
shareBean.appCustomSharePosterItemList[index] = {
title:topicInfoBean.shareContentList[index].newsTitle,
imageUrl:topicInfoBean.shareContentList[index].coverUrl,
timeNode:topicInfoBean.shareContentList[index].publishTime,
... ...
... ... @@ -214,6 +214,17 @@ export struct MultiPictureDetailPageComponent {
left: 16,
right: 0
})
.onClick(() => {
if (this.contentDetailData.rmhInfo?.cnMainControl === 1) {
// 号主页
const params: Params = {
creatorId: this.contentDetailData.rmhInfo.rmhId,
pageID: ''
}
WDRouterRule.jumpWithPage(WDRouterPage.peopleShipHomePage, params)
}
})
Row() {
if (this.followStatus == '0') {
... ...