liyubing

Merge remote-tracking branch 'origin/main'

Showing 33 changed files with 1831 additions and 324 deletions
... ... @@ -20,10 +20,18 @@ export class SpConstants{
static MESSAGE_BOARD_PRIVATE_PROTOCOL = "message_board_private_protocol" //"留言板-隐私政策"
//设置页面
static SETTING_WIFI_IMAGE_SWITCH = "setting_wifi_switch" //wifi 图片开关
static SETTING_WIFI_VIDEO_SWITCH = "setting_wifi_switch" //wifi 视频开关
static SETTING_WIFI_VIDEO_SWITCH = "setting_video_switch" //wifi 视频开关
static SETTING_SUSPENSION_SWITCH = "setting_suspension_switch" //悬浮窗 开关
static SETTING_PUSH_SWITCH = "setting_push_switch" //推送 开关
//未登录保存兴趣标签
static PUBLICVISUTORMODE_INTERESTTAGS = 'PublicVisitorMode_InterestTags'
//定位相关
static LOCATION_CITY_NAME = "location_city_name" //定位
static LOCATION_CITY_CODE = "location_city_code" //定位
//启动页数据存储key
static APP_LAUNCH_PAGE_DATA_MODEL = 'app_launch_page_data_model'
}
\ No newline at end of file
... ...
... ... @@ -43,3 +43,9 @@ export { ErrorToastUtils } from './src/main/ets/utils/ErrorToastUtils'
export { EmitterUtils } from './src/main/ets/utils/EmitterUtils'
export { EmitterEventId } from './src/main/ets/utils/EmitterEventId'
export { NetworkUtil } from './src/main/ets/utils/NetworkUtil'
export { NetworkManager } from './src/main/ets/network/NetworkManager'
export { NetworkType } from './src/main/ets/network/NetworkType'
... ...
import connection from '@ohos.net.connection';
import { BusinessError } from '@ohos.base';
import { Logger } from '../utils/Logger';
import { EmitterUtils } from '../utils/EmitterUtils';
import { EmitterEventId } from '../utils/EmitterEventId';
import { NetworkType } from './NetworkType';
const TAG = 'NetworkManager'
/**
* 网络管理类
*/
export class NetworkManager {
private netCon: connection.NetConnection | null = null;
private static instance: NetworkManager;
private networkType: NetworkType = NetworkType.TYPE_UNKNOWN
public static getInstance(): NetworkManager {
if (!NetworkManager.instance) {
NetworkManager.instance = new NetworkManager();
}
return NetworkManager.instance;
}
public init() {
// 初始化
if (this.netCon) {
// 拦截重复初始化
return
}
this.networkMonitorRegister()
}
public release() {
this.networkMonitorUnregister()
}
private constructor() {
}
private networkMonitorRegister() {
this.netCon = connection.createNetConnection();
this.netCon.register((error) => {
if (error) {
Logger.error(TAG, 'register error:' + error.message);
return;
}
Logger.info(TAG, 'register success');
})
this.netCon.on('netAvailable', (data: connection.NetHandle) => {
Logger.info(TAG, 'netAvailable, data is: ' + JSON.stringify(data))
})
this.netCon.on('netBlockStatusChange', (data: connection.NetBlockStatusInfo) => {
Logger.info(TAG, 'netBlockStatusChange, data is: ' + JSON.stringify(data))
// TODO 网络阻塞,是否创建新的网络、提示
})
this.netCon.on('netCapabilitiesChange', (data: connection.NetCapabilityInfo) => {
Logger.info(TAG, 'netCapabilitiesChange, data is: ' + JSON.stringify(data))
this.parseData(data)
// 可能多次通知
EmitterUtils.sendEvent(EmitterEventId.NETWORK_CONNECTED, JSON.stringify(this.networkType))
})
this.netCon.on('netConnectionPropertiesChange', (data: connection.NetConnectionPropertyInfo) => {
Logger.info(TAG, 'netConnectionPropertiesChange, data is: ' + JSON.stringify(data))
})
this.netCon.on('netUnavailable', ((data: void) => {
Logger.info(TAG, 'netUnavailable, data is: ' + JSON.stringify(data))
}));
this.netCon.on('netLost', ((data: connection.NetHandle) => {
Logger.info(TAG, 'netLost, data is: ' + JSON.stringify(data))
// TODO 断网
EmitterUtils.sendEvent(EmitterEventId.NETWORK_DISCONNECTED)
this.networkType = NetworkType.TYPE_NONE
}))
}
private networkMonitorUnregister() {
if (this.netCon) {
this.netCon.unregister((error: BusinessError) => {
if (error) {
Logger.error(TAG, 'unregister error:' + error.message);
return;
}
Logger.info(TAG, 'unregister success');
})
}
}
/**
* @deprecated
*/
private getNetworkMessage(netHandle: connection.NetHandle) {
connection.getNetCapabilities(netHandle, (error, netCap) => {
if (error) {
Logger.error(TAG, 'getNetCapabilities error:' + error.message);
return;
}
let netType = netCap.bearerTypes;
this.reset(netType)
})
}
private reset(netType: Array<connection.NetBearType>) {
if (netType == null) {
return
}
for (let i = 0; i < netType.length; i++) {
if (netType[i] === 0) {
// 蜂窝网
this.networkType = NetworkType.TYPE_CELLULAR
} else if (netType[i] === 1) {
// Wi-Fi网络
this.networkType = NetworkType.TYPE_WIFI
} else {
// 以太网网络
this.networkType = NetworkType.TYPE_ETHERNET
}
}
}
/**
* 获取网络类型,网络监听网络变化刷新类型,这里优先返回变量
*/
public getNetType(): NetworkType {
if (this.networkType != NetworkType.TYPE_UNKNOWN) {
return this.networkType
}
return this.getNetTypeSync()
}
/**
* 同步获取网络类型,耗时
*/
public getNetTypeSync(): NetworkType {
let netHandle = connection.getDefaultNetSync();
let netCapabilities = connection.getNetCapabilitiesSync(netHandle)
this.reset(netCapabilities.bearerTypes)
return this.networkType;
}
private parseData(data: connection.NetCapabilityInfo) {
// 解析网络信息
this.reset(data.netCap.bearerTypes)
}
}
\ No newline at end of file
... ...
/**
* 网络管理类
*/
export enum NetworkType {
// 未知
TYPE_UNKNOWN = -1,
// 无网络
TYPE_NONE = 0,
// wifi
TYPE_WIFI = 1,
// 蜂窝网
TYPE_CELLULAR = 2,
// 以太网
TYPE_ETHERNET = 3,
}
\ No newline at end of file
... ...
... ... @@ -3,6 +3,10 @@
*/
export enum EmitterEventId {
// 通知登出,事件id
FORCE_USER_LOGIN_OUT = 1
FORCE_USER_LOGIN_OUT = 1,
// 网络连接成功,事件id
NETWORK_CONNECTED = 2,
// 网络断开,事件id
NETWORK_DISCONNECTED = 3,
}
... ...
import { NetworkManager } from '../network/NetworkManager'
import { NetworkType } from '../network/NetworkType'
/**
* 网络相关工具类
* 要实时监听网络,需要添加注册函数{例:src/main/ets/entryability/EntryAbility.ets:32}
*/
export class NetworkUtil {
/**
* 网络环境:0:无网 1:WiFi 2:2G 3:3G 4:4G 5:5G,暂时只识别出蜂窝网
* 扩展6-以太网
*/
static TYPE_NONE = '0'
static TYPE_WIFI = '1'
static TYPE_CELLULAR = '5'
// TODO 以太网,手机不涉及
static TYPE_ETHERNET = '6'
static getNetworkType(): string {
let type = NetworkManager.getInstance().getNetType()
return NetworkUtil.parseType(type)
}
static parseType(type: NetworkType): string {
switch (type) {
case NetworkType.TYPE_UNKNOWN:
case NetworkType.TYPE_NONE:
return NetworkUtil.TYPE_NONE;
case NetworkType.TYPE_WIFI:
return NetworkUtil.TYPE_WIFI;
case NetworkType.TYPE_CELLULAR:
return NetworkUtil.TYPE_CELLULAR;
case NetworkType.TYPE_ETHERNET:
return NetworkUtil.TYPE_ETHERNET;
default:
return NetworkUtil.TYPE_NONE;
}
}
}
\ No newline at end of file
... ...
... ... @@ -8,6 +8,11 @@
"tablet",
"2in1"
],
"deliveryWithInstall": true
"deliveryWithInstall": true,
"requestPermissions": [
{
"name": "ohos.permission.GET_NETWORK_INFO"
}
]
}
}
\ No newline at end of file
... ...
... ... @@ -292,6 +292,11 @@ export class HttpUrlUtils {
*/
static readonly RECOMMEND_LIST: string = "/api/rmrb-bff-display-zh/recommend/zh/c/list";
/**
* 搜索推荐
*/
static readonly SEARCH_SUGGEST_DATA_PATH: string = "/api/rmrb-bff-display-zh/recommend/zh/c/list";
public static set hostUrl(value: string) {
HttpUrlUtils._hostUrl = value;
}
... ... @@ -324,8 +329,9 @@ export class HttpUrlUtils {
headers.set('EagleEye-TraceID', 'D539562E48554A60977AF4BECB6D6C7A')
headers.set('imei', HttpUrlUtils.getImei())
headers.set('Accept-Language', 'zh')
headers.set('city', HttpUrlUtils.getCity())
headers.set('city_dode', HttpUrlUtils.getCityCode())
// headers.set('city', HttpUrlUtils.getCity())
// headers.set('city_dode', HttpUrlUtils.getCityCode())
HttpUrlUtils.setLocationHeader(headers)
// TODO 判断是否登录
headers.set('userId', HttpUrlUtils.getUserId())
headers.set('userType', HttpUrlUtils.getUserType())
... ... @@ -368,6 +374,17 @@ export class HttpUrlUtils {
}
}
static setLocationHeader(headers: HashMap<string, string>) {
let cityName = SPHelper.default.getSync(SpConstants.LOCATION_CITY_NAME, '') as string
if (StringUtils.isNotEmpty(cityName)) {
headers.set('city', encodeURI(cityName))
}
let cityCode = SPHelper.default.getSync(SpConstants.LOCATION_CITY_CODE, '') as string
if (StringUtils.isNotEmpty(cityCode)) {
headers.set('city_dode', encodeURI(cityCode))
}
}
static getHost() {
return HttpUrlUtils._hostUrl;
}
... ... @@ -463,7 +480,7 @@ export class HttpUrlUtils {
return 'Android';
}
private static getImei() {
public static getImei() {
// TODO
return '8a81226a-cabd-3e1b-b630-b51db4a720ed';
}
... ... @@ -795,6 +812,11 @@ export class HttpUrlUtils {
let url = HttpUrlUtils._hostUrl + "/api/rmrb-interact/interact/zh/c/like/executeLike";
return url;
}
//搜索推荐
static getSearchSuggestDataUrl() {
let url = HttpUrlUtils._hostUrl + HttpUrlUtils.SEARCH_SUGGEST_DATA_PATH
return url
}
// static getYcgCommonHeaders(): HashMap<string, string> {
// let headers: HashMap<string, string> = new HashMap<string, string>()
... ...
import { Action, ContentDTO, Params } from 'wdBean';
import { Action, ContentDTO, Params, PhotoListBean } from 'wdBean';
import { ExtraDTO } from 'wdBean/src/main/ets/bean/component/extra/ExtraDTO';
import { Logger } from 'wdKit';
import { StringUtils } from 'wdKit/src/main/ets/utils/StringUtils';
... ... @@ -58,6 +58,7 @@ export class ProcessUtils {
break;
//动态详情页(动态图文)
case ContentConstants.TYPE_FOURTEEN:
ProcessUtils.gotoDynamicDetailPage(content);
//动态详情页(动态视频)
case ContentConstants.TYPE_FIFTEEN:
ProcessUtils.gotoDynamicDetailPage(content);
... ... @@ -91,20 +92,18 @@ export class ProcessUtils {
* 图集详情页
* @param content
* */
private static gotoAtlasDetailPage(content: ContentDTO) {
public static gotoMultiPictureListPage(photoList: PhotoListBean[]) {
let taskAction: Action = {
type: 'JUMP_DETAIL_PAGE',
params: {
detailPageType: 17,
contentID: content?.objectId,
detailPageType: 18,
extra: {
relType: content?.relType,
relId: content?.relId,
photoList
} as ExtraDTO
} as Params,
};
WDRouterRule.jumpWithAction(taskAction)
Logger.debug(TAG, `gotoAtlasDetailPage, ${content.objectId}`);
Logger.debug(TAG, `gotoMultiPictureListPage`);
}
private static gotoSpecialTopic(content: ContentDTO) {
... ... @@ -194,4 +193,24 @@ export class ProcessUtils {
WDRouterRule.jumpWithAction(taskAction)
Logger.debug(TAG, `gotoAudio, ${content.objectId}`);
}
/**
* 图片预览页
* @param content
* */
private static gotoAtlasDetailPage(content: ContentDTO) {
let taskAction: Action = {
type: 'JUMP_DETAIL_PAGE',
params: {
detailPageType: 17,
contentID: content?.objectId,
extra: {
relType: content?.relType,
relId: content?.relId,
} as ExtraDTO
} as Params,
};
WDRouterRule.jumpWithAction(taskAction)
Logger.debug(TAG, `gotoAtlasDetailPage, ${content.objectId}`);
}
}
\ No newline at end of file
... ...
... ... @@ -20,7 +20,8 @@ import { ZhCarouselLayout01 } from './compview/ZhCarouselLayout01';
import { CardParser } from './CardParser';
import { LiveHorizontalReservationComponent } from './view/LiveHorizontalReservationComponent';
import { ZhGridLayout02 } from './compview/ZhGridLayout02';
import { Card5Component } from './cardview/Card5Component'
import { Card5Component } from './cardview/Card5Component';
import { Card2Component } from './cardview/Card2Component';
import { WDRouterPage, WDRouterRule } from 'wdRouter/Index';
/**
... ... @@ -71,6 +72,9 @@ export struct CompParser {
} else if (compDTO.compStyle === CompStyle.Zh_Single_Column_02) {
//头图卡 和comStyle 2相同,
Card5Component({ contentDTO: compDTO.operDataList[0] })
} else if (compDTO.compStyle === CompStyle.Zh_Single_Column_03) {
// 大图卡
Card2Component({ contentDTO: compDTO.operDataList[0] })
} else if (compDTO.compStyle === CompStyle.Zh_Single_Column_04) {
ZhSingleColumn04({ compDTO: compDTO })
} else if (compDTO.compStyle === CompStyle.Zh_Single_Column_05) {
... ...
... ... @@ -12,7 +12,8 @@ import { ProcessUtils } from 'wdRouter';
import { StringUtils } from 'wdKit/src/main/ets/utils/StringUtils';
import display from '@ohos.display';
import { BusinessError } from '@ohos.base';
import { CommonConstants } from 'wdConstant/Index';
import { CardMediaInfo } from '../components/cardCommon/CardMediaInfo'
const TAG = 'DynamicDetailComponent'
@Preview
@Component
... ... @@ -44,7 +45,7 @@ export struct DynamicDetailComponent {
promise: Promise<Array<display.Display>> = display.getAllDisplays()
// 屏幕宽度(单位px)
screenWidth: number = 0;
@State screenWidth: number = 0;
async aboutToAppear() {
await this.getContentDetailData()
... ... @@ -156,25 +157,131 @@ export struct DynamicDetailComponent {
,left: $r('app.float.margin_16')
,right: $r('app.float.margin_16') })
.alignSelf(ItemAlign.Start)
if(this.contentDetailData.photoList!= null && this.contentDetailData.photoList.length>0){
//附件内容:图片/视频
if(this.contentDetailData.newsType+"" == ContentConstants.TYPE_FOURTEEN){
//附件内容:图片/视频
if(this.contentDetailData.photoList!= null && this.contentDetailData.photoList.length>0){
// 图片-从无图到9图展示
GridRow({
columns: { sm: this.contentDetailData.photoList.length
, md: this.contentDetailData.photoList.length == 1?1:
this.contentDetailData.photoList.length == 4?2:
3 },
breakpoints: { value: ['320vp', '520vp', '840vp'] }
gutter: { x: 2, y: 2 }
}) {
ForEach(this.contentDetailData.photoList, (item: PhotoListBean, index: number) => {
GridCol() {
this.buildItemCard(item.picPath,this.contentDetailData.photoList.length, index);
if (this.contentDetailData.photoList.length === 1) {
if (this.getPicType(item) !== 3) {
GridCol({
span: this.getPicType(item) === 1 ? 12 : 8
}){
Stack({
alignContent: Alignment.BottomEnd
}) {
if (this.getPicType(item) === 1) {
Image(item.picPath)
.width('100%')
.height(172)
.autoResize(true)
.borderRadius(this.caclImageRadius(index))
} else if (this.getPicType(item) === 2) {
Image(item.picPath)
.width('100%')
.height(305)
.autoResize(true)
.borderRadius(this.caclImageRadius(index))
}
Flex({ direction: FlexDirection.Row }) {
Image($r('app.media.icon_long_pic'))
.width(14)
.height(14)
.margin({right: 4})
Text('长图')
.fontSize(12)
.fontWeight(400)
.fontColor(0xffffff)
.fontFamily('PingFang SC')
}
.width(48)
.padding({bottom: 9})
}
}
// .onClick()
.onClick((event: ClickEvent) => {
ProcessUtils.gotoMultiPictureListPage(this.contentDetailData.photoList)
})
} else {
GridCol({
span: { xs: 8 }
}) {
Image(item.picPath)
.width('100%')
.borderRadius(this.caclImageRadius(index))
.autoResize(true)
.opacity(!item.width && !item.height ? 0 : 1)
.onComplete(callback => {
item.width = callback?.width || 0;
item.height = callback?.height || 0;
})
}
}
} else if (this.contentDetailData.photoList.length === 4) {
GridCol({
span: { xs: 4 }
}) {
Image(item.picPath)
.aspectRatio(1)
.borderRadius(this.caclImageRadius(index))
}
} else {
GridCol({
span: { sm: 4, lg: 3 }
}) {
Image(item.picPath)
.aspectRatio(1)
.borderRadius(this.caclImageRadius(index))
}
}
})
}
.margin({ left: $r('app.float.margin_16'),right: $r('app.float.margin_16'),top: $r('app.float.margin_8')})
}
}else{
this.buildItemCard(this.contentDetailData.videoInfo[0].firstFrameImageUri, 1, 0);
if(this.contentDetailData.videoInfo!= null && this.contentDetailData.videoInfo.length>0){
GridRow() {
if (this.contentDetailData.videoInfo[0].videoLandScape === 1) {
// 横屏
GridCol({
span: { xs: 12 }
}) {
Stack() {
Image(this.contentDetailData.fullColumnImgUrls!= null && this.contentDetailData.fullColumnImgUrls.length>0&&!StringUtils.isEmpty(this.contentDetailData.fullColumnImgUrls[0].url)?
this.contentDetailData.fullColumnImgUrls[0].url:
this.contentDetailData.videoInfo[0].firstFrameImageUri)
.width(CommonConstants.FULL_WIDTH)
.aspectRatio(16 / 9)
.borderRadius($r('app.float.image_border_radius'))
CardMediaInfo({ contentDTO: this.mJumpInfo })
}
.align(Alignment.BottomEnd)
}
} else {
// 竖图显示,宽度占50%,高度自适应
GridCol({
span: { xs: 6 }
}) {
Stack() {
Image(this.contentDetailData.fullColumnImgUrls!= null && this.contentDetailData.fullColumnImgUrls.length>0&&!StringUtils.isEmpty(this.contentDetailData.fullColumnImgUrls[0].url)?
this.contentDetailData.fullColumnImgUrls[0].url:
this.contentDetailData.videoInfo[0].firstFrameImageUri)
.width(CommonConstants.FULL_WIDTH)
.borderRadius($r('app.float.image_border_radius'))
CardMediaInfo({ contentDTO: this.mJumpInfo })
}
.align(Alignment.BottomEnd)
}
}
}
.margin({ left: $r('app.float.margin_16'),right: $r('app.float.margin_16'),top: $r('app.float.margin_8')})
.onClick((event: ClickEvent) => {
this.mJumpInfo.objectType = ContentConstants.TYPE_VOD;
ProcessUtils.processPage(this.mJumpInfo)
})
}
}
//特别声明
... ... @@ -231,14 +338,13 @@ export struct DynamicDetailComponent {
try {
let data = await MultiPictureDetailViewModel.getDetailData(this.relId, this.contentId, this.relType)
this.contentDetailData = data[0];
this.makeJumpInfo
console.log('动态详情',JSON.stringify(this.contentDetailData))
} catch (exception) {
console.log('请求失败',JSON.stringify(exception))
}
this.getBatchAttentionStatus
this.getInteractDataStatus
this.getScreenWidth
this.getBatchAttentionStatus()
this.getInteractDataStatus()
this.makeJumpInfo()
}
// 查询当前登录用户点赞状态
... ... @@ -281,64 +387,6 @@ export struct DynamicDetailComponent {
}
}
@Builder
setItemImageStyle(picPath: string,topLeft: number,topRight: number,bottomLeft: number,bottomRight: number){
//四角圆角
Image(picPath)
.width('100%')
.height('100%')
.borderRadius({topLeft: topLeft, topRight: topRight,
bottomLeft: bottomLeft, bottomRight: bottomRight})
}
/**
* 组件项
*
* @param programmeBean item 组件项, 上面icon,下面标题
*/
@Builder
buildItemCard(item: string,len: number,index: number) {
Column() {
this.setItemImageRoundCorner(len, item, index)
Flex({ direction: FlexDirection.Row }) {
Image($r('app.media.icon_long_pic'))
.width(14)
.height(14)
.margin({right: 4})
Text('长图')
.fontSize(12)
.fontWeight(400)
.fontColor(0xffffff)
.fontFamily('PingFang SC')
}
.width(48)
.padding({bottom: 9})
}
.width(
//图片类型
this.contentDetailData.newsType+"" == ContentConstants.TYPE_FOURTEEN?'100%'
//视频横屏 横版16:9
:this.contentDetailData.videoInfo[0].videoLandScape == 1?this.screenWidth-32
//视频竖屏 竖版3:4
:(this.screenWidth-32)/2)
.height(
//图片类型
this.contentDetailData.newsType+"" == ContentConstants.TYPE_FOURTEEN?'100%'
//视频横屏 横版16:9
:this.contentDetailData.videoInfo[0].videoLandScape == 1?(this.screenWidth-32)*9/16
//视频竖屏 竖版3:4
:(this.screenWidth-32)/2*4/3)
.onClick((event: ClickEvent) => {
if(this.contentDetailData.newsType+"" == ContentConstants.TYPE_FOURTEEN){
//fixme 跳转到查看图片页面(带页脚/下载按钮)
// this.mJumpInfo.objectType = ContentConstants.TYPE_
ProcessUtils.processPage(this.mJumpInfo)
}else{
//fixme 跳转到播放视频页面(点播)
this.mJumpInfo.objectType = ContentConstants.TYPE_VOD
ProcessUtils.processPage(this.mJumpInfo)
}
})
}
//创建跳转信息
makeJumpInfo(){
... ... @@ -347,152 +395,51 @@ export struct DynamicDetailComponent {
this.mJumpInfo.objectId = this.contentDetailData.newsId+"";
this.mJumpInfo.relType = this.contentDetailData.reLInfo?.relType+"";
this.mJumpInfo.relId = this.contentDetailData.reLInfo?.relId+"";
// this.mJumpInfo.objectType = this.contentDetailData.newsType+"";
}
//设置图片圆角
@Builder
setItemImageRoundCorner(len: number, picPath: string, index: number) {
if (len == 1) {
//四角圆角
this.setItemImageStyle(picPath, 4, 4, 4, 4);
} else if (len == 2) {
if (index == 0) {
//左边圆角
this.setItemImageStyle(picPath, 4, 0, 4, 0);
} else {
//右边圆角
this.setItemImageStyle(picPath, 0, 4, 0, 4);
}
} else if (3 == len) {
if (index == 0) {
//左边圆角
this.setItemImageStyle(picPath, 4, 0, 4, 0);
} else if (index == 1) {
//直角
this.setItemImageStyle(picPath, 0, 0, 0, 0);
} else {
//右边圆角
this.setItemImageStyle(picPath, 0, 4, 0, 4);
}
} else if (4 == len) {
if (index == 0) {
//左边圆角
this.setItemImageStyle(picPath, 4, 0, 4, 0);
} else if (index == 1) {
//右边圆角
this.setItemImageStyle(picPath, 0, 4, 0, 4);
} else if (index = 2) {
//左边圆角
this.setItemImageStyle(picPath, 4, 0, 4, 0);
} else {
//右边圆角
this.setItemImageStyle(picPath, 0, 4, 0, 4);
}
} else if (5 == len) {
if (index == 0) {
this.setItemImageStyle(picPath, 4, 0, 0, 0);
} else if (index == 1) {
//直角
this.setItemImageStyle(picPath, 0, 0, 0, 0);
} else if (index = 2) {
this.setItemImageStyle(picPath, 4, 4, 4, 4);
} else if (index = 3) {
this.setItemImageStyle(picPath, 0, 0, 4, 0);
} else {
this.setItemImageStyle(picPath, 0, 0, 0, 4);
}
} else if (6 == len) {
if (index == 0) {
this.setItemImageStyle(picPath, 4, 0, 0, 0);
} else if (index == 1) {
//直角
this.setItemImageStyle(picPath, 0, 0, 0, 0);
} else if (index = 2) {
this.setItemImageStyle(picPath, 0, 4, 0, 0);
} else if (index = 3) {
this.setItemImageStyle(picPath, 0, 0, 4, 0);
} else if (index = 4) {
//直角
this.setItemImageStyle(picPath, 0, 0, 0, 0);
} else {
//右边圆角
this.setItemImageStyle(picPath, 0, 0, 0, 4);
}
} else if (7 == len) {
if (index == 0) {
this.setItemImageStyle(picPath, 4, 0, 0, 0);
} else if (index == 1) {
//直角
this.setItemImageStyle(picPath, 0, 0, 0, 0);
} else if (index = 2) {
this.setItemImageStyle(picPath, 0, 4, 0, 0);
} else if (index = 3) {
//直角
this.setItemImageStyle(picPath, 0, 0, 0, 0);
} else if (index = 4) {
//直角
this.setItemImageStyle(picPath, 0, 0, 0, 0);
} else if (index = 5) {
this.setItemImageStyle(picPath, 0, 0, 0, 4);
} else {
this.setItemImageStyle(picPath, 0, 0, 4, 4);
}
} else if (8 == len) {
if (index == 0) {
this.setItemImageStyle(picPath, 4, 0, 0, 0);
} else if (index == 1) {
//直角
this.setItemImageStyle(picPath, 0, 0, 0, 0);
} else if (index = 2) {
this.setItemImageStyle(picPath, 0, 4, 0, 0);
} else if (index = 3) {
//直角
this.setItemImageStyle(picPath, 0, 0, 0, 0);
} else if (index = 4) {
//直角
this.setItemImageStyle(picPath, 0, 0, 0, 0);
} else if (index = 5) {
this.setItemImageStyle(picPath, 0, 0, 0, 4);
} else if (index = 6) {
this.setItemImageStyle(picPath, 0, 0, 4, 0);
caclImageRadius(index: number) {
let radius: radiusType = {
topLeft: index === 0 ? $r('app.float.image_border_radius') : 0,
topRight: 0,
bottomLeft: 0,
bottomRight: 0,
}
if (this.contentDetailData.photoList.length === 1) {
radius.topRight = index === 0 ? $r('app.float.image_border_radius') : 0
radius.bottomLeft = index === 0 ? $r('app.float.image_border_radius') : 0
radius.bottomRight = index === 0 ? $r('app.float.image_border_radius') : 0
} else if (this.contentDetailData.photoList.length === 5 && !this.contentDetailData.photoList[2].fullUrl) {
radius.topRight = index === 1 ? $r('app.float.image_border_radius') : 0
radius.bottomLeft = index === 3 ? $r('app.float.image_border_radius') : 0
radius.bottomRight = index === 4 ? $r('app.float.image_border_radius') : 0
} else {
this.setItemImageStyle(picPath, 0, 0, 0, 4);
radius.topRight = index === 2 ? $r('app.float.image_border_radius') : 0
radius.bottomLeft = index === 6 ? $r('app.float.image_border_radius') : 0
radius.bottomRight = index === 8 ? $r('app.float.image_border_radius') : 0
}
return radius
}
getPicType(item: PhotoListBean){
if (item.width && item.width) {
if (item.width / item.height > 343/172) {
return 1; //横长图
} else if (item.height / item.width > 305/228) {
return 2; //竖长图
} else {
if (index == 0) {
this.setItemImageStyle(picPath, 4, 0, 0, 0);
} else if (index == 1) {
//直角
this.setItemImageStyle(picPath, 0, 0, 0, 0);
} else if (index == 2) {
this.setItemImageStyle(picPath, 0, 4, 0, 0);
} else if (index == 3) {
//直角
this.setItemImageStyle(picPath, 0, 0, 0, 0);
} else if (index == 4) {
//直角
this.setItemImageStyle(picPath, 0, 0, 0, 0);
} else if (index == 5) {
//直角
this.setItemImageStyle(picPath, 0, 0, 0, 0);
} else if (index == 6) {
this.setItemImageStyle(picPath, 0, 0, 4, 0);
} else if (index == 7) {
//直角
this.setItemImageStyle(picPath, 0, 0, 0, 0);
} else {
this.setItemImageStyle(picPath, 0, 0, 0, 4);
return 3
}
} else {
return 3; //普通图
}
}
}
getScreenWidth(){
this.promise.then((data: Array<display.Display>) => {
console.log(`所有的屏幕信息:${JSON.stringify(data)}`)
//单位为像素
this.screenWidth = data[0]["width"]
}).catch((err: BusinessError) => {
console.error(`Failed to obtain all the display objects. Code: ${JSON.stringify(err)}`)
})
}
interface radiusType {
topLeft: number | Resource;
topRight: number | Resource;
bottomLeft: number | Resource;
bottomRight: number | Resource;
}
\ No newline at end of file
... ...
import { Params } from 'wdBean';
import { ContentDTO, Params } from 'wdBean';
import { DateTimeUtils, LazyDataSource, SPHelper,UserDataLocal } from 'wdKit';
import { WDRouterPage, WDRouterRule } from 'wdRouter';
import { ProcessUtils, WDRouterPage, WDRouterRule } from 'wdRouter';
import MinePageDatasModel from '../../../model/MinePageDatasModel';
import { CommentListItem } from '../../../viewmodel/CommentListItem';
import { FollowListDetailItem } from '../../../viewmodel/FollowListDetailItem';
... ... @@ -265,7 +265,7 @@ export struct HomePageBottomComponent{
}else{
value.list.forEach((value)=>{
let publishTime = DateTimeUtils.getCommentTime(DateTimeUtils.parseDate(value.createTime,DateTimeUtils.PATTERN_DATE_TIME_HYPHEN))
this.data_comment.push(new CommentListItem(value.fromUserHeader,value.fromUserName,value.targetTitle,publishTime,value.commentContent,value.likeNum,0,value.id,value.targetId,value.targetType))
this.data_comment.push(new CommentListItem(value.fromUserHeader,value.fromUserName,value.targetTitle,publishTime,value.commentContent,value.likeNum,0,value.id,value.targetId,value.targetType,value.targetRelId,value.targetRelObjectId,value.targetRelType,value.targetStatus))
})
this.data_comment.notifyDataReload()
this.count = this.data_comment.totalCount()
... ... @@ -365,6 +365,14 @@ struct ChildCommentComponent {
.width('662lpx')
.backgroundColor($r('app.color.color_F5F5F5'))
.margin({top:'19lpx',bottom:'31lpx'})
.onClick(()=>{
ProcessUtils.processPage(
{objectId: this.data.targetId,
relType:this.data.targetRelType+"",
relId:this.data.targetRelId,
objectType:this.data.targetType+"",
} as ContentDTO )
})
if(!this.isLastItem){
Divider().width('100%')
... ...
... ... @@ -6,6 +6,8 @@ import { ListHasNoMoreDataUI } from '../../reusable/ListHasNoMoreDataUI';
import { MineCommentListDetailItem } from '../../../viewmodel/MineCommentListDetailItem';
import { OtherUserCommentLikeStatusRequestItem } from '../../../viewmodel/OtherUserCommentLikeStatusRequestItem';
import { CommentLikeOperationRequestItem } from '../../../viewmodel/CommentLikeOperationRequestItem';
import { ProcessUtils } from 'wdRouter/Index';
import { ContentDTO } from 'wdBean/Index';
const TAG = "HomePageBottomComponent"
@Component
... ... @@ -107,7 +109,7 @@ export struct OtherHomePageBottomCommentComponent{
let data : CommentListItem[] = []
value.list.forEach((item)=>{
status.commentIdList.push(item.id)
data.push(new CommentListItem(item.fromUserHeader,item.fromUserName,item.targetTitle,item.createTime,item.commentContent,item.likeNum,0,item.id,item.targetId,item.targetType))
data.push(new CommentListItem(item.fromUserHeader,item.fromUserName,item.targetTitle,item.createTime,item.commentContent,item.likeNum,0,item.id,item.targetId,item.targetType,item.targetRelId,item.targetRelObjectId,item.targetRelType,item.targetStatus))
})
MinePageDatasModel.getOtherUserCommentLikeStatusData(status,getContext(this)).then((newValue)=>{
... ... @@ -120,7 +122,7 @@ export struct OtherHomePageBottomCommentComponent{
})
data.forEach((item)=>{
this.data_comment.push(new CommentListItem(item.fromUserHeader,item.fromUserName,item.targetTitle,item.createTime,item.commentContent,item.likeNum,item.like_status,item.id,item.targetId,item.targetType))
this.data_comment.push(new CommentListItem(item.fromUserHeader,item.fromUserName,item.targetTitle,item.createTime,item.commentContent,item.likeNum,item.like_status,item.id,item.targetId,item.targetType,item.targetRelId,item.targetRelObjectId,item.targetRelType,item.targetStatus))
})
this.data_comment.notifyDataReload()
... ... @@ -237,6 +239,14 @@ struct ChildCommentComponent {
.width('662lpx')
.backgroundColor($r('app.color.color_F5F5F5'))
.margin({top:'19lpx',bottom:'31lpx'})
.onClick(()=>{
ProcessUtils.processPage(
{objectId: this.data.targetId,
relType:this.data.targetRelType+"",
relId:this.data.targetRelId,
objectType:this.data.targetType+"",
} as ContentDTO )
})
if(!this.isLastItem){
Divider().width('100%')
... ...
... ... @@ -112,7 +112,7 @@ export struct SearchComponent {
} else {
if (this.hasChooseSearch) {
//搜索结果
SearchResultComponent({count:this.count,searchText:this.searchText})
SearchResultComponent({count:this.count,searchText:this.searchText,isInit:true})
} else {
//联想搜索
SearchRelatedComponent({relatedSearchContentData:$relatedSearchContentsData,onGetSearchRes: (item): void => this.getSearchRelatedResData(item),searchText:this.searchText})
... ...
import { ContentDTO } from 'wdBean/Index'
import { LazyDataSource, UserDataLocal } from 'wdKit/Index'
import { HttpUrlUtils } from 'wdNetwork/Index'
import SearcherAboutDataModel from '../../model/SearcherAboutDataModel'
import { SearchSuggestRequestItem } from '../../viewmodel/SearchSuggestRequestItem'
import { CardParser } from '../CardParser'
import { EmptyComponent } from '../view/EmptyComponent'
import { SearchResultContentComponent } from './SearchResultContentComponent'
const TAG = "SearchResultComponent"
/**
* 搜索结果
* 搜索结果为null(空布局 + 为你推荐)
*/
@Component
export struct SearchResultComponent{
@Prop count:string[] = []
export struct SearchResultComponent {
@Prop count: string[]
@Prop searchText: string
@State isInit:boolean = false;
@State currentIndex: number = 0
private controller: TabsController = new TabsController()
fontColor: string = '#999999'
selectedFontColor: string = '#000000'
@State data: LazyDataSource<ContentDTO> = new LazyDataSource();
@State suggest_count: number = 0;
@State isLoading: boolean = false
scroller: Scroller = new Scroller()
aboutToAppear(): void {
if (this.count.length === 0 && this.isInit == true) {
this.getSuggestData()
}
}
getSuggestData() {
this.isLoading = true
let request: SearchSuggestRequestItem = new SearchSuggestRequestItem(2, "", "", HttpUrlUtils.getImei(), UserDataLocal.userId, 8, "")
SearcherAboutDataModel.getSearchSuggestData(request, getContext(this)).then((value) => {
value.forEach((item) => {
this.data.push({
appStyle: item.appStyle,
channelId: item.channelId + "",
coverType: item.coverType,
coverUrl: item.coverUrl,
newsTitle: item.newsTitle,
objectId: item.objectId,
publishTime: item.publishTime,
relId: item.relId + "",
relType: item.relType + "",
source: item.source,
} as ContentDTO)
})
this.data.notifyDataReload()
this.suggest_count = this.data.totalCount()
this.isLoading = false
})
}
build() {
Column() {
if (this.count != null && this.count.length === 0 && this.isInit == true) {
List() {
ListItem() {
//缺省图
EmptyComponent({emptyType:4})
.height('612lpx')
.width('100%')
}
if(this.suggest_count > 0){
ListItem() {
Row() {
Image($r('app.media.search_suggest_icon'))
.width('6lpx')
.height('31lpx')
.objectFit(ImageFit.Cover)
.interpolation(ImageInterpolation.High)
.margin({ right: '10lpx' })
Text("为你推荐")
.textAlign(TextAlign.Start)
.fontWeight('600lpx')
.fontSize('33lpx')
.lineHeight('46lpx')
.fontColor($r('app.color.color_222222'))
}.height('84lpx')
.padding({ left: '31lpx', right: '31lpx' })
.width('100%')
.alignItems(VerticalAlign.Center)
}
}
LazyForEach(this.data, (item: ContentDTO, index: number) => {
ListItem() {
Column() {
CardParser({contentDTO:item})
if (index != this.data.totalCount() - 1) {
Divider()
.width('100%')
.height('1lpx')
.color($r('app.color.color_F5F5F5'))
.strokeWidth('1lpx')
}
}
}
})
}
.cachedCount(6)
.edgeEffect(EdgeEffect.None)
.scrollBar(BarState.Off)
.height('100%')
.onReachEnd(() => {
if (!this.isLoading) {
this.getSuggestData()
}
})
} else {
Tabs({ barPosition: BarPosition.Start, controller: this.controller }) {
ForEach(this.count, (item: string, index: number ) => {
TabContent(){
SearchResultContentComponent({keywords:this.searchText,searchType:item})
}.tabBar(this.TabBuilder(index,item))
ForEach(this.count, (item: string, index: number) => {
TabContent() {
SearchResultContentComponent({ keywords: this.searchText, searchType: item })
}.tabBar(this.TabBuilder(index, item))
}, (item: string, index: number) => index.toString())
}
.vertical(false)
... ... @@ -34,12 +133,14 @@ export struct SearchResultComponent{
})
.width('100%')
.layoutWeight(1)
}
}.width('100%')
.margin({ top: '12lpx' })
}
@Builder TabBuilder(index: number, item: string) {
Stack(){
@Builder
TabBuilder(index: number, item: string) {
Stack() {
Text(item)
.height('38lpx')
.fontSize('33lpx')
... ... @@ -47,22 +148,21 @@ export struct SearchResultComponent{
.fontColor(this.currentIndex === index ? this.selectedFontColor : this.fontColor)
.lineHeight('38lpx')
if(this.currentIndex === index){
if (this.currentIndex === index) {
Divider()
.width('31lpx')
.height('4lpx')
.color('#ED2800')
.strokeWidth('4lpx')
.margin({top:'50lpx'})
.margin({ top: '50lpx' })
.id("divTag")
}
}.onClick(()=>{
}.onClick(() => {
this.currentIndex = index
this.controller.changeIndex(this.currentIndex)
})
.height('100%')
.margin({right:'9lpx'})
.padding({left:'31lpx',right:index === this.count.length-1?"31lpx":"0lpx"})
.margin({ right: '9lpx' })
.padding({ left: '31lpx', right: index === this.count.length - 1 ? "31lpx" : "0lpx" })
}
}
\ No newline at end of file
... ...
... ... @@ -200,20 +200,23 @@ export struct MineSettingComponent {
// 右侧文案和右箭头
Row() {
Toggle({ type: ToggleType.Switch, isOn: false })
Toggle({ type: ToggleType.Switch, isOn: item.switchState })
.height('50lpx')
.margin({ left: '81lpx', right: '29lpx' })
.selectedColor(Color.Pink)
.onChange((isOn: boolean) => {
if(item.title=='接收推送'){
if(item.itemType=='push_switch'){
//推送
SPHelper.default.save(SpConstants.SETTING_PUSH_SWITCH,isOn)
}else if(item.title=='仅WiFi网络加载图片'){
}else if(item.itemType=='wifi_switch'){
//wifi 图片
SPHelper.default.save(SpConstants.SETTING_WIFI_IMAGE_SWITCH,isOn)
}else if(item.title=='WiFi网络情况下自动播放视频'){
}else if(item.itemType=='video_switch'){
//wifi 视频
SPHelper.default.save(SpConstants.SETTING_WIFI_VIDEO_SWITCH,isOn)
}else if(item.itemType=='suspensionState_switch'){
//悬浮窗
SPHelper.default.save(SpConstants.SETTING_SUSPENSION_SWITCH,isOn)
}
})
}.width('40%')
... ... @@ -248,7 +251,7 @@ export struct MineSettingComponent {
// 右侧文案和右箭头
Row() {
Text((item.title=='清除缓存') ? this.cacheSize.toFixed(2) + 'MB' : '')
Text((item.itemType=='clear_cache') ? this.cacheSize.toFixed(2) + 'MB' : '')
.fontColor('#999999')
.maxLines(1)
Image($r('app.media.mine_user_arrow'))
... ... @@ -267,14 +270,14 @@ export struct MineSettingComponent {
}
.height('54lpx')
.onClick(() => {
if (item.title == '账户与安全') {
if (item.itemType == 'account') {
let params: Params = {
pageID: 'AccountAndSecurityLayout'
}
WDRouterRule.jumpWithPage(WDRouterPage.settingPage, params)
} else if (item.title == '隐私设罝') {
} else if (item.itemType == 'private_setting') {
WDRouterRule.jumpWithPage(WDRouterPage.privacySettingPage)
} else if (item.title == '清除缓存') {
} else if (item.itemType == 'clear_cache') {
this.dialogController.open()
}
})
... ...
import HashMap from '@ohos.util.HashMap';
import { ResponseDTO, WDHttp } from 'wdNetwork';
import { Logger } from 'wdKit';
import { Logger, SPHelper } from 'wdKit';
import { MineMainSettingFunctionItem } from '../viewmodel/MineMainSettingFunctionItem';
import { SpConstants } from 'wdConstant/Index';
const TAG = "MineSettingDatasModel"
... ... @@ -40,15 +41,19 @@ class MineSettingDatasModel{
return this.mainSettingData
}
this.mainSettingData = []
this.mainSettingData.push(new MineMainSettingFunctionItem(null, '账户与安全', '18888888888', 0, false))
this.mainSettingData.push(new MineMainSettingFunctionItem(null, '接收推送', null, 1, false))
this.mainSettingData.push(new MineMainSettingFunctionItem(null, '隐私设罝', null, 0, false))
this.mainSettingData.push(new MineMainSettingFunctionItem(null, '仅WiFi网络加载图片', null, 1, false))
this.mainSettingData.push(new MineMainSettingFunctionItem(null, 'WiFi网络情况下自动播放视频', null, 1, false))
this.mainSettingData.push(new MineMainSettingFunctionItem(null, '开启播放器悬浮窗', null, 1, false))
this.mainSettingData.push(new MineMainSettingFunctionItem(null, null, null, 2, null))
this.mainSettingData.push(new MineMainSettingFunctionItem(null, '清除缓存', '32MB', 0, false))
this.mainSettingData.push(new MineMainSettingFunctionItem(null, '评价我们', null, 0, false))
this.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"))
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"))
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"))
let suspensionState=SPHelper.default.getSync(SpConstants.SETTING_SUSPENSION_SWITCH,false) as boolean
this.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"))
this.mainSettingData.push(new MineMainSettingFunctionItem(null, '评价我们', null, 0, false,""))
return this.mainSettingData
}
... ... @@ -62,16 +67,16 @@ class MineSettingDatasModel{
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))
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))
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,""))
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,""))
return this.accountAndSecurityData
}
... ...
... ... @@ -9,6 +9,8 @@ import { SearchResultContentData } from '../viewmodel/SearchResultContentData';
import { contentListParams, InteractDataDTO } from 'wdBean/Index';
import { CreatorDetailRequestItem } from '../viewmodel/CreatorDetailRequestItem';
import { CreatorDetailResponseItem } from '../viewmodel/CreatorDetailResponseItem';
import { SearchSuggestData } from '../viewmodel/SearchSuggestData';
import { SearchSuggestRequestItem } from '../viewmodel/SearchSuggestRequestItem';
const TAG = "SearcherAboutDataModel"
... ... @@ -349,6 +351,45 @@ class SearcherAboutDataModel{
return WDHttp.post<ResponseDTO<CreatorDetailResponseItem[]>>(url,object, headers)
};
/**
* 搜索推荐 展示列表
*/
getSearchSuggestData(object:SearchSuggestRequestItem,context: Context): Promise<SearchSuggestData[]> {
return new Promise<SearchSuggestData[]>((success, error) => {
Logger.info(TAG, `getSearchSuggestData start`);
this.fetchSearchSuggestData(object).then((navResDTO: ResponseDTO<SearchSuggestData[]>) => {
if (!navResDTO || navResDTO.code != 0 /*|| navResDTO.data == null*/) {
// success(this.getSearchSuggestDataLocal(context))
success([])
return
}
Logger.info(TAG, "getSearchSuggestData then,SearchResultListResDTO.timeStamp:" + navResDTO.timestamp);
let navigationBean = navResDTO.data as SearchSuggestData[]
success(navigationBean);
}).catch((err: Error) => {
Logger.error(TAG, `getSearchSuggestData catch, error.name : ${err.name}, error.message:${err.message}`);
// success(this.getSearchSuggestDataLocal(context))
success([])
})
})
}
fetchSearchSuggestData(object:SearchSuggestRequestItem) {
let url = HttpUrlUtils.getSearchSuggestDataUrl()
let headers: HashMap<string, string> = HttpUrlUtils.getCommonHeaders();
return WDHttp.post<ResponseDTO<SearchSuggestData[]>>(url,object, headers)
};
async getSearchSuggestDataLocal(context: Context): Promise<SearchSuggestData[]> {
Logger.info(TAG, `getInteractListDataLocal start`);
let compRes: ResponseDTO<SearchSuggestData[]> | null = await ResourcesUtils.getResourcesJson<ResponseDTO<SearchSuggestData[]>>(context,'search_suggest_data.json' );
if (!compRes || !compRes.data) {
Logger.info(TAG, `getInteractListDataLocal compRes is empty`);
return []
}
Logger.info(TAG, `getInteractListDataLocal getResourcesJsonSync compRes : ${JSON.stringify(compRes)}`);
return compRes.data
}
... ...
... ... @@ -82,6 +82,7 @@ struct MineHomePage {
.lineHeight('50lpx')
.fontWeight('500lpx')
if(this.levelId>0){
Text(`等级${this.levelId}`)
.textAlign(TextAlign.Center)
.fontColor($r('app.color.color_ED2800'))
... ... @@ -90,6 +91,8 @@ struct MineHomePage {
.width('96lpx')
.height('35lpx')
.margin({ left: '10lpx' })
}
Blank()
}.width('507lpx')
... ...
... ... @@ -2,19 +2,46 @@
@Observed
export class CommentListItem{
fromUserHeader:string = ""
fromUserName:string = ""
commentContent:string = ""
targetTitle:string = ""
createTime:string = ""
likeNum:number = 0
like_status:number = 0
id:number = 0
targetId:string = ""
targetType:number = 0
avatarFrame: string = ""
checkStatus: number = -1
commentContent: string = ""
commentContentSensitive: string = ""
commentLevel: number = -1
commentPics: string = ""
commentSensitive: string = ""
commentType: string = ""
createTime: string = ""
fromCreatorId: string = ""
fromDeviceId: string = ""
fromUserHeader: string = ""
fromUserId: string = ""
fromUserName: string = ""
fromUserType: number = -1
h5Url: string = ""
id: number = 0
keyArticle: number = -1
likeNum: number = 0
// pageId: null
// parentCommentVo: null
parentId: number = -1
rootCommentId: number = -1
sensitiveExist: number = -1
sensitiveShow: number = -1
// shareInfo: ShareInfo$1Type
targetId: string = ""
targetType: number = 0
targetRelId: string = ""
targetRelObjectId: string = ""
targetRelType: number = -1
targetStatus: number = -1
targetTitle: string = ""
// topicType: null
uuid: string = ""
constructor(fromUserHeader:string,fromUserName:string,targetTitle:string,createTime:string,commentContent:string,likeNum:number,like_status:number,id:number,targetId:string,targetType:number) {
constructor(fromUserHeader:string,fromUserName:string,targetTitle:string,createTime:string,commentContent:string,likeNum:number,like_status:number,id:number,targetId:string,targetType:number,targetRelId: string,targetRelObjectId: string,targetRelType: number,targetStatus: number,) {
this.fromUserHeader = fromUserHeader
this.fromUserName = fromUserName
this.commentContent = commentContent
... ... @@ -25,5 +52,9 @@ export class CommentListItem{
this.id = id
this.targetId = targetId
this.targetType = targetType
this.targetRelId = targetRelId
this.targetRelObjectId = targetRelObjectId
this.targetRelType = targetRelType
this.targetStatus = targetStatus
}
}
... ...
... ... @@ -6,9 +6,10 @@ export class MineMainSettingFunctionItem {
subTitle?:string // 副标题
type?:number // 数据类型 0默认箭头类型,1右侧switch按钮类型
switchState?:boolean // 右侧switch按钮状态
itemType?:string //条目类型
constructor(imgSrc:Resource|null,title:string|null,subTitle:string|null,type:number|null,switchState:boolean|null){
constructor(imgSrc:Resource|null,title:string|null,subTitle:string|null,type:number|null,switchState:boolean|null,itemType:string){
if (imgSrc) {
this.imgSrc = imgSrc
}
... ... @@ -24,6 +25,9 @@ export class MineMainSettingFunctionItem {
if (switchState != null) {
this.switchState = switchState
}
if (itemType != null) {
this.itemType = itemType
}
}
}
\ No newline at end of file
... ...
@Observed
export class SearchSuggestData{
// activityExt: null
appStyle: string = ""
// askInfo: null
axisColor: string = ""
// bestNoticer: null
// bottomNavId: null
cardItemId: string = ""
channelId: number = -1
// commentInfo: null
corner: string = ""
coverSize: string = ""
coverType: number = -1
coverUrl: string = ""
expIds: string = ""
extra: string = ""
fullColumnImgUrls: Array<FullColumnImgUrls> = []
// hasMore: null
itemId: string = ""
itemType: string = ""
itemTypeCode: string = ""
keyArticle: number = -1
// landscape: null
// likeStyle: null
linkUrl: string = ""
// liveInfo: null
menuShow: number = -1
newTags: string = ""
newsAuthor: string = ""
newsSubTitle: string = ""
newsSummary: string = ""
newsTitle: string = ""
newsTitleColor: string = ""
objectId: string = ""
objectLevel: string = ""
objectType: string = ""
// openComment: null
// openLikes: null
pageId: string = ""
// photoNum: null
// position: null
// productNum: null
publishTime: string = ""
// pushTime: null
// pushUnqueId: null
readFlag: number = -1
recommend: number = -1
relId: number = -1
relObjectId: string = ""
relType: number = -1
// rmhInfo: null
rmhPlatform: number = -1
sceneId: string = ""
// shareInfo: null
// slideShows: Array< unknown >
// sortValue: null
source: string = ""
subObjectType: string = ""
subSceneId: string = ""
// tagIds: Array< unknown >
// tagWord: null
// titleShow: null
// titleShowPolicy: null
// topicTemplate: null
traceId: string = ""
traceInfo: string = ""
// userInfo: null
videoInfo: VideoInfo = new VideoInfo()
visitorComment: number = -1
// voiceInfo: null
}
class FullColumnImgUrls{
// format: null
fullUrl: string = ""
height: number = -1
landscape: number = -1
size: number = -1
url: string = ""
weight: number = -1
}
class VideoInfo{
firstFrameImageUri: string = ""
videoDuration: number = -1
videoLandscape: number = -1
videoUrl: string = ""
}
... ...
export class SearchSuggestRequestItem{
recType: number = 0
relId: string = ""
contentId: string = ""
imei: string = ""
userId: string = ""
contentType: number = 0
channelId: string = ""
constructor(recType: number, relId: string , contentId: string , imei: string ,userId: string ,
contentType: number,channelId: string ) {
this.recType = recType
this.relId = relId
this.contentId = contentId
this.imei = imei
this.userId = userId
this.contentType = contentType
this.channelId = channelId
}
}
\ No newline at end of file
... ...
import { abilityAccessCtrl, bundleManager, Permissions } from '@kit.AbilityKit';
import { BusinessError } from '@kit.BasicServicesKit';
import { geoLocationManager } from '@kit.LocationKit';
import { SpConstants } from 'wdConstant/Index';
import { Logger, PermissionUtils, ResourcesUtils, SPHelper } from 'wdKit/Index';
import { ResponseDTO } from 'wdNetwork/Index';
/**
* 系统定位服务实现
* */
export class HWLocationUtils {
//d定位相关
static LOCATION_CITY_NAME = "location_city_name" //定位
static LOCATION_CITY_CODE = "location_city_code" //定位
static LOCATION: Permissions = 'ohos.permission.LOCATION'
... ... @@ -107,10 +106,14 @@ export class HWLocationUtils {
Logger.debug('location :' + JSON.stringify(data))
if (data[0] && data[0].administrativeArea && data[0].subAdministrativeArea) {
let cityName = data[0].subAdministrativeArea;
let name = await SPHelper.default.get(SpConstants.LOCATION_CITY_NAME, '') as string
if (cityName == name) {
return
}
let code = await HWLocationUtils.getCityCode(data[0].administrativeArea, data[0].subAdministrativeArea)
if (code) {
SPHelper.default.save(HWLocationUtils.LOCATION_CITY_NAME, cityName)
SPHelper.default.save(HWLocationUtils.LOCATION_CITY_CODE, code)
SPHelper.default.save(SpConstants.LOCATION_CITY_NAME, cityName)
SPHelper.default.save(SpConstants.LOCATION_CITY_CODE, code)
}
}
}
... ... @@ -151,23 +154,6 @@ export class HWLocationUtils {
}
}
interface ResponseDTO<T> {
success: boolean;
// 服务请求响应值/微服务响应状态码”
code: number;
// 服务请求响应说明
message: string;
// 响应结果
data?: T;
totalCount?: number;
// 请求响应时间戳(unix格式)
timestamp?: number;
}
interface LocalData {
"code": string,
"id": string,
... ...
... ... @@ -9,6 +9,18 @@
"2in1"
],
"deliveryWithInstall": true,
"pages": "$profile:main_pages"
"pages": "$profile:main_pages",
"requestPermissions": [
{
"name": "ohos.permission.APPROXIMATELY_LOCATION",
"reason": "$string:location_reason",
"usedScene": {
"abilities": [
"FormAbility"
],
"when": "inuse"
}
}
]
}
}
\ No newline at end of file
... ...
... ... @@ -3,6 +3,10 @@
{
"name": "shared_desc",
"value": "description"
},
{
"name": "location_reason",
"value": " "
}
]
}
\ No newline at end of file
... ...
... ... @@ -4,7 +4,16 @@ import UIAbility from '@ohos.app.ability.UIAbility';
import Want from '@ohos.app.ability.Want';
import window from '@ohos.window';
import { registerRouter } from 'wdRouter';
import { SPHelper, StringUtils, WindowModel } from 'wdKit';
import {
EmitterEventId,
EmitterUtils,
Logger,
NetworkManager,
NetworkType,
SPHelper,
StringUtils,
WindowModel
} from 'wdKit';
import { HttpUrlUtils, WDHttp } from 'wdNetwork';
export default class EntryAbility extends UIAbility {
... ... @@ -12,15 +21,30 @@ export default class EntryAbility extends UIAbility {
SPHelper.init(this.context);
hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onCreate');
registerRouter();
NetworkManager.getInstance().init()
WDHttp.initHttpHeader()
const spHostUrl = SPHelper.default.getSync('hostUrl', '') as string
if (StringUtils.isNotEmpty(spHostUrl)) {
HttpUrlUtils.hostUrl = spHostUrl
}
// 注册监听网络连接
EmitterUtils.receiveEvent(EmitterEventId.NETWORK_CONNECTED, ((str?: string) => {
let type: NetworkType | null = null
if (str) {
type = JSON.parse(str) as NetworkType
}
Logger.info('network connected: ' + type?.toString())
}))
// 注册监听网络断开
EmitterUtils.receiveEvent(EmitterEventId.NETWORK_DISCONNECTED, (() => {
Logger.info('network disconnected')
}))
}
onDestroy(): void {
hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onDestroy');
NetworkManager.getInstance().release()
}
onWindowStageCreate(windowStage: window.WindowStage): void {
... ...
import router from '@ohos.router'
import { WDRouterRule } from 'wdRouter';
import { WDRouterPage } from 'wdRouter';
import { Logger, SPHelper } from 'wdKit/Index';
import { SpConstants } from 'wdConstant/Index';
import LaunchDataModel from '../viewModel/LaunchDataModel'
import { LaunchModel } from '../viewModel/LaunchModel';
import { ifaa } from '@kit.OnlineAuthenticationKit';
import common from '@ohos.app.ability.common';
import Want from '@ohos.app.ability.Want';
import { BusinessError } from '@ohos.base';
@Entry
@Component
struct LaunchAdvertisingPage {
@State time: number = 4
timer :number = -1
@State model : LaunchDataModel = {} as LaunchDataModel
enter() {
// router.replaceUrl({
... ... @@ -15,7 +28,22 @@ struct LaunchAdvertisingPage {
clearInterval(this.timer)
}
aboutToAppear(): void {
let dataModelStr : string = SPHelper.default.getSync(SpConstants.APP_LAUNCH_PAGE_DATA_MODEL,'') as string
let dataModel : LaunchDataModel = JSON.parse(dataModelStr)
this.model = dataModel
console.log(dataModelStr)
if(this.model.launchAdInfo.length){
//设置倒计时时间
this.time = this.model.launchAdInfo[0].displayDuration
}
}
onPageShow(){
this.timer = setInterval(() => {
this.time--
if (this.time < 1) {
... ... @@ -32,10 +60,20 @@ struct LaunchAdvertisingPage {
Stack({alignContent:Alignment.Bottom}){
Column(){
Image($r('app.media.app_icon'))
.margin({
top:'128lpx',left:'48lpx',right:'48lpx',bottom:'128lpx'
})
if(!(this.model.launchAdInfo[0].matInfo.matType == '1')){
//显示图片
Image(this.model.launchAdInfo[0].matInfo.matImageUrl[0])
.width('100%')
.height('100%')
// .margin({
// top:'128lpx',left:'48lpx',right:'48lpx',bottom:'128lpx'
// })
}else {
//显示视频播放
}
}
.justifyContent(FlexAlign.Center)
.width('100%')
... ... @@ -62,7 +100,8 @@ struct LaunchAdvertisingPage {
}
.width('100%')
.height('100%')
if(!(this.model.launchAdInfo[0].matInfo.startStyle == 1)){
//底部logo样式 按钮加载在背景展示图上
Button(){
Row(){
Text('点击跳转至详情或第三方应用')
... ... @@ -83,27 +122,83 @@ struct LaunchAdvertisingPage {
bottom: '51lpx'
})
.backgroundColor('#80000000')
.onClick(()=>{
this.action()
})
}
}
}
.width('100%')
.height('84%')
.backgroundColor('#FF6C75')
.margin({top:'0'})
if(this.model.launchAdInfo[0].matInfo.startStyle == 1){
//全屏样式,底部无logo 按钮放在原底部logo位置
Button(){
Row(){
Text('点击跳转至详情或第三方应用')
.fontSize('31lpx')
.fontColor(Color.White)
.margin({
left:'55lpx'
})
Image($r('app.media.Slice'))
.width('46lpx')
.height('46lpx')
.margin({right:'55lpx'})
}.alignItems(VerticalAlign.Center)
}
.width('566lpx')
.height('111lpx')
.margin({
top: '28lpx'
})
.backgroundColor('#80000000')
.onClick(()=>{
this.action()
})
}else {
//底部logo样式
Image($r('app.media.LaunchPage_logo'))
.width('278lpx')
.height('154lpx')
.margin({bottom: '48lpx'})
.margin({top: '28lpx'})
}
}
.width('100%')
.height('100%')
.backgroundColor(Color.White)
}
action(){
//跳转 url linkUrl https://news.bjd.com.cn/2024/03/19/10724331.shtml
// openType 端外 端内 打开
if (this.model.launchAdInfo[0].matInfo.openType == '2') {
//端外打开
let context = getContext(this) as common.UIAbilityContext;
let wantInfo: Want = {
// uncomment line below if wish to implicitly query only in the specific bundle.
// bundleName: 'com.example.myapplication',
action: 'ohos.want.action.viewData',
// entities can be omitted.
entities: ['entity.system.browsable'],
uri: 'https://news.bjd.com.cn/2024/03/19/10724331.shtml'
}
context.startAbility(wantInfo).then(() => {
// ...
}).catch((err: BusinessError) => {
// ...
})
}else {
//端内打开
}
}
}
\ No newline at end of file
... ...
... ... @@ -10,6 +10,9 @@ import { WDRouterRule } from 'wdRouter';
import { WDRouterPage } from 'wdRouter';
import { LaunchModel } from '../viewModel/LaunchModel'
import { LaunchPageModel } from '../viewModel/LaunchPageModel'
import LaunchDataModel from '../viewModel/LaunchDataModel'
import { Logger, SPHelper } from 'wdKit/Index';
import { SpConstants } from 'wdConstant/Index';
@Entry
@Component
... ... @@ -92,8 +95,19 @@ struct LaunchPage {
// }
} else {
//需要根据请求数据判断是否需要进入广告页,广告数据为nil则直接跳转到首页
//获取本地存储的启动页数据
let dataModelStr : string = SPHelper.default.getSync(SpConstants.APP_LAUNCH_PAGE_DATA_MODEL,'') as string
let dataModel : LaunchDataModel = JSON.parse(dataModelStr)
console.log(dataModelStr)
if (dataModel.launchAdInfo.length) {
//跳转广告页
this.jumpToAdvertisingPage();
}else {
//直接跳转首页
WDRouterRule.jumpWithReplacePage(WDRouterPage.mainPage)
}
//同意隐私协议后每次启动app请求启动页相关数据,并更新数据
this.requestLaunchPageData();
}
... ... @@ -161,7 +175,6 @@ struct LaunchPage {
//请求启动页相关接口数据并保存
let launchPageModel = new LaunchPageModel()
launchPageModel.getLaunchPageData()
}
aboutToAppear(): void {
... ...
... ... @@ -40,6 +40,7 @@ export interface NetLayerLauncherADInfoModel{
startTime : number
endTime : number
displayDuration : number
displayPriority : number
displayRound : number
matInfo : NetLayerLauncherADMaterialModel
... ...
... ... @@ -11,7 +11,7 @@ import { SpConstants } from 'wdConstant/Index';
export class LaunchPageModel {
getLaunchPageData() {
getLaunchPageData(): Promise<LaunchDataModel> {
let headers: HashMap<string, string> = HttpUrlUtils.getCommonHeaders();
return new Promise<LaunchDataModel>((success, fail) => {
HttpRequest.get<ResponseDTO<LaunchDataModel>>(HttpUrlUtils.getLaunchPageDataUrl(), headers).then((data: ResponseDTO<LaunchDataModel>) => {
... ... @@ -26,8 +26,9 @@ export class LaunchPageModel {
Logger.debug("LaunchPageModel获取启动相关数据获取成功:success ", JSON.stringify(data))
success(data.data);
//存储数据
let obj : string = JSON.stringify(data.data)
console.log(obj)
SPHelper.default.saveSync(SpConstants.APP_LAUNCH_PAGE_DATA_MODEL,obj)
}, (error: Error) => {
Logger.debug("LaunchPageModel获取启动相关数据获取失败:error ", error.toString())
... ...
{
"code": "0",
"data": [
{
"activityExt": null,
"appStyle": "11",
"askInfo": null,
"axisColor": "",
"bestNoticer": null,
"bottomNavId": null,
"cardItemId": "",
"channelId": 2029,
"commentInfo": null,
"corner": "",
"coverSize": "",
"coverType": null,
"coverUrl": "",
"expIds": "105",
"extra": "",
"fullColumnImgUrls": [
],
"hasMore": null,
"itemId": "500005310685_article_r",
"itemType": "",
"itemTypeCode": "article",
"keyArticle": 0,
"landscape": null,
"likeStyle": null,
"linkUrl": "",
"liveInfo": null,
"menuShow": 1,
"newTags": "",
"newsAuthor": "",
"newsSubTitle": "",
"newsSummary": "",
"newsTitle": "2024天津·宝坻体育旅游嘉年华活动启动",
"newsTitleColor": "",
"objectId": "30044378753",
"objectLevel": "",
"objectType": "8",
"openComment": null,
"openLikes": null,
"pageId": "",
"photoNum": null,
"position": null,
"productNum": null,
"publishTime": "1713145459000",
"pushTime": null,
"pushUnqueId": null,
"readFlag": 0,
"recommend": 1,
"relId": 500005310685,
"relObjectId": "2029",
"relType": 1,
"rmhInfo": null,
"rmhPlatform": 0,
"sceneId": "54",
"shareInfo": null,
"slideShows": [
],
"sortValue": null,
"source": "人民日报客户端天津频道",
"subObjectType": "",
"subSceneId": "",
"tagIds": [
],
"tagWord": null,
"titleShow": null,
"titleShowPolicy": null,
"topicTemplate": null,
"traceId": "a20b09c58479b22f-500005310685_article_r",
"traceInfo": "",
"userInfo": null,
"videoInfo": null,
"visitorComment": 1,
"voiceInfo": null
},
{
"activityExt": null,
"appStyle": "11",
"askInfo": null,
"axisColor": "",
"bestNoticer": null,
"bottomNavId": null,
"cardItemId": "",
"channelId": 2032,
"commentInfo": null,
"corner": "",
"coverSize": "",
"coverType": null,
"coverUrl": "",
"expIds": "105",
"extra": "",
"fullColumnImgUrls": [
],
"hasMore": null,
"itemId": "500005305865_article_r",
"itemType": "",
"itemTypeCode": "article",
"keyArticle": 0,
"landscape": null,
"likeStyle": null,
"linkUrl": "",
"liveInfo": null,
"menuShow": 2,
"newTags": "",
"newsAuthor": "",
"newsSubTitle": "",
"newsSummary": "",
"newsTitle": "内蒙古扎赉特旗: “书记项目”添动能 “头雁引领”聚合力",
"newsTitleColor": "",
"objectId": "30044342646",
"objectLevel": "",
"objectType": "8",
"openComment": null,
"openLikes": null,
"pageId": "",
"photoNum": null,
"position": null,
"productNum": null,
"publishTime": "1712913646000",
"pushTime": null,
"pushUnqueId": null,
"readFlag": 0,
"recommend": 1,
"relId": 500005305865,
"relObjectId": "2032",
"relType": 1,
"rmhInfo": null,
"rmhPlatform": 0,
"sceneId": "54",
"shareInfo": null,
"slideShows": [
],
"sortValue": null,
"source": "扎赉特旗融媒体中心",
"subObjectType": "",
"subSceneId": "",
"tagIds": [
],
"tagWord": null,
"titleShow": null,
"titleShowPolicy": null,
"topicTemplate": null,
"traceId": "a20b09c58479b22f-500005305865_article_r",
"traceInfo": "",
"userInfo": null,
"videoInfo": null,
"visitorComment": 1,
"voiceInfo": null
},
{
"activityExt": null,
"appStyle": "2",
"askInfo": null,
"axisColor": "",
"bestNoticer": null,
"bottomNavId": null,
"cardItemId": "",
"channelId": 2002,
"commentInfo": null,
"corner": "",
"coverSize": "828*466",
"coverType": 1,
"coverUrl": "https://rmrbcmsonline.peopleapp.com/upload/image/202404/202404141745321527.png?x-oss-process=image/resize,m_fill,h_450,w_800/quality,q_90",
"expIds": "105",
"extra": "",
"fullColumnImgUrls": [
{
"format": null,
"fullUrl": "",
"height": 466,
"landscape": 1,
"size": 1,
"url": "https://rmrbcmsonline.peopleapp.com/upload/image/202404/202404141745321527.png?x-oss-process=image/resize,m_fill,h_450,w_800/quality,q_90",
"weight": 828
}
],
"hasMore": null,
"itemId": "500005310405_video_r",
"itemType": "",
"itemTypeCode": "video",
"keyArticle": 0,
"landscape": null,
"likeStyle": null,
"linkUrl": "",
"liveInfo": null,
"menuShow": 1,
"newTags": "",
"newsAuthor": "",
"newsSubTitle": "",
"newsSummary": "",
"newsTitle": "华丽绚烂!看了洛阳牡丹才知国色天香",
"newsTitleColor": "",
"objectId": "30044374037",
"objectLevel": "",
"objectType": "1",
"openComment": null,
"openLikes": null,
"pageId": "",
"photoNum": null,
"position": null,
"productNum": null,
"publishTime": "1713095130000",
"pushTime": null,
"pushUnqueId": null,
"readFlag": 0,
"recommend": 1,
"relId": 500005310405,
"relObjectId": "2002",
"relType": 1,
"rmhInfo": null,
"rmhPlatform": 0,
"sceneId": "54",
"shareInfo": null,
"slideShows": [
],
"sortValue": null,
"source": "荔枝风景线微博",
"subObjectType": "",
"subSceneId": "",
"tagIds": [
],
"tagWord": null,
"titleShow": null,
"titleShowPolicy": null,
"topicTemplate": null,
"traceId": "a20b09c58479b22f-500005310405_video_r",
"traceInfo": "",
"userInfo": null,
"videoInfo": {
"firstFrameImageUri": "",
"videoDuration": 19,
"videoLandscape": 1,
"videoUrl": "https://rmrbcmsonline.peopleapp.com/upload/video/mp4/202404/17130877420e174c2c6c260ac9.mp4"
},
"visitorComment": 1,
"voiceInfo": null
},
{
"activityExt": null,
"appStyle": "13",
"askInfo": null,
"axisColor": "",
"bestNoticer": null,
"bottomNavId": null,
"cardItemId": "",
"channelId": 2002,
"commentInfo": null,
"corner": "",
"coverSize": "619*466",
"coverType": 1,
"coverUrl": "https://rmrbcmsonline.peopleapp.com/upload/image/202404/202404181712303737.png?x-oss-process=image/resize,m_fill,h_160,w_240/quality,q_90",
"expIds": "105",
"extra": "",
"fullColumnImgUrls": [
{
"format": null,
"fullUrl": "",
"height": 466,
"landscape": 1,
"size": 1,
"url": "https://rmrbcmsonline.peopleapp.com/upload/image/202404/202404181712303737.png?x-oss-process=image/resize,m_fill,h_160,w_240/quality,q_90",
"weight": 619
}
],
"hasMore": null,
"itemId": "500005324157_article_r",
"itemType": "",
"itemTypeCode": "article",
"keyArticle": 0,
"landscape": null,
"likeStyle": null,
"linkUrl": "",
"liveInfo": null,
"menuShow": 2,
"newTags": "",
"newsAuthor": "",
"newsSubTitle": "",
"newsSummary": "祝福“中国天眼”!怀念南老先生!",
"newsTitle": "这超900颗新脉冲星,多希望他能看到啊",
"newsTitleColor": "",
"objectId": "30044454971",
"objectLevel": "",
"objectType": "8",
"openComment": null,
"openLikes": null,
"pageId": "",
"photoNum": null,
"position": null,
"productNum": null,
"publishTime": "1713431569000",
"pushTime": null,
"pushUnqueId": null,
"readFlag": 0,
"recommend": 1,
"relId": 500005324157,
"relObjectId": "2002",
"relType": 1,
"rmhInfo": null,
"rmhPlatform": 0,
"sceneId": "54",
"shareInfo": null,
"slideShows": [
],
"sortValue": null,
"source": "新华社微信公号",
"subObjectType": "",
"subSceneId": "",
"tagIds": [
],
"tagWord": null,
"titleShow": null,
"titleShowPolicy": null,
"topicTemplate": null,
"traceId": "a20b09c58479b22f-500005324157_article_r",
"traceInfo": "",
"userInfo": null,
"videoInfo": null,
"visitorComment": 1,
"voiceInfo": null
},
{
"activityExt": null,
"appStyle": "13",
"askInfo": null,
"axisColor": "",
"bestNoticer": null,
"bottomNavId": null,
"cardItemId": "",
"channelId": 2037,
"commentInfo": null,
"corner": "",
"coverSize": "700*525",
"coverType": 1,
"coverUrl": "https://rmrbcmsonline.peopleapp.com/upload/image/202404/202404181118592822.png?x-oss-process=image/resize,m_fill,h_160,w_240/quality,q_90",
"expIds": "105",
"extra": "",
"fullColumnImgUrls": [
{
"format": null,
"fullUrl": "",
"height": 525,
"landscape": 1,
"size": 1,
"url": "https://rmrbcmsonline.peopleapp.com/upload/image/202404/202404181118592822.png?x-oss-process=image/resize,m_fill,h_160,w_240/quality,q_90",
"weight": 700
}
],
"hasMore": null,
"itemId": "500005322754_article_r",
"itemType": "",
"itemTypeCode": "article",
"keyArticle": 0,
"landscape": null,
"likeStyle": null,
"linkUrl": "",
"liveInfo": null,
"menuShow": 1,
"newTags": "",
"newsAuthor": "",
"newsSubTitle": "",
"newsSummary": "",
"newsTitle": "神舟十八号船箭组合体转运至发射区 计划近日择机实施发射",
"newsTitleColor": "",
"objectId": "30044447518",
"objectLevel": "",
"objectType": "8",
"openComment": null,
"openLikes": null,
"pageId": "",
"photoNum": null,
"position": null,
"productNum": null,
"publishTime": "1713433480000",
"pushTime": null,
"pushUnqueId": null,
"readFlag": 0,
"recommend": 1,
"relId": 500005322754,
"relObjectId": "2037",
"relType": 1,
"rmhInfo": null,
"rmhPlatform": 0,
"sceneId": "54",
"shareInfo": null,
"slideShows": [
],
"sortValue": null,
"source": "人民日报客户端",
"subObjectType": "",
"subSceneId": "",
"tagIds": [
],
"tagWord": null,
"titleShow": null,
"titleShowPolicy": null,
"topicTemplate": null,
"traceId": "a20b09c58479b22f-500005322754_article_r",
"traceInfo": "",
"userInfo": null,
"videoInfo": null,
"visitorComment": 1,
"voiceInfo": null
},
{
"activityExt": null,
"appStyle": "13",
"askInfo": null,
"axisColor": "",
"bestNoticer": null,
"bottomNavId": null,
"cardItemId": "",
"channelId": 2050,
"commentInfo": null,
"corner": "",
"coverSize": "619*466",
"coverType": 1,
"coverUrl": "https://rmrbcmsonline.peopleapp.com/upload/image/202404/202404121822152009.png?x-oss-process=image/resize,m_fill,h_160,w_240/quality,q_90",
"expIds": "105",
"extra": "",
"fullColumnImgUrls": [
{
"format": null,
"fullUrl": "",
"height": 466,
"landscape": 1,
"size": 1,
"url": "https://rmrbcmsonline.peopleapp.com/upload/image/202404/202404121822152009.png?x-oss-process=image/resize,m_fill,h_160,w_240/quality,q_90",
"weight": 619
}
],
"hasMore": null,
"itemId": "500005306852_article_r",
"itemType": "",
"itemTypeCode": "article",
"keyArticle": 0,
"landscape": null,
"likeStyle": null,
"linkUrl": "",
"liveInfo": null,
"menuShow": 1,
"newTags": "",
"newsAuthor": "",
"newsSubTitle": "",
"newsSummary": "",
"newsTitle": "罕见!贵州梵净山再现“佛光”奇观",
"newsTitleColor": "",
"objectId": "30044345083",
"objectLevel": "",
"objectType": "8",
"openComment": null,
"openLikes": null,
"pageId": "",
"photoNum": null,
"position": null,
"productNum": null,
"publishTime": "1712934235000",
"pushTime": null,
"pushUnqueId": null,
"readFlag": 0,
"recommend": 1,
"relId": 500005306852,
"relObjectId": "2050",
"relType": 1,
"rmhInfo": null,
"rmhPlatform": 0,
"sceneId": "54",
"shareInfo": null,
"slideShows": [
],
"sortValue": null,
"source": "微铜仁",
"subObjectType": "",
"subSceneId": "",
"tagIds": [
],
"tagWord": null,
"titleShow": null,
"titleShowPolicy": null,
"topicTemplate": null,
"traceId": "a20b09c58479b22f-500005306852_article_r",
"traceInfo": "",
"userInfo": null,
"videoInfo": null,
"visitorComment": 1,
"voiceInfo": null
},
{
"activityExt": null,
"appStyle": "13",
"askInfo": null,
"axisColor": "",
"bestNoticer": null,
"bottomNavId": null,
"cardItemId": "",
"channelId": 2028,
"commentInfo": null,
"corner": "",
"coverSize": "1103*621",
"coverType": 1,
"coverUrl": "https://rmrbcmsonline.peopleapp.com/upload/image/202404/rmrb_58921713104730.png?x-oss-process=image/resize,m_fill,h_160,w_240/quality,q_90",
"expIds": "105",
"extra": "",
"fullColumnImgUrls": [
{
"format": null,
"fullUrl": "",
"height": 621,
"landscape": 1,
"size": 1,
"url": "https://rmrbcmsonline.peopleapp.com/upload/image/202404/rmrb_58921713104730.png?x-oss-process=image/resize,m_fill,h_160,w_240/quality,q_90",
"weight": 1103
}
],
"hasMore": null,
"itemId": "500005310563_article_r",
"itemType": "",
"itemTypeCode": "article",
"keyArticle": 0,
"landscape": null,
"likeStyle": null,
"linkUrl": "",
"liveInfo": null,
"menuShow": 2,
"newTags": "",
"newsAuthor": "",
"newsSubTitle": "",
"newsSummary": "",
"newsTitle": "行知读书会分享松江方塔园背后的故事",
"newsTitleColor": "",
"objectId": "30044377688",
"objectLevel": "",
"objectType": "8",
"openComment": null,
"openLikes": null,
"pageId": "",
"photoNum": null,
"position": null,
"productNum": null,
"publishTime": "1713108215000",
"pushTime": null,
"pushUnqueId": null,
"readFlag": 0,
"recommend": 1,
"relId": 500005310563,
"relObjectId": "2028",
"relType": 1,
"rmhInfo": null,
"rmhPlatform": 0,
"sceneId": "54",
"shareInfo": null,
"slideShows": [
],
"sortValue": null,
"source": "人民日报客户端上海频道",
"subObjectType": "",
"subSceneId": "",
"tagIds": [
],
"tagWord": null,
"titleShow": null,
"titleShowPolicy": null,
"topicTemplate": null,
"traceId": "a20b09c58479b22f-500005310563_article_r",
"traceInfo": "",
"userInfo": null,
"videoInfo": null,
"visitorComment": 1,
"voiceInfo": null
},
{
"activityExt": null,
"appStyle": "13",
"askInfo": null,
"axisColor": "",
"bestNoticer": null,
"bottomNavId": null,
"cardItemId": "",
"channelId": 2002,
"commentInfo": null,
"corner": "",
"coverSize": "619*466",
"coverType": 1,
"coverUrl": "https://rmrbcmsonline.peopleapp.com/upload/image/202404/202404220932238253.png?x-oss-process=image/resize,m_fill,h_160,w_240/quality,q_90",
"expIds": "105",
"extra": "",
"fullColumnImgUrls": [
{
"format": null,
"fullUrl": "",
"height": 466,
"landscape": 1,
"size": 1,
"url": "https://rmrbcmsonline.peopleapp.com/upload/image/202404/202404220932238253.png?x-oss-process=image/resize,m_fill,h_160,w_240/quality,q_90",
"weight": 619
}
],
"hasMore": null,
"itemId": "500005332338_article_r",
"itemType": "",
"itemTypeCode": "article",
"keyArticle": 0,
"landscape": null,
"likeStyle": null,
"linkUrl": "",
"liveInfo": null,
"menuShow": 2,
"newTags": "",
"newsAuthor": "",
"newsSubTitle": "",
"newsSummary": "送别老人!",
"newsTitle": "93岁南京大屠杀幸存者刘素珍去世",
"newsTitleColor": "",
"objectId": "30044516097",
"objectLevel": "",
"objectType": "8",
"openComment": null,
"openLikes": null,
"pageId": "",
"photoNum": null,
"position": null,
"productNum": null,
"publishTime": "1713750664000",
"pushTime": null,
"pushUnqueId": null,
"readFlag": 0,
"recommend": 1,
"relId": 500005332338,
"relObjectId": "2002",
"relType": 1,
"rmhInfo": null,
"rmhPlatform": 0,
"sceneId": "54",
"shareInfo": null,
"slideShows": [
],
"sortValue": null,
"source": "侵华日军南京大屠杀遇难同胞纪念馆",
"subObjectType": "",
"subSceneId": "",
"tagIds": [
],
"tagWord": null,
"titleShow": null,
"titleShowPolicy": null,
"topicTemplate": null,
"traceId": "a20b09c58479b22f-500005332338_article_r",
"traceInfo": "",
"userInfo": null,
"videoInfo": null,
"visitorComment": 1,
"voiceInfo": null
},
{
"activityExt": null,
"appStyle": "11",
"askInfo": null,
"axisColor": "",
"bestNoticer": null,
"bottomNavId": null,
"cardItemId": "",
"channelId": 2037,
"commentInfo": null,
"corner": "",
"coverSize": "",
"coverType": null,
"coverUrl": "",
"expIds": "105",
"extra": "",
"fullColumnImgUrls": [
],
"hasMore": null,
"itemId": "500005320193_article_r",
"itemType": "",
"itemTypeCode": "article",
"keyArticle": 0,
"landscape": null,
"likeStyle": null,
"linkUrl": "",
"liveInfo": null,
"menuShow": 2,
"newTags": "",
"newsAuthor": "",
"newsSubTitle": "",
"newsSummary": "",
"newsTitle": "高能级科创平台如何赋能衢州高质量发展?这些成果令人瞩目",
"newsTitleColor": "",
"objectId": "30044430493",
"objectLevel": "",
"objectType": "8",
"openComment": null,
"openLikes": null,
"pageId": "",
"photoNum": null,
"position": null,
"productNum": null,
"publishTime": "1713339049000",
"pushTime": null,
"pushUnqueId": null,
"readFlag": 0,
"recommend": 1,
"relId": 500005320193,
"relObjectId": "2037",
"relType": 1,
"rmhInfo": null,
"rmhPlatform": 0,
"sceneId": "54",
"shareInfo": null,
"slideShows": [
],
"sortValue": null,
"source": "人民日报客户端浙江频道",
"subObjectType": "",
"subSceneId": "",
"tagIds": [
],
"tagWord": null,
"titleShow": null,
"titleShowPolicy": null,
"topicTemplate": null,
"traceId": "a20b09c58479b22f-500005320193_article_r",
"traceInfo": "",
"userInfo": null,
"videoInfo": null,
"visitorComment": 1,
"voiceInfo": null
},
{
"activityExt": null,
"appStyle": "13",
"askInfo": null,
"axisColor": "",
"bestNoticer": null,
"bottomNavId": null,
"cardItemId": "",
"channelId": 2037,
"commentInfo": null,
"corner": "",
"coverSize": "600*400",
"coverType": 1,
"coverUrl": "https://rmrbcmsonline.peopleapp.com/upload/ueditor/image/20240417/a_965028022405033985.png?x-oss-process=image/resize,m_fill,h_160,w_240/quality,q_90",
"expIds": "105",
"extra": "",
"fullColumnImgUrls": [
{
"format": null,
"fullUrl": "",
"height": 400,
"landscape": 1,
"size": 1,
"url": "https://rmrbcmsonline.peopleapp.com/upload/ueditor/image/20240417/a_965028022405033985.png?x-oss-process=image/resize,m_fill,h_160,w_240/quality,q_90",
"weight": 600
}
],
"hasMore": null,
"itemId": "500005318711_article_r",
"itemType": "",
"itemTypeCode": "article",
"keyArticle": 0,
"landscape": null,
"likeStyle": null,
"linkUrl": "",
"liveInfo": null,
"menuShow": 2,
"newTags": "",
"newsAuthor": "",
"newsSubTitle": "",
"newsSummary": "",
"newsTitle": "增长缘何“超预期”?三个维度读懂",
"newsTitleColor": "",
"objectId": "30044422916",
"objectLevel": "",
"objectType": "8",
"openComment": null,
"openLikes": null,
"pageId": "",
"photoNum": null,
"position": null,
"productNum": null,
"publishTime": "1713319371000",
"pushTime": null,
"pushUnqueId": null,
"readFlag": 0,
"recommend": 1,
"relId": 500005318711,
"relObjectId": "2037",
"relType": 1,
"rmhInfo": null,
"rmhPlatform": 0,
"sceneId": "54",
"shareInfo": null,
"slideShows": [
],
"sortValue": null,
"source": "央视新闻客户端",
"subObjectType": "",
"subSceneId": "",
"tagIds": [
],
"tagWord": null,
"titleShow": null,
"titleShowPolicy": null,
"topicTemplate": null,
"traceId": "a20b09c58479b22f-500005318711_article_r",
"traceInfo": "",
"userInfo": null,
"videoInfo": null,
"visitorComment": 1,
"voiceInfo": null
}
],
"message": "Success",
"meta": null,
"requestId": "",
"success": true,
"timestamp": 1713752234695
}
\ No newline at end of file
... ...