zhenghy
Showing 67 changed files with 2473 additions and 383 deletions
... ... @@ -11,8 +11,13 @@ export class SpConstants{
static USER_TEMP_TOKEN="tempToken"
static USER_PHONE = "user_phone"
//协议相关
static USER_PROTOCOL = "user_protocol" //用户协议
static PRIVATE_PROTOCOL = "private_protocol" //隐私协议
static NET_SERVICE_PROTOCOL = "user_protocol" //人民日报客户端网络服务使用协议
static PRIVATE_PROTOCOL = "private_protocol" //人民日报客户端用户隐私协议
static LOGOUT_PROTOCOL = "logout_protocol" //人民日报客户端app注销协议
static MESSAGE_BOARD_USER_PROTOCOL = "message_board_user_protocol" //"留言板-用户协议"
static MESSAGE_BOARD_NOTICE_PROTOCOL = "message_board_notice_protocol" //留言板-留言须知
static MESSAGE_BOARD_QUESTION_PROTOCOL = "message_board_question_protocol" //"留言板-发布提问规定""
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 视频开关
... ...
import { Action } from './Action';
interface dataObject {
webViewHeight?: string
dataJson?: string
}
/**
* 消息Message
... ...
... ... @@ -218,6 +218,11 @@ export class HttpUrlUtils {
*/
static readonly SEARCH_RESULT_COUNT_DATA_PATH: string = "/api/rmrb-search-api/zh/c/count?keyword=";
/**
* 搜索结果 显示list 详情
*/
static readonly SEARCH_RESULT_LIST_DATA_PATH: string = "/api/rmrb-search-api/zh/c/search";
/**
* 早晚报列表
* 根据页面id获取页面楼层列表
* https://pdapis.pdnews.cn/api/rmrb-bff-display-zh/display/zh/c/pageInfo?pageId=28927
... ... @@ -498,13 +503,14 @@ export class HttpUrlUtils {
/*优质评论页*/
static getQualityCommentUrl() {
let url = HttpUrlUtils._hostUrl + "api/rmrb-comment/comment/zh/c/highQuality"
let url = HttpUrlUtils._hostUrl + "/api/rmrb-comment/comment/zh/c/highQuality";
return url
}
/*获取详情页评论列表*/
static getContentCommentListDataUrl() {
let url = HttpUrlUtils._hostUrl + "api/rmrb-comment/comment/zh/c/contentCommentList"
let url = HttpUrlUtils._hostUrl + "/api/rmrb-comment/comment/zh/c/contentCommentList"
return url
}
... ... @@ -521,6 +527,12 @@ export class HttpUrlUtils {
return url;
}
//获取用户安全页信息
static querySecurity() {
let url = HttpUrlUtils._hostUrl + "/api/rmrb-user-center/user/zh/c/security/query";
return url;
}
static getAppointmentListDataUrl() {
let url = HttpUrlUtils._hostUrl + HttpUrlUtils.APPOINTMENT_LIST_DATA_PATH
return url
... ... @@ -646,6 +658,16 @@ export class HttpUrlUtils {
return url
}
static getSearchResultListDataUrl() {
let url = HttpUrlUtils._hostUrl + HttpUrlUtils.SEARCH_RESULT_LIST_DATA_PATH
return url
}
static getInteractListDataUrl() {
let url = HttpUrlUtils._hostUrl + HttpUrlUtils.INTERACT_DATA_PATH
return url
}
// static getYcgCommonHeaders(): HashMap<string, string> {
// let headers: HashMap<string, string> = new HashMap<string, string>()
//
... ...
... ... @@ -8,6 +8,8 @@ export class H5CallNativeType {
static jsCall_getAppPublicInfo = 'jsCall_getAppPublicInfo'
static jsCall_getArticleDetailBussinessData = 'jsCall_getArticleDetailBussinessData'
static jsCall_callAppService = 'jsCall_callAppService'
static jsCall_appInnerLinkMethod = 'jsCall_appInnerLinkMethod'
static jsCall_receiveH5Data = 'jsCall_receiveH5Data'
// TODO 业务自行新增类型、自行在JsBridgeBiz#performJSCallNative里添加接收分支处理。
static {
... ... @@ -15,6 +17,8 @@ export class H5CallNativeType {
H5CallNativeType.JsCallTypeList.push(H5CallNativeType.jsCall_getAppPublicInfo)
H5CallNativeType.JsCallTypeList.push(H5CallNativeType.jsCall_getArticleDetailBussinessData)
H5CallNativeType.JsCallTypeList.push(H5CallNativeType.jsCall_callAppService)
H5CallNativeType.JsCallTypeList.push(H5CallNativeType.jsCall_appInnerLinkMethod)
H5CallNativeType.JsCallTypeList.push(H5CallNativeType.jsCall_receiveH5Data)
}
}
... ...
... ... @@ -2,6 +2,9 @@ import { Callback, BridgeWebViewControl } from 'wdJsBridge';
import { Message } from 'wdJsBridge/src/main/ets/bean/Message';
import { Logger, StringUtils, } from 'wdKit';
import { H5CallNativeType } from './H5CallNativeType';
import { ContentDTO } from 'wdBean';
//TODO 这里引用了 features模块,是否考虑将跳转抽到公共模块
import { ProcessUtils } from '../../../../../../features/wdComponent/src/main/ets/utils/ProcessUtils';
const TAG = 'JsBridgeBiz'
... ... @@ -11,7 +14,7 @@ const TAG = 'JsBridgeBiz'
* @param call
*/
export function performJSCallNative(data: Message, call: Callback) {
Logger.debug(TAG, 'performJSCallNative handlerName: ' + data.handlerName + ', data: ' + data.data)
Logger.debug(TAG, 'performJSCallNative handlerName: ' + data.handlerName + ', data: ' + JSON.stringify(data.data))
switch (data.handlerName) {
case H5CallNativeType.jsCall_currentPageOperate:
break;
... ... @@ -23,6 +26,9 @@ export function performJSCallNative(data: Message, call: Callback) {
break;
case H5CallNativeType.jsCall_callAppService:
break;
case H5CallNativeType.jsCall_receiveH5Data:
handleH5Data(JSON.parse(data?.data?.dataJson || '{}'))
break;
case 'changeNativeMessage':
call("this is change Web Message")
break;
... ... @@ -50,4 +56,7 @@ function getAppPublicInfo(): string {
return result;
}
function handleH5Data(content:ContentDTO) {
ProcessUtils.processPage(content)
}
... ...
import router from '@ohos.router';
import { Action } from 'wdBean';
import { ConfigConstants } from 'wdConstant';
import { Logger } from 'wdKit';
import { BridgeHandler, BridgeUtil, BridgeWebViewControl, Callback } from 'wdJsBridge';
import { BridgeUtil, BridgeWebViewControl, Callback } from 'wdJsBridge';
import { Logger } from 'wdKit/Index';
import { performJSCallNative } from './JsBridgeBiz';
import { setDefaultNativeWebSettings } from './WebComponentUtil';
import { Message } from 'wdJsBridge/src/main/ets/bean/Message';
import { H5CallNativeType } from './H5CallNativeType';
import { Message } from 'wdJsBridge/src/main/ets/bean/Message';
const TAG = 'WdWebComponent';
const TAG = 'WdWebLocalComponent';
@Component
export struct WdWebComponent {
private webviewControl: BridgeWebViewControl = new BridgeWebViewControl()
//TODO 默认网页
webUrl: string | Resource = ConfigConstants.DETAIL_URL
/**
* 对外暴露webview的回调,能力
*/
onPageBegin: (url?: string) => void = () => {
}
onPageEnd: (url?: string) => void = () => {
}
onLoadIntercept: (url?: string) => boolean = () => {
return false
}
onHttpErrorReceive: (url?: string) => boolean = () => {
return false
}
webviewControl: BridgeWebViewControl = new BridgeWebViewControl()
@Prop backVisibility: boolean = false
@Prop webUrl: string = ''
@Prop @Watch('onReloadStateChanged') reload: number = 0
/**
* 默认【CallNative】逻辑处理
*/
private defaultPerformJSCallNative: (data: Message, f: Callback) => void = (data: Message, f: Callback) => {
performJSCallNative(data, f)
}
/**
* jsBridge的处理
*/
handleInfo: [string, BridgeHandler][] = []
backVisibility: boolean = false
defaultRegisterHandler(): void {
this.webviewControl.registerHandler("CallNative", {
handle: (data: Message, f: Callback) => {
this.defaultPerformJSCallNative(data, f)
}
});
}
build() {
Column() {
... ... @@ -72,21 +36,13 @@ export struct WdWebComponent {
.zoomAccess(false)
.horizontalScrollBarAccess(false)
.verticalScrollBarAccess(false)
.onHttpErrorReceive((event) => {
//TODO 页面加载不成功的时候处理
Logger.info(TAG, 'onHttpErrorReceive event.request.getRequestUrl:' + event?.request.getRequestUrl());
Logger.info(TAG, 'onHttpErrorReceive event.response.getResponseCode:' + event?.response.getResponseCode());
.onPageBegin((event) => {
console.log(this.webUrl,"yzl")
this.onPageBegin(event?.url);
})
.onPageEnd((event) => {
this.onPageEnd(event?.url)
})
.onPageBegin((event) => {
this.onPageBegin(event?.url);
this.registerHandlers();
setTimeout(() => {
BridgeUtil.webViewLoadLocalJs(getContext(this), this.webviewControl)
}, 200)
})
.onLoadIntercept((event) => {
let url: string = event.data.getRequestUrl().toString()
url = url.replace("%(?![0-9a-fA-F]{2})", "%25")
... ... @@ -97,30 +53,51 @@ export struct WdWebComponent {
return true
}
if (url.startsWith(BridgeUtil.YY_OVERRIDE_SCHEMA)) {
Logger.debug(TAG, 'flushMessageQueue');
this.webviewControl.flushMessageQueue()
return true
}
return this.onLoadIntercept(event.data.getRequestUrl().toString())
return this.onLoadIntercept(event.data.getRequestUrl().toString());
})
}
}
onReloadStateChanged() {
Logger.info(TAG, `onReloadStateChanged:::refresh, this.reload: ${this.reload}`);
if (this.reload > 0) {
this.webviewControl.refresh()
}
}
private registerHandlers(): void {
// 注册h5调用js相关
for (let i = 0; i < H5CallNativeType.JsCallTypeList.length; i++) {
let handleName = H5CallNativeType.JsCallTypeList[i];
console.log('handleName:', handleName)
let handle = (data: Message, f: Callback) => {
this.defaultPerformJSCallNative(data, f)
} ;
};
this.webviewControl.registerHandler(handleName, { handle: handle });
}
}
/**
* 默认【CallNative】逻辑处理
*/
private defaultPerformJSCallNative: (data: Message, f: Callback) => void = (data: Message, f: Callback) => {
performJSCallNative(data, f)
}
onPageBegin: (url?: string) => void = () => {
Logger.debug(TAG, 'onPageBegin');
this.registerHandlers();
BridgeUtil.webViewLoadLocalJs(getContext(this), this.webviewControl)
}
onPageEnd: (url?: string) => void = () => {
Logger.debug(TAG, 'onPageEnd');
}
onLoadIntercept: (url?: string) => boolean = () => {
Logger.debug(TAG, 'onLoadIntercept return false');
return false
}
onReloadStateChanged() {
Logger.info(TAG, `onReloadStateChanged:::refresh, this.reload: ${this.reload}`);
if (this.reload > 0) {
this.webviewControl.refresh()
}
}
}
... ...
... ... @@ -11,9 +11,9 @@ const TAG = 'WdWebLocalComponent';
@Component
export struct WdWebLocalComponent {
private webviewControl: BridgeWebViewControl = new BridgeWebViewControl()
backVisibility: boolean = false
webResource: Resource = {} as Resource
webviewControl: BridgeWebViewControl = new BridgeWebViewControl()
@Prop backVisibility: boolean = false
@Prop webResource: Resource = {} as Resource
@State webHeight : string = '100%'
build() {
... ... @@ -35,6 +35,10 @@ export struct WdWebLocalComponent {
.domStorageAccess(true)
.databaseAccess(true)
.javaScriptAccess(true)
.imageAccess(true)
.mixedMode(MixedMode.All)
.onlineImageAccess(true)
.enableNativeEmbedMode(true)
.height(this.webHeight === '100%' ? '100%' : Number(this.webHeight))
.onPageBegin((event) => {
this.onPageBegin(event?.url);
... ...
... ... @@ -70,6 +70,7 @@ export interface ContentDTO {
rmhInfo: RmhInfoDTO; // 人民号信息
photoNum: number;
corner: string;
rmhPlatform: number
rmhPlatform: number;
newTags: string;
isSearch?: boolean; // 是否是搜索的结果,区分搜索和主页的数据
}
\ No newline at end of file
... ...
... ... @@ -12,6 +12,7 @@ import { Card17Component } from './cardview/Card17Component';
import { Card15Component } from './cardview/Card15Component';
import { Card19Component } from './cardview/Card19Component';
import { Card20Component } from './cardview/Card20Component';
import { Card21Component } from './cardview/Card21Component';
/**
* card适配器,卡片样式汇总,依据ContentDTO#appStyle
... ... @@ -52,6 +53,8 @@ export struct CardParser {
Card19Component({ contentDTO })
} else if (contentDTO.appStyle === CompStyle.Card_20) {
Card20Component({ contentDTO })
} else if (contentDTO.appStyle === CompStyle.Card_21) {
Card21Component({ contentDTO })
}
else {
// todo:组件未实现 / Component Not Implemented
... ...
import { Action, ContentDetailDTO, ContentDTO, batchLikeAndCollectResult, InteractDataDTO, } from 'wdBean';
import { Action, ContentDetailDTO, } from 'wdBean';
import DetailViewModel from '../viewmodel/DetailViewModel';
import { OperRowListView } from './view/OperRowListView';
import { WdWebComponent } from 'wdWebComponent';
import router from '@ohos.router';
import { CommonConstants } from 'wdConstant'
import { BridgeWebViewControl } from 'wdJsBridge/Index';
const TAG = 'SpacialTopicPageComponent'
@Component
export struct SpacialTopicPageComponent {
webviewControl: BridgeWebViewControl = new BridgeWebViewControl()
scroller: Scroller = new Scroller();
action: Action = {} as Action
private webUrl?: string;
@State contentDetailData: ContentDetailDTO [] = [] as ContentDetailDTO []
@State recommendList: ContentDTO[] = []
@State newsStatusOfUser: batchLikeAndCollectResult | undefined = undefined // 点赞、收藏状态
@State interactData: InteractDataDTO = {} as InteractDataDTO
@State webUrl: string = '';
build() {
Column() {
Stack({ alignContent: Alignment.Bottom }) {
Column() {
WdWebComponent({
webviewControl: this.webviewControl,
webUrl: this.webUrl,
backVisibility: false
backVisibility: false,
})
}
.padding({bottom:56})
.padding({ bottom: 56 })
.width(CommonConstants.FULL_WIDTH)
.height(CommonConstants.FULL_HEIGHT)
... ... @@ -72,36 +69,11 @@ export struct SpacialTopicPageComponent {
.backgroundColor(Color.White)
}
// private async getDetail() {
// let contentId: string = ''
// let relId: string = ''
// let relType: string = ''
// if (this.action && this.action.params) {
// if (this.action.params.contentID) {
// contentId = this.action.params.contentID;
// }
// if (this.action && this.action.params && this.action.params.extra) {
// if (this.action.params.extra.relId) {
// relId = this.action.params.extra.relId;
// }
// if (this.action.params.extra.relType) {
// relType = this.action.params.extra.relType
// }
//
// }
// let detailBeans = await DetailViewModel.getDetailPageData(relId, contentId, relType)
// if (detailBeans && detailBeans.length > 0) {
// this.contentDetailData = detailBeans;
// }
// }
// }
aboutToAppear() {
let action: Action = router.getParams() as Action
if (action) {
this.webUrl = action.params?.url
this.webUrl = action.params?.url || ''
}
// this.getDetail()
}
aboutToDisappear() {
... ...
... ... @@ -10,56 +10,60 @@ import { DateTimeUtils } from 'wdKit/Index'
@Component
export struct CardMediaInfo {
@State contentDTO: ContentDTO = {} as ContentDTO // 如果有duraion,代表点播,显示时长;如果不传或者传0,显示直播中
// objectType 0:不跳转 1:点播,2:直播,3:活动,4:广告,5:专题,6:链接,7:榜单,8:图文,9:组图,10:H5新闻,11:频道,12:组件,13:音频,
// 14动态图文,15动态视频16问政;100人民号,101标签
build() {
Row() {
if(this.contentDTO.objectType === '1' || this.contentDTO.objectType === '15' ) {
if (this.contentDTO.objectType === '1' || this.contentDTO.objectType === '15') {
// 点播、动态视频
Row(){
Image($r('app.media.videoTypeIcon'))
Row() {
Image($r('app.media.card_play'))
.mediaLogo()
Text(DateTimeUtils.getFormattedDuration(this.contentDTO.videoInfo.videoDuration * 1000))
.mediaText()
}
.backgroundColor('#4d000000')
.borderRadius($r('app.float.button_border_radius'))
} else if(this.contentDTO.objectType === '2') {
} else if (this.contentDTO.objectType === '2') {
// liveInfo.liveState 直播新闻-直播状态 wait待开播running直播中end已结束cancel已取消paused暂停
// 显示直播信息
Row(){
if(this.contentDTO.liveInfo.liveState === 'running') {
Image($r('app.media.icon_live'))
Row() {
if(this.contentDTO.liveInfo.liveState === 'wait') {
Image($r('app.media.card_wait'))
.mediaLogo()
Text('预约')
.mediaText()
} else if (this.contentDTO.liveInfo.liveState === 'running') {
Image($r('app.media.card_live'))
.mediaLogo()
Text('直播中')
.mediaText()
} else if(this.contentDTO.liveInfo.liveState === 'end'){
Image($r('app.media.videoTypeIcon'))
} else if (this.contentDTO.liveInfo.liveState === 'end' && this.contentDTO.liveInfo.replayUri) {
Image($r('app.media.card_play'))
.mediaLogo()
Text('回看')
.mediaText()
} else if(this.contentDTO.liveInfo.liveState === 'end' && this.contentDTO.liveInfo
.replayUri) {
// Image($r('app.media.card_live'))
// .mediaLogo()
Text('直播结束')
.mediaText()
}
}
.backgroundColor('#4d000000')
.borderRadius($r('app.float.button_border_radius'))
} else if(this.contentDTO.objectType === '9') {
} else if (this.contentDTO.objectType === '9') {
// 显示组图;图片数量
Row(){
Image($r('app.media.album_card_shape'))
Row() {
Image($r('app.media.card_image'))
.mediaLogo()
Text(`${this.contentDTO.photoNum}`)
.mediaText()
.width(20)
}
.backgroundColor('#4d000000')
.borderRadius($r('app.float.button_border_radius'))
} else if(this.contentDTO.objectType === '13') {
} else if (this.contentDTO.objectType === '13') {
// 显示音频信息
Row(){
Image($r('app.media.broadcast_listen'))
.height(14)
.borderRadius($r('app.float.button_border_radius'))
Row() {
Image($r('app.media.card_audio'))
.mediaLogo()
Text(DateTimeUtils.getFormattedDuration(this.contentDTO.voiceInfo.voiceDuration * 1000))
.mediaText()
}
... ... @@ -68,18 +72,27 @@ export struct CardMediaInfo {
.margin(6)
}
@Styles mediaLogo() {
.width(22)
.height(18)
.borderRadius($r('app.float.button_border_radius'))
@Styles
mediaLogo() {
.width(14)
.height(14)
.margin({ right: 3 })
.shadow({
radius: 2,
color: 'rgba(0,0,0,0.3)',
offsetY: 2
})
}
}
@Extend(Text) function mediaText() {
@Extend(Text)
function mediaText() {
.fontColor($r('app.color.color_fff'))
.fontSize($r('app.float.font_size_12'))
.width(40)
.height(18)
.textAlign(TextAlign.Center)
.margin({ left: -3 })
.fontSize($r('app.float.font_size_14'))
.lineHeight(18)
.textShadow({
radius: 2,
color: 'rgba(0,0,0,0.3)',
offsetY: 2
})
}
\ No newline at end of file
... ...
... ... @@ -7,10 +7,11 @@ export struct CardSourceInfo {
@State contentDTO: ContentDTO = {} as ContentDTO;
build() {
Flex() {
if(this.contentDTO.corner === '1') {
Text("锐评")
if(this.contentDTO.corner) {
Text(this.contentDTO.corner)
.fontSize($r("app.float.font_size_12"))
.fontColor($r("app.color.color_ED2800"))
.margin({right: 2})
}
if(this.contentDTO.rmhPlatform === 1) {
Text(this.contentDTO.rmhInfo.rmhName)
... ... @@ -27,15 +28,23 @@ export struct CardSourceInfo {
.fontColor($r("app.color.color_B0B0B0"))
.maxLines(1)
.textOverflow({overflow: TextOverflow.Ellipsis})
}
// 新闻tab下的卡片,2天之前的不显示时间。但是如果是搜索情况下展示的卡片,显示时间
if(this.contentDTO.isSearch || !this.contentDTO.isSearch && DateTimeUtils.getCommentTime
(Number
.parseFloat(this
.contentDTO.publishTime))
.indexOf
('-') === -1) {
Image($r("app.media.point"))
.width(16)
.height(16)
Text(DateTimeUtils.getCommentTime(Number.parseFloat(this.contentDTO.publishTime)))
.fontSize($r("app.float.font_size_12"))
.fontColor($r("app.color.color_B0B0B0"))
.margin({ right: 6 })
.flexShrink(0)
}
Text(DateTimeUtils.getCommentTime(Number.parseFloat(this.contentDTO.publishTime)))
.fontSize($r("app.float.font_size_12"))
.fontColor($r("app.color.color_B0B0B0"))
.margin({ right: 6 })
.flexShrink(0)
if(this.contentDTO?.interactData?.commentNum) {
Text(`${this.contentDTO.interactData.commentNum}评`)
.fontSize($r("app.float.font_size_12"))
... ...
... ... @@ -2,7 +2,8 @@ import { ContentDTO, slideShows } from 'wdBean';
import { CommonConstants } from 'wdConstant'
import { DateTimeUtils } from 'wdKit';
import { ProcessUtils } from '../../utils/ProcessUtils';
import { CardSourceInfo } from '../cardCommon/CardSourceInfo'
import { CardMediaInfo } from '../cardCommon/CardMediaInfo'
/**
* 大专题卡--CompStyle: 10
... ... @@ -76,10 +77,10 @@ export struct Card10Component {
}
.width(CommonConstants.FULL_WIDTH)
.padding({
top: 14,
left: 16,
right: 16,
bottom: 14
left: $r('app.float.card_comp_pagePadding_lf'),
right: $r('app.float.card_comp_pagePadding_lf'),
top: $r('app.float.card_comp_pagePadding_tb'),
bottom: $r('app.float.card_comp_pagePadding_tb')
})
.backgroundColor($r("app.color.white"))
.margin({ bottom: 8 })
... ... @@ -95,25 +96,14 @@ export struct Card10Component {
.fontColor($r('app.color.color_222222'))
.maxLines(2)
.textOverflow({ overflow: TextOverflow.Ellipsis })
Row() {
// 展示发稿人
if (item.source) {
Text(item.source)
.fontSize($r('app.float.font_size_12'))
.fontColor($r('app.color.color_B0B0B0'))
.textOverflow({ overflow: TextOverflow.Ellipsis })
.maxLines(1)
.width(item.source.length > 10 ? '60%' : '')
Image($r('app.media.point'))
.width(16)
.height(16)
CardSourceInfo(
{
contentDTO: {
publishTime: item.publishTime || '',
source: item.source || ''
} as ContentDTO
}
Text(DateTimeUtils.getCommentTime(Number.parseFloat(String(item.publishTime))))
.fontSize($r("app.float.font_size_12"))
.fontColor($r("app.color.color_B0B0B0"))
}
.margin({ top: 12 })
)
}
.layoutWeight(1)
.alignItems(HorizontalAlign.Start)
... ...
... ... @@ -3,46 +3,45 @@ import { RmhTitle } from '../cardCommon/RmhTitle'
import { CardMediaInfo } from '../cardCommon/CardMediaInfo'
import { CommonConstants } from 'wdConstant/Index';
const TAG = 'Card12Component';
const TAG = 'Card14Component';
/**
* 人民号-动态---12:人民号无图卡;
* 人民号-动态---14:人民号单图卡;
*/
@Entry
@Component
export struct Card12Component {
export struct Card14Component {
@State contentDTO: ContentDTO = {
appStyle: '20',
coverType: 1,
coverUrl: 'https://rmrbcmsonline.peopleapp.com/upload/user_app/gov_dynamic/video/default_image/202105/rmrb_default_image_4GdWrgSw1622451312.jpg?x-oss-process=image/resize,m_fill,h_480,w_360/quality,q_90',
fullColumnImgUrls: [
{
landscape: 1,
size: 1,
url: 'https://rmrbcmsonline.peopleapp.com/upload/user_app/gov_dynamic/video/default_image/202105/rmrb_default_image_4GdWrgSw1622451312.jpg?x-oss-process=image/resize,m_fill,h_480,w_360/quality,q_90',
weight: 1600
}
],
newsTitle: '好玩!》10后少年音乐人10后少年音乐人10后少年音乐人10后少年音乐人10后少年音乐人10后少年音乐人10后少年音乐人10后少年音乐人10后少年音乐人10后少年音乐人10后少年音乐人10后少年音乐人10后少年音乐人10后少年音乐人10后少年音乐人10后少年音乐人10后少年音乐人10后少年音乐人10后少年音乐人10后少年音乐人',
rmhInfo: {
authIcon:
'https://cdnjdphoto.aikan.pdnews.cn/creator-category/icon/auth/yellow.png',
authTitle: '10后音乐人王烁然个人人民号',
authTitle2: '10后音乐人王烁然个人人民号',
banControl: 0,
cnIsAttention: 1,
rmhDesc: '10后少年音乐人10后少年音乐人10后少年音乐人10后少年音乐人10后少年音乐人',
rmhHeadUrl: 'https://cdnjdphoto.aikan.pdnews.cn/image/creator/rmh/20221031/3d3419e86a.jpeg?x-oss-process=image/resize,l_100/auto-orient,1/quality,q_90/format,jpg',
rmhName: '王烁然',
userId: '522435359667845',
userType: '2'
},
objectType: '1',
videoInfo: {
firstFrameImageUri: '',
videoDuration: 37,
videoUrl: 'https://rmrbcmsonline.peopleapp.com/upload/user_app/gov_dynamic/video/mp4/202105/rmrb_GSNARt6P1622451310.mp4'
}
// appStyle: '20',
// coverType: 1,
// coverUrl: 'https://rmrbcmsonline.peopleapp.com/upload/user_app/gov_dynamic/video/default_image/202105/rmrb_default_image_4GdWrgSw1622451312.jpg?x-oss-process=image/resize,m_fill,h_480,w_360/quality,q_90',
// fullColumnImgUrls: [
// {
// landscape: 1,
// size: 1,
// url: 'https://rmrbcmsonline.peopleapp.com/upload/user_app/gov_dynamic/video/default_image/202105/rmrb_default_image_4GdWrgSw1622451312.jpg?x-oss-process=image/resize,m_fill,h_480,w_360/quality,q_90',
// weight: 1600
// }
// ],
// newsTitle: '好玩!》10后少年音乐人10后少年音乐人10后少年音乐人10后少年音乐人10后少年音乐人10后少年音乐人10后少年音乐人10后少年音乐人10后少年音乐人10后少年音乐人10后少年音乐人10后少年音乐人10后少年音乐人10后少年音乐人10后少年音乐人10后少年音乐人10后少年音乐人10后少年音乐人10后少年音乐人10后少年音乐人',
// rmhInfo: {
// authIcon:
// 'https://cdnjdphoto.aikan.pdnews.cn/creator-category/icon/auth/yellow.png',
// authTitle: '10后音乐人王烁然个人人民号',
// authTitle2: '10后音乐人王烁然个人人民号',
// banControl: 0,
// cnIsAttention: 1,
// rmhDesc: '10后少年音乐人10后少年音乐人10后少年音乐人10后少年音乐人10后少年音乐人',
// rmhHeadUrl: 'https://cdnjdphoto.aikan.pdnews.cn/image/creator/rmh/20221031/3d3419e86a.jpeg?x-oss-process=image/resize,l_100/auto-orient,1/quality,q_90/format,jpg',
// rmhName: '王烁然',
// userId: '522435359667845',
// userType: '2'
// },
// objectType: '1',
// videoInfo: {
// firstFrameImageUri: '',
// videoDuration: 37,
// videoUrl: 'https://rmrbcmsonline.peopleapp.com/upload/user_app/gov_dynamic/video/mp4/202105/rmrb_GSNARt6P1622451310.mp4'
// }
} as ContentDTO;
aboutToAppear(): void {
... ...
import { ContentDTO } from 'wdBean';
import { RmhTitle } from '../cardCommon/RmhTitle'
import { CardMediaInfo } from '../cardCommon/CardMediaInfo'
import { CommonConstants } from 'wdConstant/Index';
const TAG = 'Card16Component';
/**
* 人民号-动态---16:人民号三图卡;
*/
@Component
export struct Card16Component {
@State contentDTO: ContentDTO = {
appStyle: '20',
coverType: 1,
coverUrl: 'https://rmrbcmsonline.peopleapp.com/upload/user_app/gov_dynamic/video/default_image/202105/rmrb_default_image_4GdWrgSw1622451312.jpg?x-oss-process=image/resize,m_fill,h_480,w_360/quality,q_90;https://rmrbcmsonline.peopleapp.com/upload/user_app/gov_dynamic/video/default_image/202105/rmrb_default_image_4GdWrgSw1622451312.jpg?x-oss-process=image/resize,m_fill,h_480,w_360/quality,q_90;https://rmrbcmsonline.peopleapp.com/upload/user_app/gov_dynamic/video/default_image/202105/rmrb_default_image_4GdWrgSw1622451312.jpg?x-oss-process=image/resize,m_fill,h_480,w_360/quality,q_90',
fullColumnImgUrls: [
{
landscape: 1,
size: 1,
url: 'https://rmrbcmsonline.peopleapp.com/upload/user_app/gov_dynamic/video/default_image/202105/rmrb_default_image_4GdWrgSw1622451312.jpg?x-oss-process=image/resize,m_fill,h_480,w_360/quality,q_90',
weight: 1600
}
],
newsTitle: '好玩!》10后音乐人王烁然个人人民号10后音乐人王烁然个人人民号10后音乐人王烁然个人人民号10后音乐人王烁然个人人民号10后音乐人王烁然个人人民号10后音乐人王烁然个人人民号',
rmhInfo: {
authIcon:
'https://cdnjdphoto.aikan.pdnews.cn/creator-category/icon/auth/yellow.png',
authTitle: '10后音乐人王烁然个人人民号',
authTitle2: '10后音乐人王烁然个人人民号',
banControl: 0,
cnIsAttention: 1,
rmhDesc: '10后少年音乐人10后少年音乐人10后少年音乐人10后少年音乐人10后少年音乐人',
rmhHeadUrl: 'https://cdnjdphoto.aikan.pdnews.cn/image/creator/rmh/20221031/3d3419e86a.jpeg?x-oss-process=image/resize,l_100/auto-orient,1/quality,q_90/format,jpg',
rmhName: '王烁然',
userId: '522435359667845',
userType: '2'
},
objectType: '1',
videoInfo: {
firstFrameImageUri: '',
videoDuration: 37,
videoUrl: 'https://rmrbcmsonline.peopleapp.com/upload/user_app/gov_dynamic/video/mp4/202105/rmrb_GSNARt6P1622451310.mp4'
}
} as ContentDTO;
aboutToAppear(): void {
}
build() {
Column() {
// rmh信息
RmhTitle({ rmhInfo: this.contentDTO.rmhInfo })
// 标题
if (this.contentDTO.newsTitle) {
Text(this.contentDTO.newsTitle)
.fontSize($r('app.float.font_size_17'))
.fontColor($r('app.color.color_222222'))
.width(CommonConstants.FULL_WIDTH)
.textOverflowStyle(2)
.margin({ bottom: 8 })
.lineHeight(25)
}
if (this.contentDTO.coverUrl) {
Flex() {
ForEach(this.contentDTO.coverUrl?.split(';'), (item: string) => {
Image(item).flexBasis(113).height(75).margin({right: 2})
})
}
}
//TODO 底部的:分享、评论、点赞 功能;需要引用一个公共组件
}
.padding({
left: $r('app.float.card_comp_pagePadding_lf'),
right: $r('app.float.card_comp_pagePadding_lf'),
top: $r('app.float.card_comp_pagePadding_tb'),
bottom: $r('app.float.card_comp_pagePadding_tb')
})
}
}
interface radiusType {
topLeft: number | Resource;
topRight: number | Resource;
bottomLeft: number | Resource;
bottomRight: number | Resource;
}
@Component
struct createImg {
@Prop contentDTO: ContentDTO
build() {
GridRow() {
if (this.contentDTO.fullColumnImgUrls[0].landscape === 1) {
// 横屏
GridCol({
span: { xs: 12 }
}) {
Stack() {
Image(this.contentDTO.coverUrl)
.width(CommonConstants.FULL_WIDTH)
.aspectRatio(16 / 9)
.borderRadius($r('app.float.image_border_radius'))
CardMediaInfo({ contentDTO: this.contentDTO })
}
.align(Alignment.BottomEnd)
}
} else {
// 竖图显示,宽度占50%,高度自适应
GridCol({
span: { xs: 6 }
}) {
Stack() {
Image(this.contentDTO.coverUrl)
.width(CommonConstants.FULL_WIDTH)
.borderRadius($r('app.float.image_border_radius'))
CardMediaInfo({ contentDTO: this.contentDTO })
}
.align(Alignment.BottomEnd)
}
}
}
}
}
@Extend(Text)
function textOverflowStyle(maxLine: number) {
.maxLines(maxLine)
.textOverflow({ overflow: TextOverflow.Ellipsis })
}
\ No newline at end of file
... ...
... ... @@ -4,7 +4,7 @@ import { CommonConstants } from 'wdConstant/Index';
import { DateTimeUtils } from 'wdKit';
import { WDRouterRule } from 'wdRouter';
import { CardMediaInfo } from '../cardCommon/CardMediaInfo'
import { CardSourceInfo } from '../cardCommon/CardSourceInfo'
const TAG = 'Card17Component';
/**
... ... @@ -81,25 +81,8 @@ export struct Card17Component {
};
WDRouterRule.jumpWithAction(taskAction)
})
Row() {
if (this.contentDTO.source) {
Text(this.contentDTO.source)
.fontSize($r('app.float.font_size_13'))
.fontColor($r('app.color.color_B0B0B0'))
Image($r('app.media.point'))
.width(16)
.height(16)
}
if (this.contentDTO.publishTime && this.contentDTO.publishTime.length === 13) {
Text(DateTimeUtils.getCommentTime(Number.parseFloat(this.contentDTO.publishTime)))
.fontSize($r('app.float.font_size_13'))
.fontColor($r('app.color.color_B0B0B0'))
}
}
.width(CommonConstants.FULL_WIDTH)
.height(16)
.id('label')
// 评论等信息
CardSourceInfo({ contentDTO: this.contentDTO })
}
.width(CommonConstants.FULL_WIDTH)
.padding({
... ...
... ... @@ -13,37 +13,37 @@ export struct Card19Component {
// coverUrl: 'https://rmrbcmsonline.peopleapp.com/upload/ueditor/image/20240323/a_955994160362418176.png?x-oss-process=image/resize,w_550/quality,q_90/format,jpg',
// fullColumnImgUrls: [
// {
// fullUrl: 'https://rmrbcmsonline.peopleapp.com/upload/ueditor/image/20240323/a_955994160362418176.png?x-oss-process=image/quality,q_90/auto-orient,1',
// height: 1500,
// landscape: 1,
// size: 1,
// url: 'https://rmrbcmsonline.peopleapp.com/upload/ueditor/image/20240323/a_955994160362418176.png?x-oss-process=image/resize,w_550/quality,q_90/format,jpg',
// weight: 2000
// },
// {
// fullUrl: 'https://rmrbcmsonline.peopleapp.com/upload/ueditor/image/20240323/a_955994155727712256.png?x-oss-process=image/quality,q_90/auto-orient,1',
// height: 1500,
// landscape: 1,
// size: 1,
// url: 'https://rmrbcmsonline.peopleapp.com/upload/ueditor/image/20240323/a_955994155727712256.png?x-oss-process=image/resize,w_550/quality,q_90/format,jpg',
// url: 'https://rmrbcmsonline.peopleapp.com/upload/ueditor/image/20240323/a_955994160362418176.png?x-oss-process=image/resize,w_550/quality,q_90/format,jpg',
// weight: 2000
// },
// {
// fullUrl: 'https://rmrbcmsonline.peopleapp.com/upload/ueditor/image/20240323/a_955994132109586432.png?x-oss-process=image/quality,q_90/auto-orient,1',
// height: 1280,
// landscape: 1,
// size: 1,
// url: 'https://rmrbcmsonline.peopleapp.com/upload/ueditor/image/20240323/a_955994132109586432.png?x-oss-process=image/resize,w_550/quality,q_90/format,jpg',
// weight: 1707
// },
// {
// fullUrl: 'https://rmrbcmsonline.peopleapp.com/upload/ueditor/image/20240323/a_955994132109586432.png?x-oss-process=image/quality,q_90/auto-orient,1',
// height: 1280,
// landscape: 1,
// size: 1,
// url: 'https://rmrbcmsonline.peopleapp.com/upload/ueditor/image/20240323/a_955994132109586432.png?x-oss-process=image/resize,w_550/quality,q_90/format,jpg',
// weight: 1707
// }
// {
// fullUrl: 'https://rmrbcmsonline.peopleapp.com/upload/ueditor/image/20240323/a_955994155727712256.png?x-oss-process=image/quality,q_90/auto-orient,1',
// height: 1500,
// landscape: 1,
// size: 1,
// url: 'https://rmrbcmsonline.peopleapp.com/upload/ueditor/image/20240323/a_955994155727712256.png?x-oss-process=image/resize,w_550/quality,q_90/format,jpg',
// weight: 2000
// },
// {
// fullUrl: 'https://rmrbcmsonline.peopleapp.com/upload/ueditor/image/20240323/a_955994132109586432.png?x-oss-process=image/quality,q_90/auto-orient,1',
// height: 1280,
// landscape: 1,
// size: 1,
// url: 'https://rmrbcmsonline.peopleapp.com/upload/ueditor/image/20240323/a_955994132109586432.png?x-oss-process=image/resize,w_550/quality,q_90/format,jpg',
// weight: 1707
// },
// {
// fullUrl: 'https://rmrbcmsonline.peopleapp.com/upload/ueditor/image/20240323/a_955994132109586432.png?x-oss-process=image/quality,q_90/auto-orient,1',
// height: 1280,
// landscape: 1,
// size: 1,
// url: 'https://rmrbcmsonline.peopleapp.com/upload/ueditor/image/20240323/a_955994132109586432.png?x-oss-process=image/resize,w_550/quality,q_90/format,jpg',
// weight: 1707
// }
// ],
// newsSummary: '#平安建设双提升#【进工地,送安全】3月21日下午,@合肥交警 包河大队走进辖区建筑工地为驾驶员、安全员们开展春季交通安全主题宣传活动。活动中,交警结合涉工程运输车、渣土车交通事故案例,详细讲解行驶注意事项,并普及了“一盔一带”“右转必停”等安全常识,要求驾驶员牢固树立交通安全意识,自觉遵守交通法律法规,确保出行安全。',
// newsTitle: '#平安建设双提升#【进工地,送安全】3月21日下午,@合肥交警 包河大队走进辖区建筑工地为驾驶员、安全员们开展春季交通安全主题宣传活动。活动中,交警结合涉工程运输车、渣土车交通事故案例,详细讲解行驶注意事项,并普及了“一盔一带”“右转必停”等安全常识,要求驾驶员牢固树立交通安全意识,自觉遵守交通法律法规,确保出行安全。',
... ... @@ -107,6 +107,8 @@ interface radiusType {
@Component
struct createImg {
@Prop fullColumnImgUrls: FullColumnImgUrlDTO[]
@State picWidth: number = 0;
@State picHeight: number = 0;
aboutToAppear(): void {
if(this.fullColumnImgUrls.length === 4) { // 为了使用栅格布局以便于占用三分之二的宽度,加一个占位
this.fullColumnImgUrls.splice(2,0, {
... ... @@ -137,18 +139,77 @@ struct createImg {
return radius
}
getPicType(){
if (this.picWidth && this.picWidth) {
if (this.picWidth / this.picHeight > 343/172) {
return 1; //横长图
} else if (this.picHeight / this.picWidth > 305/228) {
return 2; //竖长图
} else {
return 3
}
} else {
return 3; //普通图
}
}
build() {
GridRow({
gutter: { x: 2, y: 2 }
}) {
ForEach(this.fullColumnImgUrls, (item: FullColumnImgUrlDTO, index: number) => {
if (this.fullColumnImgUrls.length === 1) {
GridCol({
span: { xs: 8 }
}) {
Image(item.fullUrl)
.width('100%')
.borderRadius(this.caclImageRadius(index))
if (this.getPicType() !== 3) {
GridCol({
span: this.getPicType() === 1 ? 12 : 8
}){
Stack({
alignContent: Alignment.BottomEnd
}) {
if (this.getPicType() === 1) {
Image(item.fullUrl)
.width('100%')
.height(172)
.autoResize(true)
.borderRadius(this.caclImageRadius(index))
} else if (this.getPicType() === 2) {
Image(item.fullUrl)
.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})
}
}
} else {
GridCol({
span: { xs: 8 }
}) {
Image(item.fullUrl)
.width('100%')
.borderRadius(this.caclImageRadius(index))
.autoResize(true)
.opacity(!this.picWidth && !this.picHeight ? 0 : 1)
.onComplete(callback => {
this.picWidth = callback?.width || 0;
this.picHeight = callback?.height || 0;
})
}
}
} else if (this.fullColumnImgUrls.length === 4) {
GridCol({
... ...
import { ContentDTO } from 'wdBean';
import { CommonConstants, CompStyle } from 'wdConstant';
import { ProcessUtils } from '../../utils/ProcessUtils';
import { RmhTitle } from '../cardCommon/RmhTitle'
import { CardMediaInfo } from '../cardCommon/CardMediaInfo'
const TAG: string = 'Card6Component-Card13Component';
/**
* 卡片样式:"appStyle":"21" 小视频卡人民号
*/
@Component
export struct Card21Component {
@State contentDTO: ContentDTO = {} as ContentDTO;
build() {
Column() {
// 顶部 rmh信息
RmhTitle({ rmhInfo: this.contentDTO.rmhInfo })
// 中间内容
Grid() {
GridItem() {
Text(`${this.contentDTO.newsTitle}`)
.fontSize($r('app.float.selected_text_size'))
.fontColor($r('app.color.color_222222'))
.width(CommonConstants.FULL_WIDTH)
.maxLines(4)
.textOverflow({ overflow: TextOverflow.Ellipsis })
.padding({ right: 12 })
.lineHeight(26)
}
GridItem() {
Stack() {
Image(this.contentDTO.coverUrl)
.width(CommonConstants.FULL_WIDTH)
.borderRadius($r('app.float.image_border_radius'))
CardMediaInfo({ contentDTO: this.contentDTO })
}
.alignContent(Alignment.BottomEnd)
}
}
.columnsTemplate('2fr 1fr')
.maxCount(1)
//TODO 底部的:分享、评论、点赞 功能;需要引用一个公共组件
}
.onClick((event: ClickEvent) => {
ProcessUtils.processPage(this.contentDTO)
})
.padding({
left: $r('app.float.card_comp_pagePadding_lf'),
right: $r('app.float.card_comp_pagePadding_lf'),
top: $r('app.float.card_comp_pagePadding_tb'),
bottom: $r('app.float.card_comp_pagePadding_tb')
})
.width(CommonConstants.FULL_WIDTH)
}
}
\ No newline at end of file
... ...
import { ContentDTO } from 'wdBean';
import { CommonConstants, CompStyle } from 'wdConstant';
import { DateTimeUtils } from 'wdKit';
import { ProcessUtils } from '../../utils/ProcessUtils';
import { CardSourceInfo } from '../cardCommon/CardSourceInfo'
import { CardMediaInfo } from '../cardCommon/CardMediaInfo'
const TAG: string = 'Card6Component-Card13Component';
const FULL_PARENT: string = '100%';
/**
* 卡片样式:"appStyle":"6"以及13--- 小视频卡
... ... @@ -18,7 +16,17 @@ export struct Card6Component {
Row() {
Column() {
Column() {
Text(this.contentDTO.newsTitle)
// TODO 这个tag涉及样式问题。待优化。
// if (this.contentDTO.newTags) {
// Text(this.contentDTO.newTags)
// .backgroundColor($r('app.color.color_ED2800'))
// .borderRadius($r('app.float.button_border_radius'))
// .fontColor($r('app.color.color_fff'))
// .fontSize($r('app.float.font_size_12'))
// .padding(2)
// .margin({ right: 2 })
// }
Text(`${this.contentDTO.newsTitle}`)
.fontSize(16)
.fontWeight(FontWeight.Normal)
.maxLines(3)//
... ...
... ... @@ -104,7 +104,7 @@ export struct Card9Component {
Column() {
Row() {
// 标题
Image($r("app.media.point_icon"))
Image($r("app.media.timeline_rect"))
.width(9)
.height(9)
.margin({ right: 5 })
... ...
... ... @@ -157,11 +157,11 @@ struct CreatorItem {
.width(44)
.height(44)
if (this.isSelected) {
Image($r('app.media.MyCollection_selected_icon'))
Image($r('app.media.rmh_selected'))
.width(16)
.height(16)
} else {
Image($r('app.media.ic_succeed_refresh'))
Image($r('app.media.rmh_unselected'))
.width(16)
.height(16)
}
... ...
... ... @@ -36,6 +36,7 @@ export class commentListModel extends PageModel{
}
@Observed
export class commentItemModel {
authorLike: string = ''
avatarFrame: string = ''
... ... @@ -92,7 +93,7 @@ export class commentItemModel {
targetRelType:string = '';
targetType:string = '';
visitorComment:string = '';
shareInfo:commentItemShareInfoModel[] = []
shareInfo:commentItemShareInfoModel = new commentItemShareInfoModel;
// targetId:string = '';
// targetId:string = '';
// targetId:string = '';
... ...
import ArrayList from '@ohos.util.ArrayList'
import { ViewType } from 'wdConstant/Index';
import { LazyDataSource } from 'wdKit/Index';
import { DateTimeUtils, LazyDataSource } from 'wdKit/Index';
import PageModel from '../../../viewmodel/PageModel';
import { commentItemModel, commentListModel, WDPublicUserType } from '../model/CommentModel';
import commentViewModel from '../viewmodel/CommentViewModel'
... ... @@ -166,7 +166,9 @@ export struct CommentComponent {
// ///1小时~1天:x小时前
// ///1天~2天:1天前
// ///2天~:日期隐藏
Text(item.createTime)
Text(DateTimeUtils.getCommentTime(Number.parseFloat(item.createTime)))
.fontColor($r('app.color.color_B0B0B0'))
.fontSize(12)
... ...
import { ViewType } from 'wdConstant/Index'
import { LazyDataSource } from 'wdKit/Index'
import { DateTimeUtils, LazyDataSource, WindowModel } from 'wdKit/Index'
import { commentItemModel, commentListModel } from '../model/CommentModel'
import commentViewModel from '../viewmodel/CommentViewModel'
import { window } from '@kit.ArkUI'
const TAG = 'QualityCommentsComponent';
@Entry
@Preview
@Component
export struct QualityCommentsComponent {
bottomSafeHeight: string = AppStorage.get<number>('bottomSafeHeight') + 'px';
@State private browSingModel: commentListModel = new commentListModel()
isloading: boolean = false
lastWindowColor:string = '#ffffff'
currentWindowColor:string = '#FF4202'
@State allDatas: LazyDataSource<commentItemModel> = new LazyDataSource();
aboutToDisappear(): void {
const windowStage = WindowModel.shared.getWindowStage() as window.WindowStage
const windowClass: window.Window = windowStage.getMainWindowSync(); // 获取应用主窗口
windowClass.setWindowBackgroundColor(this.lastWindowColor)
windowClass.setWindowLayoutFullScreen(false)
// windowClass.setWindowSystemBarProperties({ statusBarColor: '#000' })
}
aboutToAppear(): void {
commentViewModel.fetchQualityCommentList('1').then((commentListModel)=>{
if (commentListModel && commentListModel.list && commentListModel.list.length > 0) {
commentListModel.hasMore = true;
this.browSingModel.viewType = ViewType.LOADED;
this.allDatas.push(...commentListModel.list)
if (commentListModel.list.length === this.browSingModel.pageSize) {
this.browSingModel.currentPage++;
this.browSingModel.hasMore = true;
} else {
this.browSingModel.hasMore = false;
}
} else {
this.browSingModel.viewType = ViewType.EMPTY;
}
this.fullScreen();
commentViewModel.fetchQualityCommentListLocal(getContext()).then(commentListModel => {
this.allDatas.push(...commentListModel.list)
})
// commentViewModel.fetchQualityCommentList('1').then((commentListModel) => {
// if (commentListModel && commentListModel.list && commentListModel.list.length > 0) {
// // commentListModel.hasMore = true;
// // this.browSingModel.viewType = ViewType.LOADED;
// this.allDatas.push(...commentListModel.list)
// // if (commentListModel.list.length === this.browSingModel.pageSize) {
// // this.browSingModel.currentPage++;
// // this.browSingModel.hasMore = true;
// // } else {
// // this.browSingModel.hasMore = false;
// // }
// } else {
// this.browSingModel.viewType = ViewType.EMPTY;
// }
// })
}
fullScreen() {
const windowStage = WindowModel.shared.getWindowStage() as window.WindowStage
const windowClass: window.Window = windowStage.getMainWindowSync(); // 获取应用主窗口
// windowClass.setWindowBackgroundColor(this.currentWindowColor)
windowClass.setWindowLayoutFullScreen(true)
// windowClass.setWindowSystemBarProperties({ statusBarColor: '#fff' })
// windowClass.setWindowLayoutFullScreen(true).then(() => {
// console.log(TAG + 'setWindowLayoutFullScreen');
// })
}
@Builder
titleHeader() {
Row() {
Image($r('app.media.comment_img_banner')).width('100%').aspectRatio(375 / 283);
}
}
build() {
Column() {
// this.titleHeader()
List({ space: 28 }) {
ListItemGroup({ header: this.titleHeader() })
LazyForEach(this.allDatas, (item: commentItemModel, index: number) => {
ListItem() {
QualityCommentItem({ item: item }).margin({ left: 12, right: 12 })
}
// .offset({
// y:-87
// })
})
}
// .contentStartOffset(- 87)
.edgeEffect(EdgeEffect.Spring)
.margin({bottom:this.bottomSafeHeight})
// .expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.BOTTOM])
}.backgroundColor(this.currentWindowColor).height('100%').width('100%')
}
}
@Component
struct QualityCommentItem {
@ObjectLink item: commentItemModel
build() {
Column() {
/*头像以及昵称*/
RelativeContainer() {
Image(this.item.fromUserHeader)
.width(50)
.height(50)
.borderRadius(25)
.borderWidth(2)
.borderColor(Color.White)
.id('image1')
.alignRules({
top: { anchor: "__container__", align: VerticalAlign.Top },
left: { anchor: "__container__", align: HorizontalAlign.Start }
})
.offset(
{
y: -16
}
)
Text(this.item.fromUserName)
.fontSize(14)
.fontColor('#222222')
.fontWeight(FontWeight.Medium)
.id('text1')
.alignRules({
bottom: { anchor: "image1", align: VerticalAlign.Bottom },
left: { anchor: "image1", align: HorizontalAlign.End }
})
.offset(
{
x: 6,
y: -6 - 16
}
)
}.height(42)
Column() {
/*评论内容*/
Text() {
ImageSpan($r('app.media.WDBestCommentTitleDotIcon'))
.width(12)
.height(12)
.objectFit(ImageFit.Fill)
.offset({
y: -6
})
Span(' ' + this.item.commentContent)
.fontSize(16)
.fontColor('#222222')
.fontWeight(FontWeight.Medium)
}.margin({ top: 10 })
/*分割线*/
Row() {
}.width('100%').margin({ top: 10, left: 0, right: 0 }).backgroundColor('#EDEDED').height(2.5);
/*文章或者评论*/
Row() {
Row() {
Image($r('app.media.comment_img_link')).width(16).height(16)
Text(this.item.shareInfo.shareTitle)
.fontSize(14)
.fontColor('#666666')
.margin({ left: 6, right: 12 })
.maxLines(1)
.textOverflow({ overflow: TextOverflow.Ellipsis })
}.height(40).layoutWeight(1)
Image($r('app.media.more')).width(12).height(12)
}.width('100%').height(40).justifyContent(FlexAlign.SpaceBetween)
}
.backgroundColor('#F9F9F9')
.width('100%')
.alignItems(HorizontalAlign.Start)
.borderRadius(4)
.padding({ left: 12, right: 12 })
/*时间 点赞评论*/
Row() {
Text(DateTimeUtils.getCommentTime(DateTimeUtils.getDateTimestamp(this.item.createTime))).fontSize(14).fontColor('#999999')
Row({space:16}){
Row(){
Image($r('app.media.comment_icon_pinglun')).width(16).height(16)
}
Row(){
//comment_like_select
Image($r(this.item.likeNum?'app.media.comment_like_select':'app.media.comment_like_normal')).width(16).height(16)
if (this.item.likeNum){Text(this.item.likeNum).fontColor(this.item.isLike?'#ED2800':'#999999').fontSize(14).margin({left:3})}
}
}
}.height(38).width('100%').justifyContent(FlexAlign.SpaceBetween)
}.backgroundColor('#FFFFFF').padding({ top: 0, left: 16, right: 16 }).borderRadius(4)
}
}
\ No newline at end of file
... ...
... ... @@ -32,7 +32,21 @@ class CommentViewModel {
return compRes.data
}
/*获取本地mock数据*/
async fetchQualityCommentListLocal(context: Context): Promise<commentListModel> {
Logger.info(TAG, `getBottomNavDataMock start`);
let compRes: ResponseDTO<commentListModel> | null = await ResourcesUtils.getResourcesJson<ResponseDTO<commentListModel>>(context,'qualityComment_local.json' );
if (!compRes || !compRes.data) {
Logger.info(TAG, `getAppointmentListDataLocal compRes is empty`);
return new commentListModel()
}
Logger.info(TAG, `getAppointmentListDataLocal getResourcesJsonSync compRes : ${JSON.stringify(compRes)}`);
return compRes.data
}
//qualityComment_local.json
fetchQualityCommentList(pageNum: string) {
let url = HttpUrlUtils.getQualityCommentUrl() + `?&pageSize=${10}&pageNum=${pageNum}`
let headers: HashMap<string, string> = HttpUrlUtils.getCommonHeaders();
... ...
... ... @@ -90,6 +90,7 @@ export struct OtherHomePageBottomCommentComponent{
MinePageDatasModel.getOtherCommentListData(object,getContext(this)).then((value)=>{
if (!this.data_comment || value.list.length == 0){
this.hasMore = false
this.isLoading = false
}else{
this.getCommentListStatus(value)
}
... ...
... ... @@ -84,9 +84,13 @@ struct EditUserInfoPage {
Blank()
Text(r.subTitle)
.textOverflow({overflow:TextOverflow.Ellipsis})
.maxLines(1)
.fontSize(16)
.fontColor(Color.Gray)
.padding({right:10})
.width('70%')
.textAlign(TextAlign.End)
Image($r('app.media.mine_user_edit'))
.width('12')
... ... @@ -130,10 +134,11 @@ struct EditUserInfoPage {
})
}else if(i === 5){
TextPickerDialog.show({
range:['女','男'],
range:['男','女'],
canLoop:false,
selected:0,
onAccept:(value:TextPickerResult) => {
this.currentUserInfo.userExtend.sex = value.index as number;
this.currentUserInfo.userExtend.sex = value.index == 0?1:0;
this.currentUserInfo.editDataType = WDEditDataModelType.WDEditDataModelType_sex
this.updateEditModel()
}
... ...
... ... @@ -128,7 +128,7 @@ export struct SearchComponent {
* @param content
*/
getSearchHistoryResData(content:string,index:number){
//删除单记录
//删除单记录
SearcherAboutDataModel.delSearchSingleHistoryData(index)
this.isClickedHistory = true
this.searchResData(content)
... ... @@ -149,33 +149,6 @@ export struct SearchComponent {
this.getSearchResultCountData()
}
getSearchResultCountData() {
SearcherAboutDataModel.getSearchResultCountData(encodeURI(this.searchText),getContext(this)).then((value) => {
if (value != null) {
this.count = []
if(value.allTotal!=0){
this.count.push("全部")
}
if(value.cmsTotal!=0){
this.count.push("精选")
}
if(value.rmhTotal!=0){
this.count.push("人民号")
}
if(value.videoTotal!=0){
this.count.push("视频")
}
if(value.activityTotal!=0){
this.count.push("活动")
}
}
}).catch((err: Error) => {
console.log(TAG, JSON.stringify(err))
})
}
/**
* 点击联想搜索列表回调
* @param content
... ... @@ -291,4 +264,30 @@ export struct SearchComponent {
.padding({ left: '31lpx' })
.alignItems(VerticalAlign.Center)
}
getSearchResultCountData() {
SearcherAboutDataModel.getSearchResultCountData(encodeURI(this.searchText),getContext(this)).then((value) => {
if (value != null) {
this.count = []
if(value.allTotal!=0){
this.count.push("全部")
}
if(value.cmsTotal!=0){
this.count.push("精选")
}
if(value.rmhTotal!=0){
this.count.push("人民号")
}
if(value.videoTotal!=0){
this.count.push("视频")
}
if(value.activityTotal!=0){
this.count.push("活动")
}
}
}).catch((err: Error) => {
console.log(TAG, JSON.stringify(err))
})
}
}
\ No newline at end of file
... ...
... ... @@ -20,7 +20,7 @@ export struct SearchResultComponent{
Tabs({ barPosition: BarPosition.Start, controller: this.controller }) {
ForEach(this.count, (item: string, index: number ) => {
TabContent(){
SearchResultContentComponent()
SearchResultContentComponent({keywords:this.searchText,searchType:item})
}.tabBar(this.TabBuilder(index,item))
}, (item: string, index: number) => index.toString())
}
... ...
import { ContentDTO,
contentListParams,
FullColumnImgUrlDTO, InteractDataDTO, RmhInfoDTO, VideoInfoDTO } from 'wdBean/Index'
import { LiveInfoDTO } from 'wdBean/src/main/ets/bean/detail/LiveInfoDTO'
import { VoiceInfoDTO } from 'wdBean/src/main/ets/bean/detail/VoiceInfoDTO'
import { LazyDataSource, StringUtils } from 'wdKit/Index'
import SearcherAboutDataModel from '../../model/SearcherAboutDataModel'
import { SearchResultContentData } from '../../viewmodel/SearchResultContentData'
import { SearchRmhDescription } from '../../viewmodel/SearchResultContentItem'
import { CardParser } from '../CardParser'
import { ListHasNoMoreDataUI } from '../reusable/ListHasNoMoreDataUI'
const TAG = "SearchResultContentComponent"
@Component
export struct SearchResultContentComponent{
@State keywords:string = ""
@State searchType:string = ""
@State data: LazyDataSource<ContentDTO> = new LazyDataSource();
@State data_rmh: SearchRmhDescription[] = []
@State count:number = 0;
@State isLoading:boolean = false
@State hasMore:boolean = true
curPageNum:number = 1;
aboutToAppear(): void {
if(this.searchType == "全部"){
this.searchType = "all"
}else if(this.searchType == "精选"){
this.searchType = "cms"
}else if(this.searchType == "人民号"){
this.searchType = "rmh"
}else if(this.searchType == "视频"){
this.searchType = "video"
}else if(this.searchType == "活动"){
this.searchType = "activity"
}
this.keywords = encodeURI(this.keywords)
this.getNewSearchResultData()
}
getNewSearchResultData(){
this.isLoading = true
if(this.hasMore){
SearcherAboutDataModel.getSearchResultListData("20",`${this.curPageNum}`,this.searchType,this.keywords,getContext(this)).then((value)=>{
if (!this.data || value.list.length == 0){
this.hasMore = false
this.isLoading = false
}else{
if(value.list[0].dataList!=null){
this.data_rmh = value.list[0].dataList
//TODO 查询创作者详情接口
}
this.getInteractData(value)
}
}).catch((err:Error)=>{
console.log(TAG,JSON.stringify(err))
this.isLoading = false
})
}
}
getInteractData(resultData:SearchResultContentData){
if(resultData.list[0].dataList!=null){
resultData.list.splice(0,1)
}
let data : contentListParams = {
contentList: []
}
resultData.list.forEach((item)=>{
data.contentList.push({
contentId: item.data.id + '',
contentType: Number.parseInt(item.data.type)
})
})
SearcherAboutDataModel.getInteractListData(data,getContext(this)).then((newValue)=>{
newValue.forEach((item)=>{
resultData.list.forEach((data)=>{
if (item.contentId == data.data.id) {
data.data.collectNum = item.collectNum+""
data.data.commentNum = item.commentNum+""
data.data.likeNum = item.likeNum+""
data.data.readNum = item.readNum+""
data.data.shareNum = item.shareNum+""
}
})
})
resultData.list.forEach((value)=>{
let photos:FullColumnImgUrlDTO[] = []
if(value.data.appStyle === 4){
value.data.appStyleImages.split("&&").forEach((value)=>{
photos.push({url:value} as FullColumnImgUrlDTO)
})
}
//TODO 48 个赋值
let contentDTO:ContentDTO = {
appStyle: value.data.appStyle + "",
cityCode: value.data.cityCode,
coverSize: "",
coverType: -1,
coverUrl: value.data.appStyleImages.split("&&")[0],
description: value.data.description,
districtCode: value.data.districtCode,
endTime: value.data.endTime,
hImageUrl: "",
heatValue: "",
innerUrl: "",
landscape: Number.parseInt(value.data.landscape),
// lengthTime:null,
linkUrl: value.data.linkUrl,
openLikes: Number.parseInt(value.data.openLikes),
openUrl: "",
pageId: value.data.pageId,
programAuth: "",
programId: "",
programName: "",
programSource: -1,
programType: -1,
provinceCode: value.data.provinceCode,
showTitleEd: value.data.showTitleEd,
showTitleIng: value.data.showTitleIng,
showTitleNo: value.data.showTitleNo,
startTime: value.data.startTime,
subType: "",
subtitle: "",
title: value.data.title,
vImageUrl: "",
screenType: "",
source: StringUtils.isEmpty(value.data.creatorName) ? value.data.sourceName : value.data.creatorName,
objectId: "",
objectType: value.data.type,
channelId: value.data.channelId,
relId: value.data.relId,
relType: value.data.relType,
newsTitle: value.data.titleLiteral,
publishTime: value.data.publishTime,
visitorComment: -1,
fullColumnImgUrls: photos,
newsSummary: "",
hasMore: -1,
slideShows: [],
voiceInfo: {} as VoiceInfoDTO,
tagWord: -1,
isSelect: true,
rmhInfo: {} as RmhInfoDTO,
photoNum: -1,
liveInfo: {} as LiveInfoDTO,
videoInfo: {
videoDuration: Number.parseInt(value.data.duration)
} as VideoInfoDTO,
interactData: {} as InteractDataDTO,
corner: '',
rmhPlatform: 0,
newTags: '',
isSearch: true
}
this.data.push(contentDTO)
})
this.data.notifyDataReload()
this.count = this.data.totalCount()
if (this.data.totalCount() < resultData.totalCount) {
this.curPageNum++
}else {
this.hasMore = false
}
this.isLoading = false
}).catch((err:Error)=>{
console.log(TAG,"请求失败")
this.isLoading = false
})
}
build() {
Column() {
if(this.count == 0){
ListHasNoMoreDataUI({style:2})
}else{
Column(){
if (this.data_rmh!=null && this.data_rmh.length > 0) {
//List
List() {
ForEach(this.data_rmh, (item: SearchRmhDescription, index: number) => {
ListItem() {
Column(){
Image($r('app.media.default_head'))
.width('84lpx')
.height('84lpx')
.margin({bottom:'15lpx'})
Text(item.creatorName)
.fontSize('20lpx')
}.alignItems(HorizontalAlign.Center)
}.onClick(()=>{
//TODO 跳转
})
.width('150lpx')
})
}
.cachedCount(6)
.edgeEffect(EdgeEffect.None)
.scrollBar(BarState.Off)
.listDirection(Axis.Horizontal)
.width('100%')
.height('150lpx')
.onReachEnd(()=>{
if(!this.isLoading){
//进入更多关注页
}
})
}
//List
List({ space: '6lpx' }) {
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')
}
}
}
.onClick(()=>{
//TODO 跳转
})
}, (item: ContentDTO, index: number) => index.toString())
//没有更多数据 显示提示
if(!this.hasMore){
ListItem(){
ListHasNoMoreDataUI()
}
}
}.cachedCount(6)
.edgeEffect(EdgeEffect.None)
.scrollBar(BarState.Off)
.margin({top:'23lpx',left:'23lpx',right:'23lpx'})
.layoutWeight(1)
.onReachEnd(()=>{
console.log(TAG,"触底了");
if(!this.isLoading){
//加载分页数据
this.getNewSearchResultData()
}
})
}
}
}
.backgroundColor($r('app.color.white'))
.height('100%')
.width('100%')
}
}
\ No newline at end of file
... ...
import { Params } from 'wdBean';
import { WDRouterPage, WDRouterRule } from 'wdRouter';
import featureAbility from '@ohos.ability.featureAbility';
import { EnvironmentCustomDialog } from './EnvironmentCustomDialog';
const TAG = 'AboutPageUI';
@Component
export struct AboutPageUI {
export struct AboutPageUI {
@State listData: Array<string | Array<string>> = ['隐私授权协议', '软件许可及用户协议'];
@State message: string = '京ICP备16066560号-6A Copyright © 人民日报客户端\nall rights reserved.'
@State version: string = '版本号:v'
clickTimes: number = 0
dialogController: CustomDialogController = new CustomDialogController({
builder: EnvironmentCustomDialog({
cancel: () => {
},
confirm: () => {
}
}),
customStyle: true,
alignment: DialogAlignment.Center
})
build() {
Navigation() {
... ... @@ -19,18 +30,24 @@ export struct AboutPageUI {
.title('关于')
}
aboutToAppear(){
aboutToAppear() {
let context = getContext();
context.getApplicationContext();
}
@Builder aboutUi() {
@Builder
aboutUi() {
Column() {
Image($r('app.media.setting_about_logo'))
.width('278lpx')
.height('154lpx')
.margin({top:'173lpx',bottom:'154lpx'})
.margin({ top: '173lpx', bottom: '154lpx' })
.onClick(() => {
this.clickTimes++
if (this.clickTimes > 2) {
this.dialogController.open()
}
})
// Row(){
//
// }.backgroundColor(Color.Yellow)
... ... @@ -44,19 +61,17 @@ export struct AboutPageUI {
// .height('97lpx')
List(){
ForEach(this.listData, (item:string, index : number) =>{
List() {
ForEach(this.listData, (item: string, index: number) => {
ListItem() {
this.getArrowCell(item, index)
}.onClick(() =>{
}.onClick(() => {
if (index == 0) {
let bean={contentId:"1",pageID:""} as Params
WDRouterRule.jumpWithPage(WDRouterPage.loginProtocolPage,bean)
}else{
let bean={contentId:"2",pageID:""} as Params
WDRouterRule.jumpWithPage(WDRouterPage.loginProtocolPage,bean)
let bean = { contentID: "2", pageID: "" } as Params
WDRouterRule.jumpWithPage(WDRouterPage.loginProtocolPage, bean)
} else {
let bean = { contentID: "1", pageID: "" } as Params
WDRouterRule.jumpWithPage(WDRouterPage.loginProtocolPage, bean)
}
})
})
... ... @@ -77,42 +92,39 @@ export struct AboutPageUI {
.fontSize('25lpx')
.textAlign(TextAlign.Center)
.fontColor($r("app.color.color_666666"))
.margin({bottom:'31lpx'})
.margin({ bottom: '31lpx' })
Text(this.message)
.fontSize('19lpx')
.textAlign(TextAlign.Center)
.fontColor($r("app.color.color_999999"))
.margin({bottom:'35lpx'})
.margin({ bottom: '35lpx' })
}
.width('100%')
.height('100%')
}
// 右文字+箭头cell
@Builder getArrowCell(item:string, index:number) {
Row() {
// 左侧标题
Text(`${item}`)
.fontColor('#666666')
.fontSize('31lpx')
Image($r('app.media.mine_user_arrow'))
.width('27lpx')
.height('27lpx')
.objectFit(ImageFit.Auto)
}
.alignItems(VerticalAlign.Center)
.justifyContent(FlexAlign.SpaceBetween)
.height('97lpx')
.width('100%')
.padding({left:'29lpx',right:'29lpx'})
@Builder
getArrowCell(item: string, index: number) {
Row() {
// 左侧标题
Text(`${item}`)
.fontColor('#666666')
.fontSize('31lpx')
Image($r('app.media.mine_user_arrow'))
.width('27lpx')
.height('27lpx')
.objectFit(ImageFit.Auto)
}
.alignItems(VerticalAlign.Center)
.justifyContent(FlexAlign.SpaceBetween)
.height('97lpx')
.width('100%')
.padding({ left: '29lpx', right: '29lpx' })
}
}
... ...
... ... @@ -17,6 +17,7 @@ import { Router } from '@ohos.arkui.UIContext';
import promptAction from '@ohos.promptAction';
import { LogoutViewModel } from '../../viewmodel/LogoutViewModel';
import { CustomLogoutDialog } from './CustomLogoutDialog';
import { emitter } from '@kit.BasicServicesKit';
export { SettingPasswordParams } from "wdLogin"
... ... @@ -41,9 +42,11 @@ export struct AccountAndSecurityLayout {
alignment: DialogAlignment.Center
})
aboutToAppear() {
// 获取设置页面数据
this.getAccountAndSecurityData()
this.addEmitEvent()
}
async getAccountAndSecurityData() {
... ... @@ -56,6 +59,28 @@ export struct AccountAndSecurityLayout {
}
addEmitEvent(){
// 定义一个eventId为1的事件
let event: emitter.InnerEvent = {
eventId: 10010
};
// 收到eventId为1的事件后执行该回调
let callback = (eventData: emitter.EventData): void => {
promptAction.showToast({
message: JSON.stringify(eventData)
});
if(eventData&&eventData.data){
this.listData[0].subTitle = eventData.data['content']
}
Logger.debug( 'event callback:' + JSON.stringify(eventData));
};
// 订阅eventId为1的事件
emitter.on(event, callback);
}
build() {
Column(){
if(this.isAccountPage){
... ... @@ -106,7 +131,8 @@ export struct AccountAndSecurityLayout {
ListItem() {
if (item.type == 0) {
Column() {
this.getArrowCell(item)
// this.getArrowCell(item)
AccountArrowCell({ item:item})
}.padding({ left: '27lpx' }).height('117lpx').justifyContent(FlexAlign.Center)
} else if (item.type == 1) {
Column() {
... ... @@ -285,7 +311,7 @@ export struct AccountAndSecurityLayout {
}.alignItems(VerticalAlign.Center)
Row() {
Text("登录")
Text("注销账户")
.borderRadius(4)
.fontColor(this.protocolState ? "#FFFFFFFF" : "#66FFFFFF")
.fontSize(18)
... ... @@ -404,4 +430,47 @@ export struct AccountAndSecurityLayout {
securityNum = phoneNum.replace(needSecurityString,'****')
return securityNum;
}
}
@Component
export struct AccountArrowCell{
@ObjectLink item: MineMainSettingFunctionItem
build() {
Column() {
Row() {
// 左侧logo和标题
Row() {
// 判断有没有图片
if (this.item.imgSrc) {
Image(this.item.imgSrc)
.height('38lpx')
.margin({ right: '5lpx' })
}
Text(`${this.item.title}`)
.margin({ top: '8lpx' })
.height('38lpx')
.fontColor('#333333')
.fontSize('29lpx')
}.width('60%')
// 右侧文案和右箭头
Row() {
Text(this.item.subTitle ? this.item.subTitle : '')
.fontColor('#999999')
.maxLines(1)
Image($r('app.media.mine_user_arrow'))
.width('27lpx')
.height('27lpx')
.objectFit(ImageFit.Auto)
Column().width('29lpx')
}.width('40%')
.margin({ right: '29lpx' })
.justifyContent(FlexAlign.End)
}
.alignItems(VerticalAlign.Center)
.justifyContent(FlexAlign.SpaceBetween)
}
.height('54lpx')
}
}
\ No newline at end of file
... ...
import { SPHelper } from 'wdKit/Index';
import { HttpUrlUtils } from 'wdNetwork/Index';
@CustomDialog
export struct EnvironmentCustomDialog {
currentEnvironment: string = HttpUrlUtils.HOST_PRODUCT;
controller: CustomDialogController
cancel: () => void = () => {
}
confirm: () => void = () => {
}
build() {
Column() {
Text("请选择环境")
.fontColor("#222222")
.fontSize(18)
.width("100%")
.fontWeight(FontWeight.Bold)
.textAlign(TextAlign.Center)
.margin({ top: 20 })
Row() {
Radio({ value: 'Radio1', group: 'radioGroup' })
.checked(true)
.height(20)
.width(20)
.onChange((isChecked: boolean) => {
if (isChecked) {
this.currentEnvironment = HttpUrlUtils.HOST_SIT;
}
})
Text('切换到SIT(测试)环境,重启应用生效')
.fontSize(14)
}
.justifyContent(FlexAlign.Start)
.width('90%')
Row() {
Radio({ value: 'Radio1', group: 'radioGroup' })
.checked(true)
.height(20)
.width(20)
.onChange((isChecked: boolean) => {
if (isChecked) {
this.currentEnvironment = HttpUrlUtils.HOST_UAT;
}
})
Text('切换到UAT(预发布)环境,重启应用生效')
.fontSize(14)
}
.width('90%')
.justifyContent(FlexAlign.Start)
Row() {
Radio({ value: 'Radio1', group: 'radioGroup' })
.checked(true)
.height(20)
.width(20)
.onChange((isChecked: boolean) => {
if (isChecked) {
this.currentEnvironment = HttpUrlUtils.HOST_PRODUCT;
}
})
Text('切换到PROD(现网)环境,重启应用生效')
.fontSize(14)
}
.width('90%')
.justifyContent(FlexAlign.Start)
Row() {
Radio({ value: 'Radio1', group: 'radioGroup' })
.checked(true)
.height(20)
.width(20)
.onChange((isChecked: boolean) => {
if (isChecked) {
this.currentEnvironment = HttpUrlUtils.HOST_DEV;
}
})
Text('切换到DEV(开发)环境,重启应用生效')
.fontSize(14)
}
.width('90%')
.justifyContent(FlexAlign.Start)
Button('确认')
.margin({ top: 20 })
.onClick(() => {
// HttpUrlUtils.hostUrl = this.currentEnvironment
SPHelper.default.saveSync('hostUrl', this.currentEnvironment);
this.controller.close()
this.confirm()
})
}.height(261).backgroundColor(Color.White).borderRadius(6).width('74%')
}
}
\ No newline at end of file
... ...
... ... @@ -52,8 +52,7 @@ export struct BannerComponent {
.borderRadius($r('app.float.image_border_radius'))
.displayCount(this.buildDisplayCount()) // 仅展示1个图片
.cachedCount(2)
.index(1) // The default index of Swiper.
.autoPlay(true)
.index(0) // The default index of Swiper.
.indicator(Indicator.dot()
.right(5)
.itemWidth(4)
... ...
... ... @@ -22,6 +22,7 @@ export struct FirstLevelComponent {
Text('暂无数据').fontSize(20)
}else {
TextPicker({range:this.labelList,selected:this.select})
.canLoop(false)
.onChange((value: string | string[], index: number | number[]) => {
this.select = index as number
this.currentFirst = EditInfoViewModel.getAreaListManageModel(this.dataSource[index as number])
... ...
... ... @@ -15,6 +15,7 @@ export struct SecondLevelComponent {
Text(this.mTip).fontSize(20)
}else {
TextPicker({range:this.labelList,selected:this.select})
.canLoop(false)
.onChange((value: string | string[], index: number | number[]) => {
this.select = index as number
this.currentSecondBean = EditInfoViewModel.getAreaListManageModel(this.currentFirst.children[index as number])
... ...
... ... @@ -16,6 +16,7 @@ export struct ThirdLevelComponent {
Text(this.mTip).fontSize(20)
}else {
TextPicker({range:this.labelList,selected:this.select})
.canLoop(false)
.onChange((value: string | string[], index: number | number[]) => {
this.select = index as number
this.currentThirdBean = EditInfoViewModel.getAreaListManageModel(this.currentSecondBean.children[index as number])
... ...
... ... @@ -52,7 +52,7 @@ export interface contentListItemParams{
}
export interface collcetRecordParams {
delAll?: number;
delAll?: number; //是否全部删除
status?: number;
... ...
... ... @@ -5,6 +5,8 @@ import HashMap from '@ohos.util.HashMap';
import { SearchHistoryItem } from '../viewmodel/SearchHistoryItem';
import { SearchHotContentItem } from '../viewmodel/SearchHotContentItem';
import { SearchResultCountItem } from '../viewmodel/SearchResultCountItem';
import { SearchResultContentData } from '../viewmodel/SearchResultContentData';
import { contentListParams, InteractDataDTO } from 'wdBean/Index';
const TAG = "SearcherAboutDataModel"
... ... @@ -35,6 +37,11 @@ class SearcherAboutDataModel{
public async putSearchHistoryData(content:string){
let history = SPHelper.default.getSync(this.SEARCH_HISTORY_KEY,"[]") as string
this.searchHistoryData = JSON.parse(history)
this.searchHistoryData.forEach((element,index) => {
if (element.searchContent == content) {
this.searchHistoryData.splice(index,1)
}
});
this.searchHistoryData.splice(0,0,new SearchHistoryItem(content))
await SPHelper.default.saveSync(this.SEARCH_HISTORY_KEY, JSON.stringify(this.searchHistoryData));
}
... ... @@ -76,6 +83,8 @@ class SearcherAboutDataModel{
if(this.searchHistoryData.length>10){
this.searchHistoryData.splice(10,this.searchHistoryData.length - 10)
}
// this.putSearchHistoryData("大家")
// this.putSearchHistoryData("人民")
return this.searchHistoryData
}
... ... @@ -234,6 +243,83 @@ class SearcherAboutDataModel{
return compRes.data
}
/**
* 搜索结果 展示列表
*/
getSearchResultListData(pageSize:string,pageNum:string,searchType:string,keyword:string,context: Context): Promise<SearchResultContentData> {
return new Promise<SearchResultContentData>((success, error) => {
Logger.info(TAG, `getSearchResultListData start`);
this.fetchSearchResultListData(pageSize,pageNum,searchType,keyword).then((navResDTO: ResponseDTO<SearchResultContentData>) => {
if (!navResDTO || navResDTO.code != 0) {
success(this.getSearchResultListDataLocal(context))
return
}
Logger.info(TAG, "getSearchResultListData then,SearchResultListResDTO.timeStamp:" + navResDTO.timestamp);
let navigationBean = navResDTO.data as SearchResultContentData
success(navigationBean);
}).catch((err: Error) => {
Logger.error(TAG, `getSearchResultListData catch, error.name : ${err.name}, error.message:${err.message}`);
success(this.getSearchResultListDataLocal(context))
})
})
}
fetchSearchResultListData(pageSize:string,pageNum:string,searchType:string,keyword:string) {
let url = HttpUrlUtils.getSearchResultListDataUrl() + `?pageSize=${pageSize}&pageNum=${pageNum}&searchType=${searchType}&keyword=${keyword}`
let headers: HashMap<string, string> = HttpUrlUtils.getCommonHeaders();
return WDHttp.get<ResponseDTO<SearchResultContentData>>(url, headers)
};
async getSearchResultListDataLocal(context: Context): Promise<SearchResultContentData> {
Logger.info(TAG, `getSearchResultListDataLocal start`);
let compRes: ResponseDTO<SearchResultContentData> | null = await ResourcesUtils.getResourcesJson<ResponseDTO<SearchResultContentData>>(context,'search_result_list_data.json' );
if (!compRes || !compRes.data) {
Logger.info(TAG, `getSearchResultListDataLocal compRes is empty`);
return new SearchResultContentData()
}
Logger.info(TAG, `getSearchResultListDataLocal getResourcesJsonSync compRes : ${JSON.stringify(compRes)}`);
return compRes.data
}
/**
* 搜索结果 展示列表(交互详情 评论收藏点赞分享数量)
*/
getInteractListData(data : contentListParams,context: Context): Promise<InteractDataDTO[]> {
return new Promise<InteractDataDTO[]>((success, error) => {
Logger.info(TAG, `getInteractListData start`);
this.fetchInteractListData(data).then((navResDTO: ResponseDTO<InteractDataDTO[]>) => {
if (!navResDTO || navResDTO.code != 0) {
success(this.getInteractListDataLocal(context))
return
}
Logger.info(TAG, "getInteractListData then,SearchResultListResDTO.timeStamp:" + navResDTO.timestamp);
let navigationBean = navResDTO.data as InteractDataDTO[]
success(navigationBean);
}).catch((err: Error) => {
Logger.error(TAG, `getInteractListData catch, error.name : ${err.name}, error.message:${err.message}`);
success(this.getInteractListDataLocal(context))
})
})
}
fetchInteractListData(data : contentListParams) {
let url = HttpUrlUtils.getInteractListDataUrl()
let headers: HashMap<string, string> = HttpUrlUtils.getCommonHeaders();
return WDHttp.post<ResponseDTO<InteractDataDTO[]>>(url,data, headers)
};
async getInteractListDataLocal(context: Context): Promise<InteractDataDTO[]> {
Logger.info(TAG, `getInteractListDataLocal start`);
let compRes: ResponseDTO<InteractDataDTO[]> | null = await ResourcesUtils.getResourcesJson<ResponseDTO<InteractDataDTO[]>>(context,'search_result_interact_list_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
}
}
const searcherAboutDataModel = SearcherAboutDataModel.getInstance()
... ...
... ... @@ -4,6 +4,7 @@ import { SearchResultContentItem } from './SearchResultContentItem'
export class SearchResultContentData{
list:SearchResultContentItem[] = []
keyword:string = ""
pageNum: number = 0
pageSize: number = 20
... ...
import { ContentDTO } from 'wdBean/Index'
export interface SearchResultContentItem{
data:ContentDTO
resultType:string
export class SearchResultContentItem{
data:SearchDescription = new SearchDescription()
dataList:SearchRmhDescription[] = []
resultType:string = ""
}
class SearchDescription{
likeEnable: string = ""
previewUri: string = ""
firstFrameImageBucket: string = ""
appImg: string = ""
onlineStatus: string = ""
createUserName: string = ""
contentCheck: string = ""
type: string = ""
titleOsst: string = ""
coverHImageBucket: string = ""
shareImageUri: string = ""
searchTypeInt: string = ""
authIcon: string = ""
id: string = ""
newOld: string = ""
seoTags: string = ""
publishTime: string = ""
feedControl: string = ""
saveType: string = ""
userTypeInt: string = ""
userOrigin: string = ""
creatorType: string = ""
planStartTime: string = ""
waresSwitch: string = ""
introductionLiteral: string = ""
topicType: string = ""
hotFlag: string = ""
coverUrl: string = ""
itemId: string = ""
titleEn: string = ""
matrixId: string = ""
tplId: string = ""
joinActivity: string = ""
status: string = ""
headerPhotoUrl: string = ""
zhSearch: string = ""
activityControl: string = ""
city: string = ""
showTitleIng: string = ""
shareFlag: string = ""
creatorName: string = ""
className: string = ""
showTitleNo: string = ""
liveSwitch: string = ""
likesStyle: string = ""
dataKey: string = ""
search: string = ""
puserId: string = ""
top: string = ""
titleLiteral: string = ""
countryCode: string = ""
startTime: string = ""
shareDescription: string = ""
channelId: string = ""
openComment: string = ""
creatorClassify: string = ""
previewBucket: string = ""
picCount: string = ""
recommendControl: string = ""
creatorNameLiteral: string = ""
subjects: string = ""
updateUser: string = ""
i: string = ""
updateTime: string = ""
userId: string = ""
showTitleEd: string = ""
authTo: string = ""
rmhPlatformInt: string = ""
giftEnable: string = ""
titleEnosst: string = ""
shareCoverUrl: string = ""
deleted: string = ""
zhOperateFlag: string = ""
shareTitle: string = ""
scrollUpdated: string = ""
createTime: string = ""
creatorBan: string = ""
publishTimeInt: string = ""
organization: string = ""
channelName: string = ""
createUser: string = ""
currentPoliticsFlag: string = ""
endTime: string = ""
sourceId: string = ""
country: string = ""
secondClassify: string = ""
createUserId: string = ""
firstFrameImageUri: string = ""
pubTime: string = ""
openLikes: string = ""
contentText: string = ""
relType: string = ""
authImg: string = ""
roomId: string = ""
nameLiteral: string = ""
mainControl: string = ""
coverVImageBucket: string = ""
linkUrl: string = ""
openDownload: string = ""
zhChannelPageImg: string = ""
appStandImg: string = ""
shareSummary: string = ""
firstPublishTimeInt: string = ""
rmhPlatform: string = ""
creatorNameOsst: string = ""
searchType: string = ""
author: string = ""
askAnswerFlag: string = ""
seoTagName: string = ""
weight: string = ""
pageId: string = ""
firstPublishTime: string = ""
coverVImageUri: string = ""
publishType: string = ""
isVr: string = ""
name: string = ""
shareUrl: string = ""
userType: string = ""
firstProcessTime: string = ""
hasRecord: string = ""
shareTitleOsst: string = ""
classify: string = ""
itemType: string = ""
nameOsst: string = ""
districtCode: string = ""
hidden: string = ""
cityCode: string = ""
liveType: string = ""
appStyleImages: string = ""
titleShow: string = ""
cornerMark: string = ""
creatorId: string = ""
levelScore: string = ""
description: string = ""
liveStartTime: string = ""
likeStyle: string = ""
title: string = ""
content: string = ""
platform: string = ""
duration: string = "0"
shareDescriptionLiteral: string = ""
createTimeInt: string = ""
liveEndTime: string = ""
topicTemplate: string = ""
barrageEnable: string = ""
introduction: string = ""
notice: string = ""
shareTitleLiteral: string = ""
coverHImageUri: string = ""
relId: string = ""
classCode: string = ""
grayScale: string = ""
appStyle: number = -1
authTitle: string = ""
provinceCode: string = ""
tenancy: string = ""
platformId: string = ""
classSubName: string = ""
recommended: string = ""
descriptionLiteral: string = ""
banControl: string = ""
auditingStatus: string = ""
planEndTime: string = ""
speakControl: string = ""
sourceName: string = ""
shareImageBucket: string = ""
landscape: string = ""
collectNum: string = ""
commentNum: string = ""
likeNum: string= ""
readNum: string= ""
shareNum: string= ""
}
export class SearchRmhDescription{
likeEnable: string= ""
previewUri: string= ""
firstFrameImageBucket: string= ""
appImg: string= ""
onlineStatus: string= ""
createUserName: string= ""
contentCheck: string= ""
type: string= ""
titleOsst: string= ""
coverHImageBucket: string= ""
shareImageUri: string= ""
searchTypeInt: string= ""
authIcon: string= ""
id: string= ""
newOld: string= ""
seoTags: string= ""
publishTime: string= ""
feedControl: string= ""
saveType: string= ""
userTypeInt: string= ""
userOrigin: string= ""
creatorType: string= ""
planStartTime: string= ""
waresSwitch: string= ""
introductionLiteral: string= ""
topicType: string= ""
hotFlag: string= ""
coverUrl: string= ""
itemId: string= ""
titleEn: string= ""
matrixId: string= ""
tplId: string= ""
joinActivity: string= ""
status: string= ""
headerPhotoUrl: string= ""
zhSearch: string= ""
activityControl: string= ""
city: string= ""
showTitleIng: string= ""
shareFlag: string= ""
creatorName: string= ""
className: string= ""
showTitleNo: string= ""
liveSwitch: string= ""
likesStyle: string= ""
dataKey: string= ""
search: string= ""
puserId: string= ""
top: string= ""
titleLiteral: string= ""
countryCode: string= ""
startTime: string= ""
shareDescription: string= ""
channelId: string= ""
openComment: string= ""
creatorClassify: string= ""
previewBucket: string= ""
picCount: string= ""
recommendControl: string= ""
creatorNameLiteral: string= ""
subjects: string= ""
updateUser: string= ""
i: string= ""
updateTime: string= ""
userId: string= ""
showTitleEd: string= ""
authTo: string= ""
rmhPlatformInt: string= ""
giftEnable: string= ""
titleEnosst: string= ""
shareCoverUrl: string= ""
deleted: string= ""
zhOperateFlag: string= ""
shareTitle: string= ""
scrollUpdated: string= ""
createTime: string= ""
creatorBan: string= ""
publishTimeInt: string= ""
organization: string= ""
channelName: string= ""
createUser: string= ""
currentPoliticsFlag: string= ""
endTime: string= ""
sourceId: string= ""
country: string= ""
secondClassify: string= ""
createUserId: string= ""
firstFrameImageUri: string= ""
pubTime: string= ""
openLikes: string= ""
contentText: string= ""
relType: string= ""
authImg: string= ""
roomId: string= ""
nameLiteral: string= ""
mainControl: string= ""
coverVImageBucket: string= ""
linkUrl: string= ""
openDownload: string= ""
zhChannelPageImg: string= ""
appStandImg: string= ""
shareSummary: string= ""
firstPublishTimeInt: string= ""
rmhPlatform: string= ""
creatorNameOsst: string= ""
searchType: string= ""
author: string= ""
askAnswerFlag: string= ""
seoTagName: string= ""
weight: string= ""
pageId: string= ""
firstPublishTime: string= ""
coverVImageUri: string= ""
publishType: string= ""
isVr: string= ""
name: string= ""
shareUrl: string= ""
userType: string= ""
firstProcessTime: string= ""
hasRecord: string= ""
shareTitleOsst: string= ""
classify: string= ""
itemType: string= ""
nameOsst: string= ""
districtCode: string= ""
hidden: string= ""
cityCode: string= ""
liveType: string= ""
appStyleImages: string= ""
titleShow: string= ""
cornerMark: string= ""
creatorId: string= ""
levelScore: string= ""
description: string= ""
liveStartTime: string= ""
likeStyle: string= ""
title: string= ""
content: string= ""
platform: string= ""
duration: string= ""
shareDescriptionLiteral: string= ""
createTimeInt: string= ""
liveEndTime: string= ""
topicTemplate: string= ""
barrageEnable: string= ""
introduction: string= ""
notice: string= ""
shareTitleLiteral: string= ""
coverHImageUri: string= ""
relId: string= ""
classCode: string= ""
grayScale: string= ""
appStyle: string= ""
authTitle: string= ""
provinceCode: string= ""
tenancy: string= ""
platformId: string= ""
classSubName: string= ""
recommended: string= ""
descriptionLiteral: string= ""
banControl: string= ""
auditingStatus: string= ""
planEndTime: string= ""
speakControl: string= ""
sourceName: string= ""
shareImageBucket: string= ""
landscape: string= ""
}
\ No newline at end of file
... ...
... ... @@ -7,7 +7,9 @@ import { Params } from '../../../../../../../commons/wdRouter/oh_modules/wdBean/
import { WDRouterRule, WDRouterPage } from 'wdRouter';
import { SettingPasswordParams } from './SettingPasswordLayout'
import { Router } from '@ohos.arkui.UIContext'
import { ToastUtils } from 'wdKit/Index'
import { SPHelper, ToastUtils } from 'wdKit/Index'
import { SpConstants } from 'wdConstant/Index'
import { emitter } from '@kit.BasicServicesKit'
const TAG = 'ForgetPasswordPage'
... ... @@ -147,7 +149,34 @@ struct ForgetPasswordPage {
}
this.loginViewModel.changeBindPhone(this.phoneContent,this.codeContent).then(()=>{
ToastUtils.shortToast('绑定成功')
this.querySecurity()
})
}
querySecurity(){
this.loginViewModel.querySecurity().then(()=>{
SPHelper.default.save(SpConstants.USER_PHONE,this.phoneContent)
this.sendEmitEvent()
router.back()
}).catch(()=>{
})
}
sendEmitEvent(){
// 定义一个eventId为1的事件,事件优先级为Low
let event: emitter.InnerEvent = {
eventId: 10010,
priority: emitter.EventPriority.LOW
};
let eventData: emitter.EventData = {
data: {
content: this.phoneContent,
}
};
// 发送eventId为1的事件,事件内容为eventData
emitter.emit(event, eventData);
}
}
\ No newline at end of file
... ...
... ... @@ -71,11 +71,11 @@ export class LoginModel {
return new Promise<LoginBean>((success, fail) => {
HttpRequest.post<ResponseDTO<LoginBean>>(HttpUrlUtils.getAppLoginUrl(), bean, headers).then((data: ResponseDTO<LoginBean>) => {
Logger.debug("LoginViewModel:success2 ", data.message)
if (!data || !data.data) {
if (!data) {
fail("数据为空")
return
}
if (data.code != 0) {
if (!data.data||data.code != 0) {
fail(data.message)
return
}
... ... @@ -99,11 +99,11 @@ export class LoginModel {
return new Promise<LoginBean>((success, fail) => {
HttpRequest.post<ResponseDTO<LoginBean>>(HttpUrlUtils.getAppLoginUrl(), bean, headers).then((data: ResponseDTO<LoginBean>) => {
Logger.debug("LoginViewModel:success2 ", data.message)
if (!data || !data.data) {
if (!data) {
fail("数据为空")
return
}
if (data.code != 0) {
if (!data.data||data.code != 0) {
fail(data.message)
return
}
... ... @@ -268,10 +268,10 @@ export class LoginModel {
let bean: Record<string, Object> = {};
bean['phone'] = phone
bean['verifyCode'] = verificationCode
return new Promise<LoginBean>((success, fail) => {
HttpRequest.post<ResponseDTO<LoginBean>>(HttpUrlUtils.changeBindPhone(), bean, headers).then((data: ResponseDTO<LoginBean>) => {
return new Promise<object>((success, fail) => {
HttpRequest.post<ResponseDTO<object>>(HttpUrlUtils.changeBindPhone(), bean, headers).then((data: ResponseDTO<object>) => {
Logger.debug("LoginViewModel:success2 ", data.message)
if (!data || !data.data) {
if (!data) {
fail("数据为空")
return
}
... ... @@ -279,7 +279,29 @@ export class LoginModel {
fail(data.message)
return
}
success(data.data)
success(data)
}, (error: Error) => {
fail(error.message)
Logger.debug("LoginViewModel:error2 ", error.toString())
})
})
}
/**获取用户安全页信息*/
querySecurity(){
let headers: HashMap<string, string> = HttpUrlUtils.getCommonHeaders();
return new Promise<object>((success, fail) => {
HttpRequest.get<ResponseDTO<object>>(HttpUrlUtils.querySecurity(), headers).then((data: ResponseDTO<object>) => {
Logger.debug("LoginViewModel:success2 ", data.message)
if (!data) {
fail("数据为空")
return
}
if (data.code != 0) {
fail(data.message)
return
}
success(data)
}, (error: Error) => {
fail(error.message)
Logger.debug("LoginViewModel:error2 ", error.toString())
... ...
... ... @@ -312,6 +312,8 @@ struct LoginPage {
url: `${WDRouterPage.getBundleInfo()}`
}
)
}).catch((error:string)=>{
promptAction.showToast({ message: error })
})
} else {
this.loginViewModel.appLoginByPassword(this.accountContent, 0, this.passwordContent, "").then((data) => {
... ...
... ... @@ -14,18 +14,22 @@ struct LoginProtocolWebview {
webviewController: webview.WebviewController = new webview.WebviewController()
userProtocol = "https://cdnpeoplefrontuat.aikan.pdnews.cn/rmrb/rmrb-protocol-zh-web/0.0.1/app/protocol-1005.html"
privateProtocol = 'https://cdnpeoplefrontuat.aikan.pdnews.cn/rmrb/rmrb-protocol-zh-web/0.0.1/app/protocol-1001.html'
logoutProtocol = 'https://cdnpeoplefrontuat.aikan.pdnews.cn/rmrb/rmrb-protocol-zh-web/0.0.1/app/protocol-1003.html'
async aboutToAppear() {
if (router.getParams()) {
let params = router.getParams() as Params
Logger.info(TAG, 'params.contentID:' + params.contentID);
if (params.contentID == "1") {
this.webUrl = await SPHelper.default.get(SpConstants.USER_PROTOCOL, this.userProtocol) as string
if (params.contentID == "1") { //"人民日报客户端网络服务使用协议"
this.webUrl = await SPHelper.default.get(SpConstants.NET_SERVICE_PROTOCOL, this.userProtocol) as string
this.webviewController.loadUrl(this.webUrl)
} else {
} else if(params.contentID == "2"){ //"人民日报客户端用户隐私协议"
this.webUrl = await SPHelper.default.get(SpConstants.PRIVATE_PROTOCOL, this.privateProtocol) as string
this.webviewController.loadUrl(this.webUrl)
}else if(params.contentID == "3"){ //注销协议
this.webUrl = await SPHelper.default.get(SpConstants.LOGOUT_PROTOCOL, this.logoutProtocol) as string
this.webviewController.loadUrl(this.webUrl)
}
}
... ...
... ... @@ -59,8 +59,8 @@ export class LoginViewModel {
HttpUrlUtils.setUserType(data.userType+"")
HttpUrlUtils.setUserToken(data.jwtToken)
success(data)
}).catch(() => {
fail()
}).catch((error:string) => {
fail(error)
})
})
}
... ... @@ -169,8 +169,8 @@ export class LoginViewModel {
}
changeBindPhone(phone: string, verificationCode: string) {
return new Promise<LoginBean>((success, fail) => {
this.loginModel.changeBindPhone(phone, verificationCode).then((data: LoginBean) => {
return new Promise<object>((success, fail) => {
this.loginModel.changeBindPhone(phone, verificationCode).then((data: object) => {
success(data)
}).catch(() => {
fail()
... ... @@ -178,7 +178,15 @@ export class LoginViewModel {
})
}
querySecurity(){
return new Promise<object>((success, fail) => {
this.loginModel.querySecurity().then((data: object) => {
success(data)
}).catch(() => {
fail()
})
})
}
async doMd(content: string): Promise<string> {
let mdAlgName = 'SHA256'; // 摘要算法名
... ...
... ... @@ -4,8 +4,8 @@ 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, WindowModel } from 'wdKit';
import { WDHttp } from 'wdNetwork'
import { SPHelper, StringUtils, WindowModel } from 'wdKit';
import { HttpUrlUtils, WDHttp } from 'wdNetwork';
export default class EntryAbility extends UIAbility {
onCreate(want: Want, launchParam: AbilityConstant.LaunchParam): void {
... ... @@ -13,6 +13,10 @@ export default class EntryAbility extends UIAbility {
hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onCreate');
registerRouter();
WDHttp.initHttpHeader()
const spHostUrl = SPHelper.default.getSync('hostUrl', '') as string
if (StringUtils.isNotEmpty(spHostUrl)) {
HttpUrlUtils.hostUrl = spHostUrl
}
}
onDestroy(): void {
... ...
... ... @@ -23,9 +23,19 @@ export class LaunchModel {
//保存数据
for (let i = 0; i < data.data.length; i++) {
if (data.data[i].type == 1) {
SPHelper.default.save(SpConstants.USER_PROTOCOL, data.data[i].linkUrl)
SPHelper.default.save(SpConstants.NET_SERVICE_PROTOCOL, data.data[i].linkUrl)
} else if (data.data[i].type == 2) {
SPHelper.default.save(SpConstants.PRIVATE_PROTOCOL, data.data[i].linkUrl)
}else if (data.data[i].type == 4) {
SPHelper.default.save(SpConstants.LOGOUT_PROTOCOL, data.data[i].linkUrl)
}else if (data.data[i].type == 5) {
SPHelper.default.save(SpConstants.MESSAGE_BOARD_USER_PROTOCOL, data.data[i].linkUrl)
}else if (data.data[i].type == 6) {
SPHelper.default.save(SpConstants.MESSAGE_BOARD_NOTICE_PROTOCOL, data.data[i].linkUrl)
}else if (data.data[i].type == 7) {
SPHelper.default.save(SpConstants.MESSAGE_BOARD_QUESTION_PROTOCOL, data.data[i].linkUrl)
}else if (data.data[i].type == 8) {
SPHelper.default.save(SpConstants.MESSAGE_BOARD_PRIVATE_PROTOCOL, data.data[i].linkUrl)
}
}
... ...
{
"code": "0",
"data": {
"hasNext": 1,
"list": [{
"authorLike": 0,
"avatarFrame": "",
"checkStatus": 2,
"commentContent": "好棒的号主好棒的号主好棒的号主好棒的号主好棒的号主好棒的号主好棒的号主好棒的号主好棒的号主好棒的号主好棒的号主好棒的号主好棒的号主好棒的号主好棒的号主好棒的号主好棒的号主好棒的号主好棒的号主好棒的号主好棒的号主好棒的号主",
"commentContentSensitive": "",
"commentLevel": 1,
"commentPics": "",
"commentSensitive": "",
"commentType": "2",
"contentAuthor": 0,
"createTime": "2024-04-15 14:23:10",
"creatorFlag": 0,
"fromCreatorId": "",
"fromUserHeader": "https://rmrbcmsonline.peopleapp.com/upload/ueditor/image/20220101/a_661756798214074368.png?x-oss-process=image/resize,l_100/auto-orient,1/quality,q_90/format,jpg",
"fromUserId": "522455831285125",
"fromUserName": "新志说",
"fromUserType": 1,
"h5Url": "",
"highQualityExpireTime": "2024-04-15T18:32:32+0800",
"highQualityTime": "2024-04-12T18:32:32+0800",
"id": 57148720,
"likeNum": 0,
"mySelf": 0,
"pageId": null,
"parentId": -1,
"region": "北京",
"replyNum": 0,
"rootCommentId": 57148720,
"sensitiveExist": 0,
"sensitiveShow": 1,
"shareInfo": {
"shareCoverUrl": "https://rmrbcmsonline.peopleapp.com/upload/ueditor/image/20240320/a_955037763411898368.jpeg",
"shareSummary": "苏东坡的家风里藏着怎样的精神原力?",
"shareTitle": "苏东坡的家风里藏着怎样的精神原力?",
"shareUrl": "https://people.pdnews.cn/rmhvideo/30043985346"
},
"targetId": "30043985346",
"targetRelId": "",
"targetRelObjectId": "",
"targetRelType": null,
"targetStatus": 0,
"targetTitle": "苏东坡的家风里藏着怎样的精神原力?",
"targetType": 1,
"toUserContentAuthor": 0,
"toUserName": "",
"topFlag": 0,
"topicType": null,
"uuid": "267385e2-f333-422a-9552-e67d2043845c",
"visitorComment": 1
}, {
"authorLike": 0,
"avatarFrame": "",
"checkStatus": 2,
"commentContent": "啦啦啦啦",
"commentContentSensitive": "",
"commentLevel": 1,
"commentPics": "",
"commentSensitive": "",
"commentType": "2",
"contentAuthor": 0,
"createTime": "2024-04-13 14:45:14",
"creatorFlag": 0,
"fromCreatorId": "",
"fromUserHeader": "https://cdnjdphoto.aikan.pdnews.cn/null20240322/1681921291/1711108111670.jpg?x-oss-process=image/resize,l_100/auto-orient,1/quality,q_90/format,jpg",
"fromUserId": "574601020679237",
"fromUserName": "Zirui",
"fromUserType": 1,
"h5Url": "",
"highQualityExpireTime": "2024-04-15T18:32:27+0800",
"highQualityTime": "2024-04-12T18:32:27+0800",
"id": 57027343,
"likeNum": 0,
"mySelf": 0,
"pageId": null,
"parentId": -1,
"region": "北京",
"replyNum": 0,
"rootCommentId": 57027343,
"sensitiveExist": 0,
"sensitiveShow": 1,
"shareInfo": {
"shareCoverUrl": "https://rmrbcmsonline.peopleapp.com/upload/ueditor/image/20240330/a_958638228225650688.png",
"shareSummary": "黄金地块!昌平今年计划供应这7宗住宅用地",
"shareTitle": "黄金地块!昌平今年计划供应这7宗住宅用地",
"shareUrl": "https://people.pdnews.cn/rmharticle/30044144003"
},
"targetId": "30044144003",
"targetRelId": "",
"targetRelObjectId": "",
"targetRelType": null,
"targetStatus": 0,
"targetTitle": "黄金地块!昌平今年计划供应这7宗住宅用地",
"targetType": 8,
"toUserContentAuthor": 0,
"toUserName": "",
"topFlag": 0,
"topicType": null,
"uuid": "b41ba843-f2ff-47e6-8a97-3f70e50b094c",
"visitorComment": 1
}, {
"authorLike": 0,
"avatarFrame": "",
"checkStatus": 2,
"commentContent": "大家好",
"commentContentSensitive": "",
"commentLevel": 1,
"commentPics": "",
"commentSensitive": "",
"commentType": "2",
"contentAuthor": 0,
"createTime": "2024-04-02 16:05:12",
"creatorFlag": 1,
"fromCreatorId": "2495230",
"fromUserHeader": "https://cdnjdphoto.aikan.pdnews.cn/vod/content/202404/20240402152130124/mpi.png?x-oss-process=image/resize,l_100/auto-orient,1/quality,q_90/format,jpg",
"fromUserId": "488915066770949",
"fromUserName": "极目新闻客户端",
"fromUserType": 2,
"h5Url": "",
"highQualityExpireTime": "2024-04-15T18:32:24+0800",
"highQualityTime": "2024-04-12T18:32:24+0800",
"id": 57003773,
"likeNum": 0,
"mySelf": 0,
"pageId": null,
"parentId": -1,
"region": "北京",
"replyNum": 0,
"rootCommentId": 57003773,
"sensitiveExist": 0,
"sensitiveShow": 1,
"shareInfo": {
"shareCoverUrl": "",
"shareSummary": "人民日报,有品质的新闻",
"shareTitle": "探索营养新高度 三只小牛推出功能牛奶系列新品",
"shareUrl": "https://people.pdnews.cn/column/30002004812-500000215456"
},
"targetId": "30002004812",
"targetRelId": "500000215456",
"targetRelObjectId": "2017",
"targetRelType": 1,
"targetStatus": 0,
"targetTitle": "探索营养新高度 三只小牛推出功能牛奶系列新品",
"targetType": 8,
"toUserContentAuthor": 0,
"toUserName": "",
"topFlag": 0,
"topicType": null,
"uuid": "045fbe86-7227-447a-a9ea-d991d4c4bb02",
"visitorComment": 1
}, {
"authorLike": 0,
"avatarFrame": "",
"checkStatus": 2,
"commentContent": "大家好",
"commentContentSensitive": "",
"commentLevel": 1,
"commentPics": "",
"commentSensitive": "",
"commentType": "2",
"contentAuthor": 0,
"createTime": "2024-04-02 16:04:54",
"creatorFlag": 1,
"fromCreatorId": "2495230",
"fromUserHeader": "https://cdnjdphoto.aikan.pdnews.cn/vod/content/202404/20240402152130124/mpi.png?x-oss-process=image/resize,l_100/auto-orient,1/quality,q_90/format,jpg",
"fromUserId": "488915066770949",
"fromUserName": "极目新闻客户端",
"fromUserType": 2,
"h5Url": "",
"highQualityExpireTime": "2024-04-15T18:32:19+0800",
"highQualityTime": "2024-04-12T18:32:19+0800",
"id": 57003731,
"likeNum": 0,
"mySelf": 0,
"pageId": null,
"parentId": -1,
"region": "北京",
"replyNum": 0,
"rootCommentId": 57003731,
"sensitiveExist": 0,
"sensitiveShow": 1,
"shareInfo": {
"shareCoverUrl": "",
"shareSummary": "人民日报,有品质的新闻",
"shareTitle": "探索营养新高度 三只小牛推出功能牛奶系列新品",
"shareUrl": "https://people.pdnews.cn/column/30002004812-500000215456"
},
"targetId": "30002004812",
"targetRelId": "500000215456",
"targetRelObjectId": "2017",
"targetRelType": 1,
"targetStatus": 0,
"targetTitle": "探索营养新高度 三只小牛推出功能牛奶系列新品",
"targetType": 8,
"toUserContentAuthor": 0,
"toUserName": "",
"topFlag": 0,
"topicType": null,
"uuid": "e98533d4-832c-46fc-b6c8-fcfbcf8dec81",
"visitorComment": 1
}, {
"authorLike": 0,
"avatarFrame": "",
"checkStatus": 2,
"commentContent": "😉",
"commentContentSensitive": "",
"commentLevel": 1,
"commentPics": "",
"commentSensitive": "",
"commentType": "2",
"contentAuthor": 0,
"createTime": "2024-04-02 09:27:37",
"creatorFlag": 0,
"fromCreatorId": "",
"fromUserHeader": "https://cdnjdphoto.aikan.pdnews.cn//zhbj/img/user/2024010916/61A1BB7793074AEFA58F1A6B629B0575.jpg?x-oss-process=image/resize,l_100/auto-orient,1/quality,q_90/format,jpg",
"fromUserId": "507102106399685",
"fromUserName": "小土豆",
"fromUserType": 1,
"h5Url": "http://people.pdnews.cn/h/audiotopic/21622-10000002141",
"highQualityExpireTime": "2024-04-15T18:32:17+0800",
"highQualityTime": "2024-04-12T18:32:17+0800",
"id": 56897011,
"likeNum": 0,
"mySelf": 0,
"pageId": 21622,
"parentId": -1,
"region": "上海",
"replyNum": 0,
"rootCommentId": 56897011,
"sensitiveExist": 0,
"sensitiveShow": 1,
"shareInfo": {
"shareCoverUrl": "https://rmrbcmsonline.peopleapp.com/upload/seminar_img/201808/rmrb_60441534322948.png",
"shareSummary": "经典文章",
"shareTitle": "夜读",
"shareUrl": "http://people.pdnews.cn/audiotopic/21622-10000002141"
},
"targetId": "10000002141",
"targetRelId": "",
"targetRelObjectId": "",
"targetRelType": null,
"targetStatus": 0,
"targetTitle": "夜读",
"targetType": 5,
"toUserContentAuthor": 0,
"toUserName": "",
"topFlag": 0,
"topicType": 22,
"uuid": "4dad103a-de92-4db8-9ee4-9c1bb294ea69",
"visitorComment": 1
}, {
"authorLike": 0,
"avatarFrame": "",
"checkStatus": 2,
"commentContent": "2",
"commentContentSensitive": "",
"commentLevel": 1,
"commentPics": "",
"commentSensitive": "",
"commentType": "2",
"contentAuthor": 0,
"createTime": "2024-04-02 08:59:00",
"creatorFlag": 0,
"fromCreatorId": "",
"fromUserHeader": "https://rmrbcmsonline.peopleapp.com/upload/user_app/202403/rmrb_MqZfPsdm1711510425.jpg?x-oss-process=image/resize,l_100/auto-orient,1/quality,q_90/format,jpg",
"fromUserId": "497856912963077",
"fromUserName": "李冉冉",
"fromUserType": 1,
"h5Url": "",
"highQualityExpireTime": "2024-04-15T18:32:13+0800",
"highQualityTime": "2024-04-12T18:32:13+0800",
"id": 56896568,
"likeNum": 0,
"mySelf": 0,
"pageId": null,
"parentId": -1,
"region": "安徽",
"replyNum": 0,
"rootCommentId": 56896568,
"sensitiveExist": 0,
"sensitiveShow": 1,
"shareInfo": {
"shareCoverUrl": "",
"shareSummary": "人民日报,有品质的新闻",
"shareTitle": "尺素金声丨净息差20年来最低,背后是银行让利实体经济",
"shareUrl": "https://people.pdnews.cn/column/30044175615-500005272796"
},
"targetId": "30044175615",
"targetRelId": "500005272796",
"targetRelObjectId": "2002",
"targetRelType": 1,
"targetStatus": 0,
"targetTitle": "尺素金声丨净息差20年来最低,背后是银行让利实体经济",
"targetType": 8,
"toUserContentAuthor": 0,
"toUserName": "",
"topFlag": 0,
"topicType": null,
"uuid": "959e017c-b84b-4ff3-ae58-0df0e8a14dcc",
"visitorComment": 1
}, {
"authorLike": 0,
"avatarFrame": "",
"checkStatus": 2,
"commentContent": "我中午",
"commentContentSensitive": "",
"commentLevel": 1,
"commentPics": "",
"commentSensitive": "",
"commentType": "2",
"contentAuthor": 0,
"createTime": "2024-04-01 14:22:48",
"creatorFlag": 0,
"fromCreatorId": "",
"fromUserHeader": "https://cdnjdphoto.aikan.pdnews.cn//zhbj/img/user/2024040114/133af3190cd84eb7a5e70c4c23071881.png?x-oss-process=image/resize,l_100/auto-orient,1/quality,q_90/format,jpg",
"fromUserId": "574444396143685",
"fromUserName": "人民日报网友2Ai3yZ",
"fromUserType": 1,
"h5Url": "",
"highQualityExpireTime": "2024-04-15T18:32:09+0800",
"highQualityTime": "2024-04-12T18:32:09+0800",
"id": 56792967,
"likeNum": 1,
"mySelf": 0,
"pageId": null,
"parentId": -1,
"region": "安徽",
"replyNum": 0,
"rootCommentId": 56792967,
"sensitiveExist": 0,
"sensitiveShow": 1,
"shareInfo": {
"shareCoverUrl": "https://rmrbcmsonline.peopleapp.com/rb_recsys/img/2024/0328/647894_957794402615422976.jpeg",
"shareSummary": "人民日报,有品质的新闻",
"shareTitle": "日本小林制药称已有4人因服用其含红曲成分保健品而死亡",
"shareUrl": "https://people.pdnews.cn/rmharticle/30044103222"
},
"targetId": "30044103222",
"targetRelId": "",
"targetRelObjectId": "",
"targetRelType": null,
"targetStatus": 0,
"targetTitle": "日本小林制药称已有4人因服用其含红曲成分保健品而死亡",
"targetType": 8,
"toUserContentAuthor": 0,
"toUserName": "",
"topFlag": 0,
"topicType": null,
"uuid": "591871f2-bddf-4dae-9e6e-a003e1f6e718",
"visitorComment": 1
}, {
"authorLike": 0,
"avatarFrame": "",
"checkStatus": 2,
"commentContent": "你好",
"commentContentSensitive": "",
"commentLevel": 1,
"commentPics": "",
"commentSensitive": "",
"commentType": "2",
"contentAuthor": 0,
"createTime": "2024-04-01 14:22:12",
"creatorFlag": 0,
"fromCreatorId": "",
"fromUserHeader": "https://cdnjdphoto.aikan.pdnews.cn//zhbj/img/user/2024040114/133af3190cd84eb7a5e70c4c23071881.png?x-oss-process=image/resize,l_100/auto-orient,1/quality,q_90/format,jpg",
"fromUserId": "574444396143685",
"fromUserName": "人民日报网友2Ai3yZ",
"fromUserType": 1,
"h5Url": "",
"highQualityExpireTime": "2024-04-15T18:26:14+0800",
"highQualityTime": "2024-04-12T18:26:14+0800",
"id": 56882995,
"likeNum": 0,
"mySelf": 0,
"pageId": null,
"parentId": -1,
"region": "安徽",
"replyNum": 0,
"rootCommentId": 56882995,
"sensitiveExist": 0,
"sensitiveShow": 1,
"shareInfo": {
"shareCoverUrl": "",
"shareSummary": "努力过好当下,让每一个今天的自己,都比昨天有进步,就是对人生最大的敬意。",
"shareTitle": "2024年进度条:■■■□□□□□□□□□",
"shareUrl": "https://people.pdnews.cn/column/30044157156-500005269319"
},
"targetId": "30044157156",
"targetRelId": "500005269319",
"targetRelObjectId": "2003",
"targetRelType": 1,
"targetStatus": 0,
"targetTitle": "2024年进度条:■■■□□□□□□□□□",
"targetType": 13,
"toUserContentAuthor": 0,
"toUserName": "",
"topFlag": 0,
"topicType": null,
"uuid": "6562a44e-5010-4691-9c06-a31d4dd24b80",
"visitorComment": 1
}, {
"authorLike": 0,
"avatarFrame": "",
"checkStatus": 2,
"commentContent": "你晚上",
"commentContentSensitive": "",
"commentLevel": 1,
"commentPics": "",
"commentSensitive": "",
"commentType": "2",
"contentAuthor": 0,
"createTime": "2024-04-01 14:22:25",
"creatorFlag": 0,
"fromCreatorId": "",
"fromUserHeader": "https://cdnjdphoto.aikan.pdnews.cn//zhbj/img/user/2024040114/133af3190cd84eb7a5e70c4c23071881.png?x-oss-process=image/resize,l_100/auto-orient,1/quality,q_90/format,jpg",
"fromUserId": "574444396143685",
"fromUserName": "人民日报网友2Ai3yZ",
"fromUserType": 1,
"h5Url": "",
"highQualityExpireTime": "2024-04-15T18:26:09+0800",
"highQualityTime": "2024-04-12T18:26:09+0800",
"id": 56883010,
"likeNum": 0,
"mySelf": 0,
"pageId": null,
"parentId": -1,
"region": "安徽",
"replyNum": 0,
"rootCommentId": 56883010,
"sensitiveExist": 0,
"sensitiveShow": 1,
"shareInfo": {
"shareCoverUrl": "",
"shareSummary": "行业的健康发展,不能对消费者玩“套路”,凭借质量取胜才是王道。",
"shareTitle": "微短剧付费“无底洞”跌进了谁",
"shareUrl": "https://people.pdnews.cn/column/30044103669-500005258426"
},
"targetId": "30044103669",
"targetRelId": "500005258426",
"targetRelObjectId": "2003",
"targetRelType": 1,
"targetStatus": 0,
"targetTitle": "微短剧付费“无底洞”跌进了谁",
"targetType": 8,
"toUserContentAuthor": 0,
"toUserName": "",
"topFlag": 0,
"topicType": null,
"uuid": "2d16b876-b311-49a7-aa46-c3cf631a992e",
"visitorComment": 1
}, {
"authorLike": 0,
"avatarFrame": "",
"checkStatus": 2,
"commentContent": "外婆企图",
"commentContentSensitive": "",
"commentLevel": 1,
"commentPics": "",
"commentSensitive": "",
"commentType": "2",
"contentAuthor": 0,
"createTime": "2024-04-01 14:22:37",
"creatorFlag": 0,
"fromCreatorId": "",
"fromUserHeader": "https://cdnjdphoto.aikan.pdnews.cn//zhbj/img/user/2024040114/133af3190cd84eb7a5e70c4c23071881.png?x-oss-process=image/resize,l_100/auto-orient,1/quality,q_90/format,jpg",
"fromUserId": "574444396143685",
"fromUserName": "人民日报网友2Ai3yZ",
"fromUserType": 1,
"h5Url": "",
"highQualityExpireTime": "2024-04-15T18:26:05+0800",
"highQualityTime": "2024-04-12T18:26:05+0800",
"id": 56792966,
"likeNum": 0,
"mySelf": 0,
"pageId": null,
"parentId": -1,
"region": "安徽",
"replyNum": 0,
"rootCommentId": 56792966,
"sensitiveExist": 0,
"sensitiveShow": 1,
"shareInfo": {
"shareCoverUrl": "",
"shareSummary": "说话的艺术,说到底就是生活的艺术。",
"shareTitle": "学会这三种说话方式,受益无穷",
"shareUrl": "https://people.pdnews.cn/column/30044115488-500005262017"
},
"targetId": "30044115488",
"targetRelId": "500005262017",
"targetRelObjectId": "2003",
"targetRelType": 1,
"targetStatus": 0,
"targetTitle": "学会这三种说话方式,受益无穷",
"targetType": 13,
"toUserContentAuthor": 0,
"toUserName": "",
"topFlag": 0,
"topicType": null,
"uuid": "dcc25c99-8e27-42fc-aa29-861beec958f2",
"visitorComment": 1
}],
"pageNum": 1,
"pageSize": 10,
"totalCommentNum": 0,
"totalCount": 16
},
"message": "Success",
"meta": null,
"requestId": "",
"success": true,
"timestamp": 1713162597102
}
\ No newline at end of file
... ...
{
"code": "0",
"data": [
{
"collectNum": 1,
"commentNum": 1,
"contentId": "30044118767",
"contentType": 8,
"likeNum": 20,
"readNum": 7839,
"shareNum": 1
},
{
"collectNum": 0,
"commentNum": 0,
"contentId": "30043914123",
"contentType": 8,
"likeNum": 20,
"readNum": 4986,
"shareNum": 2
},
{
"collectNum": 0,
"commentNum": 0,
"contentId": "30044329241",
"contentType": 8,
"likeNum": 0,
"readNum": 416,
"shareNum": 0
},
{
"collectNum": 0,
"commentNum": 2,
"contentId": "30044323528",
"contentType": 8,
"likeNum": 3,
"readNum": 1139,
"shareNum": 4
},
{
"collectNum": 0,
"commentNum": 0,
"contentId": "30044318896",
"contentType": 8,
"likeNum": 0,
"readNum": 1266,
"shareNum": 1
},
{
"collectNum": 11,
"commentNum": 13,
"contentId": "30044318735",
"contentType": 8,
"likeNum": 12,
"readNum": 3842,
"shareNum": 0
},
{
"collectNum": 0,
"commentNum": 0,
"contentId": "30044303875",
"contentType": 8,
"likeNum": 0,
"readNum": 2689,
"shareNum": 0
},
{
"collectNum": 0,
"commentNum": 0,
"contentId": "30044210715",
"contentType": 8,
"likeNum": 0,
"readNum": 173,
"shareNum": 0
},
{
"collectNum": 0,
"commentNum": 0,
"contentId": "30002401426",
"contentType": 8,
"likeNum": 0,
"readNum": 9002,
"shareNum": 1
},
{
"collectNum": 0,
"commentNum": 0,
"contentId": "30044297214",
"contentType": 8,
"likeNum": 20,
"readNum": 3079,
"shareNum": 6
},
{
"collectNum": 0,
"commentNum": 0,
"contentId": "30002735426",
"contentType": 8,
"likeNum": 0,
"readNum": 3816,
"shareNum": 0
},
{
"collectNum": 5,
"commentNum": 1,
"contentId": "30002891779",
"contentType": 8,
"likeNum": 2,
"readNum": 30474,
"shareNum": 4
},
{
"collectNum": 0,
"commentNum": 4,
"contentId": "30044242849",
"contentType": 8,
"likeNum": 4,
"readNum": 1099,
"shareNum": 4
},
{
"collectNum": 0,
"commentNum": 0,
"contentId": "30044064967",
"contentType": 8,
"likeNum": 9,
"readNum": 63139,
"shareNum": 5
},
{
"collectNum": 0,
"commentNum": 0,
"contentId": "30044214313",
"contentType": 8,
"likeNum": 1,
"readNum": 5966,
"shareNum": 1
},
{
"collectNum": 0,
"commentNum": 0,
"contentId": "30044174144",
"contentType": 8,
"likeNum": 20,
"readNum": 5150,
"shareNum": 0
},
{
"collectNum": 0,
"commentNum": 0,
"contentId": "30044036728",
"contentType": 8,
"likeNum": 20,
"readNum": 4217,
"shareNum": 0
},
{
"collectNum": 3,
"commentNum": 0,
"contentId": "30044123091",
"contentType": 8,
"likeNum": 20,
"readNum": 16697,
"shareNum": 0
},
{
"collectNum": 0,
"commentNum": 0,
"contentId": "30044055254",
"contentType": 8,
"likeNum": 20,
"readNum": 11551,
"shareNum": 0
},
{
"collectNum": 0,
"commentNum": 0,
"contentId": "30043994115",
"contentType": 8,
"likeNum": 0,
"readNum": 2370,
"shareNum": 3
}
],
"message": "Success",
"meta": null,
"requestId": "",
"success": true,
"timestamp": 1712889166521
}
\ No newline at end of file
... ...
This diff could not be displayed because it is too large.