yangsunyue_wd
Showing 192 changed files with 6737 additions and 435 deletions
export class GlobalContext {
private constructor() { }
private static instance: GlobalContext;
private _objects = new Map<string, Object>();
public static getContext(): GlobalContext {
if (!GlobalContext.instance) {
GlobalContext.instance = new GlobalContext();
}
return GlobalContext.instance;
}
getObject(value: string): Object | undefined {
return this._objects.get(value);
}
setObject(key: string, objectClass: Object): void {
this._objects.set(key, objectClass);
}
}
\ No newline at end of file
... ...
... ... @@ -16,7 +16,7 @@ export default class EntryAbility extends UIAbility {
// Main window is created, set main page for this ability
hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onWindowStageCreate');
windowStage.loadContent('pages/MainPage', (err, data) => {
windowStage.loadContent('pages/LaunchPage', (err, data) => {
if (err.code) {
hilog.error(0x0000, 'testTag', 'Failed to load the content. Cause: %{public}s', JSON.stringify(err) ?? '');
return;
... ...
... ... @@ -6,12 +6,10 @@ import { Params } from 'wdComponent/src/main/ets/repository/bean/Params';
@Entry
@Component
struct FollowListPage {
@State params:Params = router.getParams() as Params;
@State curIndex: string = '0';
onPageShow() {
this.curIndex = "1";
this.curIndex = router.getParams()?.["index"];
}
build() {
... ...
import router from '@ohos.router'
@Entry
@Component
struct LaunchAdvertisingPage {
@State time: number = 4
timer :number = -1
enter() {
router.replaceUrl({
url:'pages/MainPage'
})
}
onPageShow(){
this.timer = setInterval(() => {
this.time--
if (this.time < 1) {
this.enter()
clearInterval(this.timer)
}
},1000)
}
build(){
Column(){
Stack({alignContent:Alignment.Bottom}){
Stack({alignContent:Alignment.Bottom}){
Column(){
Image($r('app.media.app_icon'))
.margin({
top:'128lpx',left:'48lpx',right:'48lpx',bottom:'128lpx'
})
}
.justifyContent(FlexAlign.Center)
.width('100%')
.height('100%')
.margin({
bottom: 0
})
Stack({alignContent:Alignment.TopEnd}){
Button(){
Text(this.time + 's 跳过')
.fontSize('27lpx')
.fontColor(Color.White)
.margin({left:'28lpx',right:'28lpx'})
}
.width('148lpx')
.height('56lpx')
.margin({top:'54lpx',right:'19lpx'})
.backgroundColor('#80000000')
.onClick(() => {
this.enter()
})
}
.width('100%')
.height('100%')
Button(){
Row(){
Text('点击跳转至详情或第三方应用')
.fontSize('31lpx')
.fontColor(Color.White)
.margin({
left:'55lpx'
})
Image($r('app.media.Slice'))
.width('46lpx')
.height('46lpx')
.margin({right:'55lpx'})
}.alignItems(VerticalAlign.Center)
}
.width('566lpx')
.height('111lpx')
.margin({
bottom: '51lpx'
})
.backgroundColor('#80000000')
}
}
.width('100%')
.height('84%')
.backgroundColor('#FF6C75')
.margin({top:'0'})
Image($r('app.media.LaunchPage_logo'))
.width('278lpx')
.height('154lpx')
.margin({bottom: '48lpx'})
}
.width('100%')
.height('100%')
.backgroundColor(Color.White)
}
}
\ No newline at end of file
... ...
import media from '@ohos.multimedia.media'
import App from '@system.app'
import Router from '@system.router'
import router from '@ohos.router'
import common from '@ohos.app.ability.common'
import CustomDialogComponent from '../view/CustomDialogComponent'
import preferences from '@ohos.data.preferences'
import { GlobalContext } from '../common/utils/GlobalContext'
@Entry
@Component
struct LaunchPage {
private context?: common.UIAbilityContext;
private timerId: number = 0;
private isJumpToAdvertising: boolean = false;
dialogController: CustomDialogController = new CustomDialogController({
builder: CustomDialogComponent(
{
cancel: () => {
this.onCancel();
},
confirm: () => {
this.onConfirm();
}
}),
alignment: DialogAlignment.Center,
offset: { dx: 0, dy: '-24' },
customStyle: true,
autoCancel: false
});
onCancel() {
// Exit the application.
this.context?.terminateSelf();
}
onConfirm() {
// Save privacy agreement status.
this.saveIsPrivacy();
this.jumpToAdvertisingPage();
}
jumpToAdvertisingPage() {
this.timerId = setTimeout(() => {
this.isJumpToAdvertising = true;
router.pushUrl({
url: 'pages/LaunchAdvertisingPage'
}).catch((error: Error) => {
//Logger.error(CommonConstants.LAUNCHER_PAGE_TAG, 'LauncherPage pushUrl error ' + JSON.stringify(error));
});
}, 1000);
}
onPageShow() {
this.context = getContext(this) as common.UIAbilityContext;
// Get the operation class for saving data.
this.getDataPreferences(this).then((preferences: preferences.Preferences) => {
preferences.get('isPrivacy', true).then((value: preferences.ValueType) => {
//Logger.info(CommonConstants.LAUNCHER_PAGE_TAG, 'onPageShow value: ' + value);
if (value) {
// let isJumpPrivacy: boolean = globalThis.isJumpPrivacy ?? false;
// let isJumpPrivacy: boolean = (GlobalContext.getContext().getObject('isJumpPrivacy') as boolean) ?? false;
// if (!isJumpPrivacy) {
this.dialogController.open();
// }
} else {
this.jumpToAdvertisingPage();
}
});
});
}
onPageHide() {
if (this.isJumpToAdvertising) {
router.clear();
}
// globalThis.isJumpPrivacy = true;
//GlobalContext.getContext().setObject('isJumpPrivacy', true);
clearTimeout(this.timerId);
}
getDataPreferences(common: Object) {
return preferences.getPreferences(getContext(common), 'myStore');
}
saveIsPrivacy() {
let preferences: Promise<preferences.Preferences> = this.getDataPreferences(this);
preferences.then((result: preferences.Preferences) => {
let privacyPut = result.put('isPrivacy', false);
result.flush();
privacyPut.then(() => {
//Logger.info('LauncherPage', 'Put the value of startup Successfully.');
}).catch((err: Error) => {
//Logger.error('LauncherPage', 'Put the value of startup Failed, err: ' + err);
});
}).catch((err: Error) => {
//Logger.error('LauncherPage', 'Get the preferences Failed, err: ' + err);
});
}
build(){
Stack({alignContent:Alignment.Bottom}){
Image($r('app.media.LaunchPage_logo'))
.width('278lpx')
.height('154lpx')
.margin({
bottom:'48lpx'
})
}
.width('100%')
.height('100%')
.backgroundColor(Color.White)
}
}
\ No newline at end of file
... ...
import { OtherUserHomeComponent } from 'wdComponent'
import router from '@ohos.router';
@Entry
@Component
struct OtherNormalUserHomePage {
@State userId: string = "111111111";
onPageShow() {
this.userId = router.getParams()?.["userId"]
console.log("ycg","==="+this.userId);
}
build() {
Column() {
OtherUserHomeComponent({curUserId:this.userId})
}
.height('100%')
.width('100%')
}
}
\ No newline at end of file
... ...
import webview from '@ohos.web.webview';
import router from '@ohos.router';
import { GlobalContext } from '../common/utils/GlobalContext'
@Entry
@Component
struct PrivacyPage {
@State message: string = 'Hello World'
webController: webview.WebviewController = new webview.WebviewController();
//@State params: object = router.getParams();
build() {
Row() {
Column() {
// Web component loading H5.
Web({ src: 'https://www.baidu.com', controller: this.webController })
.zoomAccess(false)
.width('100%')
.height('100%')
.aspectRatio(1)
// .onConfirm((event) => {
// AlertDialog.show({
// message: Const.WEB_ALERT_DIALOG_TEXT_VALUE + event?.message,
// confirm: {
// value: $r('app.string.web_alert_dialog_button_value'),
// action: () => {
// event?.result.handleConfirm();
// }
// },
// cancel: () => {
// event?.result.handleCancel();
// }
// });
// return true;
// })
// .onErrorReceive((event) => {
// if (event?.error.getErrorInfo() === 'ERR_INTERNET_DISCONNECTED') {
// prompt.showToast({
// message: $r('app.string.internet_err'),
// duration: Const.WebConstant_DURATION
// })
// }
// if (event?.error.getErrorInfo() === 'ERR_CONNECTION_TIMED_OUT') {
// prompt.showToast({
// message: $r('app.string.internet_err'),
// duration: Const.WebConstant_DURATION
// })
// }
// })
// .onProgressChange((event) => {
// if (event?.newProgress === Const.WebConstant_PROGRESS_MAX) {
// this.isLoading = false;
// clearInterval(this.intervalLoading);
// this.intervalLoading = -1;
// }
// })
}
.width('100%')
}
.height('100%')
}
}
\ No newline at end of file
... ...
import router from '@ohos.router';
import { GlobalContext } from '../common/utils/GlobalContext'
import { NavigatorModel } from '../viewModel/NavigatorModel';
@CustomDialog
export default struct CustomDialogComponent {
controller: CustomDialogController = new CustomDialogController({'builder': ''})
cancel: Function = () => {}
confirm: Function = () => {}
build(){
Column(){
Text($r('app.string.dialog_text_title'))
.width("90%")
.fontColor($r('app.color.dialog_text_color'))
.fontSize($r('app.float.dialog_text_privacy_size'))
.textAlign(TextAlign.Center)
.fontWeight('600')
.margin({
top: $r('app.float.dialog_text_privacy_top'),
bottom: $r('app.float.dialog_text_privacy_bottom')
})
Text($r('app.string.dialog_text_privacy_content'))
.fontSize($r('app.float.dialog_common_text_size'))
.width('90%')
Row(){
// Button(){
// Text($r('app.string.privacy_text_title_policy'))
// .fontSize('27lpx')
// .fontColor(Color.Red)
// .margin({left:'10lpx',right:'10lpx'})
// }
// .width('90%')
// .height('56lpx')
// .margin({top:'54lpx',right:'19lpx'})
// .backgroundColor('#80000000')
// .onClick(() => {
//
// })
// Button(){
// Text($r('app.string.privacy_text_title_protocol'))
// .fontSize('27lpx')
// .fontColor(Color.Red)
// .margin({left:'10lpx',right:'10lpx'})
// }
// .width('90%')
// .height('56lpx')
// .margin({top:'54lpx',right:'19lpx'})
// .backgroundColor('#80000000')
// .onClick(() => {
//
// })
// Navigator({ target: 'pages/PrivacyPage', type: NavigationType.Push }) {
// Button($r('app.string.privacy_text_title_policy'))
// .onClick(()=>{
// GlobalContext.getContext().setObject('isJumpPrivacy', true);
// })
// {
// // Text($r('app.string.privacy_text_title_policy'))
// // .fontSize($r('app.float.dialog_common_text_size'))
// // .width('50%')
// // .fontColor(Color.Red)
// // .onClick(() => {
// // GlobalContext.getContext().setObject('isJumpPrivacy', true);
// // })
// }
// .fancy(Const.MainConstant_BUTTON_MARGIN_TOP)
// }
// .params({ path: 'https://www.baidu.com', tips: '在线' } as NavigatorModel)
Text($r('app.string.privacy_text_title_policy'))
.fontSize($r('app.float.dialog_common_text_size'))
.width('40%')
.fontColor(Color.Red)
.onClick(() => {
//GlobalContext.getContext().setObject('isJumpPrivacy', false);
router.pushUrl({
url: 'pages/PrivacyPage'
}).catch((error: Error) => {
//Logger.error(CommonConstants.CUSTOM_DIALOG_TAG, 'CustomDialog pushUrl error ' + JSON.stringify(error));
});
})
Text($r('app.string.privacy_text_title_protocol'))
.fontSize($r('app.float.dialog_common_text_size'))
.width('40%')
.fontColor(Color.Red)
.onClick(() => {
//GlobalContext.getContext().setObject('isJumpPrivacy', true);
router.pushUrl({
url: 'pages/PrivacyPage'
}).catch((error: Error) => {
//Logger.error(CommonConstants.CUSTOM_DIALOG_TAG, 'CustomDialog pushUrl error ' + JSON.stringify(error));
});
})
}
Text($r('app.string.dialog_text_privacy_statement'))
.width('90%')
.fontColor($r('app.color.dialog_text_statement_color'))
.fontSize($r('app.float.dialog_common_text_size'))
Row() {
Text($r('app.string.dialog_button_disagree'))
.fancy()
.onClick(() => {
this.controller.close();
this.cancel();
})
Blank()
.backgroundColor($r('app.color.dialog_blank_background_color'))
.width($r('app.float.dialog_blank_width'))
.height($r('app.float.dialog_blank_height'))
Text($r('app.string.dialog_button_agree'))
.fancy()
.onClick(() => {
this.controller.close();
this.confirm();
})
}
.margin({ bottom: '1' })
}
.width('93%')
.borderRadius('15')
.backgroundColor(Color.White)
}
}
// Common text styles.
@Extend(Text) function fancy () {
.fontColor($r("app.color.dialog_fancy_text_color"))
.fontSize($r("app.float.dialog_fancy_text_size"))
.textAlign(TextAlign.Center)
.fontWeight(FontWeight.Medium)
.layoutWeight('1')
}
\ No newline at end of file
... ...
/**
* NewsData params info.
*/
export class NavigatorModel {
/**
* Jumping Path.
*/
path: Resource | string = '';
/**
* Prompt message.
*/
tips: Resource | string = '';
}
\ No newline at end of file
... ...
... ... @@ -7,6 +7,46 @@
{
"name": "color_F9F9F9",
"value": "#F9F9F9"
},
{
"name": "privacy_back_text",
"value": "#007DFF"
},
{
"name": "launcher_text_title_color",
"value": "#182431"
},
{
"name": "launcher_text_introduce_color",
"value": "#182431"
},
{
"name": "advertising_text_title_color",
"value": "#182431"
},
{
"name": "advertising_text_background_color",
"value": "#33000000"
},
{
"name": "home_page_text_color",
"value": "#14224D"
},
{
"name": "dialog_fancy_text_color",
"value": "#007DFF"
},
{
"name": "dialog_text_color",
"value": "#182431"
},
{
"name": "dialog_blank_background_color",
"value": "#F5F5F5"
},
{
"name": "dialog_text_statement_color",
"value": "#007DFF"
}
]
}
... ...
{
"float": [
{
"name": "float_1",
"value": "30.6"
},
{
"name": "launcher_logo_size",
"value": "119vp"
},
{
"name": "launcher_life_text_width",
"value": "105vp"
},
{
"name": "launcher_life_text_height",
"value": "35vp"
},
{
"name": "launcher_text_title_size",
"value": "26fp"
},
{
"name": "launcher_text_introduce_size",
"value": "16fp"
},
{
"name": "launcher_text_opacity",
"value": "0.6"
},
{
"name": "advertising_text_opacity",
"value": "0.4"
},
{
"name": "advertising_image_width",
"value": "54vp"
},
{
"name": "advertising_image_height",
"value": "54vp"
},
{
"name": "advertising_text_font_size",
"value": "12fp"
},
{
"name": "advertising_text_introduce_size",
"value": "16fp"
},
{
"name": "advertising_text_title_size",
"value": "26fp"
},
{
"name": "advertising_text_border_width",
"value": "1"
},
{
"name": "advertising_title_text_margin_top",
"value": "30vp"
},
{
"name": "advertising_title_text_margin_left",
"value": "260vp"
},
{
"name": "advertising_text_padding_top",
"value": "8vp"
},
{
"name": "advertising_text_padding_bottom",
"value": "8vp"
},
{
"name": "advertising_text_padding_left",
"value": "12vp"
},
{
"name": "advertising_text_padding_right",
"value": "12vp"
},
{
"name": "advertising_text_radius",
"value": "18vp"
},
{
"name": "dialog_blank_height",
"value": "32vp"
},
{
"name": "dialog_blank_width",
"value": "1vp"
},
{
"name": "dialog_common_text_size",
"value": "18fp"
},
{
"name": "dialog_text_privacy_size",
"value": "20fp"
},
{
"name": "dialog_fancy_text_size",
"value": "16fp"
},
{
"name": "dialog_text_privacy_bottom",
"value": "12vp"
},
{
"name": "dialog_text_privacy_top",
"value": "24vp"
},
{
"name": "dialog_text_declaration_bottom",
"value": "24"
},
{
"name": "dialog_text_opacity",
"value": "0.6"
},
{
"name": "privacy_text_title_size",
"value": "20fp"
},
{
"name": "privacy_back_text_size",
"value": "20fp"
},
{
"name": "privacy_text_margin_top",
"value": "10"
},
{
"name": "privacy_text_margin_bottom",
"value": "10"
},
{
"name": "privacy_bottom_text_margin",
"value": "12"
},
{
"name": "privacy_text_content_left",
"value": "24"
},
{
"name": "privacy_text_content_right",
"value": "24"
},
{
"name": "home_page_text_size",
"value": "30vp"
}
]
}
\ No newline at end of file
... ...
... ... @@ -11,6 +11,41 @@
{
"name": "EntryAbility_label",
"value": "$string:app_name"
},
{
"name": "dialog_text_title",
"value": "个人隐私保护指引"
},
{
"name": "dialog_text_subTitle",
"value": "欢迎您使用人民日报客户端!"
},
{
"name": "dialog_text_privacy_content",
"value": "为了更好地为您提供阅读新闻、发布评论等相关服务,我们会根据您使用服务的具体功能需要,收集必要的用户信息。您可通过阅读《隐私政策》和《用户协议》了解我们收集、使用、存储和共享个人信息的情况,以及对您个人隐私的保护措施。人民日报客户端深知个人信息对您的重要性,我们将以最高标准遵守法律法规要求,尽全力保护您的个人信息安全。"
},
{
"name": "dialog_text_privacy_statement",
"value": "如您同意,请点击“同意”开始接受"
},
{
"name": "dialog_button_disagree",
"value": "暂不使用"
},
{
"name": "dialog_button_agree",
"value": "同意"
},
{
"name": "privacy_text_title_policy",
"value": "《隐私政策》"
},
{
"name": "privacy_text_title_protocol",
"value": "《用户协议》"
}
]
}
\ No newline at end of file
... ...
... ... @@ -10,6 +10,10 @@
"pages/AppointmentListPage",
"pages/SettingPasswordPage",
"pages/FollowListPage",
"pages/MyHomePage"
"pages/MyHomePage",
"pages/LaunchPage",
"pages/LaunchAdvertisingPage",
"pages/PrivacyPage",
"pages/OtherNormalUserHomePage"
]
}
... ...
... ... @@ -11,6 +11,40 @@
{
"name": "EntryAbility_label",
"value": "$string:app_name"
},
{
"name": "dialog_text_title",
"value": "个人隐私保护指引"
},
{
"name": "dialog_text_subTitle",
"value": "欢迎您使用人民日报客户端!"
},
{
"name": "dialog_text_privacy_content",
"value": "为了更好地为您提供阅读新闻、发布评论等相关服务,我们会根据您使用服务的具体功能需要,收集必要的用户信息。您可通过阅读《隐私政策》和《用户协议》了解我们收集、使用、存储和共享个人信息的情况,以及对您个人隐私的保护措施。人民日报客户端深知个人信息对您的重要性,我们将以最高标准遵守法律法规要求,尽全力保护您的个人信息安全。"
},
{
"name": "dialog_text_privacy_statement",
"value": "如您同意,请点击“同意”开始接受"
},
{
"name": "dialog_button_disagree",
"value": "暂不使用"
},
{
"name": "dialog_button_agree",
"value": "同意"
},
{
"name": "privacy_text_title_policy",
"value": "《隐私政策》"
},
{
"name": "privacy_text_title_protocol",
"value": "《用户协议》"
}
]
}
\ No newline at end of file
... ...
{
"code": "0",
"message": "Success",
"requestId": "9a63f8f9e61d442880a7537763fd1769",
"success": true,
"timestamp": 1711589284588
}
\ No newline at end of file
... ...
{
"code": "0",
"data": null,
"message": "Success",
"meta": null,
"requestId": "",
"success": true,
"timestamp": 1711609914928
}
\ No newline at end of file
... ...
{
"code": "0",
"data": null,
"message": "Success",
"meta": null,
"requestId": "",
"success": true,
"timestamp": 1711609966231
}
\ No newline at end of file
... ...
{
"code": "0",
"data": {
"hasNext": 0,
"list": [
{
"avatarFrame": "",
"checkStatus": 2,
"commentContent": "方法就是\\ud83d\\udc4d",
"commentContentSensitive": "",
"commentLevel": 1,
"commentPics": "",
"commentSensitive": "",
"commentType": "2",
"createTime": "2024-02-19 14:14:16",
"fromCreatorId": "",
"fromDeviceId": "F0B98E7F-6479-462C-BA25-5FC574511C8A",
"fromUserHeader": "https://sitcontentjdcdn.aikan.pdnews.cn/null20240127/1630371072/1706336907262.jpg?x-oss-process=image/resize,l_100/auto-orient,1/quality,q_90/format,jpg",
"fromUserId": "512157124138245",
"fromUserName": "树下🍑 1122334",
"fromUserType": 1,
"h5Url": "",
"id": 403445,
"keyArticle": 0,
"likeNum": 3,
"pageId": null,
"parentCommentVo": null,
"parentId": -1,
"rootCommentId": 403445,
"sensitiveExist": 0,
"sensitiveShow": 1,
"shareInfo": {
"shareCoverUrl": "http://sitcontentjdcdn.aikan.pdnews.cn/zhbj-20231012/image/content/7f1a342a809d4276aa975ba9e7fe2313.png",
"shareSummary": "这是一个开始、请持续关注这是一个开始、请持续关注这是一个开始、请持续关注这是一个开始、请持续关注这是",
"shareTitle": "这是一个开始、请持续关注这是一个开始、请",
"shareUrl": "https://pd-people-sit.pdnews.cn/column/30000633703-500000008559"
},
"targetId": "30000633703",
"targetRelId": "500000008559",
"targetRelObjectId": "2002",
"targetRelType": 1,
"targetStatus": 0,
"targetTitle": "这是一个开始、请持续关注这是一个开始、请持续关注这是一个开始、请持续关注这是一个开始、请持续关注这是一个开始、请持续关注这是一个开始、请持续关注这是一个开始、请持续关注",
"targetType": 8,
"topicType": null,
"uuid": "5901a353-79aa-4b81-81d7-f6f13f0a6817"
},
{
"avatarFrame": "",
"checkStatus": 2,
"commentContent": "毕业",
"commentContentSensitive": "",
"commentLevel": 1,
"commentPics": "",
"commentSensitive": "",
"commentType": "2",
"createTime": "2024-01-29 17:39:04",
"fromCreatorId": "",
"fromDeviceId": "",
"fromUserHeader": "https://sitcontentjdcdn.aikan.pdnews.cn/null20240127/1630371072/1706336907262.jpg?x-oss-process=image/resize,l_100/auto-orient,1/quality,q_90/format,jpg",
"fromUserId": "512157124138245",
"fromUserName": "树下🍑 1122334",
"fromUserType": 1,
"h5Url": "",
"id": 303318,
"keyArticle": 0,
"likeNum": 0,
"pageId": null,
"parentCommentVo": null,
"parentId": -1,
"rootCommentId": 303318,
"sensitiveExist": 0,
"sensitiveShow": 1,
"shareInfo": {
"shareCoverUrl": "http://sitcontentjdcdn.aikan.pdnews.cn/zhbj-20230923/image/content/4b8f615d1b134546aa4903300c38fb5b.png",
"shareSummary": "人民日报,有品质的新闻",
"shareTitle": "【广东爱情故事】人在广东已经漂泊十年",
"shareUrl": "https://pd-people-sit.pdnews.cn/column/30000627490-500000007811"
},
"targetId": "30000627490",
"targetRelId": "500000007811",
"targetRelObjectId": "10000002083",
"targetRelType": 2,
"targetStatus": 0,
"targetTitle": "【广东爱情故事】人在广东已经漂泊十年",
"targetType": 13,
"topicType": null,
"uuid": "59339983-a9ee-4054-98aa-0eddbc6275a1"
},
{
"avatarFrame": "",
"checkStatus": 2,
"commentContent": "索尼👍",
"commentContentSensitive": "",
"commentLevel": 1,
"commentPics": "",
"commentSensitive": "",
"commentType": "2",
"createTime": "2024-01-29 17:38:56",
"fromCreatorId": "",
"fromDeviceId": "",
"fromUserHeader": "https://sitcontentjdcdn.aikan.pdnews.cn/null20240127/1630371072/1706336907262.jpg?x-oss-process=image/resize,l_100/auto-orient,1/quality,q_90/format,jpg",
"fromUserId": "512157124138245",
"fromUserName": "树下🍑 1122334",
"fromUserType": 1,
"h5Url": "",
"id": 303317,
"keyArticle": 0,
"likeNum": 0,
"pageId": null,
"parentCommentVo": null,
"parentId": -1,
"rootCommentId": 303317,
"sensitiveExist": 0,
"sensitiveShow": 1,
"shareInfo": {
"shareCoverUrl": "http://sitcontentjdcdn.aikan.pdnews.cn/zhbj-20230923/image/content/4b8f615d1b134546aa4903300c38fb5b.png",
"shareSummary": "人民日报,有品质的新闻",
"shareTitle": "【广东爱情故事】人在广东已经漂泊十年",
"shareUrl": "https://pd-people-sit.pdnews.cn/column/30000627490-500000007811"
},
"targetId": "30000627490",
"targetRelId": "500000007811",
"targetRelObjectId": "10000002083",
"targetRelType": 2,
"targetStatus": 0,
"targetTitle": "【广东爱情故事】人在广东已经漂泊十年",
"targetType": 13,
"topicType": null,
"uuid": "8808cffa-6496-4dc9-ac79-a65c8ada09d2"
},
{
"avatarFrame": "",
"checkStatus": 2,
"commentContent": "游客评论苹果",
"commentContentSensitive": "",
"commentLevel": 1,
"commentPics": "",
"commentSensitive": "",
"commentType": "2",
"createTime": "2024-01-27 15:00:24",
"fromCreatorId": "",
"fromDeviceId": "F0B98E7F-6479-462C-BA25-5FC574511C8A",
"fromUserHeader": "https://sitcontentjdcdn.aikan.pdnews.cn/null20240127/1630371072/1706336907262.jpg?x-oss-process=image/resize,l_100/auto-orient,1/quality,q_90/format,jpg",
"fromUserId": "512157124138245",
"fromUserName": "树下🍑 1122334",
"fromUserType": 1,
"h5Url": "",
"id": 403426,
"keyArticle": 0,
"likeNum": 1,
"pageId": null,
"parentCommentVo": null,
"parentId": -1,
"rootCommentId": 403426,
"sensitiveExist": 0,
"sensitiveShow": 1,
"shareInfo": {
"shareCoverUrl": "http://sitcontentjdcdn.aikan.pdnews.cn/zhbj-20231012/image/content/7f1a342a809d4276aa975ba9e7fe2313.png",
"shareSummary": "这是一个开始、请持续关注这是一个开始、请持续关注这是一个开始、请持续关注这是一个开始、请持续关注这是",
"shareTitle": "这是一个开始、请持续关注这是一个开始、请",
"shareUrl": "https://pd-people-sit.pdnews.cn/column/30000633703-500000008559"
},
"targetId": "30000633703",
"targetRelId": "500000008559",
"targetRelObjectId": "2002",
"targetRelType": 1,
"targetStatus": 0,
"targetTitle": "这是一个开始、请持续关注这是一个开始、请持续关注这是一个开始、请持续关注这是一个开始、请持续关注这是一个开始、请持续关注这是一个开始、请持续关注这是一个开始、请持续关注",
"targetType": 8,
"topicType": null,
"uuid": "a272d091-3697-44ca-95e6-532028eee776"
},
{
"avatarFrame": "",
"checkStatus": 2,
"commentContent": "游客账号评论安卓",
"commentContentSensitive": "",
"commentLevel": 1,
"commentPics": "",
"commentSensitive": "",
"commentType": "2",
"createTime": "2024-01-27 15:00:15",
"fromCreatorId": "",
"fromDeviceId": "23c43f15-37e9-3f2d-9999-bd1abbb7e0ed",
"fromUserHeader": "https://sitcontentjdcdn.aikan.pdnews.cn/null20240127/1630371072/1706336907262.jpg?x-oss-process=image/resize,l_100/auto-orient,1/quality,q_90/format,jpg",
"fromUserId": "512157124138245",
"fromUserName": "树下🍑 1122334",
"fromUserType": 1,
"h5Url": "",
"id": 403425,
"keyArticle": 0,
"likeNum": 0,
"pageId": null,
"parentCommentVo": null,
"parentId": -1,
"rootCommentId": 403425,
"sensitiveExist": 0,
"sensitiveShow": 1,
"shareInfo": {
"shareCoverUrl": "http://sitcontentjdcdn.aikan.pdnews.cn/zhbj-20231012/image/content/7f1a342a809d4276aa975ba9e7fe2313.png",
"shareSummary": "这是一个开始、请持续关注这是一个开始、请持续关注这是一个开始、请持续关注这是一个开始、请持续关注这是",
"shareTitle": "这是一个开始、请持续关注这是一个开始、请",
"shareUrl": "https://pd-people-sit.pdnews.cn/column/30000633703-500000008559"
},
"targetId": "30000633703",
"targetRelId": "500000008559",
"targetRelObjectId": "2002",
"targetRelType": 1,
"targetStatus": 0,
"targetTitle": "这是一个开始、请持续关注这是一个开始、请持续关注这是一个开始、请持续关注这是一个开始、请持续关注这是一个开始、请持续关注这是一个开始、请持续关注这是一个开始、请持续关注",
"targetType": 8,
"topicType": null,
"uuid": "62225e7a-9afd-4b8c-b9b6-71a5d610997d"
},
{
"avatarFrame": "",
"checkStatus": 2,
"commentContent": "你理解吗",
"commentContentSensitive": "",
"commentLevel": 1,
"commentPics": "",
"commentSensitive": "",
"commentType": "2",
"createTime": "2024-01-27 14:45:21",
"fromCreatorId": "",
"fromDeviceId": "23c43f15-37e9-3f2d-9999-bd1abbb7e0ed",
"fromUserHeader": "https://sitcontentjdcdn.aikan.pdnews.cn/null20240127/1630371072/1706336907262.jpg?x-oss-process=image/resize,l_100/auto-orient,1/quality,q_90/format,jpg",
"fromUserId": "512157124138245",
"fromUserName": "树下🍑 1122334",
"fromUserType": 1,
"h5Url": "",
"id": 403422,
"keyArticle": 0,
"likeNum": 0,
"pageId": null,
"parentCommentVo": null,
"parentId": -1,
"rootCommentId": 403422,
"sensitiveExist": 0,
"sensitiveShow": 1,
"shareInfo": {
"shareCoverUrl": "http://sitcontentjdcdn.aikan.pdnews.cn/zhbj-20231130/image/content/09ee931569d34781b9bbe85f5348873f.jpg",
"shareSummary": "人民日报,有品质的新闻",
"shareTitle": "点亮香港“小航天迷”的“太空梦”——内地航天专家走进香港中小学校园",
"shareUrl": "https://pd-people-sit.pdnews.cn/rmhphotos/30000650925"
},
"targetId": "30000650925",
"targetRelId": "500000013228",
"targetRelObjectId": "2058",
"targetRelType": 1,
"targetStatus": 0,
"targetTitle": "点亮香港“小航天迷”的“太空梦”——内地航天专家走进香港中小学校园",
"targetType": 9,
"topicType": null,
"uuid": "cc6b2322-ffa4-4a59-a7af-5e4a18afcbd3"
},
{
"avatarFrame": "",
"checkStatus": 2,
"commentContent": "你好我是游客",
"commentContentSensitive": "",
"commentLevel": 1,
"commentPics": "",
"commentSensitive": "",
"commentType": "2",
"createTime": "2024-01-27 14:40:19",
"fromCreatorId": "",
"fromDeviceId": "23c43f15-37e9-3f2d-9999-bd1abbb7e0ed",
"fromUserHeader": "https://sitcontentjdcdn.aikan.pdnews.cn/null20240127/1630371072/1706336907262.jpg?x-oss-process=image/resize,l_100/auto-orient,1/quality,q_90/format,jpg",
"fromUserId": "512157124138245",
"fromUserName": "树下🍑 1122334",
"fromUserType": 1,
"h5Url": "",
"id": 303306,
"keyArticle": 0,
"likeNum": 0,
"pageId": null,
"parentCommentVo": null,
"parentId": -1,
"rootCommentId": 303306,
"sensitiveExist": 0,
"sensitiveShow": 1,
"shareInfo": {
"shareCoverUrl": "http://sitcontentjdcdn.aikan.pdnews.cn/zhbj-20231130/image/content/09ee931569d34781b9bbe85f5348873f.jpg",
"shareSummary": "人民日报,有品质的新闻",
"shareTitle": "点亮香港“小航天迷”的“太空梦”——内地航天专家走进香港中小学校园",
"shareUrl": "https://pd-people-sit.pdnews.cn/rmhphotos/30000650925"
},
"targetId": "30000650925",
"targetRelId": "500000013228",
"targetRelObjectId": "2058",
"targetRelType": 1,
"targetStatus": 0,
"targetTitle": "点亮香港“小航天迷”的“太空梦”——内地航天专家走进香港中小学校园",
"targetType": 9,
"topicType": null,
"uuid": "9fac53da-603f-444a-8807-4f5feacf55bb"
},
{
"avatarFrame": "",
"checkStatus": 2,
"commentContent": "你好我是游客",
"commentContentSensitive": "",
"commentLevel": 1,
"commentPics": "",
"commentSensitive": "",
"commentType": "2",
"createTime": "2024-01-27 14:34:30",
"fromCreatorId": "",
"fromDeviceId": "23c43f15-37e9-3f2d-9999-bd1abbb7e0ed",
"fromUserHeader": "https://sitcontentjdcdn.aikan.pdnews.cn/null20240127/1630371072/1706336907262.jpg?x-oss-process=image/resize,l_100/auto-orient,1/quality,q_90/format,jpg",
"fromUserId": "512157124138245",
"fromUserName": "树下🍑 1122334",
"fromUserType": 1,
"h5Url": "",
"id": 403420,
"keyArticle": 0,
"likeNum": 0,
"pageId": null,
"parentCommentVo": null,
"parentId": -1,
"rootCommentId": 403420,
"sensitiveExist": 0,
"sensitiveShow": 1,
"shareInfo": {
"shareCoverUrl": "http://sitcontentjdcdn.aikan.pdnews.cn/image/creator/2024012911/f2f9fe93ca464d05bc0407a385ad877b.png",
"shareSummary": "爸爸角色扮演医生,在宝蓝比赛摔倒的时候悉心照顾,其他小朋友也要注意呀!",
"shareTitle": "爸爸角色扮演医生,在宝蓝比赛摔倒的时候悉心照顾,其他小朋友也要注意呀!",
"shareUrl": "https://pd-people-sit.pdnews.cn/rmhvideo/30000716043"
},
"targetId": "30000716043",
"targetRelId": "500000030952",
"targetRelObjectId": "2058",
"targetRelType": 1,
"targetStatus": 0,
"targetTitle": "爸爸角色扮演医生,在宝蓝比赛摔倒的时候悉心照顾,其他小朋友也要注意呀!",
"targetType": 1,
"topicType": null,
"uuid": "31305151-6b9c-49ea-8e5b-9e4b8fffe79d"
},
{
"avatarFrame": "",
"checkStatus": 2,
"commentContent": "游客账号",
"commentContentSensitive": "",
"commentLevel": 1,
"commentPics": "",
"commentSensitive": "",
"commentType": "2",
"createTime": "2024-01-27 14:27:52",
"fromCreatorId": "",
"fromDeviceId": "23c43f15-37e9-3f2d-9999-bd1abbb7e0ed",
"fromUserHeader": "https://sitcontentjdcdn.aikan.pdnews.cn/null20240127/1630371072/1706336907262.jpg?x-oss-process=image/resize,l_100/auto-orient,1/quality,q_90/format,jpg",
"fromUserId": "512157124138245",
"fromUserName": "树下🍑 1122334",
"fromUserType": 1,
"h5Url": "",
"id": 403417,
"keyArticle": 0,
"likeNum": 0,
"pageId": null,
"parentCommentVo": null,
"parentId": -1,
"rootCommentId": 403417,
"sensitiveExist": 0,
"sensitiveShow": 1,
"shareInfo": {
"shareCoverUrl": "",
"shareSummary": "人民日报,有品质的新闻",
"shareTitle": "跟着习主席看世界|同舟共济 打造人类卫生健康共同体",
"shareUrl": "https://pd-people-sit.pdnews.cn/column/30000628337-500000004210"
},
"targetId": "30000628337",
"targetRelId": "500000004210",
"targetRelObjectId": "2002",
"targetRelType": 1,
"targetStatus": 0,
"targetTitle": "跟着习主席看世界|同舟共济 打造人类卫生健康共同体",
"targetType": 8,
"topicType": null,
"uuid": "034911cc-34ca-4209-add2-46f48f4b2104"
},
{
"avatarFrame": "",
"checkStatus": 2,
"commentContent": "我是游客",
"commentContentSensitive": "",
"commentLevel": 1,
"commentPics": "",
"commentSensitive": "",
"commentType": "2",
"createTime": "2024-01-27 14:25:34",
"fromCreatorId": "",
"fromDeviceId": "F0B98E7F-6479-462C-BA25-5FC574511C8A",
"fromUserHeader": "https://sitcontentjdcdn.aikan.pdnews.cn/null20240127/1630371072/1706336907262.jpg?x-oss-process=image/resize,l_100/auto-orient,1/quality,q_90/format,jpg",
"fromUserId": "512157124138245",
"fromUserName": "树下🍑 1122334",
"fromUserType": 1,
"h5Url": "",
"id": 303305,
"keyArticle": 0,
"likeNum": 0,
"pageId": null,
"parentCommentVo": null,
"parentId": -1,
"rootCommentId": 303305,
"sensitiveExist": 0,
"sensitiveShow": 1,
"shareInfo": {
"shareCoverUrl": "http://sitcontentjdcdn.aikan.pdnews.cn/zhbj-20240127/image/content/e8d93872483a48c7a4eaa48f70211ab1.png",
"shareSummary": "人民日报,有品质的新闻",
"shareTitle": "“大学也有家长群",
"shareUrl": "https://pd-people-sit.pdnews.cn/column/30000723442-500000031275"
},
"targetId": "30000723442",
"targetRelId": "500000031275",
"targetRelObjectId": "2002",
"targetRelType": 1,
"targetStatus": 0,
"targetTitle": "“大学也有家长群",
"targetType": 8,
"topicType": null,
"uuid": "0b0aa5ef-b2de-4d01-9f5a-274c5122560f"
},
{
"avatarFrame": "",
"checkStatus": 2,
"commentContent": "你好,我是游客动态",
"commentContentSensitive": "",
"commentLevel": 1,
"commentPics": "",
"commentSensitive": "",
"commentType": "2",
"createTime": "2024-01-27 14:24:56",
"fromCreatorId": "",
"fromDeviceId": "23c43f15-37e9-3f2d-9999-bd1abbb7e0ed",
"fromUserHeader": "https://sitcontentjdcdn.aikan.pdnews.cn/null20240127/1630371072/1706336907262.jpg?x-oss-process=image/resize,l_100/auto-orient,1/quality,q_90/format,jpg",
"fromUserId": "512157124138245",
"fromUserName": "树下🍑 1122334",
"fromUserType": 1,
"h5Url": "",
"id": 303304,
"keyArticle": 0,
"likeNum": 0,
"pageId": null,
"parentCommentVo": null,
"parentId": -1,
"rootCommentId": 303304,
"sensitiveExist": 0,
"sensitiveShow": 1,
"shareInfo": {
"shareCoverUrl": "http://sitcontentjdcdn.aikan.pdnews.cn/zhbj-20231130/image/content/3e0cce06724740f0807ff0731c4a1d03/C4BC1C53-2B9C-4A54-BF95-044242D78260.jpg",
"shareSummary": "发布动态带活动13",
"shareTitle": "发布动态带活动13",
"shareUrl": "https://pd-people-sit.pdnews.cn/rmhmoments/30000650969"
},
"targetId": "30000650969",
"targetRelId": "500000013237",
"targetRelObjectId": "2058",
"targetRelType": 1,
"targetStatus": 0,
"targetTitle": "发布动态带活动13",
"targetType": 14,
"topicType": null,
"uuid": "ae2b2ece-d036-4b01-91e7-9708b0b5fe1c"
},
{
"avatarFrame": "",
"checkStatus": 2,
"commentContent": "你好我是游客",
"commentContentSensitive": "",
"commentLevel": 1,
"commentPics": "",
"commentSensitive": "",
"commentType": "2",
"createTime": "2024-01-27 14:24:19",
"fromCreatorId": "",
"fromDeviceId": "23c43f15-37e9-3f2d-9999-bd1abbb7e0ed",
"fromUserHeader": "https://sitcontentjdcdn.aikan.pdnews.cn/null20240127/1630371072/1706336907262.jpg?x-oss-process=image/resize,l_100/auto-orient,1/quality,q_90/format,jpg",
"fromUserId": "512157124138245",
"fromUserName": "树下🍑 1122334",
"fromUserType": 1,
"h5Url": "",
"id": 303302,
"keyArticle": 0,
"likeNum": 0,
"pageId": null,
"parentCommentVo": null,
"parentId": -1,
"rootCommentId": 303302,
"sensitiveExist": 0,
"sensitiveShow": 1,
"shareInfo": {
"shareCoverUrl": "http://sitcontentjdcdn.aikan.pdnews.cn/zhbj-20240127/image/content/e8d93872483a48c7a4eaa48f70211ab1.png",
"shareSummary": "人民日报,有品质的新闻",
"shareTitle": "“大学也有家长群",
"shareUrl": "https://pd-people-sit.pdnews.cn/column/30000723442-500000031275"
},
"targetId": "30000723442",
"targetRelId": "500000031275",
"targetRelObjectId": "2002",
"targetRelType": 1,
"targetStatus": 0,
"targetTitle": "“大学也有家长群",
"targetType": 8,
"topicType": null,
"uuid": "766a6bac-aa1d-4e88-a798-f19bade201ee"
}
],
"pageNum": 1,
"pageSize": 20,
"totalCommentNum": 12,
"totalCount": 12
},
"message": "Success",
"meta": null,
"requestId": "",
"success": true,
"timestamp": 1711440876958
}
\ No newline at end of file
... ...
{
"code": "0",
"data": [
{
"commentId": 403445,
"status": 1
},
{
"commentId": 303318,
"status": 0
},
{
"commentId": 303317,
"status": 0
},
{
"commentId": 403426,
"status": 1
},
{
"commentId": 403425,
"status": 0
},
{
"commentId": 403422,
"status": 0
},
{
"commentId": 303306,
"status": 0
},
{
"commentId": 403420,
"status": 0
},
{
"commentId": 403417,
"status": 0
},
{
"commentId": 303305,
"status": 0
},
{
"commentId": 303304,
"status": 0
},
{
"commentId": 303302,
"status": 0
}
],
"message": "Success",
"meta": null,
"requestId": "",
"success": true,
"timestamp": 1711440877105
}
\ No newline at end of file
... ...
{
"code": "0",
"data": {
"articleCreation": 0,
"attentionNum": 1,
"authIcon": "",
"authId": 0,
"authPersonal": "",
"authTitle": "",
"avatarFrame": "",
"banControl": 0,
"browseNum": 76,
"categoryAuth": "",
"city": "",
"cnContentPublish": 0,
"cnIsComment": 0,
"cnIsLike": 0,
"cnLiveCommentControl": 0,
"cnLiveGiftControl": 0,
"cnLiveLikeControl": 0,
"cnLivePublish": 0,
"cnLiveShareControl": 0,
"cnShareControl": 0,
"contentPublish": 0,
"creatorId": "",
"district": "",
"dynamicControl": 0,
"dynamicCreation": 0,
"fansNum": 0,
"headPhotoUrl": "https://sitcontentjdcdn.aikan.pdnews.cn/null20240127/1630371072/1706336907262.jpg",
"honoraryIcon": "",
"honoraryTitle": "",
"introduction": "",
"isAttention": 0,
"isComment": 0,
"isLike": 0,
"liveCommentControl": 0,
"liveGiftControl": 0,
"liveLikeControl": 0,
"livePublish": 0,
"liveShareControl": 0,
"liveSwitch": 0,
"mainControl": 1,
"originUserId": "",
"pictureCollectionCreation": 0,
"posterShareControl": 1,
"province": "",
"region": "安徽省",
"registTime": 1703485580000,
"shareControl": 0,
"shareUrl": "",
"subjectType": 0,
"userId": "512157124138245",
"userName": "树下🍑 1122334",
"userType": "1",
"videoCollectionCreation": 0,
"videoCreation": 0
},
"message": "Success",
"meta": null,
"requestId": "",
"success": true,
"timestamp": 1711440875633
}
\ No newline at end of file
... ...
{
"code": "0",
"data": [
{
"level": 2,
"levelHead": "http://rmrb-video-content-sit.oss-cn-beijing.aliyuncs.com/sjbj-20240125/image/display/88c45bf56ac941b883c69bd8ed373164.png",
"userId": 512157124138245
}
],
"message": "Success",
"success": true,
"timestamp": 1711440876088
}
\ No newline at end of file
... ...
{
"code": "0",
"data": {
"hasNext": 0,
"list": [
{
"attentionCreatorId": "3259284",
"attentionHeadPhotoUrl": "https://sitcontentjdcdn.aikan.pdnews.cn/vod/content/202401/20240127161739536/eUj.png?x-oss-process=image/resize,l_400/auto-orient,1/quality,q_90/format,jpg",
"attentionNum": 0,
"attentionUserId": "535571576006021",
"attentionUserName": "斯特的7778",
"attentionUserType": 2,
"authIcon": "",
"authId": 0,
"authPersional": "",
"authTitle": "",
"banControl": 0,
"categoryAuth": "",
"cnLiveCommentControl": 1,
"cnLiveGiftControl": 1,
"cnLiveLikeControl": 1,
"cnLiveShareControl": 1,
"cnShareControl": 1,
"collectNum": 1,
"commentNum": 0,
"createTime": 1706344099000,
"fansNum": 1,
"honoraryIcon": "",
"honoraryTitle": "",
"id": 100703,
"introduction": "暗黑世界顶级",
"isAttention": 0,
"isComment": 1,
"isLike": 1,
"isVisiable": 1,
"likeNum": 0,
"liveCommentControl": 1,
"liveGiftControl": 1,
"liveLikeControl": 1,
"liveShareControl": 1,
"mainControl": 1,
"posterShareControl": 0,
"registTime": 1706343790000,
"shareControl": 1,
"shareNum": 7,
"status": 1,
"subjectType": null,
"updateTime": 1706344099000,
"userId": "512157124138245",
"userType": 1
}
],
"pageNum": 1,
"pageSize": 20,
"totalCount": 1
},
"message": "Success",
"meta": null,
"requestId": "",
"success": true,
"timestamp": 1711441048304
}
\ No newline at end of file
... ...
... ... @@ -11,6 +11,38 @@
{
"name": "EntryAbility_label",
"value": "$string:app_name"
},
{
"name": "dialog_text_title",
"value": "个人隐私保护指引"
},
{
"name": "dialog_text_subTitle",
"value": "欢迎您使用人民日报客户端!"
},
{
"name": "dialog_text_privacy_content",
"value": "为了更好地为您提供阅读新闻、发布评论等相关服务,我们会根据您使用服务的具体功能需要,收集必要的用户信息。您可通过阅读《隐私政策》和《用户协议》了解我们收集、使用、存储和共享个人信息的情况,以及对您个人隐私的保护措施。人民日报客户端深知个人信息对您的重要性,我们将以最高标准遵守法律法规要求,尽全力保护您的个人信息安全。"
},
{
"name": "dialog_text_privacy_statement",
"value": "如您同意,请点击“同意”开始接受"
},
{
"name": "dialog_button_disagree",
"value": "暂不使用"
},
{
"name": "dialog_button_agree",
"value": "同意"
},
{
"name": "privacy_text_title_policy",
"value": "《隐私政策》"
},
{
"name": "privacy_text_title_protocol",
"value": "《用户协议》"
}
]
}
\ No newline at end of file
... ...
{
"requests" : [
]
}
\ No newline at end of file
... ...
... ... @@ -42,4 +42,6 @@ export { SettingPasswordLayout } from "./components/page/SettingPasswordLayout"
export { FollowFirstTabsComponent } from "./components/page/mine/follow/FollowFirstTabsComponent"
export { MyHomeComponent } from "./components/page/mine/MyHomeComponent"
export { MyHomeComponent } from "./components/page/mine/home/MyHomeComponent"
export { OtherUserHomeComponent } from "./components/page/mine/home/OtherUserHomeComponent"
\ No newline at end of file
... ...
import MinePageDatasModel from '../../../../model/MinePageDatasModel'
import { AppointmentOperationRequestItem } from '../../../../viewmodel/AppointmentOperationRequestItem'
import { MineAppointmentItem } from '../../../../viewmodel/MineAppointmentItem'
import { MyCustomDialog } from '../../../reusable/MyCustomDialog'
@Component
export struct AppointmentListChildComponent{
@ObjectLink item: MineAppointmentItem
dialogController: CustomDialogController = new CustomDialogController({
builder: MyCustomDialog({
cancel: this.onCancel,
confirm: this.onAccept.bind(this),//如果后期回调方法里 要使用this,一定要bind
title: "提示",
tipValue: '是否确认取消预约',
}),
autoCancel: true,
alignment: DialogAlignment.Center,
offset: { dx: 0, dy: -20 },
gridCount: 4,
customStyle: false
})
build() {
Column(){
Stack(){
... ... @@ -95,8 +112,7 @@ export struct AppointmentListChildComponent{
.height('46lpx')
.borderRadius('6lpx')
.onClick(()=>{
this.item.isAppointment = !this.item.isAppointment
//TODO 预约动作
this.dialogController.open()
})
}else {
Text(this.item.relType === 2?"去观看":"看回放")
... ... @@ -117,4 +133,25 @@ export struct AppointmentListChildComponent{
.backgroundColor($r('app.color.white'))
.borderRadius('8lpx')
}
onCancel() {
console.info('Callback when the first button is clicked')
}
onAccept() {
console.info('Callback when the second button is clicked')
this.appointmentOperation()
}
appointmentOperation(){
let item = new AppointmentOperationRequestItem(this.item.relId,this.item.liveId+"",!this.item.isAppointment)
MinePageDatasModel.getAppointmentOperation(item,getContext(this)).then((value)=>{
if(value!=null){
if (value.code === 0 || value.code.toString() === "0") {
this.item.isAppointment = !this.item.isAppointment
}
}
})
}
}
\ No newline at end of file
... ...
... ... @@ -71,9 +71,9 @@ export struct AppointmentListUI{
value.list.forEach((value)=>{
let dealTime = this.DealStartTime(value.planStartTime)
if(dealTime!=null && dealTime.length === 2){
this.data.push(new MineAppointmentItem(value.imageUrl,value.status,value.title,true,dealTime[0],dealTime[1],value.relType))
this.data.push(new MineAppointmentItem(value.imageUrl,value.status,value.title,true,dealTime[0],dealTime[1],value.relType,value.liveId,value.relId))
}else {
this.data.push(new MineAppointmentItem(value.imageUrl,value.status,value.title,true,"","",value.relType))
this.data.push(new MineAppointmentItem(value.imageUrl,value.status,value.title,true,"","",value.relType,value.liveId,value.relId))
}
})
this.data.notifyDataReload()
... ...
import { LazyDataSource, StringUtils } from 'wdKit';
import MinePageDatasModel from '../../../../model/MinePageDatasModel';
import { HttpUrlUtils } from '../../../../network/HttpUrlUtils';
import { Params } from '../../../../repository/bean/Params';
import RouteManager from '../../../../utils/RouteManager';
import { FollowListDetailItem } from '../../../../viewmodel/FollowListDetailItem'
import { FollowListDetailRequestItem } from '../../../../viewmodel/FollowListDetailRequestItem';
import { FollowListStatusRequestItem } from '../../../../viewmodel/FollowListStatusRequestItem';
import { FollowOperationRequestItem } from '../../../../viewmodel/FollowOperationRequestItem';
import { MineFollowListDetailItem } from '../../../../viewmodel/MineFollowListDetailItem';
import { QueryListIsFollowedItem } from '../../../../viewmodel/QueryListIsFollowedItem';
import { RouterObject } from '../../../../viewmodel/RouterObject';
import { ListHasNoMoreDataUI } from '../../../reusable/ListHasNoMoreDataUI';
const TAG = "FollowListDetailUI"
... ... @@ -72,7 +77,7 @@ export struct FollowListDetailUI{
this.hasMore = false
}else{
value.list.forEach((value)=>{
this.data.push(new FollowListDetailItem(value.attentionHeadPhotoUrl,value.attentionUserName,value.fansNum,value.introduction,value.attentionCreatorId,"1"))
this.data.push(new FollowListDetailItem(value.attentionHeadPhotoUrl,value.attentionUserName,value.fansNum,value.introduction,value.attentionCreatorId,"1",value.attentionUserId,value.attentionUserType,value.attentionUserId))
})
this.data.notifyDataReload()
this.count = this.data.totalCount()
... ... @@ -90,9 +95,6 @@ export struct FollowListDetailUI{
}
}else{
if(this.hasMore){
if(this.creatorDirectoryId === 120){
console.log("console");
}
let object = new FollowListDetailRequestItem(this.creatorDirectoryId,20,this.curPageNum)
MinePageDatasModel.getFollowListDetailData(object,getContext(this)).then((value)=>{
... ... @@ -115,7 +117,7 @@ export struct FollowListDetailUI{
let data : FollowListDetailItem[] = []
value.list.forEach((item)=>{
status.creatorIds.push(new QueryListIsFollowedItem(item.creatorId))
data.push(new FollowListDetailItem(item.headPhotoUrl,item.cnUserName,item.cnFansNum,item.introduction,item.creatorId,"0"))
data.push(new FollowListDetailItem(item.headPhotoUrl,item.cnUserName,item.cnFansNum,item.introduction,item.creatorId,"0",item.attentionUserId,item.cnUserType,item.cnUserId))
})
MinePageDatasModel.getFollowListStatusData(status,getContext(this)).then((newValue)=>{
... ... @@ -128,7 +130,7 @@ export struct FollowListDetailUI{
})
data.forEach((item)=>{
this.data.push(new FollowListDetailItem(item.headPhotoUrl,item.cnUserName,item.cnFansNum,item.introduction,item.creatorId,item.status))
this.data.push(new FollowListDetailItem(item.headPhotoUrl,item.cnUserName,item.cnFansNum,item.introduction,item.creatorId,item.status,item.attentionUserId,item.cnUserType,item.cnUserId))
})
this.data.notifyDataReload()
... ... @@ -198,7 +200,8 @@ struct ChildComponent {
.height('46lpx')
.margin({left:'4lpx',top:'23lpx'})
.onClick(()=>{
this.data.status = "0"
this.followOperation()
// this.data.status = "0"
})
}else{
Row(){
... ... @@ -219,7 +222,8 @@ struct ChildComponent {
.height('46lpx')
.margin({left:'4lpx',top:'23lpx'})
.onClick(()=>{
this.data.status = "1"
this.followOperation()
// this.data.status = "1"
})
}
}.alignItems(VerticalAlign.Top)
... ... @@ -233,5 +237,19 @@ struct ChildComponent {
}.height('146lpx')
.justifyContent(FlexAlign.Center)
.onClick(()=>{
//跳转 人民号的 主页
// RouteManager.jumpNewPage("pages/OtherNormalUserHomePage",new RouterObject(this.data.attentionUserId,0))
})
}
followOperation(){
let item = new FollowOperationRequestItem(this.data.cnUserType,this.data.cnUserId,this.data.creatorId,HttpUrlUtils.getYcgUserType(),HttpUrlUtils.getYcgUserId(),this.data.status==="0" ? 1:0)
MinePageDatasModel.getFollowOperation(item,getContext(this)).then((value)=>{
if(value!=null){
if (value.code === 0 || value.code.toString() === "0") {
this.data.status = this.data.status ==="0"?"1":"0"
}
}
})
}
}
\ No newline at end of file
... ...
import { LazyDataSource, StringUtils } from 'wdKit';
import MinePageDatasModel from '../../../../model/MinePageDatasModel';
import { Params } from '../../../../repository/bean/Params';
import { HttpUrlUtils } from '../../../../network/HttpUrlUtils';
import RouteManager from '../../../../utils/RouteManager';
import { CommentListItem } from '../../../../viewmodel/CommentListItem';
import { FollowListDetailItem } from '../../../../viewmodel/FollowListDetailItem';
import { FollowListDetailRequestItem } from '../../../../viewmodel/FollowListDetailRequestItem';
import { FollowOperationRequestItem } from '../../../../viewmodel/FollowOperationRequestItem';
import { RouterObject } from '../../../../viewmodel/RouterObject';
import { ListHasNoMoreDataUI } from '../../../reusable/ListHasNoMoreDataUI';
const TAG = "HomePageBottomComponent"
... ... @@ -17,6 +19,7 @@ export struct HomePageBottomComponent{
@State hasMore:boolean = true
curPageNum:number = 1;
@State count:number = 0;
@Prop levelHead:string
aboutToAppear(){
this.getNewPageData()
... ... @@ -56,10 +59,7 @@ export struct HomePageBottomComponent{
.backgroundColor($r('app.color.color_F5F5F5'))
.margin({top:'31lpx',bottom:'4lpx'})
}.onClick(()=>{
let params: Params = {
pageID: "1"
}
RouteManager.jumpNewPage("pages/FollowListPage",params)
RouteManager.jumpNewPage("pages/FollowListPage",new RouterObject('',1))
})
LazyForEach(this.data_follow, (item: FollowListDetailItem, index: number = 0) => {
... ... @@ -97,7 +97,7 @@ export struct HomePageBottomComponent{
List({ space: 3 }) {
LazyForEach(this.data_comment, (item: CommentListItem, index: number = 0) => {
ListItem() {
ChildCommentComponent({data: item})
ChildCommentComponent({data: item,levelHead:this.levelHead})
}
.onClick(() => {
})
... ... @@ -152,7 +152,7 @@ export struct HomePageBottomComponent{
this.hasMore = false
}else{
value.list.forEach((value)=>{
this.data_follow.push(new FollowListDetailItem(value.attentionHeadPhotoUrl,value.attentionUserName,value.fansNum,value.introduction,value.attentionCreatorId,"1"))
this.data_follow.push(new FollowListDetailItem(value.attentionHeadPhotoUrl,value.attentionUserName,value.fansNum,value.introduction,value.attentionCreatorId,"1",value.attentionUserId,value.attentionUserType,value.attentionUserId))
})
this.data_follow.notifyDataReload()
this.count = this.data_follow.totalCount()
... ... @@ -177,7 +177,7 @@ export struct HomePageBottomComponent{
this.hasMore = false
}else{
value.list.forEach((value)=>{
this.data_comment.push(new CommentListItem(value.fromUserHeader,value.fromUserName,value.targetTitle,value.createTime,value.commentContent))
this.data_comment.push(new CommentListItem(value.fromUserHeader,value.fromUserName,value.targetTitle,value.createTime,value.commentContent,value.likeNum,0,value.id,value.targetId,value.targetType))
})
this.data_comment.notifyDataReload()
this.count = this.data_comment.totalCount()
... ... @@ -246,7 +246,8 @@ struct ChildFollowComponent {
.height('46lpx')
.margin({left:'4lpx',top:'23lpx'})
.onClick(()=>{
this.data.status = "0"
// this.data.status = "0"
this.followOperation()
})
}else{
Row(){
... ... @@ -267,7 +268,8 @@ struct ChildFollowComponent {
.height('46lpx')
.margin({left:'4lpx',top:'23lpx'})
.onClick(()=>{
this.data.status = "1"
// this.data.status = "1"
this.followOperation()
})
}
}.alignItems(VerticalAlign.Top)
... ... @@ -282,20 +284,40 @@ struct ChildFollowComponent {
}.height('146lpx')
.justifyContent(FlexAlign.Center)
}
followOperation(){
let item = new FollowOperationRequestItem(this.data.cnUserType,this.data.cnUserId,this.data.creatorId,HttpUrlUtils.getYcgUserType(),HttpUrlUtils.getYcgUserId(),this.data.status==="0" ? 1:0)
MinePageDatasModel.getFollowOperation(item,getContext(this)).then((value)=>{
if(value!=null){
if (value.code === 0 || value.code.toString() === "0") {
this.data.status = this.data.status ==="0"?"1":"0"
}
}
})
}
}
@Component
struct ChildCommentComponent {
@ObjectLink data: CommentListItem
@Prop levelHead:string
build() {
Column(){
Row() {
Image(StringUtils.isEmpty(this.data.fromUserHeader)?$r('app.media.default_head'):this.data.fromUserHeader)
Stack(){
Image(this.data.fromUserHeader)
.alt($r('app.media.default_head'))
.objectFit(ImageFit.Auto)
.width('69lpx')
.height('69lpx')
.margin({right:'15lpx'})
.borderRadius(50)
Image(this.levelHead)
.width('89lpx')
.height('89lpx')
.objectFit(ImageFit.Cover)
.borderRadius(50)
}.margin({right:'15lpx'})
Column(){
Text(this.data.fromUserName)
... ... @@ -359,4 +381,7 @@ struct ChildCommentComponent {
}
.justifyContent(FlexAlign.Center)
}
}
\ No newline at end of file
... ...
import router from '@ohos.router';
import { StringUtils } from 'wdKit/src/main/ets/utils/StringUtils';
import MinePageDatasModel from '../../../model/MinePageDatasModel';
import { HomePageBottomComponent } from './home/HomePageBottomComponent';
import MinePageDatasModel from '../../../../model/MinePageDatasModel';
import RouteManager from '../../../../utils/RouteManager';
import { Params } from '../../../../repository/bean/Params';
import { HomePageBottomComponent } from './HomePageBottomComponent';
import { RouterObject } from '../../../../viewmodel/RouterObject';
const TAG = "MyHomeComponent"
... ... @@ -61,7 +64,9 @@ export struct MyHomeComponent {
.height('130lpx')
.objectFit(ImageFit.Cover)
.borderRadius(50)
}
}.onClick(()=>{
RouteManager.jumpNewPage("pages/OtherNormalUserHomePage",new RouterObject('512157124138245',0))
})
Column() {
Row() {
Text(`${this.userName}`)
... ... @@ -175,10 +180,10 @@ export struct MyHomeComponent {
//tab 页面
Tabs({controller: this.controller}) {
TabContent() {
HomePageBottomComponent({style:0})
HomePageBottomComponent({style:0,levelHead:this.levelHead})
}.tabBar(this.TabBuilder(0,"评论"))
TabContent() {
HomePageBottomComponent({style:1})
HomePageBottomComponent({style:1,levelHead:this.levelHead})
}.tabBar(this.TabBuilder(1,"关注"))
}
.backgroundColor($r('app.color.white'))
... ... @@ -256,7 +261,9 @@ export struct MyHomeComponent {
.onClick(() => {
router.back()
})
Image($r('app.media.default_head'))
Image(this.headPhotoUrl)
.borderRadius(50)
.alt($r('app.media.default_head'))
.width('60lpx')
.height('60lpx')
.objectFit(ImageFit.Auto)
... ... @@ -270,7 +277,7 @@ export struct MyHomeComponent {
router.back()
})
Text("我的昵称")
Text(this.userName)
.height('42lpx')
.maxLines(1)
.id("title")
... ...
import { DateTimeUtils, LazyDataSource, StringUtils } from 'wdKit';
import { CommentListItem } from '../../../../viewmodel/CommentListItem';
import { ListHasNoMoreDataUI } from '../../../reusable/ListHasNoMoreDataUI';
import { OtherUserCommentListRequestItem } from '../../../../viewmodel/OtherUserCommentListRequestItem';
import MinePageDatasModel from '../../../../model/MinePageDatasModel';
import { MineCommentListDetailItem } from '../../../../viewmodel/MineCommentListDetailItem';
import { OtherUserCommentLikeStatusRequestItem } from '../../../../viewmodel/OtherUserCommentLikeStatusRequestItem';
import { CommentLikeOperationRequestItem } from '../../../../viewmodel/CommentLikeOperationRequestItem';
const TAG = "HomePageBottomComponent"
@Component
export struct OtherHomePageBottomCommentComponent{
@Prop curUserId: string
@State data_comment: LazyDataSource<CommentListItem> = new LazyDataSource();
@State isLoading:boolean = false
@State hasMore:boolean = true
curPageNum:number = 1;
@State count:number = 0;
@Prop levelHead:string
aboutToAppear(){
this.getNewPageData()
}
build(){
Column(){
Divider().width('100%')
.height('2lpx')
.strokeWidth('1lpx')
.backgroundColor($r('app.color.color_EDEDED'))
if(this.count === 0){
ListHasNoMoreDataUI({style:2})
.height('100%')
}else{
List({ space: 3 }) {
LazyForEach(this.data_comment, (item: CommentListItem, index: number = 0) => {
ListItem() {
ChildCommentComponent({data: item,levelHead:this.levelHead})
}
.onClick(() => {
})
}, (item: CommentListItem, index: number) => index.toString())
//没有更多数据 显示提示
if(!this.hasMore){
ListItem(){
ListHasNoMoreDataUI()
}
}
}.cachedCount(15)
.layoutWeight(1)
.scrollBar(BarState.Off)
.edgeEffect(EdgeEffect.None)
// .nestedScroll({
// scrollForward: NestedScrollMode.PARENT_FIRST,
// scrollBackward: NestedScrollMode.SELF_FIRST
// })
.onReachEnd(()=>{
console.log(TAG,"触底了");
if(!this.isLoading){
this.isLoading = true
//加载分页数据
this.getNewPageData()
}
})
}
}
.width('100%')
}
@Styles
listStyle() {
.backgroundColor(Color.White)
.height(72)
.width("100%")
.borderRadius(12)
}
getNewPageData(){
this.isLoading = true
if(this.hasMore){
let time = encodeURI(DateTimeUtils.getCurDate(DateTimeUtils.PATTERN_DATE_TIME_HYPHEN))
let object = new OtherUserCommentListRequestItem("",20,this.curPageNum,time,"1",this.curUserId)
MinePageDatasModel.getOtherCommentListData(object,getContext(this)).then((value)=>{
if (!this.data_comment || value.list.length == 0){
this.hasMore = false
}else{
this.getCommentListStatus(value)
}
}).catch((err:Error)=>{
console.log(TAG,"请求失败")
this.isLoading = false
})
}
}
getCommentListStatus(value:MineCommentListDetailItem){
let status = new OtherUserCommentLikeStatusRequestItem()
let data : CommentListItem[] = []
value.list.forEach((item)=>{
status.commentIdList.push(item.id)
data.push(new CommentListItem(item.fromUserHeader,item.fromUserName,item.targetTitle,item.createTime,item.commentContent,item.likeNum,0,item.id,item.targetId,item.targetType))
})
MinePageDatasModel.getOtherUserCommentLikeStatusData(status,getContext(this)).then((newValue)=>{
newValue.forEach((item)=>{
data.forEach((list)=>{
if (item.commentId == list.id) {
list.like_status = item.status
}
})
})
data.forEach((item)=>{
this.data_comment.push(new CommentListItem(item.fromUserHeader,item.fromUserName,item.targetTitle,item.createTime,item.commentContent,item.likeNum,item.like_status,item.id,item.targetId,item.targetType))
})
this.data_comment.notifyDataReload()
this.count = this.data_comment.totalCount()
if (this.data_comment.totalCount() < value.totalCount) {
this.curPageNum++
}else {
this.hasMore = false
}
this.isLoading = false
}).catch((err:Error)=>{
console.log(TAG,"请求失败")
this.isLoading = false
})
}
}
@Component
struct ChildCommentComponent {
@ObjectLink data: CommentListItem
@Prop levelHead:string
build() {
Column(){
Row() {
Stack(){
Image(this.data.fromUserHeader)
.alt($r('app.media.default_head'))
.objectFit(ImageFit.Auto)
.width('69lpx')
.height('69lpx')
.borderRadius(50)
Image(this.levelHead)
.width('89lpx')
.height('89lpx')
.objectFit(ImageFit.Cover)
.borderRadius(50)
}.margin({right:'15lpx'})
Column(){
Text(this.data.fromUserName)
.fontSize('25lpx')
.lineHeight('35lpx')
.fontWeight('600lpx')
.fontColor($r('app.color.color_222222'))
.margin({bottom:'6lpx'})
.maxLines(1)
Text(`${this.data.createTime}`)
.fontColor($r('app.color.color_B0B0B0'))
.fontSize('23lpx')
.lineHeight('31lpx')
.fontWeight('400lpx')
.maxLines(1)
}.layoutWeight(1)
.alignItems(HorizontalAlign.Start)
Row(){
Text(this.data.likeNum.toString())
.fontWeight("500lpx")
.fontSize("27lpx")
.lineHeight("31lpx")
.fontColor(this.data.like_status===0?$r('app.color.color_666666'):$r('app.color.color_ED2800'))
.margin({right:'8lpx'})
Image(this.data.like_status===0?$r('app.media.like_default_status'):$r('app.media.liked_status'))
.width('31lpx')
.height('31lpx')
.objectFit(ImageFit.Auto)
.interpolation(ImageInterpolation.Medium)
.borderRadius(50)
}.onClick(()=>{
this.commentLikeOperation()
})
}
.margin({bottom:'10lpx'})
.width('100%')
.height('108lpx')
.padding({left:'31lpx',right:'31lpx'})
Row(){
Text(this.data.commentContent)
.maxLines(3)
.textOverflow({ overflow: TextOverflow.Ellipsis })
.fontWeight('400lpx')
.fontSize('31lpx')
.lineHeight('46lpx')
.fontColor($r('app.color.color_222222'))
.margin({bottom:'10lpx'})
}.padding({left:'31lpx',right:'31lpx'})
.width('100%')
Row(){
Text(this.data.targetTitle)
.fontWeight('400lpx')
.fontColor($r('app.color.color_222222'))
.lineHeight('38lpx')
.fontSize('27lpx')
.textAlign(TextAlign.Center)
.margin({right:'4lpx'})
.maxLines(3)
.width('616lpx')
Image($r('app.media.arrow_icon_right'))
.objectFit(ImageFit.Auto)
.width('27lpx')
.height('27lpx')
}
.padding({top:'17lpx',bottom:'17lpx',left:'23lpx',right:'23lpx'})
.width('662lpx')
.backgroundColor($r('app.color.color_F5F5F5'))
.margin({top:'19lpx',bottom:'31lpx'})
Divider().width('100%')
.height('12lpx')
.strokeWidth('12lpx')
.backgroundColor($r('app.color.color_F5F5F5'))
}
.justifyContent(FlexAlign.Center)
}
commentLikeOperation(){
let item = new CommentLikeOperationRequestItem(this.data.targetId,this.data.id+"",this.data.targetType+"",this.data.fromUserName,this.data.fromUserHeader,this.data.like_status===0?1:0)
MinePageDatasModel.getCommentLikeOperation(item,getContext(this)).then((value)=>{
if(value!=null){
if (value.code === 0 || value.code.toString() === "0") {
this.data.like_status = this.data.like_status===0?1:0
this.data.likeNum = this.data.like_status===0?this.data.likeNum-1:this.data.likeNum+1
}
}
})
}
}
\ No newline at end of file
... ...
import { LazyDataSource, StringUtils } from 'wdKit';
import { ListHasNoMoreDataUI } from '../../../reusable/ListHasNoMoreDataUI';
import { UserFollowListRequestItem } from '../../../../viewmodel/UserFollowListRequestItem';
import { FollowListDetailItem } from '../../../../viewmodel/FollowListDetailItem';
import { Params } from '../../../../repository/bean/Params';
import MinePageDatasModel from '../../../../model/MinePageDatasModel';
import RouteManager from '../../../../utils/RouteManager';
import { RouterObject } from '../../../../viewmodel/RouterObject';
const TAG = "HomePageBottomComponent"
@Component
export struct OtherHomePageBottomFollowComponent{
@State data_follow: LazyDataSource<FollowListDetailItem> = new LazyDataSource();
@State isLoading:boolean = false
@State hasMore:boolean = true
curPageNum:number = 1;
@State count:number = 0;
@Prop curUserId: string
aboutToAppear(){
this.getNewPageData()
}
build(){
Column(){
Divider().width('100%')
.height('2lpx')
.strokeWidth('1lpx')
.backgroundColor($r('app.color.color_EDEDED'))
if(this.count === 0){
ListHasNoMoreDataUI({style:2})
.height('100%')
}else{
List({ space: 3 }) {
ListItem() {
Row(){
Text("关注更多人民号")
.fontWeight('400lpx')
.fontColor($r('app.color.color_222222'))
.lineHeight('38lpx')
.fontSize('27lpx')
.textAlign(TextAlign.Center)
.margin({right:'4lpx'})
Image($r('app.media.arrow_icon_right'))
.objectFit(ImageFit.Auto)
.width('27lpx')
.height('27lpx')
}.height('69lpx')
.width('659lpx')
.alignItems(VerticalAlign.Center)
.justifyContent(FlexAlign.Center)
.backgroundColor($r('app.color.color_F5F5F5'))
.margin({top:'31lpx',bottom:'4lpx'})
}.onClick(()=>{
RouteManager.jumpNewPage("pages/FollowListPage",new RouterObject('',1))
})
LazyForEach(this.data_follow, (item: FollowListDetailItem, index: number = 0) => {
ListItem() {
ChildFollowComponent({data: item})
}
.onClick(() => {
})
}, (item: FollowListDetailItem, index: number) => index.toString())
//没有更多数据 显示提示
if(!this.hasMore){
ListItem(){
ListHasNoMoreDataUI()
}
}
}.cachedCount(15)
.padding({left:'31lpx',right:'31lpx'})
.layoutWeight(1)
.scrollBar(BarState.Off)
.edgeEffect(EdgeEffect.None)
// .nestedScroll({
// scrollForward: NestedScrollMode.PARENT_FIRST,
// scrollBackward: NestedScrollMode.SELF_FIRST
// })
.onReachEnd(()=>{
console.log(TAG,"触底了");
if(!this.isLoading){
this.isLoading = true
//加载分页数据
this.getNewPageData()
}
})
}
}
.width('100%')
}
@Styles
listStyle() {
.backgroundColor(Color.White)
.height(72)
.width("100%")
.borderRadius(12)
}
getNewPageData(){
this.isLoading = true
//我的关注列表
if(this.hasMore){
let object = new UserFollowListRequestItem(Number(this.curUserId),20,this.curPageNum,"1")
MinePageDatasModel.getOtherUserFollowListData(object,getContext(this)).then((value)=>{
if (!this.data_follow || value.list.length == 0){
this.hasMore = false
}else{
value.list.forEach((value)=>{
this.data_follow.push(new FollowListDetailItem(value.attentionHeadPhotoUrl,value.attentionUserName,value.fansNum,value.introduction,value.attentionCreatorId,"1",value.attentionUserId,value.cnUserType,value.cnUserId))
})
this.data_follow.notifyDataReload()
this.count = this.data_follow.totalCount()
if (this.data_follow.totalCount() < value.totalCount) {
this.curPageNum++
}else {
this.hasMore = false
}
}
this.isLoading = false
}).catch((err:Error)=>{
console.log(TAG,"请求失败")
this.isLoading = false
})
}
}
}
@Component
struct ChildFollowComponent {
@ObjectLink data: FollowListDetailItem
build() {
Column(){
Blank().height('27lpx')
Row() {
Image(StringUtils.isEmpty(this.data.headPhotoUrl)?$r('app.media.default_head'):this.data.headPhotoUrl)
.objectFit(ImageFit.Auto)
.width('92lpx')
.height('92lpx')
.margin({right:'15lpx'})
Column(){
Text(this.data.cnUserName)
.fontWeight('400lpx')
.fontSize('31lpx')
.lineHeight('38lpx')
.fontColor($r('app.color.color_222222'))
Text(`粉丝${this.data.cnFansNum}`)
.fontColor($r('app.color.color_B0B0B0'))
.fontSize('23lpx')
.maxLines(1)
Text(`${this.data.introduction}`)
.fontColor($r('app.color.color_B0B0B0'))
.fontSize('23lpx')
.maxLines(2)
.textOverflow({ overflow: TextOverflow.Ellipsis })
}.layoutWeight(1)
.alignItems(HorizontalAlign.Start)
if(this.data.status == "1"){
Row(){
Text(`已关注`)
.fontColor($r('app.color.color_CCCCCC'))
.fontSize('23lpx')
.fontWeight('500lpx')
.lineHeight('35lpx')
}.backgroundColor($r('app.color.color_F5F5F5'))
.borderRadius('6lpx')
.borderColor($r('app.color.color_F5F5F5'))
.borderWidth('2lpx')
.justifyContent(FlexAlign.Center)
.width('100lpx')
.height('46lpx')
.margin({left:'4lpx',top:'23lpx'})
.onClick(()=>{
this.data.status = "0"
})
}else{
Row(){
Image($r('app.media.follow_icon'))
.margin({right:'4lpx'})
.width('23lpx')
.height('23lpx')
Text(`关注`)
.fontColor($r('app.color.color_ED2800'))
.fontSize('23lpx')
.fontWeight('500lpx')
.lineHeight('35lpx')
}.borderColor($r('app.color.color_1AED2800'))
.borderRadius('6lpx')
.borderWidth('2lpx')
.justifyContent(FlexAlign.Center)
.width('100lpx')
.height('46lpx')
.margin({left:'4lpx',top:'23lpx'})
.onClick(()=>{
this.data.status = "1"
})
}
}.alignItems(VerticalAlign.Top)
.width('100%')
.layoutWeight(1)
Divider().width('100%')
.height('2lpx')
.strokeWidth('1lpx')
.backgroundColor($r('app.color.color_EDEDED'))
}.height('146lpx')
.justifyContent(FlexAlign.Center)
}
}
\ No newline at end of file
... ...
import router from '@ohos.router';
import { StringUtils } from 'wdKit/src/main/ets/utils/StringUtils';
import MinePageDatasModel from '../../../../model/MinePageDatasModel';
import { OtherHomePageBottomFollowComponent } from './OtherHomePageBottomFollowComponent';
import { OtherHomePageBottomCommentComponent } from './OtherHomePageBottomCommentComponent';
import { OtherUserDetailRequestItem } from '../../../../viewmodel/OtherUserDetailRequestItem';
const TAG = "OtherUserHomeComponent"
@Component
export struct OtherUserHomeComponent {
@Prop curUserId: string
@State tileOpacity: number = 0;
firstPositionY:number = 0;
fontColor: string = '#999999'
selectedFontColor: string = '#000000'
@State currentIndex: number = 0
private controller: TabsController = new TabsController()
isChangeToUserEdit = false;
@State userName:string = ""
@State headPhotoUrl:string = ""
@State levelHead:string = ""
@State levelId:number = 0
@State browseNum:number = 0//阅读数
@State commentNum:number = 0//评论数
@State attentionNum:number = 0//关注数
@State desc:string = ""
aboutToAppear(){
this.getUserInfo()
this.getUserLevel()
}
build() {
Stack({ alignContent: Alignment.Top }){
Image($r('app.media.title_bg'))
.width('100%')
.height('355lpx')
.objectFit(ImageFit.Cover)
Column(){
Stack({ alignContent: Alignment.Top }){
this.MineHomeTitleTransparent()
this.MineHomeTitleWhite()
}
Scroll() {
Column() {
//用户信息区域
Row() {
Stack(){
Image(this.headPhotoUrl)
.alt($r('app.media.default_head'))
.width('115lpx')
.height('115lpx')
.objectFit(ImageFit.Cover)
.borderRadius(50)
Image(this.levelHead)
.width('130lpx')
.height('130lpx')
.objectFit(ImageFit.Cover)
.borderRadius(50)
}
Column() {
Row() {
Text(`${this.userName}`)
.fontColor($r('app.color.white'))
.maxLines(1)
.textOverflow({ overflow: TextOverflow.Ellipsis })
.fontSize('38lpx')
.lineHeight('50lpx')
.fontWeight('500lpx')
Text(`等级${this.levelId}`)
.textAlign(TextAlign.Center)
.fontColor($r('app.color.color_ED2800'))
.backgroundColor($r('app.color.white'))
.fontSize('19lpx')
.width('96lpx')
.height('35lpx')
.margin({ left: '10lpx' })
Blank()
}.width('507lpx')
Row() {
Row() {
Text(`${this.browseNum}`)
.textStyle()
Text("阅读")
.textStyle2()
}
.margin({ right: '15lpx' })
Divider()
.height('19lpx')
.width('2lpx')
.color($r('app.color.white'))
.vertical(true)
.opacity(0.4)
Row() {
Text(`${this.commentNum}`)
.textStyle()
Text("评论")
.textStyle2()
}.margin({ right: '15lpx', left: '15lpx' })
Divider()
.height('19lpx')
.width('2lpx')
.color($r('app.color.white'))
.vertical(true)
.opacity(0.4)
Row() {
Text(`${this.attentionNum}`)
.textStyle()
Text("关注")
.textStyle2()
}.margin({ left: '15lpx' })
}.margin({ top: '23lpx' })
}.alignItems(HorizontalAlign.Start)
.margin({ left: '32lpx' })
}
.onAreaChange((oldValue: Area, newValue: Area) => {
if (this.firstPositionY === 0) {
this.firstPositionY = newValue.globalPosition.y as number
}else{
let persent = (this.firstPositionY - Number(newValue.globalPosition.y)) / (this.firstPositionY * 0.3)
if(persent > 1){
persent = 1
}
this.tileOpacity = persent
}
})
.backgroundColor($r('app.color.color_transparent'))
.height('184lpx')
.width('100%')
.padding({ left: '35lpx' })
//用户简介区域
if(StringUtils.isNotEmpty(this.desc)){
Column() {
Row() {
Text(this.desc)
.fontSize('27lpx')
.maxLines(3)
.textOverflow({ overflow: TextOverflow.Ellipsis })
.lineHeight('40lpx')
.fontWeight('400lpx')
.fontColor($r('app.color.color_222222'))
.textAlign(TextAlign.Start)
}
}.padding({ left: '31lpx',right:'31lpx',top:'19lpx',bottom:'31lpx'})
.alignItems(HorizontalAlign.Start)
.justifyContent(FlexAlign.Center)
.width('100%')
.backgroundColor($r('app.color.white'))
}
//间隔符
Divider().width('100%').height('12lpx').color($r('app.color.color_F5F5F5')).strokeWidth('12lpx')
//tab 页面
Tabs({controller: this.controller}) {
TabContent() {
OtherHomePageBottomCommentComponent({curUserId:this.curUserId,levelHead:this.levelHead})
}.tabBar(this.TabBuilder(0,"评论"))
TabContent() {
OtherHomePageBottomFollowComponent({curUserId:this.curUserId})
}.tabBar(this.TabBuilder(1,"关注"))
}
.backgroundColor($r('app.color.white'))
.animationDuration(0)
.onChange((index: number) => {
this.currentIndex = index
})
.vertical(false)
.height("100%")
}.width("100%")
}
.edgeEffect(EdgeEffect.None)
.scrollBar(BarState.Off)
.width('100%')
.height('100%')
}
}.width('100%')
.height('100%')
}
@Builder MineHomeTitleTransparent() {
RelativeContainer() {
//标题栏目
Image($r('app.media.icon_arrow_left_white') )
.width('46lpx')
.height('46lpx')
.objectFit(ImageFit.Auto)
.id("back_icon")
.alignRules({
center: { anchor: "__container__", align: VerticalAlign.Center },
left: { anchor: "__container__", align: HorizontalAlign.Start }
})
.margin({ left: '31lpx' })
.onClick(() => {
router.back()
})
}
.visibility(this.tileOpacity > 0 ? 1 : 0)
.height('84lpx')
.width('100%')
.backgroundColor($r('app.color.color_transparent'))
}
@Builder MineHomeTitleWhite() {
RelativeContainer() {
//标题栏目
Image($r('app.media.back_icon'))
.width('46lpx')
.height('46lpx')
.objectFit(ImageFit.Auto)
.id("back_icon")
.alignRules({
center: { anchor: "__container__", align: VerticalAlign.Center },
left: { anchor: "__container__", align: HorizontalAlign.Start }
})
.margin({ left: '31lpx' })
.onClick(() => {
router.back()
})
Image(this.headPhotoUrl)
.alt($r('app.media.default_head'))
.width('60lpx')
.height('60lpx')
.borderRadius(50)
.objectFit(ImageFit.Auto)
.id("head_icon")
.alignRules({
center: { anchor: "__container__", align: VerticalAlign.Center },
left: { anchor: "back_icon", align: HorizontalAlign.End }
})
.margin({ left: '31lpx' })
.onClick(() => {
router.back()
})
Text(`${this.userName}`)
.height('42lpx')
.maxLines(1)
.id("title")
.fontSize('35lpx')
.fontWeight('400lpx')
.fontColor($r('app.color.color_222222'))
.lineHeight('42lpx')
.alignRules({
center: { anchor: "__container__", align: VerticalAlign.Center },
left: { anchor: "head_icon", align: HorizontalAlign.End }
})
.margin({ left: '12lpx' })
}
.visibility(this.tileOpacity > 0 ? 0 : 1)
.height('84lpx')
.width('100%')
.backgroundColor($r('app.color.white'))
.opacity(this.tileOpacity )
}
@Builder TabBuilder(index: number, title: string) {
Stack(){
Text(title)
.height('38lpx')
.fontSize('33lpx')
.fontWeight(this.currentIndex === index ? 600 : 400)
.fontColor(this.currentIndex === index ? this.selectedFontColor : this.fontColor)
.lineHeight('38lpx')
if(this.currentIndex === index){
Divider()
.width('31lpx')
.height('4lpx')
.color('#ED2800')
.strokeWidth('4lpx')
.margin({top:'50lpx'})
.id("divTag")
}
}.onClick(()=>{
this.currentIndex = index
this.controller.changeIndex(this.currentIndex)
})
.height('100%')
.width('100%')
.margin({right:'9lpx'})
}
getUserInfo(){
let item = new OtherUserDetailRequestItem("","1",this.curUserId)
MinePageDatasModel.getOtherUserDetailData(item,getContext(this)).then((value)=>{
if(value!=null){
this.userName = value.userName
this.headPhotoUrl = value.headPhotoUrl
if(StringUtils.isNotEmpty(value.introduction)){
this.desc = value.introduction
}
this.browseNum = StringUtils.isEmpty(value.browseNum)?0:value.browseNum
this.commentNum = StringUtils.isEmpty(value.commentNum)?0:value.commentNum
this.attentionNum = StringUtils.isEmpty(value.attentionNum)?0:value.attentionNum
}
}).catch((err:Error)=>{
console.log(TAG,JSON.stringify(err))
})
}
getUserLevel(){
MinePageDatasModel.getOtherUserLevelData([this.curUserId],getContext(this)).then((value)=>{
if(value!=null){
this.levelHead = value[0].levelHead
this.levelId = value[0].level
}
}).catch((err:Error)=>{
console.log(TAG,JSON.stringify(err))
})
}
}
@Extend(Text) function textStyle() {
.fontColor($r('app.color.white'))
.textStyleDefault()
.margin({ right: '10lpx' })
}
@Extend(Text) function textStyle2() {
.textStyleDefault()
.fontColor($r('app.color.color_B2FFFFFF'))
}
@Extend(Text) function textStyleDefault() {
.textAlign(TextAlign.Start)
.fontSize('23lpx')
.fontWeight('400lpx')
.lineHeight('31lpx')
}
... ...
@CustomDialog
export struct MyCustomDialog {
@State title: string = "标题"
@State tipValue: string ="提示文字"
@State leftText: string = "取消"
@State rightText: string = "确认"
controller?: CustomDialogController
cancel: () => void = () => {
}
confirm: () => void = () => {
}
build() {
Column() {
Text(this.title)
.fontSize("32lpx")
.margin({ top: "40lpx", bottom: "15lpx" })
.fontColor($r('app.color.color_333333'))
.fontSize('35lpx')
.fontWeight('600lpx')
Text(this.tipValue)
.margin({ bottom: "30lpx" })
.fontSize("27lpx")
.fontColor($r('app.color.color_B0B0B0'))
Divider()
.width("100%")
.strokeWidth('1lpx')
.height('1lpx')
.color($r('app.color.color_EEEEEE'))
Row(){
Text(this.leftText)
.fontSize('35lpx')
.fontWeight('400lpx')
.fontColor($r('app.color.color_333333'))
.onClick(() => {
this.controller.close()
this.cancel()
}).layoutWeight(1)
.textAlign(TextAlign.Center)
Divider()
.width("1lpx")
.strokeWidth('1lpx')
.vertical(true)
.height('92lpx')
.color($r('app.color.color_EEEEEE'))
Text(this.rightText)
.fontSize('35lpx')
.textAlign(TextAlign.Center)
.fontWeight('400lpx')
.fontColor($r('app.color.color_648DF2'))
.onClick(() => {
if (this.controller != undefined) {
this.controller.close()
this.confirm()
}
}).layoutWeight(1)
}
.alignItems(VerticalAlign.Center)
.height('96lpx')
}.borderRadius(10)
}
}
\ No newline at end of file
... ...
... ... @@ -117,14 +117,14 @@ export struct BannerComponent {
// 不滚动banner
Stack() {
// 背景图
Image(this.bannerContent.coverUrl.toString())
Image(this.bannerContent?.coverUrl.toString())
.objectFit(ImageFit.Fill)
.borderRadius(5)
// 底部标题和时间
Row() {
// 标题
Text(this.bannerContent.newsTitle.toString())
Text(this.bannerContent?.newsTitle.toString())
.fontSize(18)
.fontColor(Color.White)
.fontWeight(600)
... ... @@ -133,7 +133,7 @@ export struct BannerComponent {
.padding({ left: 10, right: 0 ,bottom: 5 })
.width('80%')
// 时间
if (this.bannerContent.lengthTime) {
if (this.bannerContent?.lengthTime) {
Row() {
Image($r('app.media.videoTypeIcon'))
.height(20)
... ...
... ... @@ -6,7 +6,7 @@ import { HttpUrlUtils } from '../network/HttpUrlUtils';
import HashMap from '@ohos.util.HashMap';
import { ResponseDTO, WDHttp } from 'wdNetwork';
import { MineAppointmentListItem } from '../viewmodel/MineAppointmentListItem';
import { Logger, ResourcesUtils } from 'wdKit';
import { Logger, ResourcesUtils, StringUtils } from 'wdKit';
import { MineFollowListDetailItem } from '../viewmodel/MineFollowListDetailItem';
import { FollowListDetailRequestItem } from '../viewmodel/FollowListDetailRequestItem';
import { FollowListItem } from '../viewmodel/FollowListItem';
... ... @@ -16,6 +16,14 @@ import { MineCommentListDetailItem } from '../viewmodel/MineCommentListDetailIte
import { FollowListStatusRequestItem } from '../viewmodel/FollowListStatusRequestItem';
import { MineUserLevelItem } from '../viewmodel/MineUserLevelItem';
import { MineUserDetailItem } from '../viewmodel/MineUserDetailItem';
import { OtherUserCommentLikeStatusRequestItem } from '../viewmodel/OtherUserCommentLikeStatusRequestItem';
import { OtherUserCommentListRequestItem } from '../viewmodel/OtherUserCommentListRequestItem';
import { QueryCommentListIsLikedItem } from '../viewmodel/QueryCommentListIsLikedItem';
import { UserFollowListRequestItem } from '../viewmodel/UserFollowListRequestItem';
import { OtherUserDetailRequestItem } from '../viewmodel/OtherUserDetailRequestItem';
import { AppointmentOperationRequestItem } from '../viewmodel/AppointmentOperationRequestItem';
import { FollowOperationRequestItem } from '../viewmodel/FollowOperationRequestItem';
import { CommentLikeOperationRequestItem } from '../viewmodel/CommentLikeOperationRequestItem';
const TAG = "MinePageDatasModel"
/**
... ... @@ -427,6 +435,329 @@ class MinePageDatasModel{
return compRes.data
}
/**
* 个人中心 获取其他用户详细信息
*/
getOtherUserDetailData(item:OtherUserDetailRequestItem,context: Context): Promise<MineUserDetailItem> {
return new Promise<MineUserDetailItem>((success, error) => {
Logger.info(TAG, `getAppointmentList start`);
this.fetchOtherUserDetailData(item).then((navResDTO: ResponseDTO<MineUserDetailItem>) => {
if (!navResDTO || navResDTO.code != 0) {
success(this.getOtherUserDetailDataLocal(context))
return
}
Logger.info(TAG, "getUserDetailData then,timeStamp:" + navResDTO.timestamp);
let navigationBean = navResDTO.data as MineUserDetailItem
success(navigationBean);
}).catch((err: Error) => {
Logger.error(TAG, `fetchMineUserDetailData catch, error.name : ${err.name}, error.message:${err.message}`);
success(this.getOtherUserDetailDataLocal(context))
})
})
}
fetchOtherUserDetailData(item:OtherUserDetailRequestItem) {
let url = HttpUrlUtils.getOtherUserDetailDataUrl()
let headers: HashMap<string, string> = HttpUrlUtils.getYcgCommonHeaders();
return WDHttp.post<ResponseDTO<MineUserDetailItem>>(url, item,headers)
};
async getOtherUserDetailDataLocal(context: Context): Promise<MineUserDetailItem> {
Logger.info(TAG, `getMineUserLevelDataLocal start`);
let compRes: ResponseDTO<MineUserDetailItem> | null = await ResourcesUtils.getResourcesJson<ResponseDTO<MineUserDetailItem>>('other_user512157124138245_detail.json',context );
if (!compRes || !compRes.data) {
Logger.info(TAG, `getMineUserDetailDataLocal compRes is empty`);
return new MineUserDetailItem()
}
Logger.info(TAG, `getMineUserDetailDataLocal getResourcesJsonSync compRes : ${JSON.stringify(compRes)}`);
return compRes.data
}
/**
* 个人中心 获取其他用户等级
*/
getOtherUserLevelData(item:string[],context: Context): Promise<MineUserLevelItem[]> {
return new Promise<MineUserLevelItem[]>((success, error) => {
Logger.info(TAG, `getAppointmentList start`);
this.fetchOtherUserLevelData(item).then((navResDTO: ResponseDTO<MineUserLevelItem[]>) => {
if (!navResDTO || navResDTO.code != 0) {
success(this.getOtherUserLevelDataLocal(context))
return
}
Logger.info(TAG, "getAppointmentList then,AppointmentResDTO.timeStamp:" + navResDTO.timestamp);
let navigationBean = navResDTO.data as MineUserLevelItem[]
if(navigationBean.length>0 && StringUtils.isNotEmpty(navigationBean[0].levelHead)){
success(navigationBean);
}else{
success(this.getOtherUserLevelDataLocal(context))
}
}).catch((err: Error) => {
Logger.error(TAG, `fetchMineUserLevelData catch, error.name : ${err.name}, error.message:${err.message}`);
success(this.getOtherUserLevelDataLocal(context))
})
})
}
fetchOtherUserLevelData(item:string[]) {
let url = HttpUrlUtils.getOtherUserLevelDataUrl()
let headers: HashMap<string, string> = HttpUrlUtils.getYcgCommonHeaders();
return WDHttp.post<ResponseDTO<MineUserLevelItem[]>>(url,item, headers)
};
async getOtherUserLevelDataLocal(context: Context): Promise<MineUserLevelItem[]> {
Logger.info(TAG, `getMineUserLevelDataLocal start`);
let compRes: ResponseDTO<MineUserLevelItem[]> | null = await ResourcesUtils.getResourcesJson<ResponseDTO<MineUserLevelItem[]>>('other_user512157124138245_level.json' ,context);
if (!compRes || !compRes.data) {
Logger.info(TAG, `getMineUserLevelDataLocal compRes is empty`);
return []
}
Logger.info(TAG, `getMineUserLevelDataLocal getResourcesJsonSync compRes : ${JSON.stringify(compRes)}`);
return compRes.data
}
/**
* 其他用户的评论列表
* @param params
* @param context
* @returns
*/
getOtherCommentListData(params:OtherUserCommentListRequestItem,context: Context): Promise<MineCommentListDetailItem> {
return new Promise<MineCommentListDetailItem>((success, error) => {
Logger.info(TAG, `getAppointmentList start`);
this.fetchOtherCommentListData(params).then((navResDTO: ResponseDTO<MineCommentListDetailItem>) => {
if (!navResDTO || navResDTO.code != 0) {
success(this.getOtherCommentListDataLocal(context))
return
}
Logger.info(TAG, "getAppointmentList then,AppointmentResDTO.timeStamp:" + navResDTO.timestamp);
let navigationBean = navResDTO.data as MineCommentListDetailItem
success(navigationBean);
}).catch((err: Error) => {
Logger.error(TAG, `fetchAppointmentListDataApi catch, error.name : ${err.name}, error.message:${err.message}`);
success(this.getOtherCommentListDataLocal(context))
})
})
}
fetchOtherCommentListData(object:OtherUserCommentListRequestItem) {
let url = HttpUrlUtils.getOtherCommentListDataUrl()+`?pageSize=${object.pageSize}&pageNum=${object.pageNum}&creatorId=${object.creatorId}&time=${object.time}&userType=${object.userType}&userId=${object.userId}`
let headers: HashMap<string, string> = HttpUrlUtils.getYcgCommonHeaders();
return WDHttp.get<ResponseDTO<MineCommentListDetailItem>>(url, headers)
};
async getOtherCommentListDataLocal(context: Context): Promise<MineCommentListDetailItem> {
Logger.info(TAG, `getMineFollowListDataLocal start`);
let compRes: ResponseDTO<MineCommentListDetailItem> | null = await ResourcesUtils.getResourcesJson<ResponseDTO<MineCommentListDetailItem>>('other_user512157124138245_comment_list_data.json' ,context);
if (!compRes || !compRes.data) {
Logger.info(TAG, `getMineFollowListDataLocal compRes is empty`);
return new MineCommentListDetailItem()
}
Logger.info(TAG, `getMineFollowListDataLocal getResourcesJsonSync compRes : ${JSON.stringify(compRes)}`);
return compRes.data
}
/**
* 查询是否点赞了这条评论
* @param params
* @param context
* @returns
*/
getOtherUserCommentLikeStatusData(params:OtherUserCommentLikeStatusRequestItem,context: Context): Promise<QueryCommentListIsLikedItem[]> {
return new Promise<QueryCommentListIsLikedItem[]>((success, error) => {
Logger.info(TAG, `getAppointmentList start`);
this.fetchOtherUserCommentLikeStatusData(params).then((navResDTO: ResponseDTO<QueryCommentListIsLikedItem[]>) => {
if (!navResDTO || navResDTO.code != 0) {
success(this.getOtherUserCommentLikeStatusDataLocal(context))
return
}
Logger.info(TAG, "getAppointmentList then,AppointmentResDTO.timeStamp:" + navResDTO.timestamp);
let navigationBean = navResDTO.data as QueryCommentListIsLikedItem[]
success(navigationBean);
}).catch((err: Error) => {
Logger.error(TAG, `fetchAppointmentListDataApi catch, error.name : ${err.name}, error.message:${err.message}`);
success(this.getOtherUserCommentLikeStatusDataLocal(context))
})
})
}
fetchOtherUserCommentLikeStatusData(object:OtherUserCommentLikeStatusRequestItem) {
let url = HttpUrlUtils.getFollowListStatusDataUrl()
let headers: HashMap<string, string> = HttpUrlUtils.getYcgCommonHeaders();
return WDHttp.post<ResponseDTO<QueryCommentListIsLikedItem[]>>(url,object, headers)
};
async getOtherUserCommentLikeStatusDataLocal(context: Context): Promise<QueryCommentListIsLikedItem[]> {
Logger.info(TAG, `getMineFollowListDataLocal start`);
let compRes: ResponseDTO<QueryCommentListIsLikedItem[]> | null = await ResourcesUtils.getResourcesJson<ResponseDTO<QueryCommentListIsLikedItem[]>>('other_user512157124138245_comment_list_liked_data.json',context );
if (!compRes || !compRes.data) {
Logger.info(TAG, `getMineFollowListDataLocal compRes is empty`);
return []
}
Logger.info(TAG, `getMineFollowListDataLocal getResourcesJsonSync compRes : ${JSON.stringify(compRes)}`);
return compRes.data
}
/**
* 其他用户的关注列表
* @param params
* @param context
* @returns
*/
getOtherUserFollowListData(params:UserFollowListRequestItem,context: Context): Promise<MineFollowListItem> {
return new Promise<MineFollowListItem>((success, error) => {
Logger.info(TAG, `getAppointmentList start`);
this.fetchOtherUserFollowListData(params).then((navResDTO: ResponseDTO<MineFollowListItem>) => {
if (!navResDTO || navResDTO.code != 0) {
success(this.getOtherUserFollowListDataLocal(context))
return
}
Logger.info(TAG, "getAppointmentList then,AppointmentResDTO.timeStamp:" + navResDTO.timestamp);
let navigationBean = navResDTO.data as MineFollowListItem
success(navigationBean);
}).catch((err: Error) => {
Logger.error(TAG, `fetchAppointmentListDataApi catch, error.name : ${err.name}, error.message:${err.message}`);
success(this.getOtherUserFollowListDataLocal(context))
})
})
}
fetchOtherUserFollowListData(object:UserFollowListRequestItem) {
let url = HttpUrlUtils.getOtherUserFollowListDataUrl()+`?pageSize=${object.pageSize}&pageNum=${object.pageNum}&queryUserId=${object.queryUserId}&userType=${object.userType}&userId=${"567387477063621"}`
let headers: HashMap<string, string> = HttpUrlUtils.getYcgCommonHeaders();
return WDHttp.get<ResponseDTO<MineFollowListItem>>(url, headers)
};
async getOtherUserFollowListDataLocal(context: Context): Promise<MineFollowListItem> {
Logger.info(TAG, `getMineFollowListDataLocal start`);
let compRes: ResponseDTO<MineFollowListItem> | null = await ResourcesUtils.getResourcesJson<ResponseDTO<MineFollowListItem>>('other_user_follow_list_data.json',context );
if (!compRes || !compRes.data) {
Logger.info(TAG, `getMineFollowListDataLocal compRes is empty`);
return new MineFollowListItem()
}
Logger.info(TAG, `getMineFollowListDataLocal getResourcesJsonSync compRes : ${JSON.stringify(compRes)}`);
return compRes.data
}
/**
* 预约 和取消预约操作
* @param params
* @param context
* @returns
*/
getAppointmentOperation(params:AppointmentOperationRequestItem,context: Context): Promise<ResponseDTO> {
return new Promise((success, error) => {
Logger.info(TAG, `getAppointmentList start`);
this.fetchAppointmentOperation(params).then((navResDTO: ResponseDTO) => {
if (!navResDTO || navResDTO.code != 0) {
success(this.getAppointmentOperationLocal(context))
return
}
Logger.info(TAG, "getAppointmentList then,AppointmentResDTO.timeStamp:" + navResDTO.timestamp);
success(navResDTO);
}).catch((err: Error) => {
Logger.error(TAG, `fetchAppointmentListDataApi catch, error.name : ${err.name}, error.message:${err.message}`);
success(this.getAppointmentOperationLocal(context))
})
})
}
fetchAppointmentOperation(object:AppointmentOperationRequestItem) {
let url = HttpUrlUtils.getAppointmentOperationUrl()
let headers: HashMap<string, string> = HttpUrlUtils.getYcgCommonHeaders();
return WDHttp.post<ResponseDTO>(url,object, headers)
};
async getAppointmentOperationLocal(context: Context): Promise<ResponseDTO> {
Logger.info(TAG, `getMineFollowListDataLocal start`);
let compRes: ResponseDTO | null = await ResourcesUtils.getResourcesJson<ResponseDTO>('appointment_operation_data.json',context );
if (!compRes ) {
Logger.info(TAG, `getMineFollowListDataLocal compRes is empty`);
return null
}
Logger.info(TAG, `getMineFollowListDataLocal getResourcesJsonSync compRes : ${JSON.stringify(compRes)}`);
return compRes
}
/**
* 评论点赞操作
* @param params
* @param context
* @returns
*/
getCommentLikeOperation(params:CommentLikeOperationRequestItem,context: Context): Promise<ResponseDTO> {
return new Promise((success, error) => {
Logger.info(TAG, `getAppointmentList start`);
this.fetchCommentLikeOperation(params).then((navResDTO: ResponseDTO) => {
if (!navResDTO || navResDTO.code != 0) {
success(this.getCommentLikeOperationLocal(context))
return
}
Logger.info(TAG, "getAppointmentList then,AppointmentResDTO.timeStamp:" + navResDTO.timestamp);
success(navResDTO);
}).catch((err: Error) => {
Logger.error(TAG, `fetchAppointmentListDataApi catch, error.name : ${err.name}, error.message:${err.message}`);
success(this.getCommentLikeOperationLocal(context))
})
})
}
fetchCommentLikeOperation(object:CommentLikeOperationRequestItem) {
let url = HttpUrlUtils.getCommentLikeOperationUrl()
let headers: HashMap<string, string> = HttpUrlUtils.getYcgCommonHeaders();
return WDHttp.post<ResponseDTO>(url,object, headers)
};
async getCommentLikeOperationLocal(context: Context): Promise<ResponseDTO> {
Logger.info(TAG, `getMineFollowListDataLocal start`);
let compRes: ResponseDTO | null = await ResourcesUtils.getResourcesJson<ResponseDTO>('comment_like_operation_data.json',context);
if (!compRes ) {
Logger.info(TAG, `getMineFollowListDataLocal compRes is empty`);
return compRes
}
Logger.info(TAG, `getMineFollowListDataLocal getResourcesJsonSync compRes : ${JSON.stringify(compRes)}`);
return compRes
}
/**
* 关注 取消关注 操作
* @param params
* @param context
* @returns
*/
getFollowOperation(params:FollowOperationRequestItem,context: Context): Promise<ResponseDTO> {
return new Promise((success, error) => {
Logger.info(TAG, `getAppointmentList start`);
this.fetchFollowOperation(params).then((navResDTO: ResponseDTO) => {
if (!navResDTO || navResDTO.code != 0) {
success(this.getFollowOperationLocal(context))
return
}
Logger.info(TAG, "getAppointmentList then,AppointmentResDTO.timeStamp:" + navResDTO.timestamp);
success(navResDTO);
}).catch((err: Error) => {
Logger.error(TAG, `fetchAppointmentListDataApi catch, error.name : ${err.name}, error.message:${err.message}`);
success(this.getFollowOperationLocal(context))
})
})
}
fetchFollowOperation(object:FollowOperationRequestItem) {
let url = HttpUrlUtils.getFollowOperationUrl()
let headers: HashMap<string, string> = HttpUrlUtils.getYcgCommonHeaders();
return WDHttp.post<ResponseDTO>(url,object, headers)
};
async getFollowOperationLocal(context: Context): Promise<ResponseDTO> {
Logger.info(TAG, `getMineFollowListDataLocal start`);
let compRes: ResponseDTO | null = await ResourcesUtils.getResourcesJson<ResponseDTO>('follow_operation_data.json',context);
if (!compRes ) {
Logger.info(TAG, `getMineFollowListDataLocal compRes is empty`);
return compRes
}
Logger.info(TAG, `getMineFollowListDataLocal getResourcesJsonSync compRes : ${JSON.stringify(compRes)}`);
return compRes
}
}
const minePageDatasModel = MinePageDatasModel.getInstance()
... ...
... ... @@ -76,10 +76,33 @@ export class HttpUrlUtils {
static readonly MINE_USER_LEVEL_DATA_PATH: string = "/api/rmrb-user-point/auth/level/zh/c/queryUserLevel";
/**
* 个人中心 APP获取其他用户等级
*/
static readonly OTHER_USER_LEVEL_DATA_PATH: string = "/api/rmrb-user-point/auth/level/zh/c/batchUser";
/**
* 个人中心 (号主/普通用户)我的基本信息
*/
static readonly MINE_USER_DETAIL_DATA_PATH: string = "/api/rmrb-contact/contact/zh/c/my/detail";
/**
* 个人中心 (普通用户)其他用户 的基本信息
*/
static readonly OTHER_USER_DETAIL_DATA_PATH: string = "/api/rmrb-contact/contact/zh/c/master/detail";
/**
* 个人中心 其他用户的评论列表
*/
static readonly OTHER_COMMENT_LIST_DATA_PATH: string = "/api/rmrb-comment/comment/zh/c/othersCommentList";
/**
* 个人中心 我的关注列表
*/
static readonly OTHER_USER_FOLLOW_LIST_DATA_PATH: string = "/api/rmrb-interact/interact/zh/c/userAttention/list";
/**
* 预约操作
*/
static readonly APPOINTMENT_OPERATION_STATUS_PATH: string = "/api/live-center-message/zh/c/live/subscribe";
private static hostUrl: string = HttpUrlUtils.HOST_UAT;
static getCommonHeaders(): HashMap<string, string> {
... ... @@ -200,6 +223,50 @@ export class HttpUrlUtils {
return url
}
static getOtherUserLevelDataUrl() {
let url = HttpUrlUtils.HOST_SIT + HttpUrlUtils.OTHER_USER_LEVEL_DATA_PATH
return url
}
static getOtherUserDetailDataUrl() {
let url = HttpUrlUtils.HOST_SIT + HttpUrlUtils.OTHER_USER_DETAIL_DATA_PATH
return url
}
static getOtherCommentListDataUrl() {
let url = HttpUrlUtils.HOST_SIT + HttpUrlUtils.OTHER_COMMENT_LIST_DATA_PATH
return url
}
static getOtherUserFollowListDataUrl() {
let url = HttpUrlUtils.HOST_SIT + HttpUrlUtils.OTHER_USER_FOLLOW_LIST_DATA_PATH
return url
}
static getAppointmentOperationUrl() {
let url = HttpUrlUtils.HOST_SIT + HttpUrlUtils.APPOINTMENT_OPERATION_STATUS_PATH
return url
}
static getCommentLikeOperationUrl() {
let url = HttpUrlUtils.HOST_SIT + HttpUrlUtils.COMMENT_LIKE_OPERATION_PATH
return url
}
static getFollowOperationUrl() {
let url = HttpUrlUtils.HOST_SIT + HttpUrlUtils.FOLLOW_OPERATION_PATH
return url
}
/**
* 预约操作
*/
static readonly COMMENT_LIKE_OPERATION_PATH: string = "/api/rmrb-comment/comment/zh/c/commentLike";
/**
* 关注操作
*/
static readonly FOLLOW_OPERATION_PATH: string = "https://pd-apis-sit.pdnews.cn/api/rmrb-interact/interact/zh/c/attention/operation";
static getYcgCommonHeaders(): HashMap<string, string> {
let headers: HashMap<string, string> = new HashMap<string, string>()
... ... @@ -355,4 +422,12 @@ export class HttpUrlUtils {
private static getUserType() {
return '2';
}
public static getYcgUserType() {
return '1';
}
public static getYcgUserId() {
return '459776297474949';
}
}
\ No newline at end of file
... ...
... ... @@ -10,9 +10,7 @@ class RouteManager{
jumpNewPage(target_url: string,params?: Object){
router.pushUrl({
url: target_url,
params: {
params
}
}).catch((error: Error) => {
console.log(TAG,JSON.stringify(error));
});
... ...
// {"relationId":"500000017021","liveId":"20000007348","isSubscribe":false}
export class AppointmentOperationRequestItem{
relationId:string = ""
liveId:string = ""
isSubscribe:boolean = false
constructor(relationId: string ,liveId: string ,isSubscribe: boolean ) {
this.relationId = relationId
this.liveId = liveId
this.isSubscribe = isSubscribe
}
}
... ...
// {
// "targetId":"30000627490",
// "commentId":"303318",
// "targetType":"13",
// "userName":"人民日报网友aPrtq5",
// "userHeaderUrl":"https://sitcontentjdcdn.aikan.pdnews.cn//img/user/2024031215/48d5bd53227d436b9faa937b3ac14600.png",
// "status":1
// }
export class CommentLikeOperationRequestItem{
targetId:string = ""
commentId:string = ""
targetType:string = ""
userName:string = ""
userHeaderUrl:string = ""
status:number = 1
constructor(targetId: string, commentId: string, targetType: string , userName: string,
userHeaderUrl: string , status:number) {
this.targetId = targetId
this.commentId = commentId
this.targetType = targetType
this.userName = userName
this.userHeaderUrl = userHeaderUrl
this.status = status
}
}
... ...
... ... @@ -7,12 +7,22 @@ export class CommentListItem{
commentContent:string = ""
targetTitle:string = ""
createTime:string = ""
likeNum:number = 0
like_status:number = 0
id:number = 0
targetId:string = ""
targetType:number = 0
constructor(fromUserHeader:string,fromUserName:string,targetTitle:string,createTime:string,commentContent:string ) {
constructor(fromUserHeader:string,fromUserName:string,targetTitle:string,createTime:string,commentContent:string,likeNum:number,like_status:number,id:number,targetId:string,targetType:number) {
this.fromUserHeader = fromUserHeader
this.fromUserName = fromUserName
this.commentContent = commentContent
this.targetTitle = targetTitle
this.createTime = createTime
this.likeNum = likeNum
this.like_status = like_status
this.id = id
this.targetId = targetId
this.targetType = targetType
}
}
... ...
... ... @@ -67,19 +67,28 @@ export class FollowListDetailItem{
introduction:string //介绍
status:string = "0" //是否已经关注
creatorId:string = ""
attentionUserId:string = ""
cnUserType:string = ""
cnUserId:string = ""
attentionCreatorId:string = ""
attentionUserType:string = ""
attentionHeadPhotoUrl:string = ""
attentionUserName:string = ""
fansNum :number = 0
constructor(headPhotoUrl:string,cnUserName:string,cnFansNum:number,introduction:string,creatorId:string,status:string ) {
constructor(headPhotoUrl:string,cnUserName:string,cnFansNum:number,introduction:string,creatorId:string,status:string,attentionUserId:string,cnUserType:string,cnUserId:string) {
this.headPhotoUrl = headPhotoUrl
this.cnUserName = cnUserName
this.cnFansNum = cnFansNum
this.introduction = introduction
this.creatorId = creatorId
this.status = status
this.attentionUserId = attentionUserId
this.cnUserType = cnUserType
this.cnUserId = cnUserId
}
}
... ...
// {
// "attentionUserType":"2",
// "attentionUserId":"444911718724933",
// "attentionCreatorId":"3004861",
// "userType":1,
// "userId":"567387477063621",
// "status":1
// }
export class FollowOperationRequestItem{
attentionUserType:string = ""
attentionUserId:string = ""
attentionCreatorId:string = ""
userType:string = ""
userId:string = ""
status:number = 1
constructor(attentionUserType:string, attentionUserId:string, attentionCreatorId:string, userType:string, userId:string, status:number) {
this.attentionUserType = attentionUserType
this.attentionUserId = attentionUserId
this.attentionCreatorId = attentionCreatorId
this.userType = userType
this.userId = userId
this.status = status
}
}
... ...
... ... @@ -18,7 +18,7 @@ export class MineAppointmentItem{
isAppointment:boolean
constructor(imageUrl:string[],status:string,title:string,isAppointment:boolean,timePre:string,timeBack:string,relType:number ) {
constructor(imageUrl:string[],status:string,title:string,isAppointment:boolean,timePre:string,timeBack:string,relType:number,liveId:number,relId:string ) {
this.imageUrl=imageUrl
this.status=status
this.title=title
... ... @@ -26,5 +26,7 @@ export class MineAppointmentItem{
this.timePre = timePre
this.timeBack = timeBack
this.relType = relType
this.liveId = liveId
this.relId = relId
}
}
\ No newline at end of file
... ...
... ... @@ -2,6 +2,7 @@
export class MineUserLevelItem{
levelHead:string = ""
levelId:number = 0
level:number = 0
levelName:string = ""
}
\ No newline at end of file
... ...
export class OtherUserCommentLikeStatusRequestItem{
commentIdList:number[] = []
}
\ No newline at end of file
... ...
export class OtherUserCommentListRequestItem {
creatorId: string = ""
pageSize: number = 20
pageNum: number = 1
time: string = ""
userType: string = "1"
userId: string = ""
constructor(creatorId: string, pageSize: number,
pageNum: number,
time: string,
userType: string,
userId: string) {
this.creatorId = creatorId
this.pageSize = pageSize
this.pageNum = pageNum
this.time = time
this.userType = userType
this.userId = userId
}
}
\ No newline at end of file
... ...
export class OtherUserDetailRequestItem {
creatorId: string = ""
userType: string = "1"
userId: string = "-1"
constructor(creatorId: string ,
userType: string,
userId: string ) {
this.creatorId = creatorId
this.userType = userType
this.userId = userId
}
}
\ No newline at end of file
... ...
export class QueryCommentListIsLikedItem{
commentId:number = 0
status:number = 0
}
\ No newline at end of file
... ...
export class RouterObject{
userId:string = ""
index:number = 0;
constructor(userId:string,index:number) {
this.userId = userId
this.index = index
}
}
\ No newline at end of file
... ...
export class UserFollowListRequestItem{
queryUserId:number = -1
pageSize:number = 20
pageNum:number = 1
userType:string = "1"
constructor(queryUserId:number, pageSize:number, pageNum:number, userType:string) {
this.queryUserId = queryUserId
this.pageSize = pageSize
this.pageNum = pageNum
this.userType = userType
}
}
\ No newline at end of file
... ...
... ... @@ -102,6 +102,14 @@
{
"name":"color_transparent",
"value": "#00000000"
},
{
"name":"color_648DF2",
"value": "#648DF2"
},
{
"name":"color_EEEEEE",
"value": "#EEEEEE"
}
]
}
\ No newline at end of file
... ...
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" fill="none" version="1.1" width="24" height="24" viewBox="0 0 24 24"><g><g><path d="M6.29805,13.2927L19.701900000000002,20.8323C19.8353,20.9073,20,20.811,20,20.658L20,3.34197C20,3.189004,19.8353,3.0926614,19.701900000000002,3.167654L6.29805,10.70735C6.1647300000000005,10.78234,6,10.686,6,10.53303L6,3.2C6,3.0895431,5.9104600000000005,3,5.8,3L4.2,3C4.0895431,3,4,3.0895431,4,3.2L4,20.6764C4,20.8251,4.156463,20.9218,4.289443,20.8553L5.8894400000000005,20.0553C5.9572,20.0214,6,19.9521,6,19.8764L6,13.467C6,13.314,6.1647300000000005,13.2177,6.29805,13.2927" fill-rule="evenodd" fill="#FFFFFF" fill-opacity="1"/></g></g></svg>
\ No newline at end of file
... ...
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" fill="none" version="1.1" width="28.000001907348633" height="28.000001907348633" viewBox="0 0 28.000001907348633 28.000001907348633"><g><g><path d="M18.083399999999997,2.33349609375L9.91675,2.33349609375L9.91675,4.66682609375L16.9167,4.66682609375L18.083399999999997,2.33349609375ZM14,5.83349609375C19.799,5.83349609375,24.5,10.53450609375,24.5,16.33349609375C24.5,22.13249609375,19.799,26.83349609375,14,26.83349609375C10.73856,26.83349609375,7.72175,25.33539609375,5.74375,22.82139609375C4.299051,20.98519609375,3.5,18.71869609375,3.5,16.33349609375C3.5,10.53450609375,8.20101,5.83349609375,14,5.83349609375ZM13.9999,8.16650609375C9.48959,8.16650609375,5.83325,11.82284609375,5.83325,16.33319609375C5.83325,18.19029609375,6.45355,19.94979609375,7.57746,21.37829609375C9.11766,23.33579609375,11.46167,24.49979609375,13.9999,24.49979609375C18.510199999999998,24.49979609375,22.1666,20.84349609375,22.1666,16.33319609375C22.1666,11.82284609375,18.510199999999998,8.16650609375,13.9999,8.16650609375ZM15.1666,18.66679609375L15.1666,12.83349609375L12.83325,12.83349609375L12.83325,18.66679609375L15.1666,18.66679609375Z" fill-rule="evenodd" fill="#FFFFFF" fill-opacity="1"/></g></g></svg>
\ No newline at end of file
... ...
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" fill="none" version="1.1" width="24" height="24" viewBox="0 0 24 24"><g><g><path d="M15.545709424877167,8.283168125Q15.495009424877166,8.276668125,15.453609424877166,8.246598125Q15.412209424877167,8.216528125,15.390309424877167,8.170278125L12.180809424877166,1.382397125Q12.156009424877167,1.329958425,12.107009424877166,1.298923025Q12.058009424877167,1.267887729,12.000009424877167,1.267887724Q11.942009424877167,1.26788772,11.893009424877167,1.298923025Q11.844009424877166,1.329958325,11.819209424877167,1.382397125L8.609729424877166,8.170278125Q8.587869424877166,8.216528125,8.546479424877166,8.246598125Q8.505099424877166,8.276668125,8.454359424877167,8.283168125L1.0069094248771668,9.238008125Q0.9493754248771668,9.245378125,0.9047162248771667,9.282398125Q0.8600567248771668,9.319418125,0.8421322148771667,9.374578125Q0.8242076348771668,9.429748125,0.8385809248771667,9.485938125Q0.8529542248771668,9.542138125,0.8951645248771667,9.581918125L6.3590394248771664,14.731878125Q6.396259424877167,14.766978125,6.412069424877167,14.815678125Q6.427879424877167,14.864278125,6.418389424877167,14.914578125L5.025099424877166,22.292578125Q5.014339424877167,22.349578125,5.035739424877167,22.403478125Q5.057149424877167,22.457378125,5.104069424877166,22.491478125Q5.150999424877167,22.525578125,5.208889424877166,22.529278125Q5.266769424877166,22.532978125,5.317659424877167,22.505078125L11.904009424877167,18.900078125Q11.948909424877167,18.875578125,12.000009424877167,18.875578125Q12.051209424877166,18.875578125,12.096109424877167,18.900078125L18.682409424877168,22.505078125Q18.733309424877167,22.532978125,18.791209424877167,22.529278125Q18.849109424877167,22.525578125,18.896009424877168,22.491478125Q18.94290942487717,22.457378125,18.964309424877168,22.403478125Q18.985709424877168,22.349578125,18.975009424877168,22.292578125L17.581709424877168,14.914578125Q17.572209424877165,14.864278125,17.588009424877168,14.815678125Q17.603809424877166,14.766978125,17.64100942487717,14.731878125L23.104909424877167,9.581918125Q23.14710942487717,9.542138125,23.161509424877167,9.485938125Q23.175909424877165,9.429748125,23.157909424877168,9.374578125Q23.140009424877167,9.319408125,23.09530942487717,9.282398125Q23.050709424877166,9.245378125,22.993109424877165,9.238008125L15.545709424877167,8.283168125ZM14.158609424877167,10.029038125L12.000009424877167,5.463868125L9.841499424877167,10.029038125L4.832749424877167,10.671208125L8.507459424877167,14.134778125L7.570409424877167,19.096878125L12.000009424877167,16.672278125L16.429709424877167,19.096878125L15.492609424877166,14.134778125L19.167309424877168,10.671208125L14.158609424877167,10.029038125Z" fill-rule="evenodd" fill="#FFFFFF" fill-opacity="1"/></g></g></svg>
\ No newline at end of file
... ...
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" fill="none" version="1.1" width="24" height="24" viewBox="0 0 24 24"><defs><clipPath id="master_svg0_13448_089626"><rect x="0" y="0" width="24" height="24" rx="0"/></clipPath></defs><g clip-path="url(#master_svg0_13448_089626)"><g><path d="M10.67639,4L3.2,4C3.0895431,4,3,4.0895431,3,4.2L3,20.8C3,20.9105,3.0895431,21,3.2,21L20.8,21C20.9105,21,21,20.9105,21,20.8L21,5.12361C21,5.04785,20.9572,4.9786,20.8894,4.944721L19.2894,4.144721C19.1565,4.0782313,19,4.17493,19,4.323607L19,19L5,19L5,6L9.87639,6C9.95215,6,10.0214,5.9572,10.05528,5.8894400000000005L10.85528,4.289443C10.92177,4.156463,10.82507,4,10.67639,4" fill-rule="evenodd" fill="#FFFFFF" fill-opacity="1"/></g><g><path d="M11.5,3.0706476L11.5,6.52935C11.5,6.56044,11.5339189,6.57965,11.5605798,6.56365L14.44283,4.8343C14.46873,4.81876,14.46873,4.78124,14.44283,4.7657L11.5605798,3.0363479C11.5339189,3.0203513,11.5,3.0395558,11.5,3.0706476" fill-rule="evenodd" fill="#FFFFFF" fill-opacity="1"/></g><g><path d="M15,3.0706476L15,6.52935C15,6.56044,15.0339189,6.57965,15.0605798,6.56365L17.94283,4.8343C17.96873,4.81876,17.96873,4.78124,17.94283,4.7657L15.0605798,3.0363479C15.0339189,3.0203513,15,3.0395558,15,3.0706476" fill-rule="evenodd" fill="#FFFFFF" fill-opacity="1"/></g><g><path d="M8.916,11.64L8.916,16L9.964,16L9.964,10.48L8.916,10.48L7.9879999999999995,11.176L7.9879999999999995,12.312000000000001L8.916,11.64ZM10.788,14.864L10.788,16L11.9,16L11.9,14.864L10.788,14.864ZM13.008,15.612C13.27725,15.9294,13.692,16.0881,14.251999999999999,16.088C14.812000000000001,16.088,15.22663,15.928,15.496,15.608C15.76525,15.2881,15.9,14.81338,15.9,14.184L15.9,12.232C15.9,11.623999999999999,15.76525,11.16537,15.496,10.856C15.22663,10.54675,14.812000000000001,10.392,14.251999999999999,10.392C13.71325,10.392,13.304,10.548,13.024000000000001,10.86C12.744,11.172,12.604,11.62937,12.604,12.232L12.604,14.184C12.604,14.81875,12.73863,15.2948,13.008,15.612ZM14.728,14.932C14.64525,15.0947,14.48663,15.176,14.251999999999999,15.176C14.02262,15.176,13.866620000000001,15.0947,13.783999999999999,14.932C13.70125,14.76937,13.66,14.49075,13.66,14.096L13.66,12.384C13.66,11.989370000000001,13.7,11.712,13.780000000000001,11.552C13.86,11.392,14.01725,11.312000000000001,14.251999999999999,11.312000000000001C14.48663,11.312000000000001,14.64525,11.392,14.728,11.552C14.81063,11.712,14.852,11.989370000000001,14.852,12.384L14.852,14.096C14.852,14.49075,14.81063,14.76937,14.728,14.932Z" fill="#FFFFFF" fill-opacity="1"/></g></g></svg>
\ No newline at end of file
... ...
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" fill="none" version="1.1" width="24" height="24" viewBox="0 0 24 24"><g><g><path d="M17.701900000000002,13.2927L4.298053,20.8323C4.164731,20.9073,4,20.811,4,20.658L4,3.34197C4,3.189004,4.164731,3.0926614,4.298052,3.167654L17.701900000000002,10.70735C17.8353,10.78234,18,10.686,18,10.53303L18,3.2C18,3.0895431,18.0895,3,18.2,3L19.8,3C19.9105,3,20,3.0895431,20,3.2L20,20.6764C20,20.8251,19.8435,20.9218,19.7106,20.8553L18.110599999999998,20.0553C18.0428,20.0214,18,19.9521,18,19.8764L18,13.467C18,13.314,17.8353,13.2177,17.701900000000002,13.2927" fill-rule="evenodd" fill="#FFFFFF" fill-opacity="1"/></g></g></svg>
\ No newline at end of file
... ...
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" fill="none" version="1.1" width="24" height="24" viewBox="0 0 24 24"><g><g><path d="M15.455292971801757,2.941157435449219L6.545744871801758,11.850703835449218Q6.486763725801758,11.909683835449218,6.4871686249017575,11.99309383544922Q6.486763725801758,12.076503835449218,6.545744871801758,12.135483835449218L15.455292971801757,21.045043835449217Q15.513872971801758,21.10364383544922,15.596712971801757,21.10364383544922Q15.679552971801758,21.10364383544922,15.738132971801758,21.045043835449217L17.081592971801758,19.70154383544922Q17.10979297180176,19.67344383544922,17.12499297180176,19.63664383544922Q17.14019297180176,19.599843835449217,17.14019297180176,19.560143835449217Q17.14019297180176,19.520343835449218,17.12499297180176,19.48354383544922Q17.10979297180176,19.44684383544922,17.081592971801758,19.41864383544922L9.656042971801758,11.99309383544922L17.081592971801758,4.567503835449219Q17.10979297180176,4.539373835449219,17.12499297180176,4.5026138354492184Q17.14019297180176,4.465863835449219,17.14019297180176,4.4260838354492185Q17.14019297180176,4.3862938354492185,17.12499297180176,4.349543835449219Q17.10979297180176,4.312793835449218,17.081592971801758,4.284663835449219L15.738132971801758,2.941157435449219Q15.679552971801758,2.8825787414492186,15.596712971801757,2.882578739449219Q15.513872971801758,2.8825787374492187,15.455292971801757,2.941157435449219Z" fill-rule="evenodd" fill="#FFFFFF" fill-opacity="1"/></g></g></svg>
\ No newline at end of file
... ...
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" fill="none" version="1.1" width="24" height="24" viewBox="0 0 24 24"><g><g><path d="M20.566968294906616,12.68848429069519C22.714868294906616,10.54059429069519,22.714868294906616,7.058194290695191,20.566968294906616,4.910304290695191C18.419068294906616,2.7624232906951907,14.936668294906616,2.7624232906951907,12.788768294906616,4.910304290695191L11.728268294906616,5.97079429069519L10.668918294906616,4.91139429069519C8.521038294906617,2.7635142906951904,5.038628294906616,2.7635142906951904,2.890748294906616,4.91139429069519C0.7428652949066162,7.0592842906951905,0.7428652949066162,10.54168429069519,2.890748294906616,12.689574290695191L3.9501382949066164,13.74893429069519L3.949968294906616,13.74913429069519L11.728168294906617,21.52733429069519L11.728268294906616,21.52713429069519L11.729568294906617,21.52843429069519L19.507768294906615,13.75023429069519L19.506468294906615,13.74893429069519L20.566968294906616,12.68848429069519ZM13.555568294906616,6.972654290695191L14.202968294906617,6.3252142906951905C15.569868294906616,4.958374290695191,17.785968294906617,4.958374290695191,19.152768294906615,6.3252142906951905L19.284868294906616,6.4646642906951906C20.518068294906616,7.83885429069519,20.474068294906616,9.95369429069519,19.152768294906615,11.27497429069519L18.092668294906616,12.33510429069519L18.089568294906616,12.332024290695191L16.67556829490662,13.74783429069519L16.677768294906617,13.75003429069519L11.728168294906617,18.69963429069519L6.980568294906616,13.95203429069519L6.978238294906617,13.95393429069519L5.366338294906616,12.332774290695191L5.363668294906616,12.33544429069519L4.304448294906616,11.27622429069519C2.9376082949066165,9.90938429069519,2.9376082949066165,7.69330429069519,4.304448294906616,6.32646429069519L4.443898294906616,6.19434429069519C5.818078294906616,4.96115429069519,7.932928294906616,5.00519429069519,9.254208294906615,6.32646429069519L10.115348294906616,7.1876142906951905L11.725968294906616,8.79143429069519L13.555368294906616,6.972464290695191L13.555568294906616,6.972654290695191Z" fill-rule="evenodd" fill="#FFFFFF" fill-opacity="1"/></g></g></svg>
\ No newline at end of file
... ...
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" fill="none" version="1.1" width="28" height="28" viewBox="0 0 28 28"><g><g><path d="M3.5,4.31780565625L3.5,6.18447265625Q3.5,6.2308826562499995,3.5177614,6.27376265625Q3.5355229,6.31664265625,3.5683417,6.34946265625Q3.601161,6.38228265625,3.644041,6.40004265625Q3.68692,6.41780265625,3.733333,6.41780265625L24.2667,6.41780265625Q24.3131,6.41780265625,24.356,6.40004265625Q24.3988,6.38228265625,24.4317,6.34946265625Q24.4645,6.31664265625,24.4822,6.27376265625Q24.5,6.2308826562499995,24.5,6.18447265625L24.5,4.31780565625Q24.5,4.27139265625,24.4822,4.22851365625Q24.4645,4.18563365625,24.4317,4.15281435625Q24.3988,4.11999555625,24.356,4.10223405625Q24.3131,4.08447265625,24.2667,4.08447265625L3.733333,4.08447265625Q3.68692,4.08447265625,3.644041,4.10223405625Q3.601161,4.11999555625,3.5683417,4.15281435625Q3.5355229,4.18563365625,3.5177614,4.22851365625Q3.5,4.27139265625,3.5,4.31780565625ZM10.20878,13.80699265625L3.862763,9.57631265625C3.707701,9.47294265625,3.5,9.58410265625,3.5,9.77046265625L3.5,18.23177265625C3.5,18.41817265625,3.707701,18.52937265625,3.862763,18.42597265625L10.20878,14.19527265625C10.34732,14.10297265625,10.34732,13.89935265625,10.20878,13.80699265625ZM24.2667,12.83349265625L13.5609,12.83349265625C13.47249,12.83349265625,13.3917,12.88343265625,13.35217,12.96248265625L12.41884,14.82917265625C12.34127,14.98427265625,12.45409,15.16687265625,12.62754,15.16687265625L24.2667,15.16687265625C24.3955,15.16687265625,24.5,15.06237265625,24.5,14.93347265625L24.5,13.06683265625C24.5,12.93796265625,24.3955,12.83349265625,24.2667,12.83349265625ZM3.5,21.81777265625L3.5,23.68447265625Q3.5,23.73087265625,3.5177614,23.77377265625Q3.5355229,23.81667265625,3.5683417,23.84947265625Q3.601161,23.88227265625,3.644041,23.90007265625Q3.68692,23.91777265625,3.733333,23.91777265625L24.2667,23.91777265625Q24.3131,23.91777265625,24.356,23.90007265625Q24.3988,23.88227265625,24.4317,23.84947265625Q24.4645,23.81667265625,24.4822,23.77377265625Q24.5,23.73087265625,24.5,23.68447265625L24.5,21.81777265625Q24.5,21.77137265625,24.4822,21.72847265625Q24.4645,21.68567265625,24.4317,21.65277265625Q24.3988,21.61997265625,24.356,21.60227265625Q24.3131,21.58447265625,24.2667,21.58447265625L3.733333,21.58447265625Q3.68692,21.58447265625,3.644041,21.60227265625Q3.601161,21.61997265625,3.5683417,21.65277265625Q3.5355229,21.68567265625,3.5177614,21.72847265625Q3.5,21.77137265625,3.5,21.81777265625Z" fill-rule="evenodd" fill="#FFFFFF" fill-opacity="1"/></g></g></svg>
\ No newline at end of file
... ...
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" fill="none" version="1.1" width="24" height="24" viewBox="0 0 24 24"><g><g><path d="M16.61255231628418,0.6909312143875121L15.48135231628418,1.8221886143875121C15.40315231628418,1.9003386143875123,15.40325231628418,2.0270586143875122,15.48145231628418,2.105148614387512L16.87945231628418,3.5008286143875122L2.19995231628418,3.5008286143875122C2.0894953162841796,3.5008286143875122,1.9999523162841797,3.5903786143875123,1.9999523162841797,3.7008286143875124L1.9999523162841797,14.377268614387512C1.9999523162841797,14.452968614387512,2.0427528162841795,14.522268614387512,2.1105093162841797,14.556068614387513L3.7105123162841798,15.356068614387512C3.8434923162841796,15.422568614387512,3.9999523162841797,15.325868614387511,3.9999523162841797,15.177268614387513L3.9999523162841797,5.500828614387512L18.99995231628418,5.500828614387512L18.99995231628418,5.499258614387513L21.22095231628418,5.499258614387513C21.39905231628418,5.499258614387513,21.48835231628418,5.283828614387512,21.36235231628418,5.157838614387512L16.895452316284178,0.6909312143875121C16.81735231628418,0.6128262143875122,16.69065231628418,0.6128263143875122,16.61255231628418,0.6909312143875121ZM19.99995231628418,8.823458614387512L19.99995231628418,18.499868614387513L5.11660231628418,18.499868614387513L5.115252316284179,18.498468614387512L2.7755723162841797,18.498468614387512C2.5973913162841797,18.498468614387512,2.50815731628418,18.71396861438751,2.6341503162841797,18.839968614387512L7.101052316284179,23.30686861438751C7.17916231628418,23.384968614387514,7.30579231628418,23.384968614387514,7.383902316284179,23.30686861438751L8.51515231628418,22.17556861438751C8.59330231628418,22.097468614387513,8.593252316284179,21.970668614387513,8.51503231628418,21.89256861438751L7.11995231628418,20.499868614387513L21.79995231628418,20.499868614387513C21.91045231628418,20.499868614387513,21.99995231628418,20.410268614387512,21.99995231628418,20.299868614387513L21.99995231628418,9.623458614387513C21.99995231628418,9.547708614387512,21.95715231628418,9.478458614387511,21.889352316284178,9.444578614387511L20.28935231628418,8.644578614387513C20.15645231628418,8.578088614387513,19.99995231628418,8.674788614387513,19.99995231628418,8.823458614387512Z" fill-rule="evenodd" fill="#FFFFFF" fill-opacity="1"/></g></g></svg>
\ No newline at end of file
... ...
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" fill="none" version="1.1" width="24" height="24" viewBox="0 0 24 24"><g><g><path d="M2.7,3.2001953125L21.3,3.2001953125C21.4105,3.2001953125,21.5,3.2897384125,21.5,3.4001953125L21.5,19.0001953125C21.5,19.1106953125,21.4105,19.2001953125,21.3,19.2001953125L14.9442,19.2001953125L13.4142,20.7300953125L13.4198,20.7356953125L12.35915,21.7963953125C12.2601,21.8953953125,12.12982,21.9442953125,12,21.9427953125C11.87018,21.9442953125,11.7399,21.8953953125,11.64085,21.7963953125L10.58019,20.7356953125L10.58579,20.7300953125L9.05585,19.2001953125L2.7,19.2001953125C2.5895431,19.2001953125,2.5,19.1106953125,2.5,19.0001953125L2.5,3.4001953125C2.5,3.2897384125,2.5895431,3.2001953125,2.7,3.2001953125ZM9.88281,17.2016953125L9.88428,17.2001953125L12,19.3158953125L14.1157,17.2001953125L14.1179,17.202395312500002L14.1179,17.2001953125L19.5,17.2001953125L19.5,5.2001953125L4.5,5.2001953125L4.5,17.2001953125L9.88281,17.2001953125L9.88281,17.2016953125ZM15.8553,11.7884653125L15.0553,13.3884953125C15.0214,13.4561953125,14.9521,13.4989953125,14.8764,13.4989953125L9.2,13.4989953125C9.08954,13.4989953125,9,13.4094953125,9,13.2989953125L9,11.6990253125C9,11.5885653125,9.08954,11.4990253125,9.2,11.4990253125L15.6764,11.4990253125C15.8251,11.4990253125,15.9218,11.6554853125,15.8553,11.7884653125Z" fill-rule="evenodd" fill="#FFFFFF" fill-opacity="1"/></g></g></svg>
\ No newline at end of file
... ...
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" fill="none" version="1.1" width="24" height="24" viewBox="0 0 24 24"><g><g><path d="M6.915255046875,4.7314907592749025L11.848588046875001,5.964826319274902C11.937618046875,5.987086319274902,12.000078046875,6.067076319274903,12.000078046875,6.158856319274903L12.000078046875,28.413216319274902C12.000078046875,28.5433163192749,11.877808046875,28.638816319274902,11.751578046875,28.6072163192749L6.818241046875,27.3739163192749C6.729207546875,27.351616319274903,6.666748046875,27.2716163192749,6.666748046875,27.179916319274902L6.666748046875,4.925519319274902C6.666748046875,4.795405019274902,6.789026046875,4.6999334192749025,6.915255046875,4.7314907592749025M20.248548046875,4.7314907592749025L25.181848046875,5.964826319274902C25.270848046875,5.987086319274902,25.333348046875,6.067076319274903,25.333348046875,6.158856319274903L25.333348046875,28.413216319274902C25.333348046875,28.5433163192749,25.211048046875,28.638816319274902,25.084848046875,28.6072163192749L20.151448046875,27.3739163192749C20.062448046874998,27.351616319274903,20.000048046875,27.2716163192749,20.000048046875,27.179916319274902L20.000048046875,4.925519319274902C20.000048046875,4.795405019274902,20.122248046875,4.6999334192749025,20.248548046875,4.7314907592749025" fill-rule="evenodd" fill="#FFFFFF" fill-opacity="1"/></g></g></svg>
\ No newline at end of file
... ...
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" fill="none" version="1.1" width="24" height="24" viewBox="0 0 24 24"><g><g><g></g><g><path d="M1.105417,18.0568234375C1.761066,12.8724234375,5.40289,8.7758634375,10,8.0615634375L10,2.4051984375C10,2.2392634375,10.19042,2.1455014375,10.32194,2.2466744375L11.7395,3.3371434375L12,3.5375034375L21.3599,10.7374734375L21.3737,10.7481134375L22.7939,11.8405934375C22.898,11.9206534375,22.898,12.0776234375,22.7939,12.1576234375L21.3737,13.2501234375L21.3599,13.2607234375L12,20.4606234375L10.32194,21.7514234375C10.19042,21.8525234375,10,21.7588234375,10,21.5928234375L10,15.9352234375C9.25883,15.9524234375,8.59673,16.0094234375,8,16.1030234375C5.56676,16.4847234375,4.220549999999999,17.475123437500002,3.03385,18.8574234375C2.9302799999999998,18.9781234375,2.8279199999999998,19.1017234375,2.72616,19.2282234375C2.5922799999999997,19.3946234375,2.45944,19.5659234375,2.32622,19.7418234375Q2.1580399999999997,19.9639234375,1.9526590000000001,20.2902234375C1.675074,20.7312234375,1.00114143,20.6132234375,1.0000145385,20.0921234375L1,20.0787234375C1,19.7077234375,1.0151771,19.0006234375,1.0448684,18.6383234375C1.0452151,18.6341234375,1.0455638,18.6299234375,1.0459145,18.6256234375C1.0617483,18.4347234375,1.0816148,18.2450234375,1.105417,18.0568234375ZM12,9.774803437500001L12,6.0607734375L19.7198,11.9991234375L12,17.937323437499998L12,13.8883234375L9.95364,13.9357234375Q6.42661,14.0175234375,4.1625,15.3073234375Q3.98453,15.4087234375,3.80699,15.5232234375Q4.40034,14.0850234375,5.42699,12.8756234375Q7.46041,10.4801634375,10.30707,10.0378534375L12,9.774803437500001Z" fill-rule="evenodd" fill="#FFFFFF" fill-opacity="1"/></g></g></g></svg>
\ No newline at end of file
... ...
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" fill="none" version="1.1" width="28.000001907348633" height="28.000001907348633" viewBox="0 0 28.000001907348633 28.000001907348633"><g><g></g><g><path d="M3.5,25.08349609375L3.5,2.91682909375Q3.5,2.85937609375,3.5112086,2.80302709375Q3.5224172,2.74667709375,3.5444036,2.6935970937500002Q3.56639,2.6405170937499998,3.5983094,2.59274709375Q3.630229,2.54497609375,3.670854,2.50435009375Q3.71148,2.46372509375,3.759251,2.43180549375Q3.8070209999999998,2.39988609375,3.8601010000000002,2.37789969375Q3.913181,2.35591329375,3.969531,2.34470469375Q4.02588,2.33349609375,4.083333,2.33349609375L23.9167,2.33349609375Q23.9741,2.33349609375,24.0305,2.34470469375Q24.0868,2.35591329375,24.1399,2.37789969375Q24.193,2.39988609375,24.2407,2.43180549375Q24.2885,2.46372509375,24.3291,2.50435009375Q24.3698,2.54497609375,24.4017,2.59274709375Q24.4336,2.6405170937499998,24.4556,2.6935970937500002Q24.4776,2.74667709375,24.4888,2.80302709375Q24.5,2.85937609375,24.5,2.91682909375L24.5,15.16649609375L22.1666,15.16649609375L22.1666,4.66650609375L5.83325,4.66650609375L5.83325,23.33319609375L14,23.33319609375L14,25.66679609375L4.083333,25.66679609375Q4.02588,25.66679609375,3.969531,25.65559609375Q3.913181,25.64439609375,3.8601010000000002,25.62239609375Q3.8070209999999998,25.60039609375,3.759251,25.56849609375Q3.71148,25.53659609375,3.670854,25.49599609375Q3.630229,25.45539609375,3.5983094,25.40759609375Q3.56639,25.35979609375,3.5444036,25.30669609375Q3.5224172,25.25369609375,3.5112086,25.19729609375Q3.5,25.14099609375,3.5,25.08349609375Z" fill-rule="evenodd" fill="#FFFFFF" fill-opacity="1"/></g><g><path d="M9.333251953125,11.43447265625C9.333251953125,11.56334265625,9.437718953125,11.66780265625,9.566584953125,11.66780265625L17.355711953125002,11.66780265625C17.444091953125,11.66780265625,17.524881953125,11.61787265625,17.564411953125,11.53882265625L18.497741953125,9.67215565625C18.575311953125002,9.51701265625,18.462501953125,9.33447265625,18.289041953125,9.33447265625L9.566584953125,9.33447265625C9.437718953125,9.33447265625,9.333251953125,9.43893965625,9.333251953125,9.56780565625L9.333251953125,11.43447265625Z" fill="#FFFFFF" fill-opacity="1"/></g><g><path d="M9.333251953125,16.68203125C9.333251953125,16.81090125,9.437718953125,16.91536125,9.566584953125,16.91536125L14.439041953124999,16.91536125C14.527421953125,16.91536125,14.608221953125,16.86543125,14.647741953125,16.786381249999998L15.581081953125,14.91971425C15.658651953125,14.76457125,15.545831953124999,14.58203125,15.372381953125,14.58203125L9.566584953125,14.58203125C9.437718953125,14.58203125,9.333251953125,14.68649825,9.333251953125,14.81536425L9.333251953125,16.68203125Z" fill="#FFFFFF" fill-opacity="1"/></g><g><path d="M17.588956390625,19.15734328125L20.566870390625,19.16774328125L20.548890390625,24.31857328125L19.458060390625,24.314763281250002L19.471360390625,20.50559328125C19.471810390625,20.37673328125,19.367710390625,20.27190328125,19.238840390625,20.27145328125L18.346340390625,20.26833328125C18.217470390625,20.26788328125,18.112640390625,20.37198328125,18.112190390625,20.50085328125L18.098890390625,24.31002328125L17.054726390625,24.30637328125C16.925861390625,24.30592328125,16.821030110625,24.410023281249998,16.820580290625,24.53889328125L16.817464871625,25.43139328125C16.817015045625,25.560263281250002,16.921116390625,25.66509328125,17.049982390625,25.66554328125L24.933730390625,25.693063281249998C25.062600390625,25.69351328125,25.167430390625,25.58941328125,25.167880390625,25.46054328125L25.171000390625,24.56804328125C25.171450390624997,24.43917328125,25.067340390625,24.33434328125,24.938480390625,24.33389328125L21.934310390625,24.323413281249998L21.941450390625,22.27882328125L24.105620390625,22.28638328125C24.234480390625002,22.28683328125,24.339310390625002,22.18272328125,24.339760390625,22.05386328125L24.342820390625,21.17886328125C24.343270390625,21.04999328125,24.239170390625,20.94516328125,24.110300390625,20.94471328125L21.946130390625,20.93716328125L21.952290390625002,19.17257328125L24.588960390625,19.18178328125C24.717820390625,19.18223328125,24.822660390625,19.07812328125,24.823100390625,18.94926328125L24.826220390625,18.05675828125C24.826670390625,17.92789328125,24.722570390625002,17.82306218125,24.593700390625,17.82261228125L17.593700390625,17.79817776225C17.464835390625,17.79772793625,17.360004390625,17.90182928125,17.359554390625,18.03069528125L17.356439390625,18.92320328125C17.355989390625,19.05206328125,17.460090390625,19.15689328125,17.588956390625,19.15734328125Z" fill-rule="evenodd" fill="#FFFFFF" fill-opacity="1"/></g></g></svg>
\ No newline at end of file
... ...
... ... @@ -5,13 +5,13 @@
"name": "default",
"type": "HarmonyOS",
"material": {
"certpath": "/Users/ysy/.ohos/config/auto_debug_sight_harmony_com.wondertek.sight_30086000745972390.cer",
"storePassword": "0000001AD1ABE6FB1D5AEC538066BBDCACCDF8DFB85BA89D4A7B163112F48FDFAD37222DD5D2FBC6738C",
"certpath": "/Users/jrl/.ohos/config/auto_debug_sight_harmony_com.wondertek.sight_2850086000431478878.cer",
"storePassword": "0000001B1B59DAB22B389A8BCD25A2C43C89DE581FD6AC3EEE1D3FC227D46727A7763AAE553A50B5E81310",
"keyAlias": "debugKey",
"keyPassword": "0000001AA4301CF4CB6CD92BFD749A3C09BC771B02A1E544A47EBBC557DB27E8150CB2AB5CB13029999D",
"profile": "/Users/ysy/.ohos/config/auto_debug_sight_harmony_com.wondertek.sight_30086000745972390.p7b",
"keyPassword": "0000001B2B0EDD642E43906A1B9A6B72A79F40316E908829B79DD96467FE5C3A8D1DF9E40957DA733DF77F",
"profile": "/Users/jrl/.ohos/config/auto_debug_sight_harmony_com.wondertek.sight_2850086000431478878.p7b",
"signAlg": "SHA256withECDSA",
"storeFile": "/Users/ysy/.ohos/config/auto_debug_sight_harmony_com.wondertek.sight_30086000745972390.p12"
"storeFile": "/Users/jrl/.ohos/config/auto_debug_sight_harmony_com.wondertek.sight_2850086000431478878.p12"
}
}
],
... ...
... ... @@ -31,3 +31,5 @@ export { DisplayUtils } from './src/main/ets/utils/DisplayUtils'
export { SystemUtils } from './src/main/ets/utils/SystemUtils'
export { PermissionUtil } from './src/main/ets/utils/PermissionUtil'
export { UserDataLocal } from './src/main/ets/utils/UserDataLocal'
\ No newline at end of file
... ...
/**
* 用户信息 暂存管理类
* 主要用于 不需要调用 用户详情接口 获取 当前用户信息的 数据
*/
import { SPHelper } from './SPHelper'
import { StringUtils } from './StringUtils'
export class UserDataLocal {
public static userId=''
public static userType=''
public static token=''
public static userName=''
public static userHeaderUrl=''
public static userLevel = -1
public static userLevelHeaderUrl=''
//先写死
static USER_ID="userId"
static USER_Type="userType"
static USER_JWT_TOKEN="jwtToken"
static USER_NAME="userName"
static USER_HEADER_URL="userHeaderUrl"
static USER_LEVEL="userLevel"
static USER_LEVEL_HEADER_URL="userLevelHeaderUrl"
//刷新token 用到
static USER_REFRESH_TOKEN="refreshToken"
/**
* 清除 本地用户数据
*/
public static clearUserData(){
SPHelper.default.deleteSync(UserDataLocal.USER_ID)
SPHelper.default.deleteSync(UserDataLocal.USER_Type)
SPHelper.default.deleteSync(UserDataLocal.USER_JWT_TOKEN) //待确认
SPHelper.default.deleteSync(UserDataLocal.USER_NAME)
SPHelper.default.deleteSync(UserDataLocal.USER_HEADER_URL)
SPHelper.default.deleteSync(UserDataLocal.USER_LEVEL)
SPHelper.default.deleteSync(UserDataLocal.USER_LEVEL_HEADER_URL)
}
public static getUserId() {
if(StringUtils.isNotEmpty(UserDataLocal.userId)){
return UserDataLocal.userId
}
UserDataLocal.userId = SPHelper.default.getSync(UserDataLocal.USER_ID,"") as string
return UserDataLocal.userId;
}
public static getUserType() {
if(StringUtils.isNotEmpty(UserDataLocal.userType)){
return UserDataLocal.userType
}
UserDataLocal.userType = SPHelper.default.getSync(UserDataLocal.USER_Type,"") as string
return UserDataLocal.userType;
}
private static getXToken() {
if(StringUtils.isNotEmpty(UserDataLocal.token)){
return UserDataLocal.token
}
UserDataLocal.token = SPHelper.default.getSync(UserDataLocal.USER_JWT_TOKEN,"") as string
if(StringUtils.isNotEmpty(UserDataLocal.token)) {
return UserDataLocal.token
}
return 'eyJhbGciOiJIUzI1NiIsImtpZCI6ImQ4WkI2QkhxSEZrdjJ2U25BNlRwZEdKRjBHcjItVzBvS2FaYzdLOUUycmcifQ.eyJpc3MiOiJwZW9wbGVzLWRhaWx5LWZvdXJhIiwic3ViIjoicGVvcGxlcy1kYWlseS1mb3VyYSIsImV4cCI6MTcwMzY0OTYwNiwidXNlcklkIjo0NTk3NzYyOTc0NzQ5NDksInVzZXJWZXJzaW9uIjoiNDU5Nzc2Mjk3NDc0OTQ5XzIiLCJ1c2VyTmFtZSI6IkJ1bGlraWtpMTgxIiwidXNlclR5cGUiOjIsImNyZWF0b3JJZCI6NDI2NTM5MH0.jhQ9kylcm3FxWf0-lBMZuLkdtIQ6XpFnAi0AFZJNwfc';
}
public static getUserName() {
if(StringUtils.isNotEmpty(UserDataLocal.userName)){
return UserDataLocal.userName
}
UserDataLocal.userName = SPHelper.default.getSync(UserDataLocal.USER_NAME,"") as string
return UserDataLocal.userName;
}
public static getUserHeaderUrl() {
if(StringUtils.isNotEmpty(UserDataLocal.userHeaderUrl)){
return UserDataLocal.userHeaderUrl
}
UserDataLocal.userHeaderUrl = SPHelper.default.getSync(UserDataLocal.USER_HEADER_URL,"") as string
return UserDataLocal.userHeaderUrl;
}
public static setUserHeaderUrl(url:string) {
SPHelper.default.save(UserDataLocal.USER_HEADER_URL, url)
}
public static getUserLevel() {
if(UserDataLocal.userLevel != -1){
return UserDataLocal.userLevel
}
UserDataLocal.userLevel = SPHelper.default.getSync(UserDataLocal.USER_LEVEL,-1) as number
return UserDataLocal.userLevel;
}
public static setUserLevel(level:number) {
SPHelper.default.save(UserDataLocal.USER_LEVEL, level)
}
public static getUserLevelHeaderUrl() {
if(StringUtils.isNotEmpty(UserDataLocal.userLevelHeaderUrl)){
return UserDataLocal.userLevelHeaderUrl
}
UserDataLocal.userLevelHeaderUrl = SPHelper.default.getSync(UserDataLocal.USER_LEVEL_HEADER_URL,"") as string
return UserDataLocal.userLevelHeaderUrl;
}
public static setUserLevelHeaderUrl(url:string) {
SPHelper.default.save(UserDataLocal.USER_LEVEL_HEADER_URL, url)
}
}
\ No newline at end of file
... ...
... ... @@ -26,7 +26,6 @@ export class HttpUrlUtils {
* 启动接口(底导接口)
*/
static readonly BOTTOM_NAV_PATH: string = "/api/rmrb-bff-display-zh/display/zh/c/bottomNavGroup";
/**
* 展现pageInfo接口
*/
... ... @@ -42,24 +41,24 @@ export class HttpUrlUtils {
/**
* 批查接口,查询互动相关数据,如收藏数、评论数等
*/
static readonly INTERACT_DATA_PATH: string = "/api/rmrb-contact/contact/zh/c/content/interactData";
static readonly INTERACT_DATA_PATH: string = "/api/rmrb-contact/contact/zh/c/v2/content/interactData";
// 多图(图集)详情页
/**
* 批量查询内容当前用户点赞、收藏状态
*/
static readonly INTERACT_DATA_STATUS: string = "/api/rmrb-interact/interact/zh/c/batchLikeAndCollect/status";
/**
* 沉浸式視頻批量查詢20條數據
*/
static readonly RECOMMEND_VIDEOLIST: string = "/api/rmrb-bff-display-zh/recommend/zh/c/videoList";
/**
* 浏览历史新增、删除接口
*/
static readonly INTERACT_BROWS_OPERATE: string = "/api/rmrb-interact/interact/zh/c/brows/operate";
/**
* 电子报信息
*/
static readonly E_NEWSPAPER_INFO_PATH: string = "/api/rmrb-bff-display-zh/display/zh/c/paperApi/paperTime";
/**
* 电子报列表
*/
... ... @@ -94,25 +93,25 @@ export class HttpUrlUtils {
*/
static readonly FOLLOW_LIST_STATUS_DATA_PATH: string = "/api/rmrb-interact/interact/zh/c/batchAttention/status";
/**
* 个人中心 启用用户 有没有被当前用户点赞状态
*/
static readonly COMMENT_LIST_STATUS_DATA_PATH: string = "/api/rmrb-comment/comment/zh/c/batchCommentStatus";
/**
* 我的收藏
*/
static readonly APPOINTMENT_MyCollectionList_PATH: string = "/api/rmrb-interact/content/zh/c/interact";
/**
* 个人中心 我的评论列表
*/
static readonly MINE_COMMENT_LIST_DATA_PATH: string = "/api/rmrb-comment/comment/zh/c/myCommentList";
/**
* 个人中心 APP获取用户等级
*/
static readonly MINE_USER_LEVEL_DATA_PATH: string = "/api/rmrb-user-point/auth/level/zh/c/queryUserLevel";
/**
* 个人中心 APP获取其他用户等级
*/
static readonly OTHER_USER_LEVEL_DATA_PATH: string = "/api/rmrb-user-point/auth/level/zh/c/batchUser";
/**
* 个人中心 (号主/普通用户)我的基本信息
*/
... ... @@ -129,6 +128,20 @@ export class HttpUrlUtils {
* 个人中心 我的关注列表
*/
static readonly OTHER_USER_FOLLOW_LIST_DATA_PATH: string = "/api/rmrb-interact/interact/zh/c/userAttention/list";
/**
* 预约操作
*/
static readonly APPOINTMENT_OPERATION_STATUS_PATH: string = "/api/live-center-message/zh/c/live/subscribe";
/**
* 点赞操作
*/
static readonly COMMENT_LIKE_OPERATION_PATH: string = "/api/rmrb-comment/comment/zh/c/commentLike";
/**
* 关注操作
*/
static readonly FOLLOW_OPERATION_PATH: string = "/api/rmrb-interact/interact/zh/c/attention/operation";
/**
* 早晚报列表
* 根据页面id获取页面楼层列表
... ... @@ -139,13 +152,11 @@ export class HttpUrlUtils {
* pageSize=20&pageNum=1&topicId=10000009445
* */
static readonly MORNING_EVENING_PAGE_INFO_PATH: string = "/api/rmrb-bff-display-zh/display/zh/c/pageInfo";
static readonly MORNING_EVENING_COMP_INFO_PATH: string = "/api/rmrb-bff-display-zh/display/zh/c/compInfo";
private static hostUrl: string = HttpUrlUtils.HOST_PRODUCT;
private static userId=''
private static userType=''
private static token=''
private static userId = ''
private static userType = ''
private static token = ''
static getCommonHeaders(): HashMap<string, string> {
let headers: HashMap<string, string> = new HashMap<string, string>()
... ... @@ -240,9 +251,12 @@ export class HttpUrlUtils {
}
private static getXToken() {
let jwttoken = SPHelper.default.getSync(SpConstants.USER_JWT_TOKEN,"")
if(StringUtils.isNotEmpty(jwttoken)) {
return jwttoken as string;
if(StringUtils.isNotEmpty(HttpUrlUtils.token)){
return HttpUrlUtils.token
}
HttpUrlUtils.token = SPHelper.default.getSync(SpConstants.USER_JWT_TOKEN,"") as string
if(StringUtils.isNotEmpty(HttpUrlUtils.token)) {
return HttpUrlUtils.token
}
return 'eyJhbGciOiJIUzI1NiIsImtpZCI6ImQ4WkI2QkhxSEZrdjJ2U25BNlRwZEdKRjBHcjItVzBvS2FaYzdLOUUycmcifQ.eyJpc3MiOiJwZW9wbGVzLWRhaWx5LWZvdXJhIiwic3ViIjoicGVvcGxlcy1kYWlseS1mb3VyYSIsImV4cCI6MTcwMzY0OTYwNiwidXNlcklkIjo0NTk3NzYyOTc0NzQ5NDksInVzZXJWZXJzaW9uIjoiNDU5Nzc2Mjk3NDc0OTQ5XzIiLCJ1c2VyTmFtZSI6IkJ1bGlraWtpMTgxIiwidXNlclR5cGUiOjIsImNyZWF0b3JJZCI6NDI2NTM5MH0.jhQ9kylcm3FxWf0-lBMZuLkdtIQ6XpFnAi0AFZJNwfc';
}
... ... @@ -313,19 +327,18 @@ export class HttpUrlUtils {
public static getUserId() {
// TODO 对接登录
let userid = SPHelper.default.getSync(SpConstants.USER_ID,"")
if(StringUtils.isNotEmpty(userid)) {
return userid as string;
if(StringUtils.isNotEmpty(HttpUrlUtils.userId)){
return HttpUrlUtils.userId
}
HttpUrlUtils.userId = SPHelper.default.getSync(SpConstants.USER_ID,"") as string
return HttpUrlUtils.userId;
}
private static getUserType() {
let userType = SPHelper.default.getSync(SpConstants.USER_Type,"")
if(StringUtils.isNotEmpty(userType)) {
return userType as string;
public static getUserType() {
if(StringUtils.isNotEmpty(HttpUrlUtils.userType)){
return HttpUrlUtils.userType
}
HttpUrlUtils.userType = SPHelper.default.getSync(SpConstants.USER_Type,"") as string
return HttpUrlUtils.userType;
}
... ... @@ -366,7 +379,7 @@ export class HttpUrlUtils {
return url;
}
static getAppLoginUrl() :string{
static getAppLoginUrl(): string {
let url = HttpUrlUtils.getHost() + "/api/rmrb-user-center/auth/zh/c/appLogin";
return url;
}
... ... @@ -382,7 +395,7 @@ export class HttpUrlUtils {
}
static getAppointmentListDataUrl() {
let url = HttpUrlUtils.HOST_SIT + HttpUrlUtils.APPOINTMENT_LIST_DATA_PATH
let url = HttpUrlUtils.hostUrl + HttpUrlUtils.APPOINTMENT_LIST_DATA_PATH
return url
}
... ... @@ -392,110 +405,128 @@ export class HttpUrlUtils {
}
static getFollowListDetailDataUrl() {
let url = HttpUrlUtils.HOST_SIT + HttpUrlUtils.FOLLOW_LIST_DETAIL_DATA_PATH
let url = HttpUrlUtils.hostUrl + HttpUrlUtils.FOLLOW_LIST_DETAIL_DATA_PATH
return url
}
static getFollowListDataUrl() {
let url = HttpUrlUtils.HOST_SIT + HttpUrlUtils.FOLLOW_LIST_DATA_PATH
let url = HttpUrlUtils.hostUrl + HttpUrlUtils.FOLLOW_LIST_DATA_PATH
return url
}
static getMineFollowListDataUrl() {
let url = HttpUrlUtils.HOST_SIT + HttpUrlUtils.MINE_FOLLOW_LIST_DATA_PATH
let url = HttpUrlUtils.hostUrl + HttpUrlUtils.MINE_FOLLOW_LIST_DATA_PATH
return url
}
static getFollowListStatusDataUrl() {
let url = HttpUrlUtils.HOST_SIT + HttpUrlUtils.FOLLOW_LIST_STATUS_DATA_PATH
let url = HttpUrlUtils.hostUrl + HttpUrlUtils.FOLLOW_LIST_STATUS_DATA_PATH
return url
}
static getCommentListStatusDataUrl() {
let url = HttpUrlUtils.hostUrl + HttpUrlUtils.COMMENT_LIST_STATUS_DATA_PATH
return url
}
static getMineCommentListDataUrl() {
let url = HttpUrlUtils.HOST_SIT + HttpUrlUtils.MINE_COMMENT_LIST_DATA_PATH
let url = HttpUrlUtils.hostUrl + HttpUrlUtils.MINE_COMMENT_LIST_DATA_PATH
return url
}
static getMineUserLevelDataUrl() {
let url = HttpUrlUtils.HOST_SIT + HttpUrlUtils.MINE_USER_LEVEL_DATA_PATH
let url = HttpUrlUtils.hostUrl + HttpUrlUtils.MINE_USER_LEVEL_DATA_PATH
return url
}
static getOtherUserLevelDataUrl() {
let url = HttpUrlUtils.HOST_SIT + HttpUrlUtils.OTHER_USER_LEVEL_DATA_PATH
let url = HttpUrlUtils.hostUrl + HttpUrlUtils.OTHER_USER_LEVEL_DATA_PATH
return url
}
static getMineUserDetailDataUrl() {
let url = HttpUrlUtils.HOST_SIT + HttpUrlUtils.MINE_USER_DETAIL_DATA_PATH
let url = HttpUrlUtils.hostUrl + HttpUrlUtils.MINE_USER_DETAIL_DATA_PATH
return url
}
static getOtherUserDetailDataUrl() {
let url = HttpUrlUtils.HOST_SIT + HttpUrlUtils.OTHER_USER_DETAIL_DATA_PATH
let url = HttpUrlUtils.hostUrl + HttpUrlUtils.OTHER_USER_DETAIL_DATA_PATH
return url
}
static getOtherCommentListDataUrl() {
let url = HttpUrlUtils.HOST_SIT + HttpUrlUtils.OTHER_COMMENT_LIST_DATA_PATH
let url = HttpUrlUtils.hostUrl + HttpUrlUtils.OTHER_COMMENT_LIST_DATA_PATH
return url
}
static getOtherUserFollowListDataUrl() {
let url = HttpUrlUtils.HOST_SIT + HttpUrlUtils.OTHER_USER_FOLLOW_LIST_DATA_PATH
let url = HttpUrlUtils.hostUrl + HttpUrlUtils.OTHER_USER_FOLLOW_LIST_DATA_PATH
return url
}
static getYcgCommonHeaders(): HashMap<string, string> {
let headers: HashMap<string, string> = new HashMap<string, string>()
headers.set('mpassid', 'XGt6jfGUx8ADAKruTyAMdhHj')
headers.set('city', "%E5%90%88%E8%82%A5%E5%B8%82")
headers.set('User-Agent', 'Dalvik/2.1.0 (Linux; U; Android 10; PCT-AL10 Build/HUAWEIPCT-AL10)')
headers.set('channel', "rmrb_china_0000")
headers.set('appCode', "0af1f9085e484c97b2a44704bae72c07")
headers.set('Authorization', "APPCODE 0af1f9085e484c97b2a44704bae72c07")
headers.set('X-Ca-Stage', "TEST")
headers.set('plat', "Phone")
headers.set('Content-Type', 'application/json; charset=utf-8')
headers.set('timestamp', "740977741")
headers.set('RMRB-X-TOKEN', "eyJhbGciOiJIUzI1NiIsImtpZCI6IklFazBGclhfV2RYMEx1ZktDU01iYTVYd0VmUHZ6a043T0F5UTRFLWIwWU0ifQ.eyJpc3MiOiJwZW9wbGVzLWRhaWx5LWZvdXJhIiwic3ViIjoicGVvcGxlcy1kYWlseS1mb3VyYSIsImV4cCI6MTcxMDc1NjM3NywidXNlcklkIjo1NjczODc0NzcwNjM2MjEsInVzZXJWZXJzaW9uIjoiNTY3Mzg3NDc3MDYzNjIxXzAiLCJ1c2VyTmFtZSI6IiVFNCVCQSVCQSVFNiVCMCU5MSVFNiU5NyVBNSVFNiU4QSVBNSVFNyVCRCU5MSVFNSU4RiU4QmFQcnRxNSIsInVzZXJUeXBlIjoxLCJjcmVhdG9ySWQiOm51bGwsInVzZXJJZFpoIjpudWxsfQ.KBkF0Yki-JWlq0ZIOCzgKwQc1ycBnFHa6CF-rMPRgHU")
headers.set('device_id', "5156098c-6c44-3514-af70-04a0139a9327")
// headers.set('cookie', 'RMRB-X-TOKEN=eyJhbGciOiJIUzI1NiIsImtpZCI6IklFazBGclhfV2RYMEx1ZktDU01iYTVYd0VmUHZ6a043T0F5UTRFLWIwWU0ifQ.eyJpc3MiOiJwZW9wbGVzLWRhaWx5LWZvdXJhIiwic3ViIjoicGVvcGxlcy1kYWlseS1mb3VyYSIsImV4cCI6MTcxMDU4Mzk0MywidXNlcklkIjo1NjczODc0NzcwNjM2MjEsInVzZXJWZXJzaW9uIjoiNTY3Mzg3NDc3MDYzNjIxXzAiLCJ1c2VyTmFtZSI6IiVFNCVCQSVCQSVFNiVCMCU5MSVFNiU5NyVBNSVFNiU4QSVBNSVFNyVCRCU5MSVFNSU4RiU4QmFQcnRxNSIsInVzZXJUeXBlIjoxLCJjcmVhdG9ySWQiOm51bGwsInVzZXJJZFpoIjpudWxsfQ._LTKrUxQozpCj1XMhx1TWOIxn5gjDveoPuMFGpI0g_8')
headers.set('build_version', "202403112023")
headers.set('adcode', "340000")
headers.set('os_version', "10")
headers.set('city_dode', "340100")
headers.set('userId', "567387477063621")
headers.set('versionCode', "7302")
headers.set('system', "Android")
headers.set('version_name', "7.3.0.2")
headers.set('EagleEye-TraceID', '101118E4D006453DA549A82AA8CAFBFE')
headers.set('imei', "5156098c-6c44-3514-af70-04a0139a9327")
headers.set('userType', "1")
headers.set('Accept-Language', 'zh')
// HttpUrlUtils.addSpecialHeaders(headers);
// Logger.debug("TAG", '******************* commonHeaders headers start ******************************** ');
// headers.forEach((v,k)=>{
// Logger.debug("TAG", 'getCommonHeaders header: ' + k + ': ' + v);
// })
// Logger.debug("TAG", '******************* commonHeaders headers end ******************************** ');
return headers;
static getAppointmentOperationUrl() {
let url = HttpUrlUtils.hostUrl + HttpUrlUtils.APPOINTMENT_OPERATION_STATUS_PATH
return url
}
public static setUserId(userId:string){
HttpUrlUtils.userId=userId;
static getCommentLikeOperationUrl() {
let url = HttpUrlUtils.hostUrl + HttpUrlUtils.COMMENT_LIKE_OPERATION_PATH
return url
}
public static setUserType(userType:string){
HttpUrlUtils.userType=userType;
static getFollowOperationUrl() {
let url = HttpUrlUtils.hostUrl + HttpUrlUtils.FOLLOW_OPERATION_PATH
return url
}
public static setUserToken(token:string){
HttpUrlUtils.token=token;
}
// static getYcgCommonHeaders(): HashMap<string, string> {
// let headers: HashMap<string, string> = new HashMap<string, string>()
//
// headers.set('mpassid', 'XGt6jfGUx8ADAKruTyAMdhHj')
// headers.set('city', "%E5%90%88%E8%82%A5%E5%B8%82")
// headers.set('User-Agent', 'Dalvik/2.1.0 (Linux; U; Android 10; PCT-AL10 Build/HUAWEIPCT-AL10)')
// headers.set('channel', "rmrb_china_0000")
// headers.set('appCode', "0af1f9085e484c97b2a44704bae72c07")
// headers.set('Authorization', "APPCODE 0af1f9085e484c97b2a44704bae72c07")
// headers.set('X-Ca-Stage', "TEST")
// headers.set('plat', "Phone")
// headers.set('Content-Type', 'application/json; charset=utf-8')
// headers.set('timestamp', "740977741")
// headers.set('RMRB-X-TOKEN', "eyJhbGciOiJIUzI1NiIsImtpZCI6IklFazBGclhfV2RYMEx1ZktDU01iYTVYd0VmUHZ6a043T0F5UTRFLWIwWU0ifQ.eyJpc3MiOiJwZW9wbGVzLWRhaWx5LWZvdXJhIiwic3ViIjoicGVvcGxlcy1kYWlseS1mb3VyYSIsImV4cCI6MTcxMDc1NjM3NywidXNlcklkIjo1NjczODc0NzcwNjM2MjEsInVzZXJWZXJzaW9uIjoiNTY3Mzg3NDc3MDYzNjIxXzAiLCJ1c2VyTmFtZSI6IiVFNCVCQSVCQSVFNiVCMCU5MSVFNiU5NyVBNSVFNiU4QSVBNSVFNyVCRCU5MSVFNSU4RiU4QmFQcnRxNSIsInVzZXJUeXBlIjoxLCJjcmVhdG9ySWQiOm51bGwsInVzZXJJZFpoIjpudWxsfQ.KBkF0Yki-JWlq0ZIOCzgKwQc1ycBnFHa6CF-rMPRgHU")
// headers.set('device_id', "5156098c-6c44-3514-af70-04a0139a9327")
// // headers.set('cookie', 'RMRB-X-TOKEN=eyJhbGciOiJIUzI1NiIsImtpZCI6IklFazBGclhfV2RYMEx1ZktDU01iYTVYd0VmUHZ6a043T0F5UTRFLWIwWU0ifQ.eyJpc3MiOiJwZW9wbGVzLWRhaWx5LWZvdXJhIiwic3ViIjoicGVvcGxlcy1kYWlseS1mb3VyYSIsImV4cCI6MTcxMDU4Mzk0MywidXNlcklkIjo1NjczODc0NzcwNjM2MjEsInVzZXJWZXJzaW9uIjoiNTY3Mzg3NDc3MDYzNjIxXzAiLCJ1c2VyTmFtZSI6IiVFNCVCQSVCQSVFNiVCMCU5MSVFNiU5NyVBNSVFNiU4QSVBNSVFNyVCRCU5MSVFNSU4RiU4QmFQcnRxNSIsInVzZXJUeXBlIjoxLCJjcmVhdG9ySWQiOm51bGwsInVzZXJJZFpoIjpudWxsfQ._LTKrUxQozpCj1XMhx1TWOIxn5gjDveoPuMFGpI0g_8')
// headers.set('build_version', "202403112023")
// headers.set('adcode', "340000")
// headers.set('os_version', "10")
// headers.set('city_dode', "340100")
// headers.set('userId', "567387477063621")
// headers.set('versionCode', "7302")
// headers.set('system', "Android")
// headers.set('version_name', "7.3.0.2")
// headers.set('EagleEye-TraceID', '101118E4D006453DA549A82AA8CAFBFE')
// headers.set('imei', "5156098c-6c44-3514-af70-04a0139a9327")
// headers.set('userType', "1")
// headers.set('Accept-Language', 'zh')
//
// // HttpUrlUtils.addSpecialHeaders(headers);
// // Logger.debug("TAG", '******************* commonHeaders headers start ******************************** ');
// // headers.forEach((v,k)=>{
// // Logger.debug("TAG", 'getCommonHeaders header: ' + k + ': ' + v);
// // })
// // Logger.debug("TAG", '******************* commonHeaders headers end ******************************** ');
// return headers;
// }
public static setUserId(userId: string) {
HttpUrlUtils.userId = userId;
}
public static setUserType(userType: string) {
HttpUrlUtils.userType = userType;
}
public static setUserToken(token: string) {
HttpUrlUtils.token = token;
}
}
\ No newline at end of file
... ...
... ... @@ -53,9 +53,11 @@ export function registerRouter() {
// return WDRouterPage.detailPlayLivePage
// }
if (action.params?.detailPageType == 7 || action.params?.detailPageType == 8) {
return WDRouterPage.detailPlayShortVideoPage
} else if (action.params?.detailPageType == 9 ) {
return WDRouterPage.detailVideoListPage
} else if (action.params?.detailPageType == 17) {
return WDRouterPage.multiPictureDetailPage
} else if (action.params?.detailPageType == 13) {
return WDRouterPage.audioDetail
}
return WDRouterPage.detailPlayVodPage
})
... ... @@ -67,9 +69,9 @@ export function registerRouter() {
Action2Page.register("JUMP_INNER_NEW_PAGE", (action) => {
if (action.params?.pageID == "E_NEWSPAPER") {
return WDRouterPage.eNewspaper
} else if (action.params?.pageID == "MorningEveningPaper"){
} else if (action.params?.pageID == "MorningEveningPaper") {
return WDRouterPage.morningEveningPaperPage
} else if (action.params?.pageID == "IMAGE_TEXT_DETAIL"){
} else if (action.params?.pageID == "IMAGE_TEXT_DETAIL") {
return WDRouterPage.imageTextDetailPage
}
return undefined
... ...
... ... @@ -9,6 +9,12 @@ export class WDRouterPage {
this.pagePath = pagePath
}
static getBundleInfo(){
let bundleInfo = bundleManager.getBundleInfoForSelfSync(bundleManager.BundleFlag.GET_BUNDLE_INFO_DEFAULT)
return `@bundle:${bundleInfo.name}/${"phone"}/${"ets/pages/MainPage"}`
}
url() {
let bundleInfo = bundleManager.getBundleInfoForSelfSync(bundleManager.BundleFlag.GET_BUNDLE_INFO_DEFAULT)
return `@bundle:${bundleInfo.name}/${this.moduleName}/${this.pagePath}`
... ... @@ -27,6 +33,7 @@ export class WDRouterPage {
// 图文详情页
static imageTextDetailPage = new WDRouterPage("phone", "ets/pages/ImageAndTextDetailPage");
// 短视频详情页
static detailVideoListPage = new WDRouterPage("wdDetailPlayShortVideo", "ets/pages/DetailVideoListPage");
static detailPlayShortVideoPage = new WDRouterPage("wdDetailPlayShortVideo", "ets/pages/DetailPlayShortVideoPage");
// 点播详情页
static detailPlayVodPage = new WDRouterPage("wdDetailPlayVod", "ets/pages/DetailPlayVodPage");
... ... @@ -34,9 +41,9 @@ export class WDRouterPage {
static detailPlayLivePage = new WDRouterPage("wdDetailPlayLive", "ets/pages/DetailPlayLivePage");
// 多图(图集)详情页
static multiPictureDetailPage = new WDRouterPage("phone", "ets/pages/detail/MultiPictureDetailPage");
// 音乐详情页
static audioDetail = new WDRouterPage("phone", "ets/pages/detail/AudioDetail");
static loginPage = new WDRouterPage("wdLogin", "ets/pages/login/LoginPage");
static forgetPasswordPage = new WDRouterPage("wdLogin", "ets/pages/login/ForgetPasswordPage");
//我的 预约
static appointmentListPage = new WDRouterPage("wdComponent", "ets/components/page/AppointmentListPage");
... ... @@ -63,9 +70,17 @@ export class WDRouterPage {
static settingPage = new WDRouterPage("wdComponent", "ets/components/page/SettingPage");
// 设置密码页、设置手机号页等等 (需要传参)
static settingPasswordPage = new WDRouterPage("wdLogin", "ets/pages/login/SettingPasswordPage");
//其他普通用户 主页
static otherNormalUserHomePagePage = new WDRouterPage("wdComponent", "ets/pages/OtherNormalUserHomePage");
static guidePage = new WDRouterPage("wdLogin", "ets/pages/guide/GuidePages");
//隐私政策页面
static privacyPage = new WDRouterPage("phone", "ets/pages/launchPage/PrivacyPage");
//启动广告页面
static launchAdvertisingPage = new WDRouterPage("phone", "ets/pages/launchPage/LaunchAdvertisingPage");
//主页
static mainPage = new WDRouterPage("phone", "ets/pages/MainPage");
// static loginProtocolPage = new WDRouterPage("wdLogin", "ets/pages/login/LoginProtocolWebview");
}
... ...
... ... @@ -18,6 +18,7 @@ export class WDRouterRule {
if (page) {
if (params) {
// router.pushUrl({ url: 'pages/routerpage2', , params: params })
console.log('page.url()==',page.url())
router.pushUrl({ url: page.url(), params: params })
} else {
router.pushUrl({ url: page.url() }).catch((error:Error)=>{
... ... @@ -28,4 +29,21 @@ export class WDRouterRule {
ToastUtils.showToast("功能开发中", 1000);
}
}
static jumpWithReplacePage(page?: WDRouterPage, params?: object) {
if (page) {
if (params) {
// router.pushUrl({ url: 'pages/routerpage2', , params: params })
router.replaceUrl({ url: page.url(), params: params })
} else {
router.replaceUrl({ url: page.url() }).catch((error:Error)=>{
console.log("err",JSON.stringify(error))//100002 uri is not exist
})
}
} else {
ToastUtils.showToast("功能开发中", 1000);
}
}
}
\ No newline at end of file
... ...
... ... @@ -28,5 +28,5 @@ export interface CompDTO {
sortValue: number;
subType: string;
imageScale: number; // 封面图比例 1-4:3, 2-16:9, 3-3:2
audioDataList:AudioDTO[]
audioDataList: AudioDTO[]
}
\ No newline at end of file
... ...
... ... @@ -3,7 +3,7 @@ import { LiveInfoDTO } from '../detail/LiveInfoDTO';
import { VideoInfoDTO } from '../detail/VideoInfoDTO';
import { InteractDataDTO } from './InteractDataDTO';
import { slideShows } from '../morningevening/slideShows'
import { VoiceInfoDTO } from '../detail/VoiceInfoDTO'
export interface ContentDTO {
cityCode: string;
... ... @@ -62,5 +62,6 @@ export interface ContentDTO {
interactData:InteractDataDTO;
hasMore: number,
slideShows: slideShows[]
slideShows: slideShows[],
voiceInfo: VoiceInfoDTO
}
\ No newline at end of file
... ...
... ... @@ -16,6 +16,7 @@ export interface Params {
// 6.挂件详情页
// 7.沉浸式竖屏详情页
// 8.专辑竖屏详情页
// 9.多图(图集)详情页
// 13.音频详情页
// 17.多图(图集)详情页
detailPageType?:number; // 详情页类型
}
... ...
... ... @@ -16,5 +16,5 @@ export interface PhotoListBean {
height: number;
width: number;
picPath: string;
picDesc: number;
picDesc: string;
}
\ No newline at end of file
... ...
export interface VoiceInfoDTO {
defaultMultiple?: string;
openMultipleAdjustment?: number;
type?: number;
voiceDuration: number;
voiceUrl?: string;
}
\ No newline at end of file
... ...
... ... @@ -2,15 +2,15 @@ import { FullColumnImgUrlDTO } from '../detail/FullColumnImgUrlDTO';
export interface slideShows {
fullColumnImgUrls: FullColumnImgUrlDTO[];
linkUrl?: string;
newsId?: string;
newsId: string;
newsTitle?: string;
newsTitleColor?: string;
objectLevel?: string;
objectType?: string;
objectType: string;
pageId?: string;
photoNum?: string;
publishTime: number;
relId?: string;
relId: string;
source?: string;
timeBlurred?: string;
videoDuration?: string;
... ...
... ... @@ -8,12 +8,12 @@
"version": "1.0.0",
"dependencies": {
"wdConstant": "file:../../commons/wdConstant",
"wdPlayer": "file:../../features/wdPlayer",
"wdLogin": "file:../../features/wdLogin",
"wdKit": "file:../../commons/wdKit",
"wdWebComponent": "file:../../commons/wdWebComponent",
"wdBean": "file:../../features/wdBean",
"wdRouter": "file:../../commons/wdRouter",
"wdNetwork": "file:../../commons/wdNetwork",
"wdPlayer": "file:../../features/wdPlayer",
"wdLogin": "file:../../features/wdLogin"
"wdNetwork": "file:../../commons/wdNetwork"
}
}
... ...
... ... @@ -7,7 +7,8 @@ import { MorningEveningViewModel } from '../../viewmodel/MorningEveningViewModel
import { PaperTitleComponent } from './PaperTitleComponent';
import { SingleColumn999Component } from './SingleColumn999Component';
import { topicInfoView } from './topicInfoView';
import { WDPlayerController } from 'wdPlayer';
import { DateFormatUtil, PlayerConstants, WDPlayerController } from 'wdPlayer';
import { AudioDataList } from 'wdBean/src/main/ets/bean/morningevening/AudioDataList';
const TAG = 'MorningEveningPaperComponent';
... ... @@ -39,17 +40,57 @@ export struct MorningEveningPaperComponent {
// } as MorningEveningPaperDTO
@Provide title: string = ''
@Provide subTitle: string = ''
@Provide audioTitle: string = ''
@Provide isAudioPlaying: boolean = false
@Provide status: number = PlayerConstants.STATUS_START;
@Provide currentTime: string = "00:00";
@Provide totalTime: string = "00:00";
@Provide progressVal: number = 0;
private audioDataList: AudioDataList[] = []
private playerController: WDPlayerController = new WDPlayerController();
private xComponentController: XComponentController = new XComponentController();
simpleAudioDialog: CustomDialogController = new CustomDialogController({
builder: PaperReaderSimpleDialog(),
builder: PaperReaderSimpleDialog({
cancel: this.onCancel,
confirm: this.onConfirm,
playerController: this.playerController
}),
autoCancel: false,
customStyle: true,
alignment: DialogAlignment.CenterStart,
offset: { dx: 12, dy: -150 }
offset: { dx: 12, dy: -150 },
})
onCancel() {
Logger.info(TAG, "cj2024 onCancel = ")
}
/**
* 回调无用
**/
onConfirm() {
Logger.info(TAG, "cj2024 onConfirm = ")
// if (this.playerController != undefined) {
//
// }
// this.status = PlayerConstants.STATUS_PAUSE;
// this.playerController?.pause()
}
// 续播判断
changeContinue() {
Logger.info(TAG, "cj2024 changeContinue = 1")
// if (this.nextContId) {
this.playerController.continue = () => {
Logger.info(TAG, "cj2024 changeContinue = 2")
this.playerController?.stop();
// this.playVM.playWithContentId(this.nextContId ?? '');
}
return;
// }
this.playerController.continue = undefined;
}
async aboutToAppear() {
console.info(TAG, `aboutToAppear`)
... ... @@ -74,16 +115,26 @@ export struct MorningEveningPaperComponent {
this.compListItem = compInfoBean?.compList[0]
if (compInfoBean?.compList[0].audioDataList) {
this.audioPlayUrl = compInfoBean?.compList[0].audioDataList[0].audioUrl
this.audioTitle = compInfoBean?.compList[0].audioDataList[0].title
}
}
Logger.info(TAG, "compInfoBean compStyle = " + compInfoBean.compList[0].compStyle)
this.playerController.onTimeUpdate = (position, duration) => {
this.currentTime = DateFormatUtil.secondToTime(position);
this.totalTime = DateFormatUtil.secondToTime(duration);
this.progressVal = Math.floor(position * 100 / duration);
}
} catch (exception) {
}
}
onPageHide() {
this.status = PlayerConstants.STATUS_PAUSE;
this.playerController?.pause();
}
build() {
Stack({ alignContent: Alignment.Top }) {
List() {
... ...
import { PhotoListBean } from 'wdBean';
import { Logger } from 'wdKit';
const TAG = 'MultiPictureDetailPageComponent';
@Component
export struct MultiPictureDetailItemComponent {
private photoListLength: number = 1;
private index: number = 1;
private newsTitle: string = '';
private MultiPictureDetailItem: PhotoListBean = {} as PhotoListBean
async aboutToAppear() {
Logger.info(TAG, 'pictures preview')
}
build() {
Stack() {
Stack({ alignContent: Alignment.BottomStart }) {
Row() {
Image(this.MultiPictureDetailItem.picPath)
.alt($r('app.media.picture_loading'))
.width('100%')
.aspectRatio(this.MultiPictureDetailItem.width / this.MultiPictureDetailItem.height)
.objectFit(ImageFit.Fill)
}
.height('100%')
.width('100%')
Row() {
Flex({
direction: FlexDirection.Column,
justifyContent: FlexAlign.Start
}) {
Text() {
Span(`${this.index + 1}`).fontSize(24).fontFamily('PingFang SC-Medium').fontWeight(500).lineHeight(28)
Span(`/${this.photoListLength}`).fontSize(14).fontFamily('PingFang SC-Medium').fontWeight(500).lineHeight(19)
}.fontColor(Color.White).margin(4)
Text(`${this.newsTitle}`).fontColor(Color.White).fontSize(16).fontFamily('PingFang SC-Semibold')
.fontWeight(600).lineHeight(24)
.margin ({
top: 4,
left: 0,
bottom: 4,
right: 0
})
Text(`${this.MultiPictureDetailItem.picDesc}`).fontColor(Color.White)
.fontSize(14).fontFamily('PingFang SC-Regular').fontWeight(400).lineHeight(22)
.textOverflow({ overflow: TextOverflow.Ellipsis })
.margin ({
top: 4,
left: 0,
bottom: 4,
right: 18
})
}
}
.width('100%')
.height(178)
.margin ({
top: 8,
left: 18,
bottom: 8,
right: 18
})
}
.backgroundColor(Color.Black)
.width('100%')
}
... ...
... ... @@ -8,16 +8,15 @@ import { MultiPictureDetailItemComponent } from './MultiPictureDetailItemCompone
const TAG = 'MultiPictureDetailPageComponent';
@Preview
@Component
export struct MultiPictureDetailPageComponent {
private relId: string = ''
private contentId: string = ''
private relType: string = ''
private displayTool = display.getDefaultDisplaySync()
private screenWidth: number = 0
private picWidth: number = 0
@State picHeight: number = 0
@State relId: string = '500005189942'
@State contentId: string = '30043715146'
@State relType: string = '1'
@State contentDetailData: ContentDetailDTO[] = [] as ContentDetailDTO[]
@Provide @Watch('onCurrentPageNumUpdated') currentPageNum: string = '01'
private swiperController: SwiperController = new SwiperController()
... ... @@ -35,7 +34,8 @@ export struct MultiPictureDetailPageComponent {
async aboutToAppear() {
//获取宽高尺寸
this.screenWidth = this.displayTool.width
this.picWidth = this.screenWidth - vp2px(52)
// this.picWidth = this.screenWidth - vp2px(52)
this.picWidth = this.screenWidth
this.picHeight = this.picWidth * 566 / 378
//注册字体
font.registerFont({
... ... @@ -54,12 +54,12 @@ export struct MultiPictureDetailPageComponent {
if (this.contentDetailData && this.contentDetailData.length > 0 && this.contentDetailData[0].photoList && this.contentDetailData[0].photoList?.length > 0) {
Swiper(this.swiperController) {
ForEach(this.contentDetailData[0].photoList, (item: PhotoListBean, index: number) => {
MultiPictureDetailItemComponent({ MultiPictureDetailItem: item })
MultiPictureDetailItemComponent({ photoListLength: this.contentDetailData[0].photoList?.length , index: index, newsTitle: this.contentDetailData[0].newsTitle, MultiPictureDetailItem: item })
})
}
.index(this.swiperIndex)
.width('100%')
.height(px2vp(this.picHeight) + 32)
.height(px2vp(this.picHeight))
.vertical(false)
.autoPlay(false)
.cachedCount(3)
... ...
import { Logger } from 'wdKit'
import { Logger, UserDataLocal } from 'wdKit'
import { WDRouterPage, WDRouterRule } from 'wdRouter'
import MinePageDatasModel from '../../model/MinePageDatasModel'
const TAG = "MinePageUserSimpleInfoUI"
... ... @@ -13,24 +13,12 @@ export default struct MinePageUserSimpleInfoUI {
@State levelId:number = 0
aboutToAppear(){
if(this.isLogin){
this.getUserInfo()
this.getUserLevel()
}
}
@Consume('isLogin')@Watch('loginChange') loginState:Record<string,string>
@Consume('isLogin') @Watch('loginChange') loginState:Record<string,string>
loginChange(){
Logger.debug("isLogin",'MinePageUserSimpleInfoUI')
if(this.loginState){
this.isLogin=true
}
if(this.isLogin){
this.getUserInfo()
this.getUserLevel()
}
}
loginStateChange(){
if(this.isLogin){
... ... @@ -42,20 +30,19 @@ export default struct MinePageUserSimpleInfoUI {
build(){
Row(){
//头像
Stack(){
Stack({alignContent: Alignment.Center}){
Image(this.headPhotoUrl)
.alt($r('app.media.default_head'))
.width('108lpx')
.height('108lpx')
.objectFit(ImageFit.Cover)
.objectFit(ImageFit.Auto)
.borderRadius(50)
Image(this.levelHead)
.width('120lpx')
.height('120lpx')
.objectFit(ImageFit.Cover)
.borderRadius(50)
}.width('120lpx')
.height('120lpx')
.width('130lpx')
.height('130lpx')
.objectFit(ImageFit.Auto)
}.width('130lpx')
.height('130lpx')
.alignContent(Alignment.Center)
.onClick(()=>{
this.jumpLogin()
... ... @@ -156,6 +143,7 @@ export default struct MinePageUserSimpleInfoUI {
if(value!=null){
this.userName = value.userName
this.headPhotoUrl = value.headPhotoUrl
UserDataLocal.setUserHeaderUrl(value.headPhotoUrl)
}
}).catch((err:Error)=>{
console.log(TAG,JSON.stringify(err))
... ... @@ -166,6 +154,8 @@ export default struct MinePageUserSimpleInfoUI {
if(value!=null){
this.levelHead = value.levelHead
this.levelId = value.levelId
UserDataLocal.setUserLevel(value.levelId)
UserDataLocal.setUserLevelHeaderUrl(value.levelHead + "")
}
}).catch((err:Error)=>{
console.log(TAG,JSON.stringify(err))
... ...
import MinePageDatasModel from '../../../model/MinePageDatasModel'
import { AppointmentOperationRequestItem } from '../../../viewmodel/AppointmentOperationRequestItem'
import { MineAppointmentItem } from '../../../viewmodel/MineAppointmentItem'
import { MyCustomDialog } from '../../reusable/MyCustomDialog'
@Component
export struct AppointmentListChildComponent{
@ObjectLink item: MineAppointmentItem
dialogController: CustomDialogController = new CustomDialogController({
builder: MyCustomDialog({
cancel: this.onCancel,
confirm: () => {
this.onAccept()
},
title: "提示",
tipValue: '是否确认取消预约'
}),
autoCancel: true,
alignment: DialogAlignment.Center,
offset: { dx: 0, dy: -20 },
gridCount: 4,
customStyle: false
})
build() {
Column(){
... ... @@ -102,8 +121,7 @@ export struct AppointmentListChildComponent{
.height('46lpx')
.borderRadius('6lpx')
.onClick(()=>{
this.item.isAppointment = !this.item.isAppointment
//TODO 预约动作
this.dialogController.open()
})
}else {
Text(this.item.relType === 2?"去观看":"看回放")
... ... @@ -124,4 +142,25 @@ export struct AppointmentListChildComponent{
.backgroundColor($r('app.color.white'))
.borderRadius('8lpx')
}
onCancel() {
console.info('Callback when the first button is clicked')
}
onAccept(){
console.info('Callback when the second button is clicked')
this.appointmentOperation()
}
appointmentOperation(){
let item = new AppointmentOperationRequestItem(this.item.relId,this.item.liveId+"",!this.item.isAppointment)
MinePageDatasModel.getAppointmentOperation(item,getContext(this)).then((value)=>{
if(value!=null){
if (value.code === 0 || value.code.toString() === "0") {
this.item.isAppointment = !this.item.isAppointment
}
}
})
}
}
\ No newline at end of file
... ...
... ... @@ -71,9 +71,9 @@ export struct AppointmentListUI{
value.list.forEach((value)=>{
let dealTime = this.DealStartTime(value.planStartTime)
if(dealTime!=null && dealTime.length === 2){
this.data.push(new MineAppointmentItem(value.imageUrl,value.status,value.title,true,dealTime[0],dealTime[1],value.relType))
this.data.push(new MineAppointmentItem(value.imageUrl,value.status,value.title,true,dealTime[0],dealTime[1],value.relType,value.liveId,value.relId))
}else {
this.data.push(new MineAppointmentItem(value.imageUrl,value.status,value.title,true,"","",value.relType))
this.data.push(new MineAppointmentItem(value.imageUrl,value.status,value.title,true,"","",value.relType,value.liveId,value.relId))
}
})
this.data.notifyDataReload()
... ...
... ... @@ -13,10 +13,6 @@ export struct FollowFirstTabsComponent{
selectedFontColor: string = '#000000'
aboutToAppear(){
// let res = JSON.parse(`{"code":"0","data":[{"children":[],"directoryName":"阅读","directoryWeight":99,"id":165,"isShow":1,"level":1,"parentId":0,"rootId":0},{"children":[{"children":[{"directoryName":"三二","directoryWeight":2,"id":120,"isShow":1,"level":3,"parentId":118,"rootId":117},{"directoryName":"三级","directoryWeight":1,"id":119,"isShow":1,"level":3,"parentId":118,"rootId":117}],"directoryName":"二级","directoryWeight":1,"id":118,"isShow":1,"level":2,"parentId":117,"rootId":117}],"directoryName":"幽游白书","directoryWeight":33,"id":117,"isShow":1,"level":1,"parentId":0,"rootId":0},{"children":[],"directoryName":"推荐","directoryWeight":9,"id":386,"isShow":1,"level":1,"parentId":0,"rootId":0},{"children":[],"directoryName":"政务","directoryWeight":9,"id":379,"isShow":1,"level":1,"parentId":0,"rootId":0},{"children":[{"children":[],"directoryName":"推荐","directoryWeight":0,"id":335,"isShow":1,"level":2,"parentId":320,"rootId":320}],"directoryName":"推荐","directoryWeight":9,"id":320,"isShow":1,"level":1,"parentId":0,"rootId":0},{"children":[],"directoryName":"媒体","directoryWeight":8,"id":390,"isShow":1,"level":1,"parentId":0,"rootId":0},{"children":[],"directoryName":"媒体","directoryWeight":8,"id":323,"isShow":1,"level":1,"parentId":0,"rootId":0},{"children":[],"directoryName":"自媒体","directoryWeight":7,"id":329,"isShow":1,"level":1,"parentId":0,"rootId":0},{"children":[],"directoryName":"名人","directoryWeight":6,"id":389,"isShow":1,"level":1,"parentId":0,"rootId":0},{"children":[{"children":[],"directoryName":"测试","directoryWeight":0,"id":338,"isShow":1,"level":2,"parentId":324,"rootId":324}],"directoryName":"名人","directoryWeight":6,"id":324,"isShow":1,"level":1,"parentId":0,"rootId":0},{"children":[{"children":[],"directoryName":"2级目录","directoryWeight":0,"id":340,"isShow":1,"level":2,"parentId":312,"rootId":312},{"children":[{"directoryName":"3级测试","directoryWeight":0,"id":368,"isShow":1,"level":3,"parentId":339,"rootId":312}],"directoryName":"二级目录","directoryWeight":0,"id":339,"isShow":1,"level":2,"parentId":312,"rootId":312},{"children":[{"directoryName":"企业","directoryWeight":1,"id":348,"isShow":1,"level":3,"parentId":336,"rootId":312},{"directoryName":"部委","directoryWeight":0,"id":344,"isShow":1,"level":3,"parentId":336,"rootId":312},{"directoryName":"地方","directoryWeight":0,"id":341,"isShow":1,"level":3,"parentId":336,"rootId":312}],"directoryName":"类型","directoryWeight":0,"id":336,"isShow":1,"level":2,"parentId":312,"rootId":312},{"children":[{"directoryName":"贵州省","directoryWeight":0,"id":378,"isShow":1,"level":3,"parentId":332,"rootId":312},{"directoryName":"西藏自治区","directoryWeight":0,"id":377,"isShow":1,"level":3,"parentId":332,"rootId":312},{"directoryName":"四川省","directoryWeight":0,"id":376,"isShow":1,"level":3,"parentId":332,"rootId":312},{"directoryName":"重庆市","directoryWeight":0,"id":375,"isShow":1,"level":3,"parentId":332,"rootId":312},{"directoryName":"湖南省","directoryWeight":0,"id":374,"isShow":1,"level":3,"parentId":332,"rootId":312},{"directoryName":"云南省","directoryWeight":0,"id":373,"isShow":1,"level":3,"parentId":332,"rootId":312},{"directoryName":"广西壮族自治区","directoryWeight":0,"id":372,"isShow":1,"level":3,"parentId":332,"rootId":312},{"directoryName":"宁夏回族自治区","directoryWeight":0,"id":371,"isShow":1,"level":3,"parentId":332,"rootId":312},{"directoryName":"湖北省","directoryWeight":0,"id":370,"isShow":1,"level":3,"parentId":332,"rootId":312},{"directoryName":"青海省","directoryWeight":0,"id":369,"isShow":1,"level":3,"parentId":332,"rootId":312},{"directoryName":"陕西省","directoryWeight":0,"id":367,"isShow":1,"level":3,"parentId":332,"rootId":312},{"directoryName":"甘肃省","directoryWeight":0,"id":366,"isShow":1,"level":3,"parentId":332,"rootId":312},{"directoryName":"吉林省","directoryWeight":0,"id":365,"isShow":1,"level":3,"parentId":332,"rootId":312},{"directoryName":"广东省","directoryWeight":0,"id":364,"isShow":1,"level":3,"parentId":332,"rootId":312},{"directoryName":"海南省","directoryWeight":0,"id":363,"isShow":1,"level":3,"parentId":332,"rootId":312},{"directoryName":"辽宁省","directoryWeight":0,"id":362,"isShow":1,"level":3,"parentId":332,"rootId":312},{"directoryName":"江苏省","directoryWeight":0,"id":361,"isShow":1,"level":3,"parentId":332,"rootId":312},{"directoryName":"新疆维吾尔族自治区","directoryWeight":0,"id":360,"isShow":1,"level":3,"parentId":332,"rootId":312},{"directoryName":"福建省","directoryWeight":0,"id":359,"isShow":1,"level":3,"parentId":332,"rootId":312},{"directoryName":"山东省","directoryWeight":0,"id":358,"isShow":1,"level":3,"parentId":332,"rootId":312},{"directoryName":"河南省","directoryWeight":0,"id":357,"isShow":1,"level":3,"parentId":332,"rootId":312},{"directoryName":"浙江省","directoryWeight":0,"id":356,"isShow":1,"level":3,"parentId":332,"rootId":312},{"directoryName":"安徽省","directoryWeight":0,"id":355,"isShow":1,"level":3,"parentId":332,"rootId":312},{"directoryName":"上海市","directoryWeight":0,"id":354,"isShow":1,"level":3,"parentId":332,"rootId":312},{"directoryName":"河北省","directoryWeight":0,"id":353,"isShow":1,"level":3,"parentId":332,"rootId":312},{"directoryName":"黑龙江省","directoryWeight":0,"id":352,"isShow":1,"level":3,"parentId":332,"rootId":312},{"directoryName":"江西省","directoryWeight":0,"id":351,"isShow":1,"level":3,"parentId":332,"rootId":312},{"directoryName":"内蒙古自治区","directoryWeight":0,"id":350,"isShow":1,"level":3,"parentId":332,"rootId":312},{"directoryName":"北京市","directoryWeight":0,"id":349,"isShow":1,"level":3,"parentId":332,"rootId":312},{"directoryName":"山西省","directoryWeight":0,"id":346,"isShow":1,"level":3,"parentId":332,"rootId":312}],"directoryName":"地域","directoryWeight":0,"id":332,"isShow":1,"level":2,"parentId":312,"rootId":312}],"directoryName":"政务","directoryWeight":5,"id":312,"isShow":1,"level":1,"parentId":0,"rootId":0},{"children":[],"directoryName":"学校","directoryWeight":4,"id":331,"isShow":1,"level":1,"parentId":0,"rootId":0},{"children":[],"directoryName":"机构","directoryWeight":3,"id":330,"isShow":1,"level":1,"parentId":0,"rootId":0},{"children":[{"children":[{"directoryName":"新闻联播","directoryWeight":3,"id":79,"isShow":1,"level":3,"parentId":75,"rootId":74},{"directoryName":"第三季","directoryWeight":2,"id":78,"isShow":1,"level":3,"parentId":75,"rootId":74},{"directoryName":"三级","directoryWeight":1,"id":76,"isShow":1,"level":3,"parentId":75,"rootId":74}],"directoryName":"短视频","directoryWeight":1,"id":75,"isShow":1,"level":2,"parentId":74,"rootId":74}],"directoryName":"创作","directoryWeight":3,"id":74,"isShow":1,"level":1,"parentId":0,"rootId":0},{"children":[{"children":[],"directoryName":"教学","directoryWeight":2,"id":72,"isShow":1,"level":2,"parentId":64,"rootId":64},{"children":[],"directoryName":"热门","directoryWeight":1,"id":73,"isShow":1,"level":2,"parentId":64,"rootId":64},{"children":[],"directoryName":"赛事","directoryWeight":1,"id":71,"isShow":1,"level":2,"parentId":64,"rootId":64}],"directoryName":"游戏","directoryWeight":2,"id":64,"isShow":1,"level":1,"parentId":0,"rootId":0},{"children":[],"directoryName":"新闻","directoryWeight":1,"id":315,"isShow":1,"level":1,"parentId":0,"rootId":0},{"children":[{"children":[],"directoryName":"趣闻","directoryWeight":6,"id":70,"isShow":1,"level":2,"parentId":63,"rootId":63},{"children":[],"directoryName":"时政","directoryWeight":5,"id":69,"isShow":1,"level":2,"parentId":63,"rootId":63},{"children":[],"directoryName":"农业","directoryWeight":3,"id":68,"isShow":1,"level":2,"parentId":63,"rootId":63},{"children":[],"directoryName":"娱乐","directoryWeight":3,"id":67,"isShow":1,"level":2,"parentId":63,"rootId":63},{"children":[],"directoryName":"科技","directoryWeight":2,"id":66,"isShow":1,"level":2,"parentId":63,"rootId":63},{"children":[],"directoryName":"国际","directoryWeight":1,"id":65,"isShow":1,"level":2,"parentId":63,"rootId":63}],"directoryName":"新闻","directoryWeight":1,"id":63,"isShow":1,"level":1,"parentId":0,"rootId":0},{"children":[],"directoryName":"公安","directoryWeight":0,"id":388,"isShow":1,"level":1,"parentId":0,"rootId":0},{"children":[],"directoryName":"dddd","directoryWeight":0,"id":387,"isShow":1,"level":1,"parentId":0,"rootId":0},{"children":[],"directoryName":"健康","directoryWeight":0,"id":384,"isShow":1,"level":1,"parentId":0,"rootId":0},{"children":[],"directoryName":"综合","directoryWeight":0,"id":328,"isShow":1,"level":1,"parentId":0,"rootId":0},{"children":[],"directoryName":"房产","directoryWeight":0,"id":327,"isShow":1,"level":1,"parentId":0,"rootId":0},{"children":[],"directoryName":"健康","directoryWeight":0,"id":318,"isShow":1,"level":1,"parentId":0,"rootId":0},{"children":[],"directoryName":"历史","directoryWeight":0,"id":310,"isShow":1,"level":1,"parentId":0,"rootId":0},{"children":[],"directoryName":"dddd","directoryWeight":0,"id":309,"isShow":1,"level":1,"parentId":0,"rootId":0},{"children":[{"children":[],"directoryName":"aaaa","directoryWeight":1,"id":333,"isShow":1,"level":2,"parentId":308,"rootId":308},{"children":[],"directoryName":"qqq","directoryWeight":0,"id":334,"isShow":1,"level":2,"parentId":308,"rootId":308}],"directoryName":"dddd","directoryWeight":0,"id":308,"isShow":1,"level":1,"parentId":0,"rootId":0}],"message":"Success","success":true,"timestamp":1710741803593}`) as ResponseDTO<FollowListItem[]>
// res.data.forEach(element => {
// this.data.push(element)
// });
MinePageDatasModel.getFollowListData(getContext(this)).then((value)=>{
this.data.push(new FollowListItem("我的"))
value.forEach((element)=>{
... ...
import { Params } from 'wdBean';
import { LazyDataSource, StringUtils } from 'wdKit';
import { HttpUrlUtils } from 'wdNetwork';
import { WDRouterPage, WDRouterRule } from 'wdRouter';
import MinePageDatasModel from '../../../model/MinePageDatasModel';
import { FollowListDetailItem } from '../../../viewmodel/FollowListDetailItem'
import { FollowListDetailRequestItem } from '../../../viewmodel/FollowListDetailRequestItem';
import { FollowListStatusRequestItem } from '../../../viewmodel/FollowListStatusRequestItem';
import { FollowOperationRequestItem } from '../../../viewmodel/FollowOperationRequestItem';
import { MineFollowListDetailItem } from '../../../viewmodel/MineFollowListDetailItem';
import { QueryListIsFollowedItem } from '../../../viewmodel/QueryListIsFollowedItem';
import { ListHasNoMoreDataUI } from '../../reusable/ListHasNoMoreDataUI';
... ... @@ -67,14 +69,14 @@ export struct FollowListDetailUI{
//我的关注列表
if (this.creatorDirectoryId === -1){
if(this.hasMore){
let object = new FollowListDetailRequestItem(20,this.curPageNum)
let object = new FollowListDetailRequestItem(-1,20,this.curPageNum)
MinePageDatasModel.getMineFollowListData(object,getContext(this)).then((value)=>{
if (!this.data || value.list.length == 0){
this.hasMore = false
}else{
value.list.forEach((value)=>{
this.data.push(new FollowListDetailItem(value.attentionHeadPhotoUrl,value.attentionUserName,value.fansNum,value.introduction,value.attentionCreatorId,"1",value.attentionUserId))
this.data.push(new FollowListDetailItem(value.attentionHeadPhotoUrl,value.attentionUserName,value.fansNum,value.introduction,value.attentionCreatorId,"1",value.attentionUserId,value.attentionUserType,value.attentionUserId))
})
this.data.notifyDataReload()
this.count = this.data.totalCount()
... ... @@ -114,7 +116,7 @@ export struct FollowListDetailUI{
let data : FollowListDetailItem[] = []
value.list.forEach((item)=>{
status.creatorIds.push(new QueryListIsFollowedItem(item.creatorId))
data.push(new FollowListDetailItem(item.headPhotoUrl,item.cnUserName,item.cnFansNum,item.introduction,item.creatorId,"0",item.attentionUserId))
data.push(new FollowListDetailItem(item.headPhotoUrl,item.cnUserName,item.cnFansNum,item.introduction,item.creatorId,"0",item.attentionUserId,item.cnUserType,item.cnUserId))
})
MinePageDatasModel.getFollowListStatusData(status,getContext(this)).then((newValue)=>{
... ... @@ -127,7 +129,7 @@ export struct FollowListDetailUI{
})
data.forEach((item)=>{
this.data.push(new FollowListDetailItem(item.headPhotoUrl,item.cnUserName,item.cnFansNum,item.introduction,item.creatorId,item.status,item.attentionUserId))
this.data.push(new FollowListDetailItem(item.headPhotoUrl,item.cnUserName,item.cnFansNum,item.introduction,item.creatorId,item.status,item.attentionUserId,item.cnUserType,item.cnUserId))
})
this.data.notifyDataReload()
... ... @@ -197,7 +199,8 @@ struct ChildComponent {
.height('46lpx')
.margin({left:'4lpx',top:'23lpx'})
.onClick(()=>{
this.data.status = "0"
this.followOperation()
// this.data.status = "0"
})
}else{
Row(){
... ... @@ -218,7 +221,8 @@ struct ChildComponent {
.height('46lpx')
.margin({left:'4lpx',top:'23lpx'})
.onClick(()=>{
this.data.status = "1"
this.followOperation()
// this.data.status = "1"
})
}
}.alignItems(VerticalAlign.Top)
... ... @@ -233,10 +237,22 @@ struct ChildComponent {
}.height('146lpx')
.justifyContent(FlexAlign.Center)
.onClick(()=>{
let params: Params = {
pageID: this.data.attentionUserId
//跳转 人民号的 主页
// let params: Params = {
// pageID: this.data.attentionUserId
// }
// WDRouterRule.jumpWithPage(WDRouterPage.otherNormalUserHomePagePage,params)
})
}
followOperation(){
let item = new FollowOperationRequestItem(this.data.cnUserType,this.data.cnUserId,this.data.creatorId,HttpUrlUtils.getUserType(),HttpUrlUtils.getUserId(),this.data.status==="0" ? 1:0)
MinePageDatasModel.getFollowOperation(item,getContext(this)).then((value)=>{
if(value!=null){
if (value.code === 0 || value.code.toString() === "0") {
this.data.status = this.data.status ==="0"?"1":"0"
}
}
WDRouterRule.jumpWithPage(WDRouterPage.otherNormalUserHomePagePage,params)
})
}
}
\ No newline at end of file
... ...
import { Params } from 'wdBean';
import { LazyDataSource, StringUtils } from 'wdKit';
import { DateTimeUtils, LazyDataSource, StringUtils, UserDataLocal } from 'wdKit';
import { HttpUrlUtils } from 'wdNetwork';
import { WDRouterPage, WDRouterRule } from 'wdRouter';
import MinePageDatasModel from '../../../model/MinePageDatasModel';
import { CommentListItem } from '../../../viewmodel/CommentListItem';
import { FollowListDetailItem } from '../../../viewmodel/FollowListDetailItem';
import { FollowListDetailRequestItem } from '../../../viewmodel/FollowListDetailRequestItem';
import { FollowOperationRequestItem } from '../../../viewmodel/FollowOperationRequestItem';
import { ListHasNoMoreDataUI } from '../../reusable/ListHasNoMoreDataUI';
const TAG = "HomePageBottomComponent"
... ... @@ -32,8 +34,35 @@ export struct HomePageBottomComponent{
.backgroundColor($r('app.color.color_EDEDED'))
if(this.count === 0){
if(this.style === 1){
Row(){
Text("关注更多人民号")
.fontWeight('400lpx')
.fontColor($r('app.color.color_222222'))
.lineHeight('38lpx')
.fontSize('27lpx')
.textAlign(TextAlign.Center)
.margin({right:'4lpx'})
Image($r('app.media.arrow_icon_right'))
.objectFit(ImageFit.Auto)
.width('27lpx')
.height('27lpx')
}.height('69lpx')
.width('659lpx')
.alignItems(VerticalAlign.Center)
.justifyContent(FlexAlign.Center)
.backgroundColor($r('app.color.color_F5F5F5'))
.margin({top:'31lpx',bottom:'4lpx'})
.onClick(()=>{
let params: Params = {
pageID: "1"
}
WDRouterRule.jumpWithPage(WDRouterPage.followListPage,params)
})
}else{
ListHasNoMoreDataUI({style:2})
.height('100%')
.layoutWeight(1)
}
}else{
if(this.style === 1){
List({ space: 3 }) {
... ... @@ -129,7 +158,8 @@ export struct HomePageBottomComponent{
})
}
}
}
}.height('100%')
.justifyContent(FlexAlign.Start)
.width('100%')
}
... ... @@ -147,14 +177,14 @@ export struct HomePageBottomComponent{
//我的关注列表
if (this.style === 1){
if(this.hasMore){
let object = new FollowListDetailRequestItem(20,this.curPageNum)
let object = new FollowListDetailRequestItem(-1,20,this.curPageNum)
MinePageDatasModel.getMineFollowListData(object,getContext(this)).then((value)=>{
if (!this.data_follow || value.list.length == 0){
this.hasMore = false
}else{
value.list.forEach((value)=>{
this.data_follow.push(new FollowListDetailItem(value.attentionHeadPhotoUrl,value.attentionUserName,value.fansNum,value.introduction,value.attentionCreatorId,"1",value.attentionUserId))
this.data_follow.push(new FollowListDetailItem(value.attentionHeadPhotoUrl,value.attentionUserName,value.fansNum,value.introduction,value.attentionCreatorId,"1",value.attentionUserId,value.attentionUserType,value.attentionUserId))
})
this.data_follow.notifyDataReload()
this.count = this.data_follow.totalCount()
... ... @@ -172,14 +202,15 @@ export struct HomePageBottomComponent{
}
}else if(this.style === 0){
if(this.hasMore){
let object = new FollowListDetailRequestItem(20,this.curPageNum)
let time = encodeURI(DateTimeUtils.getCurDate(DateTimeUtils.PATTERN_DATE_TIME_HYPHEN))
let object = new FollowListDetailRequestItem(-1,20,this.curPageNum)
MinePageDatasModel.getMineCommentListData(object,getContext(this)).then((value)=>{
MinePageDatasModel.getMineCommentListData(time,object,getContext(this)).then((value)=>{
if (!this.data_comment || value.list.length == 0){
this.hasMore = false
}else{
value.list.forEach((value)=>{
this.data_comment.push(new CommentListItem(value.fromUserHeader,value.fromUserName,value.targetTitle,value.createTime,value.commentContent,value.likeNum,0,value.id))
this.data_comment.push(new CommentListItem(value.fromUserHeader,value.fromUserName,value.targetTitle,value.createTime,value.commentContent,value.likeNum,0,value.id,value.targetId,value.targetType))
})
this.data_comment.notifyDataReload()
this.count = this.data_comment.totalCount()
... ... @@ -248,7 +279,8 @@ struct ChildFollowComponent {
.height('46lpx')
.margin({left:'4lpx',top:'23lpx'})
.onClick(()=>{
this.data.status = "0"
// this.data.status = "0"
this.followOperation()
})
}else{
Row(){
... ... @@ -269,7 +301,8 @@ struct ChildFollowComponent {
.height('46lpx')
.margin({left:'4lpx',top:'23lpx'})
.onClick(()=>{
this.data.status = "1"
// this.data.status = "1"
this.followOperation()
})
}
}.alignItems(VerticalAlign.Top)
... ... @@ -284,6 +317,18 @@ struct ChildFollowComponent {
}.height('146lpx')
.justifyContent(FlexAlign.Center)
}
followOperation(){
let item = new FollowOperationRequestItem(this.data.cnUserType,this.data.cnUserId,this.data.creatorId,UserDataLocal.getUserType(),UserDataLocal.getUserId(),this.data.status==="0" ? 1:0)
MinePageDatasModel.getFollowOperation(item,getContext(this)).then((value)=>{
if(value!=null){
if (value.code === 0 || value.code.toString() === "0") {
this.data.status = this.data.status ==="0"?"1":"0"
}
}
})
}
}
@Component
... ... @@ -293,10 +338,20 @@ struct ChildCommentComponent {
build() {
Column(){
Row() {
Image(StringUtils.isEmpty(this.data.fromUserHeader)?$r('app.media.default_head'):this.data.fromUserHeader)
Stack({alignContent: Alignment.Center}){
Image(this.data.fromUserHeader)
.alt($r('app.media.default_head'))
.objectFit(ImageFit.Auto)
.width('69lpx')
.height('69lpx')
.borderRadius(50)
Image(UserDataLocal.getUserLevelHeaderUrl())
.width('89lpx')
.height('89lpx')
.objectFit(ImageFit.Cover)
.borderRadius(50)
}.width('89lpx')
.height('89lpx')
.margin({right:'15lpx'})
Column(){
... ...
import { DateTimeUtils, LazyDataSource } from 'wdKit';
import { DateTimeUtils, LazyDataSource, UserDataLocal } from 'wdKit';
import MinePageDatasModel from '../../../model/MinePageDatasModel';
import { CommentListItem } from '../../../viewmodel/CommentListItem';
import { OtherUserCommentListRequestItem } from '../../../viewmodel/OtherUserCommentListRequestItem';
import { ListHasNoMoreDataUI } from '../../reusable/ListHasNoMoreDataUI';
import { MineCommentListDetailItem } from '../../../viewmodel/MineCommentListDetailItem';
import { OtherUserCommentLikeStatusRequestItem } from '../../../viewmodel/OtherUserCommentLikeStatusRequestItem';
import { CommentLikeOperationRequestItem } from '../../../viewmodel/CommentLikeOperationRequestItem';
const TAG = "HomePageBottomComponent"
@Component
... ... @@ -16,6 +17,7 @@ export struct OtherHomePageBottomCommentComponent{
curPageNum:number = 1;
@State count:number = 0;
@Prop levelHead:string
@Link commentNum:number
aboutToAppear(){
this.getNewPageData()
... ... @@ -87,7 +89,7 @@ export struct OtherHomePageBottomCommentComponent{
if (!this.data_comment || value.list.length == 0){
this.hasMore = false
}else{
this.getFollowListStatus(value)
this.getCommentListStatus(value)
}
}).catch((err:Error)=>{
console.log(TAG,"请求失败")
... ... @@ -96,13 +98,13 @@ export struct OtherHomePageBottomCommentComponent{
}
}
getFollowListStatus(value:MineCommentListDetailItem){
getCommentListStatus(value:MineCommentListDetailItem){
let status = new OtherUserCommentLikeStatusRequestItem()
let data : CommentListItem[] = []
value.list.forEach((item)=>{
status.commentIdList.push(item.id)
data.push(new CommentListItem(item.fromUserHeader,item.fromUserName,item.targetTitle,item.createTime,item.commentContent,item.likeNum,0,item.id))
data.push(new CommentListItem(item.fromUserHeader,item.fromUserName,item.targetTitle,item.createTime,item.commentContent,item.likeNum,0,item.id,item.targetId,item.targetType))
})
MinePageDatasModel.getOtherUserCommentLikeStatusData(status,getContext(this)).then((newValue)=>{
... ... @@ -115,12 +117,13 @@ export struct OtherHomePageBottomCommentComponent{
})
data.forEach((item)=>{
this.data_comment.push(new CommentListItem(item.fromUserHeader,item.fromUserName,item.targetTitle,item.createTime,item.commentContent,item.likeNum,item.like_status,item.id))
this.data_comment.push(new CommentListItem(item.fromUserHeader,item.fromUserName,item.targetTitle,item.createTime,item.commentContent,item.likeNum,item.like_status,item.id,item.targetId,item.targetType))
})
this.data_comment.notifyDataReload()
this.count = this.data_comment.totalCount()
this.commentNum = value.totalCount
if (this.data_comment.totalCount() < value.totalCount) {
this.curPageNum++
}else {
... ... @@ -144,20 +147,21 @@ struct ChildCommentComponent {
build() {
Column(){
Row() {
Stack(){
Stack({alignContent: Alignment.Center}){
Image(this.data.fromUserHeader)
.alt($r('app.media.default_head'))
.objectFit(ImageFit.Auto)
.width('69lpx')
.height('69lpx')
.margin({right:'15lpx'})
.borderRadius(50)
Image(this.levelHead)
.width('89lpx')
.height('89lpx')
.objectFit(ImageFit.Cover)
.borderRadius(50)
}
}.width('89lpx')
.height('89lpx')
.margin({right:'15lpx'})
Column(){
Text(this.data.fromUserName)
... ... @@ -189,8 +193,9 @@ struct ChildCommentComponent {
.objectFit(ImageFit.Auto)
.interpolation(ImageInterpolation.Medium)
.borderRadius(50)
}
}.onClick(()=>{
this.commentLikeOperation()
})
}
.margin({bottom:'10lpx'})
.width('100%')
... ... @@ -237,4 +242,16 @@ struct ChildCommentComponent {
}
.justifyContent(FlexAlign.Center)
}
commentLikeOperation(){
let item = new CommentLikeOperationRequestItem(this.data.targetId,this.data.id+"",this.data.targetType+"",UserDataLocal.getUserName(),UserDataLocal.getUserHeaderUrl(),this.data.like_status===0?1:0)
MinePageDatasModel.getCommentLikeOperation(item,getContext(this)).then((value)=>{
if(value!=null){
if (value.code === 0 || value.code.toString() === "0") {
this.data.like_status = this.data.like_status===0?1:0
this.data.likeNum = this.data.like_status===0?this.data.likeNum-1:this.data.likeNum+1
}
}
})
}
}
\ No newline at end of file
... ...
... ... @@ -3,7 +3,6 @@ import { LazyDataSource, StringUtils } from 'wdKit';
import { WDRouterRule, WDRouterPage } from 'wdRouter';
import MinePageDatasModel from '../../../model/MinePageDatasModel';
import { FollowListDetailItem } from '../../../viewmodel/FollowListDetailItem';
import { FollowListDetailRequestItem } from '../../../viewmodel/FollowListDetailRequestItem';
import { UserFollowListRequestItem } from '../../../viewmodel/UserFollowListRequestItem';
import { ListHasNoMoreDataUI } from '../../reusable/ListHasNoMoreDataUI';
... ... @@ -17,6 +16,7 @@ export struct OtherHomePageBottomFollowComponent{
@State count:number = 0;
@Prop curUserId: string
aboutToAppear(){
this.getNewPageData()
}
... ... @@ -107,7 +107,7 @@ export struct OtherHomePageBottomFollowComponent{
getNewPageData(){
this.isLoading = true
//我的关注列表
//关注列表
if(this.hasMore){
let object = new UserFollowListRequestItem(Number(this.curUserId),20,this.curPageNum,"1")
... ... @@ -116,10 +116,11 @@ export struct OtherHomePageBottomFollowComponent{
this.hasMore = false
}else{
value.list.forEach((value)=>{
this.data_follow.push(new FollowListDetailItem(value.attentionHeadPhotoUrl,value.attentionUserName,value.fansNum,value.introduction,value.attentionCreatorId,"1",value.attentionUserId))
this.data_follow.push(new FollowListDetailItem(value.attentionHeadPhotoUrl,value.attentionUserName,value.fansNum,value.introduction,value.attentionCreatorId,"1",value.attentionUserId,value.cnUserType,value.cnUserId))
})
this.data_follow.notifyDataReload()
this.count = this.data_follow.totalCount()
if (this.data_follow.totalCount() < value.totalCount) {
this.curPageNum++
}else {
... ... @@ -167,47 +168,6 @@ struct ChildFollowComponent {
.textOverflow({ overflow: TextOverflow.Ellipsis })
}.layoutWeight(1)
.alignItems(HorizontalAlign.Start)
if(this.data.status == "1"){
Row(){
Text(`已关注`)
.fontColor($r('app.color.color_CCCCCC'))
.fontSize('23lpx')
.fontWeight('500lpx')
.lineHeight('35lpx')
}.backgroundColor($r('app.color.color_F5F5F5'))
.borderRadius('6lpx')
.borderColor($r('app.color.color_F5F5F5'))
.borderWidth('2lpx')
.justifyContent(FlexAlign.Center)
.width('100lpx')
.height('46lpx')
.margin({left:'4lpx',top:'23lpx'})
.onClick(()=>{
this.data.status = "0"
})
}else{
Row(){
Image($r('app.media.follow_icon'))
.margin({right:'4lpx'})
.width('23lpx')
.height('23lpx')
Text(`关注`)
.fontColor($r('app.color.color_ED2800'))
.fontSize('23lpx')
.fontWeight('500lpx')
.lineHeight('35lpx')
}.borderColor($r('app.color.color_1AED2800'))
.borderRadius('6lpx')
.borderWidth('2lpx')
.justifyContent(FlexAlign.Center)
.width('100lpx')
.height('46lpx')
.margin({left:'4lpx',top:'23lpx'})
.onClick(()=>{
this.data.status = "1"
})
}
}.alignItems(VerticalAlign.Top)
.width('100%')
.layoutWeight(1)
... ...
import { TopNavDTO } from 'wdBean';
const INDEX_SETTING_TITLE: string = '首页设置'
const INDEX_SETTING_SUBTITLE: string = '将指定频道设置为首页'
const MY_CHANNEL: string = '我的频道'
const EDIT_TEXT: string = '编辑'
const EDIT_DOWN: string = '完成'
const MORE_CHANNEL: string = '更多频道'
const LOCAL_CHANNEL: string = '地方频道'
@CustomDialog
struct ChannelDialog {
@State indexSettingTabIndex: number = 1
@State isEditIng: boolean = false
@Link currentTopNavSelectedIndex : number
@Link myChannelList: Array<TopNavDTO>
@Link moreChannelList: Array<TopNavDTO>
@Link localChannelList: Array<TopNavDTO>
@Link indexSettingArray: Array<string>
@Link topNavList: Array<TopNavDTO>
myChannelItemEditHandle = (index: number): void => {
let item = this.myChannelList.splice(index, 1)[0]
console.info(`itemitemitem${JSON.stringify(item)}`)
if (item.moreChannel === '1') {
this.moreChannelList.unshift(item)
}
if (item.localChannel === '1') {
this.localChannelList.unshift(item)
}
}
controller?: CustomDialogController
build() {
Column() {
Flex({ justifyContent: FlexAlign.SpaceBetween, alignItems: ItemAlign.Center }) {
Image($r('app.media.icon_ren_min_ri_bao'))
.width(72)
.height(29)
Image($r('app.media.close_button'))
.width(24)
.onClick(() => {
this.controller?.close()
})
}
.width('100%')
.margin({ top: 30, bottom: 10 })
List() {
ListItem() {
Row() {
Text(INDEX_SETTING_TITLE)
.fontSize(16)
.fontWeight(600)
.margin({ right: 4 })
Text(INDEX_SETTING_SUBTITLE)
.fontSize(12)
.fontWeight(400)
}
.width('100%')
.margin({ top: 22, bottom: 16 })
}
ListItem() {
Flex({ justifyContent: FlexAlign.SpaceBetween }) {
ForEach(this.indexSettingArray, (text: string, index: number) => {
Button(text, { type: ButtonType.Normal, stateEffect: false })
.width('48%')
.borderRadius(2)
.fontColor(index === this.indexSettingTabIndex ? '#ffffff' : '#ED2800')
.fontSize(16)
.fontWeight(400)
.backgroundColor(index === this.indexSettingTabIndex ? '#ED2800' : '#FDE9E5')
.onClick(() => {
this.indexSettingTabIndex = index
})
})
}
.height(36)
.margin({ bottom: 36 })
}
ListItem() {
Row() {
Text(MY_CHANNEL)
.fontSize(16)
.fontWeight(600)
Text(this.isEditIng ? EDIT_DOWN : EDIT_TEXT)
.fontSize(14)
.fontColor('#ED2800')
.onClick(() => {
this.isEditIng = !this.isEditIng
})
}
.width('100%')
.justifyContent(FlexAlign.SpaceBetween)
.margin({ bottom: 12 })
}
ListItem() {
GridRow({ columns: 4, gutter: 10 }) {
ForEach(this.myChannelList, (item: TopNavDTO, index: number) => {
GridCol() {
Row() {
Text(item.name)
.fontSize(14)
.fontColor( this.currentTopNavSelectedIndex === index ? '#ED2800' : (item.homeChannel === '1' ? '#999999' : '#222222'))
if (this.isEditIng && item.myChannel !== '1') {
Image($r('app.media.icon_audio_close'))
.width(12)
.margin({ left: 1 })
}
}
.width('100%')
.height('100%')
.justifyContent(FlexAlign.Center)
.backgroundColor(item.homeChannel === '1' ? '#F5F5F5' : '')
.onClick(() => {
if (this.isEditIng) {
if(item.myChannel !== '1'){
this.myChannelItemEditHandle(index)
}
}else{
this.controller?.close()
}
})
}
.width(80)
.height(40)
.border({
width: item.homeChannel === '1' ? 0 : 1,
color: '#EDEDED',
radius: 3
})
}, (item: TopNavDTO) => JSON.stringify(item))
}
.width('100%')
.margin({ bottom: 24 })
}
ListItem() {
Column() {
if (this.moreChannelList.length > 0) {
Text(MORE_CHANNEL)
.width('100%')
.fontSize(16)
.fontWeight(600)
.margin({ bottom: 12 })
.textAlign(TextAlign.Start)
}
GridRow({ columns: 4, gutter: 10 }) {
ForEach(this.moreChannelList, (item: TopNavDTO, index: number) => {
GridCol() {
Row() {
Text(item.name)
.fontSize(14)
Image($r('app.media.add_icon'))
.width(12)
.margin({ left: 1 })
}
.width('100%').height('100%')
.justifyContent(FlexAlign.Center)
.onClick(() => {
this.myChannelList.push(this.moreChannelList.splice(index, 1)[0])
})
}
.width(80)
.height(40)
.border({
width: 1,
color: '#EDEDED'
})
}, (item: TopNavDTO) => JSON.stringify(item))
}
.width('100%')
.margin({ bottom: 24 })
}
.width('100%')
}
ListItem() {
Column() {
if (this.localChannelList.length > 0) {
Text(LOCAL_CHANNEL)
.width('100%')
.fontSize(16)
.fontWeight(600)
.margin({ bottom: 12 })
.textAlign(TextAlign.Start)
}
GridRow({ columns: 4, gutter: 10 }) {
ForEach(this.localChannelList, (item: TopNavDTO, index: number) => {
GridCol() {
Row() {
Text(item.name)
.fontSize(14)
Image($r('app.media.add_icon'))
.width(12)
.margin({ left: 1 })
}
.width('100%').height('100%')
.justifyContent(FlexAlign.Center)
.onClick(() => {
this.myChannelList.push(this.localChannelList.splice(index, 1)[0])
})
}
.width(80)
.height(40)
.border({
width: 1,
color: '#EDEDED'
})
}, (item: TopNavDTO) => JSON.stringify(item))
}
.width('100%')
.margin({ bottom: 24 })
}
.width('100%')
}
}.width('100%').height('100%')
}
.padding(16)
.backgroundColor('#ffffff')
}
onTopNavigationDataUpdated() {
}
}
@Entry
@Component
struct ChannelSubscriptionLayout {
//当前选中的频道
@Prop currentTopNavSelectedIndex?: number;
@State indexSettingArray: Array<string> = ['推荐', '热点']
@State myChannelList: Array<TopNavDTO> = [
// {
// channelId: 0,
// channelStyle: 1,
// channelType: 1,
// defaultPermitted: 1,
// delPermitted: 1,
// fontCColor: '#000000',
// fontColor: '#000000',
// headlinesOn: 0,
// homeChannel: '1',
// iconCUrl: '',
// iconCUrlSize: '',
// iconUrl: '',
// iconUrlSize: '',
// localChannel: '',
// moreChannel: '',
// movePermitted: 0,
// myChannel: '1',
// name: '推荐',
// num: 0,
// pageId: 21212,
// pageType: '',
// underlineCColor: ''
// },
// {
// channelId: 1,
// channelStyle: 1,
// channelType: 1,
// defaultPermitted: 1,
// delPermitted: 1,
// fontCColor: '#000000',
// fontColor: '#000000',
// headlinesOn: 0,
// homeChannel: '1',
// iconCUrl: '',
// iconCUrlSize: '',
// iconUrl: '',
// iconUrlSize: '',
// localChannel: '',
// moreChannel: '',
// movePermitted: 0,
// myChannel: '1',
// name: '热点',
// num: 0,
// pageId: 21212,
// pageType: '',
// underlineCColor: ''
// },
// {
// channelId: 2,
// channelStyle: 1,
// channelType: 1,
// defaultPermitted: 1,
// delPermitted: 1,
// fontCColor: '#000000',
// fontColor: '#000000',
// headlinesOn: 0,
// homeChannel: '',
// iconCUrl: '',
// iconCUrlSize: '',
// iconUrl: '',
// iconUrlSize: '',
// localChannel: '',
// moreChannel: '',
// movePermitted: 0,
// myChannel: '1',
// name: '视频',
// num: 0,
// pageId: 21212,
// pageType: '',
// underlineCColor: ''
// },
// {
// channelId: 3,
// channelStyle: 1,
// channelType: 1,
// defaultPermitted: 1,
// delPermitted: 1,
// fontCColor: '#000000',
// fontColor: '#000000',
// headlinesOn: 0,
// homeChannel: '',
// iconCUrl: '',
// iconCUrlSize: '',
// iconUrl: '',
// iconUrlSize: '',
// localChannel: '',
// moreChannel: '',
// movePermitted: 0,
// myChannel: '1',
// name: '云课堂',
// num: 0,
// pageId: 21212,
// pageType: '',
// underlineCColor: ''
// },
]
@State moreChannelList: Array<TopNavDTO> = [
// {
// channelId: 4,
// channelStyle: 1,
// channelType: 1,
// defaultPermitted: 1,
// delPermitted: 1,
// fontCColor: '#000000',
// fontColor: '#000000',
// headlinesOn: 0,
// homeChannel: '',
// iconCUrl: '',
// iconCUrlSize: '',
// iconUrl: '',
// iconUrlSize: '',
// localChannel: '',
// moreChannel: '1',
// movePermitted: 0,
// myChannel: '',
// name: '房产',
// num: 0,
// pageId: 21212,
// pageType: '',
// underlineCColor: ''
// },
// {
// channelId: 5,
// channelStyle: 1,
// channelType: 1,
// defaultPermitted: 1,
// delPermitted: 1,
// fontCColor: '#000000',
// fontColor: '#000000',
// headlinesOn: 0,
// homeChannel: '',
// iconCUrl: '',
// iconCUrlSize: '',
// iconUrl: '',
// iconUrlSize: '',
// localChannel: '',
// moreChannel: '1',
// movePermitted: 0,
// myChannel: '',
// name: '生态',
// num: 0,
// pageId: 21212,
// pageType: '',
// underlineCColor: ''
// },
// {
// channelId: 6,
// channelStyle: 1,
// channelType: 1,
// defaultPermitted: 1,
// delPermitted: 1,
// fontCColor: '#000000',
// fontColor: '#000000',
// headlinesOn: 0,
// homeChannel: '',
// iconCUrl: '',
// iconCUrlSize: '',
// iconUrl: '',
// iconUrlSize: '',
// localChannel: '',
// moreChannel: '1',
// movePermitted: 0,
// myChannel: '',
// name: '健康',
// num: 0,
// pageId: 21212,
// pageType: '',
// underlineCColor: ''
// }
]
@State localChannelList: Array<TopNavDTO> = [
// {
// channelId: 7,
// channelStyle: 1,
// channelType: 1,
// defaultPermitted: 1,
// delPermitted: 1,
// fontCColor: '#000000',
// fontColor: '#000000',
// headlinesOn: 0,
// homeChannel: '',
// iconCUrl: '',
// iconCUrlSize: '',
// iconUrl: '',
// iconUrlSize: '',
// localChannel: '1',
// moreChannel: '',
// movePermitted: 0,
// myChannel: '',
// name: '北京',
// num: 0,
// pageId: 21212,
// pageType: '',
// underlineCColor: ''
// },
// {
// channelId: 8,
// channelStyle: 1,
// channelType: 1,
// defaultPermitted: 1,
// delPermitted: 1,
// fontCColor: '#000000',
// fontColor: '#000000',
// headlinesOn: 0,
// homeChannel: '',
// iconCUrl: '',
// iconCUrlSize: '',
// iconUrl: '',
// iconUrlSize: '',
// localChannel: '1',
// moreChannel: '',
// movePermitted: 0,
// myChannel: '',
// name: '上海',
// num: 0,
// pageId: 21212,
// pageType: '',
// underlineCColor: ''
// },
// {
// channelId: 9,
// channelStyle: 1,
// channelType: 1,
// defaultPermitted: 1,
// delPermitted: 1,
// fontCColor: '#000000',
// fontColor: '#000000',
// headlinesOn: 0,
// homeChannel: '',
// iconCUrl: '',
// iconCUrlSize: '',
// iconUrl: '',
// iconUrlSize: '',
// localChannel: '1',
// moreChannel: '',
// movePermitted: 0,
// myChannel: '',
// name: '江苏',
// num: 0,
// pageId: 21212,
// pageType: '',
// underlineCColor: ''
// }
]
// 顶导数据
@State topNavList: TopNavDTO[] = []
dialogController: CustomDialogController | null = new CustomDialogController({
builder: ChannelDialog({
currentTopNavSelectedIndex:this.currentTopNavSelectedIndex,
indexSettingArray: this.indexSettingArray,
topNavList: this.topNavList,
myChannelList: this.myChannelList,
moreChannelList: this.moreChannelList,
localChannelList: this.localChannelList,
}),
cancel: this.exitApp,
alignment: DialogAlignment.TopEnd,
customStyle: true,
})
aboutToAppear() {
this.topNavList.forEach((item,index)=>{
if(item.myChannel === '1'){
this.myChannelList.push(item)
}
if(item.moreChannel === '1'){
this.moreChannelList.push(item)
}
if(item.localChannel === '1'){
this.localChannelList.push(item)
}
})
}
aboutToDisappear() {
this.dialogController = null // 将dialogController置空
}
onCancel() {
console.info('Callback when the first button is clicked')
}
onAccept() {
console.info('Callback when the second button is clicked')
}
exitApp() {
console.info('Click the callback in the blank area')
}
build() {
Row() {
Image($r('app.media.channel_button'))
.width(18)
}
.width(36)
.height(30)
.justifyContent(FlexAlign.Center)
.backgroundColor('#ffffff')
.onClick(() => {
if (this.dialogController != null) {
this.dialogController.open()
}
})
}
}
export { ChannelSubscriptionLayout }
\ No newline at end of file
... ...
import router from '@ohos.router';
import { CustomTitleUI } from '../reusable/CustomTitleUI';
import { EditInfoModel, EditListInfo, editModel } from '../../model/EditInfoModel';
import { EditListInfo } from '../../model/EditInfoModel';
import EditInfoViewModel from '../../viewmodel/EditInfoViewModel';
import { WDRouterPage, WDRouterRule } from 'wdRouter';
import {AreaPickerDialog} from '../view/areaPickerDialog/AreaPickerDialog'
import { AreaListModel } from '../../model/AreaListModel';
@Entry
@Component
struct EditUserInfoPage {
private listData: EditListInfo[] = []
// editM: editModel
@State listData: EditListInfo[] = []
@State headerImg: string = ''
@State dataSource: AreaListModel[] = []
dialogController: CustomDialogController = new CustomDialogController({
builder: AreaPickerDialog({dataSource:this.dataSource}),
alignment: DialogAlignment.Bottom,
offset:{dx:0,dy:-20}
})
aboutToAppear() {
// this.listData = EditInfoViewModel.getEditListInfo(this.editM)
this.getAccountOwnerInfo()
this.getAreaList()
}
build() {
Row() {
Column() {
CustomTitleUI({titleName:'资料编辑'})
Image('')
Image(this.headerImg)
.alt($r('app.media.default_head'))
.backgroundColor(Color.Gray)
.width(100)
.height(100)
... ... @@ -87,6 +97,8 @@ struct EditUserInfoPage {
// url:'pages/EditUserInstoductionPage',
// params:{pageNum:i}
// })
}else if (i === 3){
this.dialogController.open()
} else if (i === 4) {
DatePickerDialog.show({
start:new Date('1900-1-1'),
... ... @@ -110,9 +122,15 @@ struct EditUserInfoPage {
}
getAccountOwnerInfo(){
EditInfoViewModel.queryAccountOwnerInfo(1,getContext(this)).then((result) => {
// this.editM = result
EditInfoViewModel.queryAccountOwnerInfo(1,getContext(this)).then((editModel) => {
this.headerImg = editModel.userExtend.headPhotoUrl
this.listData.push(...EditInfoViewModel.getEditListInfo(editModel))
});
}
getAreaList(){
EditInfoViewModel.getAreaList(getContext(this)).then((value) =>{
this.dataSource.push(...value)
})
}
}
... ...
... ... @@ -79,6 +79,7 @@ export struct MinePageComponent {
}
async getUserLogin() {
// let userid = SPHelper.default.getSync(SpConstants.USER_ID,"") as string
let userid = await SPHelper.default.get(SpConstants.USER_ID,"")
if(StringUtils.isNotEmpty(userid)){
this.isLogin = true
... ...
... ... @@ -2,6 +2,7 @@ import { Action, CompDTO, Params, TopNavDTO } from 'wdBean';
import { LazyDataSource, Logger } from 'wdKit';
import { WDRouterRule } from 'wdRouter';
import { PageComponent } from './PageComponent';
import { ChannelSubscriptionLayout } from './ChannelSubscriptionLayout'
const TAG = 'TopNavigationComponent';
... ... @@ -16,8 +17,48 @@ export struct TopNavigationComponent {
// 顶导数据
@State @Watch('onTopNavigationDataUpdated') topNavList: TopNavDTO[] = []
@State compList: LazyDataSource<CompDTO> = new LazyDataSource();
@State handledTopNavList: TopNavDTO[] = []
readonly MAX_LINE: number = 1;
topNavListHandle() {
let defaultMyChannelList: TopNavDTO[] = []
this.handledTopNavList = [...this.topNavList]
this.handledTopNavList.sort((a, b) => {
return a.num - b.num;
});
Logger.info(TAG, `aboutToAppear this.handledTopNavListsort : ${JSON.stringify(this.handledTopNavList)}`);
for (let i = 0; i < this.handledTopNavList.length; i++) {
if (this.handledTopNavList[i].defaultPermitted === 0 || this.handledTopNavList[i].movePermitted === 0 || this.handledTopNavList[i].delPermitted === 0 || this.handledTopNavList[i].headlinesOn === 1) {
defaultMyChannelList.push(this.handledTopNavList.splice(i, 1)[0]);
}
}
Logger.info(TAG, `aboutToAppear defaultMyChannelListsort : ${JSON.stringify(defaultMyChannelList)}`);
for (const element of defaultMyChannelList) {
element.myChannel = '1'
if (element.defaultPermitted === 1) {
element.homeChannel = '1'
}
}
this.handledTopNavList.unshift(...defaultMyChannelList)
for (let i = 0; i < this.handledTopNavList.length; i++) {
if(this.handledTopNavList[i].channelType === 2){
this.handledTopNavList[i].localChannel = '1'
}
if(i>=11){
if(this.handledTopNavList[i].channelType === 1){
this.handledTopNavList[i].moreChannel = '1'
}
}else{
if(this.handledTopNavList[i].channelType === 1 && this.handledTopNavList[i].myChannel !== '1'){
this.handledTopNavList[i].moreChannel = '1'
}
}
}
console.info(`handledTopNavList:${JSON.stringify(this.handledTopNavList)}`)
}
build() {
Column() {
RelativeContainer() {
... ... @@ -44,8 +85,10 @@ export struct TopNavigationComponent {
.height(30)
.width(123)
.id('search')
.alignRules({ left: { anchor: "__container__", align: HorizontalAlign.Start },
center: { anchor: "__container__", align: VerticalAlign.Center } })
.alignRules({
left: { anchor: "__container__", align: HorizontalAlign.Start },
center: { anchor: "__container__", align: VerticalAlign.Center }
})
Image($r('app.media.icon_ren_min_ri_bao'))
.width(72)
... ... @@ -60,8 +103,10 @@ export struct TopNavigationComponent {
WDRouterRule.jumpWithAction(taskAction)
})
.id('ren_min')
.alignRules({ middle: { anchor: "__container__", align: HorizontalAlign.Center },
center: { anchor: "__container__", align: VerticalAlign.Center } })
.alignRules({
middle: { anchor: "__container__", align: HorizontalAlign.Center },
center: { anchor: "__container__", align: VerticalAlign.Center }
})
Stack({ alignContent: Alignment.Center }) {
Image($r('app.media.background_read_paper_home'))
... ... @@ -83,8 +128,10 @@ export struct TopNavigationComponent {
.height(30)
.width(124)
.id('read')
.alignRules({ right: { anchor: "__container__", align: HorizontalAlign.End },
center: { anchor: "__container__", align: VerticalAlign.Center } })
.alignRules({
right: { anchor: "__container__", align: HorizontalAlign.End },
center: { anchor: "__container__", align: VerticalAlign.Center }
})
.onClick((event: ClickEvent) => {
let taskAction: Action = {
... ... @@ -100,8 +147,10 @@ export struct TopNavigationComponent {
.height(40)
.visibility(this._currentNavIndex == 0 ? Visibility.Visible : Visibility.None)
Stack({ alignContent: Alignment.TopEnd }) {
Tabs() {
ForEach(this.topNavList, (navItem: TopNavDTO, index: number) => {
ForEach(this.handledTopNavList, (navItem: TopNavDTO, index: number) => {
TabContent() {
PageComponent({
currentTopNavSelectedIndex: $currentTopNavSelectedIndex,
... ... @@ -120,6 +169,13 @@ export struct TopNavigationComponent {
Logger.info(TAG, `onChange index : ${index}`);
this.currentTopNavSelectedIndex = index;
})
ChannelSubscriptionLayout({
topNavList: this.handledTopNavList,
currentTopNavSelectedIndex: this.currentTopNavSelectedIndex
})
}
}
}
... ... @@ -144,6 +200,7 @@ export struct TopNavigationComponent {
minWidth: $r('app.float.top_tab_item_min_width'),
maxWidth: $r('app.float.top_tab_item_max_width')
})
// .margin({ right: 36 })
// .backgroundColor(Color.Black)
.padding({
left: $r('app.float.top_tab_item_padding_horizontal'),
... ... @@ -151,9 +208,11 @@ export struct TopNavigationComponent {
bottom: $r('app.float.top_tab_item_padding_bottom')
})
.id(`col_tabBar${index}`)
}
aboutToAppear() {
this.topNavListHandle()
Logger.info(TAG, `aboutToAppear this.topNavList : ${JSON.stringify(this.topNavList)}`);
}
... ...
import { MineAppointmentItem } from '../../viewmodel/MineAppointmentItem'
@CustomDialog
export struct MyCustomDialog {
@State title: string = "标题"
@State tipValue: string ="提示文字"
@State leftText: string = "取消"
@State rightText: string = "确认"
controller: CustomDialogController
cancel: () => void = () => {
}
confirm: () => void = () => {
}
build() {
Column() {
Text(this.title)
.fontSize("32lpx")
.margin({ top: "40lpx", bottom: "15lpx" })
.fontColor($r('app.color.color_333333'))
.fontSize('35lpx')
.fontWeight('600lpx')
Text(this.tipValue)
.margin({ bottom: "30lpx" })
.fontSize("27lpx")
.fontColor($r('app.color.color_B0B0B0'))
Divider()
.width("100%")
.strokeWidth('1lpx')
.height('1lpx')
.color($r('app.color.color_EEEEEE'))
Row(){
Text(this.leftText)
.fontSize('35lpx')
.fontWeight('400lpx')
.fontColor($r('app.color.color_333333'))
.onClick(() => {
this.controller.close()
this.cancel()
}).layoutWeight(1)
.textAlign(TextAlign.Center)
Divider()
.width("1lpx")
.strokeWidth('1lpx')
.vertical(true)
.height('92lpx')
.color($r('app.color.color_EEEEEE'))
Text(this.rightText)
.fontSize('35lpx')
.textAlign(TextAlign.Center)
.fontWeight('400lpx')
.fontColor($r('app.color.color_648DF2'))
.onClick(() => {
if (this.controller != undefined) {
this.controller.close()
this.confirm()
}
}).layoutWeight(1)
}
.alignItems(VerticalAlign.Center)
.height('96lpx')
}.borderRadius(10)
}
}
\ No newline at end of file
... ...
import { Action, CompDTO, Params } from 'wdBean';
import { ExtraDTO } from 'wdBean/src/main/ets/bean/component/extra/ExtraDTO';
import { DateTimeUtils, Logger } from 'wdKit';
import { WDRouterRule } from 'wdRouter';
... ... @@ -10,7 +11,7 @@ export struct AlbumCardComponent {
@State compDTO: CompDTO = {} as CompDTO
aboutToAppear() {
Logger.debug(TAG + "" + JSON.stringify(this.compDTO.operDataList));
Logger.debug(TAG + "this.compDTO.operDataList" + JSON.stringify(this.compDTO.operDataList));
}
... ... @@ -102,7 +103,12 @@ export struct AlbumCardComponent {
let taskAction: Action = {
type: 'JUMP_DETAIL_PAGE',
params: {
detailPageType: 9
detailPageType: 17,
contentID: this.compDTO.operDataList?.[0].objectId,
extra: {
relType: this.compDTO.operDataList?.[0].relType,
relId: `${this.compDTO.operDataList?.[0].relId}`,
} as ExtraDTO
} as Params,
};
WDRouterRule.jumpWithAction(taskAction)
... ...
import { CompDTO, slideShows } from 'wdBean';
import { CommonConstants } from 'wdConstant'
import { DateTimeUtils } from 'wdKit';
import { ProcessUtils } from '../../utils/ProcessUtils';
/**
* 时间链卡--CompStyle: 09
*/
... ... @@ -47,10 +47,6 @@ export struct CompStyle_09 {
.borderRadius(3)
.justifyContent(FlexAlign.Center)
.margin({top: 5})
.onClick(() => {
// TODO
console.log('跳转到查看更多的页面')
})
}
}
.width(CommonConstants.FULL_WIDTH)
... ... @@ -62,6 +58,9 @@ export struct CompStyle_09 {
})
.backgroundColor($r("app.color.white"))
.margin({ bottom: 8 })
.onClick((event: ClickEvent) => {
ProcessUtils.processPage(this.compDTO?.operDataList[0])
})
}
@Builder timelineItem (item:slideShows, index:number) {
... ...
import { CompDTO, slideShows } from 'wdBean';
import { CompDTO, ContentDTO, slideShows } from 'wdBean';
import { CommonConstants } from 'wdConstant'
import { DateTimeUtils } from 'wdKit';
import { ProcessUtils } from '../../utils/ProcessUtils';
/**
* 大专题卡--CompStyle: 10
... ... @@ -22,8 +24,11 @@ export struct CompStyle_10 {
.margin({ bottom: 19 })
}
// 大图
Image(this.compDTO.operDataList[0].coverUrl)
Image(this.compDTO.operDataList[0] && this.compDTO.operDataList[0].coverUrl)
.width('100%')
.onClick((event: ClickEvent) => {
ProcessUtils.processPage(this.compDTO?.operDataList[0])
})
// 专题列表--后端返回三个,
Column(){
ForEach(this.compDTO.operDataList[0].slideShows, (item:slideShows, index:number) => {
... ... @@ -47,9 +52,8 @@ export struct CompStyle_10 {
.borderRadius(3)
.justifyContent(FlexAlign.Center)
.margin({top: 5})
.onClick(() => {
// TODO
console.log('跳转到查看更多的页面')
.onClick((event: ClickEvent) => {
ProcessUtils.processPage(this.compDTO?.operDataList[0])
})
}
}
... ... @@ -63,9 +67,7 @@ export struct CompStyle_10 {
.backgroundColor($r("app.color.white"))
.margin({ bottom: 8 })
}
@Builder timelineItem (item:slideShows, index:number) {
Column(){
Row() {
Column(){
Text(item.newsTitle)
... ... @@ -74,18 +76,20 @@ export struct CompStyle_10 {
.fontColor($r('app.color.color_222222'))
.maxLines(2)
.textOverflow({ overflow: TextOverflow.Ellipsis })
.alignSelf(ItemAlign.Center)
Row(){
// 展示发稿人
if(item.source) {
Text(item.source)
.fontSize($r('app.float.font_size_12'))
.fontColor($r('app.color.color_B0B0B0'))
.layoutWeight(1)
.textOverflow({overflow: TextOverflow.Ellipsis})
.maxLines(1)
.width(item.source.length > 10 ? '60%' : '')
Image($r('app.media.point'))
.width(16)
.height(16)
}
Text(DateTimeUtils.getCommentTime(Number.parseFloat(String(item.publishTime))))
.fontSize($r("app.float.font_size_12"))
.fontColor($r("app.color.color_B0B0B0"))
... ... @@ -106,6 +110,13 @@ export struct CompStyle_10 {
}
}
.padding({top: 10, bottom: 10})
}
.onClick((event: ClickEvent) => {
const str: string = JSON.stringify(this.compDTO.operDataList[0]);
const data: ContentDTO = JSON.parse(str)
data.objectId = item.newsId
data.relId = item.relId
data.objectType = String(item.objectType)
ProcessUtils.processPage(data)
})
}
}
\ No newline at end of file
... ...
import { CompDTO } from 'wdBean';
import { CommonConstants } from 'wdConstant';
import { ProcessUtils } from '../../utils/ProcessUtils';
@Component
export struct HeadPictureCardComponent {
... ... @@ -40,5 +41,8 @@ export struct HeadPictureCardComponent {
.height(200)
.padding(
{ top: 16, bottom: 16, left: 14, right: 14 })
.onClick((event: ClickEvent) => {
ProcessUtils.processPage(this.compDTO?.operDataList[0])
})
}
}
... ...
... ... @@ -93,6 +93,25 @@ export struct SingleImageCardComponent {
bottom: 4
})
.backgroundColor($r('app.color.color_4d000000'))
} else if(this.compDTO.operDataList[0].voiceInfo) {
Row() {
Image($r('app.media.icon_listen'))
.width(22)
.height(18)
Text(DateTimeUtils.getFormattedDuration(this.compDTO.operDataList[0].voiceInfo
.voiceDuration * 1000))
.fontSize($r('app.float.font_size_13'))
.fontWeight(400)
.fontColor($r('app.color.color_fff'))
}
.alignItems(VerticalAlign.Bottom)
.height(18)
.padding({ right: 4 })
.margin({
right: 4,
bottom: 4
})
.backgroundColor($r('app.color.color_4d000000'))
}
}.alignContent(Alignment.BottomEnd)
}
... ...
... ... @@ -67,9 +67,9 @@ export struct ZhSingleRow04 {
Text(item.source)
.fontSize($r('app.float.font_size_12'))
.fontColor($r('app.color.color_B0B0B0'))
.layoutWeight(1)
.textOverflow({overflow: TextOverflow.Ellipsis})
.maxLines(1)
.width(item.source.length > 10 ? '60%' : '')
Image($r("app.media.point"))
.width(16)
.height(16)
... ...
import { AreaListManageModel, AreaListModel } from '../../../model/AreaListModel';
import EditInfoViewModel from '../../../viewmodel/EditInfoViewModel';
import { FirstLevelComponent } from './FirstLevelComponent';
import { SecondLevelComponent } from './SecondLevelComponent';
import { ThirdLevelComponent } from './ThirdLevelComponent';
@CustomDialog
export struct AreaPickerDialog {
@Provide currentFirst: AreaListManageModel = new AreaListManageModel('','','',[])
@Provide currentSecondBean: AreaListManageModel = new AreaListManageModel('','','',[])
@Provide currentThirdBean: AreaListManageModel = new AreaListManageModel('','','',[])
controller: CustomDialogController
title: string = '地区选择'
@Provide dataSource: AreaListModel[] = []
result: JSON[] = [];
aboutToAppear(){
this.currentFirst = EditInfoViewModel.getAreaListManageModel(this.dataSource[0])
this.currentSecondBean = EditInfoViewModel.getAreaListManageModel(this.dataSource[0].children[0])
this.currentThirdBean = EditInfoViewModel.getAreaListManageModel(this.dataSource[0].children[0].children[0])
}
build() {
Column(){
Row(){
Button('取消',{type:ButtonType.Normal})
.onClick(()=> {
this.controller.close()
})
.backgroundColor(0xffffff)
.fontColor(Color.Black)
.layoutWeight(1)
Blank()
Text(this.title)
.fontSize(18).textAlign(TextAlign.Center).margin({top:10,bottom:10})
Blank()
Button('确定',{type:ButtonType.Normal})
.onClick(()=> {
})
.backgroundColor(0xffffff)
.fontColor(Color.Blue)
.layoutWeight(1)
}
.margin({top:0,bottom:10})
Row(){
FirstLevelComponent().width('30%')
SecondLevelComponent().width('30%')
ThirdLevelComponent().width('30%')
}
}
.height('40%')
}
}
\ No newline at end of file
... ...
import { AreaListManageModel, AreaListModel } from '../../../model/AreaListModel';
import EditInfoViewModel from '../../../viewmodel/EditInfoViewModel';
@Component
export struct FirstLevelComponent {
@State labelList :string[] = [];
@State select: number = 0;
@Consume currentFirst: AreaListManageModel
@Consume dataSource: AreaListModel[]
aboutToAppear(){
for (let index = 0; index < this.dataSource.length; index++) {
const element = this.dataSource[index];
this.labelList.push(element.label)
}
}
build() {
Column(){
Column(){
if (this.labelList.length === 0){
Text('暂无数据').fontSize(20)
}else {
TextPicker({range:this.labelList,selected:this.select})
// .onChange((value:string,index:number) => {
// this.select = index
// this.currentFirst = EditInfoViewModel.getAreaListManageModel(this.dataSource[index])
// })
.backgroundColor(Color.White)
.border({color:'#e2e2e2',width:{right:0.5}})
.width('100%')
.layoutWeight(1)
}
}
.justifyContent(FlexAlign.Center)
}
.height('100%')
}
}
\ No newline at end of file
... ...
import { AreaListManageModel, AreaListModel } from '../../../model/AreaListModel';
@Component
export struct SecondLevelComponent {
@State mTip: string = '暂无数据'
@State labelList: string[] = [];
@State select: number = 0;
@Consume @Watch('onFirstChange') currentFirst: AreaListManageModel;
@Consume currentSecondBean: AreaListManageModel
aboutToAppear(){
for (let index = 0; index < this.currentFirst.children.length; index++) {
const element = this.currentFirst.children[index];
this.labelList.push(element.label)
}
}
build() {
Column(){
Column(){
if (this.labelList.length === 0){
Text(this.mTip).fontSize(20)
}else {
TextPicker({range:this.labelList,selected:this.select})
// .onChange((value:string,index:number) => {
// this.select = index
// this.currentSecondBean = this.currentFirst.children[index]
// })
.backgroundColor(Color.White)
.border({color:'#e2e2e2',width:{right:0.5}})
.width('100%')
.layoutWeight(1)
}
}
.justifyContent(FlexAlign.Center)
}
.height('100%')
}
onFirstChange(){
if (!this.currentFirst) {
this.mTip = '暂无数据';
} else {
this.labelList = []
for (let index = 0; index < this.currentFirst.children.length; index++) {
const element = this.currentFirst.children[index];
this.labelList.push(element.label)
}
// this.currentSecondBean = this.currentFirst.children[this.select]
}
}
}
\ No newline at end of file
... ...
import { AreaListManageModel, AreaListModel } from '../../../model/AreaListModel';
@Component
export struct ThirdLevelComponent {
@State mTip: string = '暂无数据'
@State labelList: string[] = [];
@State select: number = 0;
@Consume @Watch('onFirstChange') currentFirst: AreaListManageModel;
@Consume @Watch('onSecondChange') currentSecondBean: AreaListManageModel;
@Consume currentThirdBean: AreaListManageModel
aboutToAppear(){
for (let index = 0; index < this.currentSecondBean.children.length; index++) {
const element = this.currentSecondBean.children[index];
this.labelList.push(element.label)
}
}
build() {
Column(){
Column(){
if (this.labelList.length === 0){
Text(this.mTip).fontSize(20)
}else {
TextPicker({range:this.labelList,selected:this.select})
// .onChange((value:string,index:number) => {
// this.select = index
// this.currentThirdBean = this.currentSecondBean.children[index]
// })
.backgroundColor(Color.White)
.border({color:'#e2e2e2',width:{right:0.5}})
.width('100%')
.layoutWeight(1)
}
}
.justifyContent(FlexAlign.Center)
}
.height('100%')
}
onFirstChange(){
}
onSecondChange(){
if (!this.currentSecondBean) {
this.mTip = '暂无数据';
} else {
this.labelList = []
for (let index = 0; index < this.currentSecondBean.children.length; index++) {
const element = this.currentSecondBean.children[index];
this.labelList.push(element.label)
}
// this.currentThirdBean = this.currentSecondBean.children[this.select]
}
}
}
\ No newline at end of file
... ...
... ... @@ -9,7 +9,15 @@ export class ContentConstants {
*/
static readonly TYPE_VOD: string = "1";
/**
* 5:专题详情
*/
static readonly TYPE_SPECIAL_TOPIC: string = "5";
/**
* 8:图文详情,这里是h5页面
*/
static readonly TYPE_TELETEXT: string = "8";
/**
* 13:音频详情
*/
static readonly TYPE_AUDIO: string = "13";
}
\ No newline at end of file
... ...
/**
* 简易音频对话框
* */
import { PlayerConstants, WDPlayerController } from 'wdPlayer/Index'
@CustomDialog
export struct PaperReaderSimpleDialog {
private controllerSimple?: CustomDialogController;
cancel: () => void = () => {
}
confirm: () => void = () => {
}
playerController: WDPlayerController = new WDPlayerController()
paperReaderDialog: CustomDialogController = new CustomDialogController({
builder: PaperReaderDialog({
onCancel: this.cancel,
onConfirm: this.confirm,
playerController: this.playerController
}),
autoCancel: false,
customStyle: true,
alignment: DialogAlignment.CenterStart,
offset: { dx: 12, dy: -150 }
})
controllerSimple?: CustomDialogController // // 若尝试在CustomDialog中传入多个其他的Controller,以实现在CustomDialog中打开另一个或另一些CustomDialog,那么此处需要将指向自己的controller放在所有controller的后面
build() {
Row() {
... ... @@ -19,6 +38,18 @@ export struct PaperReaderSimpleDialog {
.onClick(() => {
if (this.controllerSimple) {
this.controllerSimple.close()
this.paperReaderDialog.open()
if (this.paperReaderDialog) {
setTimeout(() => {
console.log('PaperReaderSimpleDialog delay 1s');
if (this.paperReaderDialog != undefined) {
this.paperReaderDialog.close()
}
if (this.controllerSimple != undefined) {
this.controllerSimple.open()
}
}, 500000);
}
}
})
... ... @@ -31,23 +62,34 @@ export struct PaperReaderSimpleDialog {
* */
@CustomDialog
export struct PaperReaderDialog {
@Consume audioTitle: string;
@Consume currentTime: string;
@Consume totalTime: string;
@Consume progressVal: number;
@State currentStatus: number = 0;
playerController: WDPlayerController = new WDPlayerController()
controllerDetail?: CustomDialogController
onCancel: () => void = () => {
}
onConfirm: () => void = () => {
}
build() {
Stack() {
Stack({ alignContent: Alignment.End }) {
Column() { //标题 时间 进度条
Marquee({
start: true,
step: 50,
step: 5,
loop: Number.POSITIVE_INFINITY,
fromStart: true,
src: "Running Marquee starts rolling"
src: this.audioTitle
})
.width("60%")
.height(20)
.fontColor($r("app.color.color_222222"))
.fontSize(14)
.margin({ top: 10 })
.margin({ top: 10, left: 10 })
.alignSelf(ItemAlign.Start)
.onStart(() => {
console.info('Marquee animation complete onStart')
})
... ... @@ -59,48 +101,66 @@ export struct PaperReaderDialog {
})
Row() {
Text("00:00")
Text(this.currentTime)
.fontSize($r('app.float.font_size_12'))
.fontColor($r('app.color.color_999999'))
.width("49%")
.height("100%")
Text("/00:00")
.alignSelf(ItemAlign.Start)
Text("/" + this.totalTime)
.fontSize($r('app.float.font_size_12'))
.fontColor($r('app.color.color_999999'))
.width("51%")
.height("100%")
.alignSelf(ItemAlign.Start)
}
.width("100%")
.height(16)
.margin({ top: 4 })
}
.width("100%")
.height("100%")
.margin({ top: 4, left: 10 })
Progress({ value: 0, total: 100, type: ProgressType.Linear })
Progress({ value: this.progressVal, total: 100, type: ProgressType.Capsule })
.color($r('app.color.color_ED2800'))
.backgroundColor($r('app.color.white'))
.width("100%")
.height(3)
.margin({ top: 7 })
}
.width("100%")
.height("100%")
.justifyContent(FlexAlign.Start)
Image($r("app.media.icon_audio_pause"))
.objectFit(ImageFit.Auto)
.align(Alignment.End)
Row() {
Image(this.currentStatus != PlayerConstants.STATUS_START ? $r("app.media.icon_audio_pause") : $r("app.media.icon_audio_playing"))
.objectFit(ImageFit.Contain)
.width(24)
.height(24)
.margin({ right: 12 })
.onClick(() => {
if (this.playerController) {
// this.onConfirm()
this.playerController.switchPlayOrPause()
this.currentStatus = this.playerController.getStatus()
}
})
Image($r("app.media.icon_audio_close"))
.objectFit(ImageFit.Auto)
.align(Alignment.End)
.margin({ right: 48 })
.objectFit(ImageFit.Contain)
.width(24)
.height(24)
.onClick(() => {
if (this.playerController) {
this.playerController.stop()
}
if (this.controllerDetail) {
this.controllerDetail.close()
}
})
}.width(80)
.height(60)
}
.width("65%")
.height(60)
.backgroundColor(Color.White)
.borderRadius(5)
.borderRadius(2)
}
}
\ No newline at end of file
... ...
export interface AreaListModel{
code: string
id: string
label: string
children: AreaListModel[]
}
export class AreaListManageModel{
code: string = ''
id: string = ''
label: string = ''
children: AreaListModel[] = []
constructor(code:string , id:string,label:string, children:AreaListModel[]) {
this.code = code;
this.id = id
this.label = label;
this.children = children
}
}
\ No newline at end of file
... ...
... ... @@ -23,9 +23,10 @@ export interface EditInfoModel{
//生日
birthday:string
//性别
sex:string
// 推荐开关 0:关 1:开(默认)
sex:number
airec:number
}
export interface editModel{
... ...
... ... @@ -20,6 +20,9 @@ import { OtherUserCommentListRequestItem } from '../viewmodel/OtherUserCommentLi
import { OtherUserCommentLikeStatusRequestItem } from '../viewmodel/OtherUserCommentLikeStatusRequestItem';
import { QueryCommentListIsLikedItem } from '../viewmodel/QueryCommentListIsLikedItem';
import { UserFollowListRequestItem } from '../viewmodel/UserFollowListRequestItem';
import { AppointmentOperationRequestItem } from '../viewmodel/AppointmentOperationRequestItem';
import { CommentLikeOperationRequestItem } from '../viewmodel/CommentLikeOperationRequestItem';
import { FollowOperationRequestItem } from '../viewmodel/FollowOperationRequestItem';
const TAG = "MinePageDatasModel"
... ... @@ -106,7 +109,7 @@ class MinePageDatasModel{
*/
fetchAppointmentListData(pageSize:string,pageNum:string) {
let url = HttpUrlUtils.getAppointmentListDataUrl()+ `?pageSize=${pageSize}&pageNum=${pageNum}`
let headers: HashMap<string, string> = HttpUrlUtils.getYcgCommonHeaders();
let headers: HashMap<string, string> = HttpUrlUtils.getCommonHeaders();
return WDHttp.get<ResponseDTO<MineAppointmentListItem>>(url, headers)
};
... ... @@ -177,7 +180,7 @@ class MinePageDatasModel{
fetchFollowListDetailData(object:FollowListDetailRequestItem) {
let url = HttpUrlUtils.getFollowListDetailDataUrl()
let headers: HashMap<string, string> = HttpUrlUtils.getYcgCommonHeaders();
let headers: HashMap<string, string> = HttpUrlUtils.getCommonHeaders();
return WDHttp.post<ResponseDTO<MineFollowListDetailItem>>(url, object,headers)
};
... ... @@ -187,7 +190,7 @@ class MinePageDatasModel{
*/
fetchFollowListData() {
let url = HttpUrlUtils.getFollowListDataUrl()
let headers: HashMap<string, string> = HttpUrlUtils.getYcgCommonHeaders();
let headers: HashMap<string, string> = HttpUrlUtils.getCommonHeaders();
return WDHttp.get<ResponseDTO<FollowListItem[]>>(url, headers)
};
... ... @@ -246,7 +249,7 @@ class MinePageDatasModel{
fetchMineDetailFollowListData(object:FollowListDetailRequestItem) {
let url = HttpUrlUtils.getMineFollowListDataUrl()+`?pageSize=${object.pageSize}&pageNum=${object.pageNum}`
let headers: HashMap<string, string> = HttpUrlUtils.getYcgCommonHeaders();
let headers: HashMap<string, string> = HttpUrlUtils.getCommonHeaders();
return WDHttp.get<ResponseDTO<MineFollowListItem>>(url, headers)
};
... ... @@ -287,7 +290,7 @@ class MinePageDatasModel{
fetchFollowListStatusData(object:FollowListStatusRequestItem) {
let url = HttpUrlUtils.getFollowListStatusDataUrl()
let headers: HashMap<string, string> = HttpUrlUtils.getYcgCommonHeaders();
let headers: HashMap<string, string> = HttpUrlUtils.getCommonHeaders();
return WDHttp.post<ResponseDTO<QueryListIsFollowedItem[]>>(url,object, headers)
};
... ... @@ -309,10 +312,10 @@ class MinePageDatasModel{
* @param context
* @returns
*/
getMineCommentListData(params:FollowListDetailRequestItem,context: Context): Promise<MineCommentListDetailItem> {
getMineCommentListData(time:string,params:FollowListDetailRequestItem,context: Context): Promise<MineCommentListDetailItem> {
return new Promise<MineCommentListDetailItem>((success, error) => {
Logger.info(TAG, `getAppointmentList start`);
this.fetchMineCommentListData(params).then((navResDTO: ResponseDTO<MineCommentListDetailItem>) => {
this.fetchMineCommentListData(time,params).then((navResDTO: ResponseDTO<MineCommentListDetailItem>) => {
if (!navResDTO || navResDTO.code != 0) {
success(this.getMineCommentListDataLocal(context))
return
... ... @@ -327,9 +330,9 @@ class MinePageDatasModel{
})
}
fetchMineCommentListData(object:FollowListDetailRequestItem) {
let url = HttpUrlUtils.getMineCommentListDataUrl()+`?pageSize=${object.pageSize}&pageNum=${object.pageNum}`
let headers: HashMap<string, string> = HttpUrlUtils.getYcgCommonHeaders();
fetchMineCommentListData(time:string,object:FollowListDetailRequestItem) {
let url = HttpUrlUtils.getMineCommentListDataUrl()+`?pageSize=${object.pageSize}&pageNum=${object.pageNum}&time=${time}`
let headers: HashMap<string, string> = HttpUrlUtils.getCommonHeaders();
return WDHttp.get<ResponseDTO<MineCommentListDetailItem>>(url, headers)
};
... ... @@ -367,7 +370,7 @@ class MinePageDatasModel{
fetchMineUserLevelData() {
let url = HttpUrlUtils.getMineUserLevelDataUrl()
let headers: HashMap<string, string> = HttpUrlUtils.getYcgCommonHeaders();
let headers: HashMap<string, string> = HttpUrlUtils.getCommonHeaders();
return WDHttp.get<ResponseDTO<MineUserLevelItem>>(url, headers)
};
... ... @@ -405,7 +408,7 @@ class MinePageDatasModel{
fetchMineUserDetailData() {
let url = HttpUrlUtils.getMineUserDetailDataUrl()
let headers: HashMap<string, string> = HttpUrlUtils.getYcgCommonHeaders();
let headers: HashMap<string, string> = HttpUrlUtils.getCommonHeaders();
return WDHttp.get<ResponseDTO<MineUserDetailItem>>(url, headers)
};
... ... @@ -442,7 +445,7 @@ class MinePageDatasModel{
fetchOtherUserDetailData(item:OtherUserDetailRequestItem) {
let url = HttpUrlUtils.getOtherUserDetailDataUrl()
let headers: HashMap<string, string> = HttpUrlUtils.getYcgCommonHeaders();
let headers: HashMap<string, string> = HttpUrlUtils.getCommonHeaders();
return WDHttp.post<ResponseDTO<MineUserDetailItem>>(url, item,headers)
};
... ... @@ -484,7 +487,7 @@ class MinePageDatasModel{
fetchOtherUserLevelData(item:string[]) {
let url = HttpUrlUtils.getOtherUserLevelDataUrl()
let headers: HashMap<string, string> = HttpUrlUtils.getYcgCommonHeaders();
let headers: HashMap<string, string> = HttpUrlUtils.getCommonHeaders();
return WDHttp.post<ResponseDTO<MineUserLevelItem[]>>(url,item, headers)
};
... ... @@ -525,7 +528,7 @@ class MinePageDatasModel{
fetchOtherCommentListData(object:OtherUserCommentListRequestItem) {
let url = HttpUrlUtils.getOtherCommentListDataUrl()+`?pageSize=${object.pageSize}&pageNum=${object.pageNum}&creatorId=${object.creatorId}&time=${object.time}&userType=${object.userType}&userId=${object.userId}`
let headers: HashMap<string, string> = HttpUrlUtils.getYcgCommonHeaders();
let headers: HashMap<string, string> = HttpUrlUtils.getCommonHeaders();
return WDHttp.get<ResponseDTO<MineCommentListDetailItem>>(url, headers)
};
... ... @@ -565,8 +568,8 @@ class MinePageDatasModel{
}
fetchOtherUserCommentLikeStatusData(object:OtherUserCommentLikeStatusRequestItem) {
let url = HttpUrlUtils.getFollowListStatusDataUrl()
let headers: HashMap<string, string> = HttpUrlUtils.getYcgCommonHeaders();
let url = HttpUrlUtils.getCommentListStatusDataUrl()
let headers: HashMap<string, string> = HttpUrlUtils.getCommonHeaders();
return WDHttp.post<ResponseDTO<QueryCommentListIsLikedItem[]>>(url,object, headers)
};
... ... @@ -607,7 +610,7 @@ class MinePageDatasModel{
fetchOtherUserFollowListData(object:UserFollowListRequestItem) {
let url = HttpUrlUtils.getOtherUserFollowListDataUrl()+`?pageSize=${object.pageSize}&pageNum=${object.pageNum}&queryUserId=${object.queryUserId}&userType=${object.userType}&userId=${HttpUrlUtils.getUserId()}`
let headers: HashMap<string, string> = HttpUrlUtils.getYcgCommonHeaders();
let headers: HashMap<string, string> = HttpUrlUtils.getCommonHeaders();
return WDHttp.get<ResponseDTO<MineFollowListItem>>(url, headers)
};
... ... @@ -622,6 +625,127 @@ class MinePageDatasModel{
return compRes.data
}
/**
* 预约 和取消预约操作
* @param params
* @param context
* @returns
*/
getAppointmentOperation(params:AppointmentOperationRequestItem,context: Context): Promise<ResponseDTO> {
return new Promise((success, error) => {
Logger.info(TAG, `getAppointmentList start`);
this.fetchAppointmentOperation(params).then((navResDTO: ResponseDTO) => {
if (!navResDTO || navResDTO.code != 0) {
success(this.getAppointmentOperationLocal(context))
return
}
Logger.info(TAG, "getAppointmentList then,AppointmentResDTO.timeStamp:" + navResDTO.timestamp);
success(navResDTO);
}).catch((err: Error) => {
Logger.error(TAG, `fetchAppointmentListDataApi catch, error.name : ${err.name}, error.message:${err.message}`);
success(this.getAppointmentOperationLocal(context))
})
})
}
fetchAppointmentOperation(object:AppointmentOperationRequestItem) {
let url = HttpUrlUtils.getAppointmentOperationUrl()
let headers: HashMap<string, string> = HttpUrlUtils.getCommonHeaders();
return WDHttp.post<ResponseDTO>(url,object, headers)
};
async getAppointmentOperationLocal(context: Context): Promise<ResponseDTO> {
Logger.info(TAG, `getMineFollowListDataLocal start`);
let compRes: ResponseDTO | null = await ResourcesUtils.getResourcesJson<ResponseDTO>(context,'appointment_operation_data.json');
if (!compRes ) {
Logger.info(TAG, `getMineFollowListDataLocal compRes is empty`);
return compRes
}
Logger.info(TAG, `getMineFollowListDataLocal getResourcesJsonSync compRes : ${JSON.stringify(compRes)}`);
return compRes
}
/**
* 评论点赞操作
* @param params
* @param context
* @returns
*/
getCommentLikeOperation(params:CommentLikeOperationRequestItem,context: Context): Promise<ResponseDTO> {
return new Promise((success, error) => {
Logger.info(TAG, `getAppointmentList start`);
this.fetchCommentLikeOperation(params).then((navResDTO: ResponseDTO) => {
if (!navResDTO || navResDTO.code != 0) {
success(this.getCommentLikeOperationLocal(context))
return
}
Logger.info(TAG, "getAppointmentList then,AppointmentResDTO.timeStamp:" + navResDTO.timestamp);
success(navResDTO);
}).catch((err: Error) => {
Logger.error(TAG, `fetchAppointmentListDataApi catch, error.name : ${err.name}, error.message:${err.message}`);
success(this.getCommentLikeOperationLocal(context))
})
})
}
fetchCommentLikeOperation(object:CommentLikeOperationRequestItem) {
let url = HttpUrlUtils.getCommentLikeOperationUrl()
let headers: HashMap<string, string> = HttpUrlUtils.getCommonHeaders();
return WDHttp.post<ResponseDTO>(url,object, headers)
};
async getCommentLikeOperationLocal(context: Context): Promise<ResponseDTO> {
Logger.info(TAG, `getMineFollowListDataLocal start`);
let compRes: ResponseDTO | null = await ResourcesUtils.getResourcesJson<ResponseDTO>(context,'comment_like_operation_data.json');
if (!compRes ) {
Logger.info(TAG, `getMineFollowListDataLocal compRes is empty`);
return compRes
}
Logger.info(TAG, `getMineFollowListDataLocal getResourcesJsonSync compRes : ${JSON.stringify(compRes)}`);
return compRes
}
/**
* 关注 取消关注 操作
* @param params
* @param context
* @returns
*/
getFollowOperation(params:FollowOperationRequestItem,context: Context): Promise<ResponseDTO> {
return new Promise((success, error) => {
Logger.info(TAG, `getAppointmentList start`);
this.fetchFollowOperation(params).then((navResDTO: ResponseDTO) => {
if (!navResDTO || navResDTO.code != 0) {
success(this.getFollowOperationLocal(context))
return
}
Logger.info(TAG, "getAppointmentList then,AppointmentResDTO.timeStamp:" + navResDTO.timestamp);
success(navResDTO);
}).catch((err: Error) => {
Logger.error(TAG, `fetchAppointmentListDataApi catch, error.name : ${err.name}, error.message:${err.message}`);
success(this.getFollowOperationLocal(context))
})
})
}
fetchFollowOperation(object:FollowOperationRequestItem) {
let url = HttpUrlUtils.getFollowOperationUrl()
let headers: HashMap<string, string> = HttpUrlUtils.getCommonHeaders();
return WDHttp.post<ResponseDTO>(url,object, headers)
};
async getFollowOperationLocal(context: Context): Promise<ResponseDTO> {
Logger.info(TAG, `getMineFollowListDataLocal start`);
let compRes: ResponseDTO | null = await ResourcesUtils.getResourcesJson<ResponseDTO>(context,'follow_operation_data.json');
if (!compRes ) {
Logger.info(TAG, `getMineFollowListDataLocal compRes is empty`);
return compRes
}
Logger.info(TAG, `getMineFollowListDataLocal getResourcesJsonSync compRes : ${JSON.stringify(compRes)}`);
return compRes
}
}
... ...
... ... @@ -56,21 +56,21 @@ struct MineHomePage {
Stack(){
Image(this.headPhotoUrl)
.alt($r('app.media.default_head'))
.width('115lpx')
.height('115lpx')
.objectFit(ImageFit.Cover)
.width('100lpx')
.height('100lpx')
.objectFit(ImageFit.Auto)
.borderRadius(50)
Image(this.levelHead)
.width('130lpx')
.height('130lpx')
.objectFit(ImageFit.Cover)
.borderRadius(50)
}.onClick(()=>{
let params: Params = {
pageID: "512157124138245"
pageID: "531267787833221"//sit 测试用 512157124138245
}
WDRouterRule.jumpWithPage(WDRouterPage.otherNormalUserHomePagePage,params)
})
}).width('135lpx')
.height('135lpx')
Column() {
Row() {
... ...
... ... @@ -12,12 +12,17 @@ const TAG = "OtherNormalUserHomePage"
@Component
struct OtherNormalUserHomePage {
@State params:Params = router.getParams() as Params;
@State curUserId: string = '-1';
@Watch('change') @State curUserId: string = '-1';
onPageShow() {
this.curUserId = this.params?.pageID;
}
change(){
this.getUserInfo()
this.getUserLevel()
}
@State tileOpacity: number = 0;
firstPositionY:number = 0;
fontColor: string = '#999999'
... ... @@ -61,8 +66,8 @@ struct OtherNormalUserHomePage {
Stack(){
Image(this.headPhotoUrl)
.alt($r('app.media.default_head'))
.width('115lpx')
.height('115lpx')
.width('100lpx')
.height('100lpx')
.objectFit(ImageFit.Cover)
.borderRadius(50)
Image(this.levelHead)
... ... @@ -148,6 +153,7 @@ struct OtherNormalUserHomePage {
.padding({ left: '35lpx' })
//用户简介区域
if(StringUtils.isNotEmpty(this.desc)){
Column() {
Row() {
Text(this.desc)
... ... @@ -165,15 +171,14 @@ struct OtherNormalUserHomePage {
.justifyContent(FlexAlign.Center)
.width('100%')
.backgroundColor($r('app.color.white'))
.visibility(StringUtils.isEmpty(this.desc)?Visibility.Hidden:Visibility.Visible)
}
//间隔符
Divider().width('100%').height('12lpx').color($r('app.color.color_F5F5F5')).strokeWidth('12lpx')
//tab 页面
Tabs({controller: this.controller}) {
TabContent() {
OtherHomePageBottomCommentComponent({curUserId:this.curUserId,levelHead:this.levelHead})
OtherHomePageBottomCommentComponent({curUserId:this.curUserId,levelHead:this.levelHead,commentNum:$commentNum})
}.tabBar(this.TabBuilder(0,"评论"))
TabContent() {
OtherHomePageBottomFollowComponent({curUserId:this.curUserId})
... ... @@ -303,6 +308,9 @@ struct OtherNormalUserHomePage {
getUserInfo(){
if(this.curUserId === "-1" ){
return
}
let item = new OtherUserDetailRequestItem("","1",this.curUserId)
MinePageDatasModel.getOtherUserDetailData(item,getContext(this)).then((value)=>{
if(value!=null){
... ... @@ -320,6 +328,9 @@ struct OtherNormalUserHomePage {
})
}
getUserLevel(){
if(this.curUserId === "-1" ){
return
}
MinePageDatasModel.getOtherUserLevelData([this.curUserId],getContext(this)).then((value)=>{
if(value!=null){
this.levelHead = value[0].levelHead
... ...
... ... @@ -99,7 +99,7 @@ export class PageRepository {
}
/**
* 早晚报pageInfo请求
* 早晚报pageInfo请求 TODO 现网无数据写死测试环境
* */
static getMorningEveningPageInfoUrl(pageId: string) {
let url = HttpUrlUtils.getHost() + HttpUrlUtils.MORNING_EVENING_PAGE_INFO_PATH;
... ... @@ -118,7 +118,7 @@ export class PageRepository {
*
* 可选
* channelId:频道id
* channelStrategy:频道策略
* channelStrategy:频道策略 TODO 现网无数据写死测试环境
* topicId:专题id
* */
static getMorningEveningCompInfoUrl(pageId: number, groupId: number, refreshTime: string, topicId: string, pageNum: number, pageSize: number) {
... ...
... ... @@ -32,15 +32,30 @@ export class ProcessUtils {
Logger.debug(TAG, "processPage, nonsupport!!!");
ProcessUtils.gotoVod(content)
break;
case ContentConstants.TYPE_AUDIO:
ProcessUtils.gotoAudio(content)
break;
case ContentConstants.TYPE_TELETEXT:
// 图文详情,跳转h5
ProcessUtils.gotoWeb(content);
break;
case ContentConstants.TYPE_SPECIAL_TOPIC:
// 专题详情,跳转h5
ProcessUtils.gotoSpecialTopic(content);
break;
default:
break;
}
}
private static gotoSpecialTopic(content: ContentDTO) {
let taskAction: Action = {
type: 'JUMP_H5_BY_WEB_VIEW',
params: {
url: content.linkUrl
} as Params,
};
WDRouterRule.jumpWithAction(taskAction)
}
private static gotoWeb(content: ContentDTO) {
// // topicId
// content.channelId;
... ... @@ -83,4 +98,20 @@ export class ProcessUtils {
WDRouterRule.jumpWithAction(taskAction)
Logger.debug(TAG, `gotoVod, ${content.objectId}`);
}
private static gotoAudio(content: ContentDTO) {
let taskAction: Action = {
type: 'JUMP_DETAIL_PAGE',
params: {
detailPageType: 13,
contentID: content?.objectId,
extra:{
relType: content?.relType,
relId: content?.relId,
} as ExtraDTO
} as Params,
};
WDRouterRule.jumpWithAction(taskAction)
Logger.debug(TAG, `gotoAudio, ${content.objectId}`);
}
}
\ No newline at end of file
... ...
// {"relationId":"500000017021","liveId":"20000007348","isSubscribe":false}
export class AppointmentOperationRequestItem{
relationId:string = ""
liveId:string = ""
isSubscribe:boolean = false
constructor(relationId: string ,liveId: string ,isSubscribe: boolean ) {
this.relationId = relationId
this.liveId = liveId
this.isSubscribe = isSubscribe
}
}
... ...
// {
// "targetId":"30000627490",
// "commentId":"303318",
// "targetType":"13",
// "userName":"人民日报网友aPrtq5",
// "userHeaderUrl":"https://sitcontentjdcdn.aikan.pdnews.cn//img/user/2024031215/48d5bd53227d436b9faa937b3ac14600.png",
// "status":1
// }
export class CommentLikeOperationRequestItem{
targetId:string = ""
commentId:string = ""
targetType:string = ""
userName:string = ""
userHeaderUrl:string = ""
status:number = 1
constructor(targetId: string, commentId: string, targetType: string , userName: string,
userHeaderUrl: string , status:number) {
this.targetId = targetId
this.commentId = commentId
this.targetType = targetType
this.userName = userName
this.userHeaderUrl = userHeaderUrl
this.status = status
}
}
... ...
... ... @@ -10,8 +10,11 @@ export class CommentListItem{
likeNum:number = 0
like_status:number = 0
id:number = 0
targetId:string = ""
targetType:number = 0
constructor(fromUserHeader:string,fromUserName:string,targetTitle:string,createTime:string,commentContent:string,likeNum:number,like_status:number,id:number) {
constructor(fromUserHeader:string,fromUserName:string,targetTitle:string,createTime:string,commentContent:string,likeNum:number,like_status:number,id:number,targetId:string,targetType:number) {
this.fromUserHeader = fromUserHeader
this.fromUserName = fromUserName
this.commentContent = commentContent
... ... @@ -20,5 +23,7 @@ export class CommentListItem{
this.likeNum = likeNum
this.like_status = like_status
this.id = id
this.targetId = targetId
this.targetType = targetType
}
}
... ...
... ... @@ -3,6 +3,7 @@ import { EditInfoModel, EditListInfo, editModel } from '../model/EditInfoModel';
import HashMap from '@ohos.util.HashMap';
import { HttpUrlUtils, ResponseDTO, WDHttp } from 'wdNetwork';
import { Logger, ResourcesUtils } from 'wdKit';
import { AreaListManageModel, AreaListModel } from '../model/AreaListModel';
const TAG = "EditInfoViewModel"
... ... @@ -27,13 +28,13 @@ class EditInfoViewModel {
}
getEditListInfo(item:editModel):EditListInfo[]{
getEditListInfo(item?:editModel):EditListInfo[]{
this.editListData = [
// new EditListInfo('昵称',item&&item.userName?item.userName:'待完善'),
// new EditListInfo('简介',item&&item.userExtend.introduction?item.userExtend.introduction:'待完善'),
// new EditListInfo('地区',item&&item.userExtend.city?item.userExtend.city:'待完善'),
// new EditListInfo('生日',item&&item.userExtend.birthday?item.userExtend.birthday:'待完善'),
// new EditListInfo('性别',item&&item.userExtend.sex?item.userExtend.sex:'待完善'),
new EditListInfo('昵称',item&&item.userName?item.userName:'待完善'),
new EditListInfo('简介',item&&item.userExtend.introduction?item.userExtend.introduction:'待完善'),
new EditListInfo('地区',item&&item.userExtend.city?item.userExtend.city:'待完善'),
new EditListInfo('生日',item&&item.userExtend.birthday?item.userExtend.birthday:'待完善'),
new EditListInfo('性别',item&&item.userExtend.sex?item.userExtend.sex===1?'男':'女':'待完善'),
]
return this.editListData
}
... ... @@ -46,10 +47,10 @@ class EditInfoViewModel {
// let editM = navResDTO.data as EditInfoModel
// success(JSON.parse(navResDTO.data)
}
return this.GetqueryAccountOwnerLocal(context)
success(this.GetqueryAccountOwnerLocal(context))
}).catch((error: Error) => {
Logger.info('EditInfoViewModel','EditInfoViewModel','EditInfoViewModel')
return this.GetqueryAccountOwnerLocal(context)
success(this.GetqueryAccountOwnerLocal(context))
})
}))
... ... @@ -66,6 +67,38 @@ class EditInfoViewModel {
return compRes.data
}
getAreaList(context: Context):PromiseLike<AreaListModel[]>{
return new Promise(((success, error) => {
success(this.getAreaListLocal(context))
// this.BaseGetRequest(HttpUrlUtils.APPOINTMENT_AccountOwner_PATH).then((navResDTO:ResponseDTO) =>{
// if (navResDTO.code == 200) {
// // let editM = navResDTO.data as EditInfoModel
// // success(JSON.parse(navResDTO.data)
// }
//
// }).catch((error: Error) => {
// Logger.info('EditInfoViewModel','EditInfoViewModel','EditInfoViewModel')
// success(this.GetqueryAccountOwnerLocal(context))
//
// })
}))
}
async getAreaListLocal(context: Context): Promise<AreaListModel[]> {
Logger.info(TAG, `getBottomNavDataMock start`);
let compRes: ResponseDTO<AreaListModel[]> | null = await ResourcesUtils.getResourcesJson<ResponseDTO<AreaListModel[]>>(context,'areaList_data.json');
if (!compRes || !compRes.data) {
Logger.info(TAG, `getAppointmentListDataLocal compRes is empty`);
return [] as AreaListModel[]
}
Logger.info(TAG, `getAppointmentListDataLocal getResourcesJsonSync compRes : ${JSON.stringify(compRes)}`);
return compRes.data
}
getAreaListManageModel(item:AreaListModel):AreaListManageModel{
return new AreaListManageModel(item.code,item.id,item.label,item.children)
}
updateUserInfo(){
}
... ...
... ... @@ -69,13 +69,18 @@ export class FollowListDetailItem{
creatorId:string = ""
attentionUserId:string = ""
cnUserType:string = ""
cnUserId:string = ""
attentionCreatorId:string = ""
attentionUserType:string = ""
attentionHeadPhotoUrl:string = ""
attentionUserName:string = ""
fansNum :number = 0
constructor(headPhotoUrl:string,cnUserName:string,cnFansNum:number,introduction:string,creatorId:string,status:string,attentionUserId:string) {
constructor(headPhotoUrl:string,cnUserName:string,cnFansNum:number,introduction:string,creatorId:string,status:string,attentionUserId:string,cnUserType:string,cnUserId:string) {
this.headPhotoUrl = headPhotoUrl
this.cnUserName = cnUserName
this.cnFansNum = cnFansNum
... ... @@ -83,5 +88,7 @@ export class FollowListDetailItem{
this.creatorId = creatorId
this.status = status
this.attentionUserId = attentionUserId
this.cnUserType = cnUserType
this.cnUserId = cnUserId
}
}
... ...
// {
// "attentionUserType":"2",
// "attentionUserId":"444911718724933",
// "attentionCreatorId":"3004861",
// "userType":1,
// "userId":"567387477063621",
// "status":1
// }
export class FollowOperationRequestItem{
attentionUserType:string = ""
attentionUserId:string = ""
attentionCreatorId:string = ""
userType:string = ""
userId:string = ""
status:number = 1
constructor(attentionUserType:string, attentionUserId:string, attentionCreatorId:string, userType:string, userId:string, status:number) {
this.attentionUserType = attentionUserType
this.attentionUserId = attentionUserId
this.attentionCreatorId = attentionCreatorId
this.userType = userType
this.userId = userId
this.status = status
}
}
... ...
... ... @@ -18,8 +18,8 @@ export class MineAppointmentItem{
isAppointment:boolean
constructor(imageUrl:string[],status:string,title:string,isAppointment:boolean,timePre:string,timeBack:string,relType:number,appStyle?:string,liveId?:number,planStartTime?:string,
relId?:string,startTime?:string) {
constructor(imageUrl:string[],status:string,title:string,isAppointment:boolean,timePre:string,timeBack:string,relType:number,liveId:number,
relId:string) {
this.imageUrl=imageUrl
this.status=status
this.title=title
... ... @@ -27,5 +27,7 @@ export class MineAppointmentItem{
this.timePre = timePre
this.timeBack = timeBack
this.relType = relType
this.liveId = liveId
this.relId = relId
}
}
\ No newline at end of file
... ...
... ... @@ -119,6 +119,14 @@
{
"name": "color_99636363",
"value": "#99636363"
},
{
"name":"color_648DF2",
"value": "#648DF2"
},
{
"name":"color_EEEEEE",
"value": "#EEEEEE"
}
]
}
\ No newline at end of file
... ...
... ... @@ -13,6 +13,12 @@ export interface ContentDetailRequestParams {
relType: string
}
export interface recommentVideoListParame {
pageSize: number;
refreshCnt: number;
}
export class ContentDetailRequest {
static getContentDetailDataMock(context: Context): Promise<ResponseDTO<ContentDetailDTO[]>> {
Logger.info(TAG, `getContentDetailDataMock start`);
... ... @@ -26,10 +32,10 @@ export class ContentDetailRequest {
/**
* 新闻内容详情【get】接口
*/
static readonly CONTENT_DETAIL_PATH: string = "/api/rmrb-bff-display-zh/content/zh/c/content/detail";
// static readonly CONTENT_DETAIL_PATH: string = "/api/rmrb-bff-display-zh/content/zh/c/content/detail";
static getContentDetailUrl(contentId: string, relId: string, relType: string) {
let url = HttpUrlUtils.getHost() + ContentDetailRequest.CONTENT_DETAIL_PATH
let url = HttpUrlUtils.getHost() + HttpUrlUtils.DETAIL_PATH
url = url + "?&contentId=" + contentId
+ "&relId=" + relId
+ "&relType=" + relType;
... ... @@ -44,4 +50,46 @@ export class ContentDetailRequest {
let headers: HashMap<string, string> = HttpUrlUtils.getCommonHeaders();
return WDHttp.get<ResponseDTO<ContentDetailDTO[]>>(url, headers)
}
/**
*
* @returns
*/
static getContentInteract() {
let url = HttpUrlUtils.getHost() + HttpUrlUtils.INTERACT_DATA_PATH
let headers: HashMap<string, string> = HttpUrlUtils.getCommonHeaders();
return WDHttp.get(url, headers)
}
/**
*
* @returns
*/
static postBatchLikeAndCollectStatus() {
let url = HttpUrlUtils.getHost() + HttpUrlUtils.INTERACT_DATA_STATUS
let headers: HashMap<string, string> = HttpUrlUtils.getCommonHeaders();
return WDHttp.post(url, headers)
}
/**
*
* @returns
*/
static postBatchAttentionStatus() {
let url = HttpUrlUtils.getHost() + HttpUrlUtils.FOLLOW_LIST_STATUS_DATA_PATH
let headers: HashMap<string, string> = HttpUrlUtils.getCommonHeaders();
return WDHttp.post(url, headers)
}
/**
* 沉浸式視頻查詢近20条数据
* @returns
*/
static postRecommendVideoList(params: recommentVideoListParame): Promise<ResponseDTO<ContentDetailDTO[]>> {
let url = HttpUrlUtils.getHost() + HttpUrlUtils.RECOMMEND_VIDEOLIST
let headers: HashMap<string, string> = HttpUrlUtils.getCommonHeaders();
return WDHttp.post0(url, params, headers)
}
}
\ No newline at end of file
... ...
import router from '@ohos.router';
import mediaquery from '@ohos.mediaquery';
import window from '@ohos.window';
import { Action, RmhInfoDTO, UserInfoDTO } from 'wdBean';
import { Action, ContentDetailDTO, RmhInfoDTO, UserInfoDTO } from 'wdBean';
import { Logger, SPHelper, WindowModel } from 'wdKit';
import { PlayerConstants, WDPlayerController, WDPlayerRenderView } from 'wdPlayer';
import { devicePLSensorManager } from 'wdDetailPlayApi';
... ... @@ -15,12 +15,15 @@ const TAG = 'DetailPlayShortVideoPage';
/**
* 详情&短视频播放页面
*/
@Entry
@Component
export struct DetailPlayShortVideoPage {
private contentId?: string = undefined
private relId?: string = undefined
private relType?: string = undefined
private contentDetailData: ContentDetailDTO | undefined = undefined
@Prop @Watch('currentIndexChange') currentIndex: number = 0
private index: number = 0
private playerController: WDPlayerController = new WDPlayerController();
@Watch("urlChanged") @State url?: string = undefined
@Watch('changeContinue') @Provide nextContId?: string = '';
... ... @@ -55,7 +58,21 @@ export struct DetailPlayShortVideoPage {
this.userInfo = this.playVM.userInfo
}
currentIndexChange() {
console.log('currentIndexChange====', this.currentIndex)
if (this.currentIndex != this.index) {
this.playerController.pause()
} else {
console.log('currentIndexChange====1', this.playerController)
this.playerController.switchPlayOrPause()
}
}
aboutToAppear() {
console.log('开始设置setContentDetailData', JSON.stringify(this.contentDetailData))
this.playVM.setContentDetailData(this.contentDetailData)
let action: Action = router.getParams() as Action
Logger.info(TAG, "action", JSON.stringify(action))
if (action) {
... ... @@ -79,12 +96,23 @@ export struct DetailPlayShortVideoPage {
}
WindowModel.shared.setMainWindowFullScreen(this.isFullScreen)
})
console.error('111,', this.index, this.currentIndex)
if (this.index == 0 && this.currentIndex === this.index) {
setTimeout(() => {
this.playerController.play()
}, 2000)
}
}
onPageShow() {
WindowModel.shared.setPreferredOrientation(window.Orientation.AUTO_ROTATION_RESTRICTED);
}
aboutToDisappear(): void {
this.playerController?.pause();
}
onPageHide() {
WindowModel.shared.setPreferredOrientation(window.Orientation.PORTRAIT);
devicePLSensorManager.devicePLSensorOff();
... ... @@ -100,12 +128,16 @@ export struct DetailPlayShortVideoPage {
onLoad: async () => {
console.log('onload==', this.contentId, this.relId, this.relType)
// this.playVM.playWithContentId(this.contentId ?? "846899373")
this.playVM.playWithIds(this.contentId ?? "846899373",
this.relId ?? "500000301942", this.relType ?? "1")
this.playVM.playWithIds(this.contentId,
this.relId, this.relType)
}
})
.height('100%')
.width('100%')
.onClick(() => {
console.error('WDPlayerRenderView=== onClick')
this.playerController?.switchPlayOrPause();
})
}
@Builder
... ... @@ -130,16 +162,21 @@ export struct DetailPlayShortVideoPage {
playerView: () => {
this.playerViewContainerBuilder()
}, playControlView: () => {
this.playControlViewContainerBuilder()
// this.playControlViewContainerBuilder()
}, detailView: () => {
this.detailContainerBuilder()
}
})
.height('100%')
.width('100%')
.onClick(() => {
console.error('PlayerDetailContainer=== onClick')
this.playerController?.switchPlayOrPause();
})
}
.height('100%')
.width('100%')
.backgroundColor(Color.Black)
}
... ...
import { Action, ContentDetailDTO } from 'wdBean/Index';
import { ContentDetailRequest } from 'wdDetailPlayApi/Index'
import { ResponseDTO } from 'wdNetwork/Index';
import { DetailPlayShortVideoPage } from './DetailPlayShortVideoPage'
import { Test } from './Test'
import router from '@ohos.router';
import window from '@ohos.window';
@Entry
@Component
export struct DetailVideoListPage {
private contentId: string = ''
private relId: string = ''
private relType: string = ''
private swiperController: SwiperController = new SwiperController()
@State data: ContentDetailDTO[] = []
@State testData: string[] = ['111', '222', '333']
@State currentIndex: number = 0
async aboutToAppear(): Promise<void> {
console.error('=================',)
let data: ContentDetailDTO[] = []
let action: Action = router.getParams() as Action
if (action) {
this.contentId = action.params?.contentID || ''
if (action.params && action.params.extra) {
this.relId = action.params.extra.relId || ''
this.relType = action.params.extra.relType || ''
}
await ContentDetailRequest.getContentDetail({
contentId: this.contentId,
relId: this.relId,
relType: this.relType
}).then((resDTO: ResponseDTO<ContentDetailDTO[]>) => {
console.error('resDTO==', JSON.stringify(resDTO.data))
if (resDTO.data) {
data.push(resDTO.data[0])
}
})
}
await ContentDetailRequest.postRecommendVideoList({
pageSize: 10,
refreshCnt: 1
}).then(res => {
if (res.data) {
data = data.concat(res.data)
}
// this.data = res.data || []
console.log('res1===', JSON.stringify(res))
console.log('res==' + this.data)
})
this.data = data
console.error('aboutToAppear===', this.data.length)
}
build() {
Column() {
Swiper(this.swiperController) {
ForEach(this.data, (item: ContentDetailDTO, index: number) => {
Column() {
DetailPlayShortVideoPage({
contentDetailData: item,
currentIndex: this.currentIndex,
index: index
})
}.width('100%')
.height('100%')
}, (item: ContentDetailDTO) => item.newsId + '')
// ForEach(this.testData, (item: string, index: number) => {
// Column() {
// Test({ currentItem: item, currentIndex: this.currentIndex, index: index })
// }
// .width('100%')
// .height('100%')
// }, (item: string) => item)
}
.cachedCount(0)
.indicator(false)
.vertical(true)
.loop(false)
.width('100%')
.height('100%')
.onChange((index: number) => {
this.currentIndex = index
console.info('onChange==', index.toString())
})
}.width('100%').height('100%')
}
}
\ No newline at end of file
... ...
@Entry
@Component
export struct Test {
@Prop currentItem: string = '';
@Prop @Watch('currentIndexChange') currentIndex: number = 0;
@Prop index: number = 0;
currentIndexChange() {
console.log('currentIndexChange====', this.currentIndex);
}
build() {
Row() {
Column() {
Text('currentItem: ' + this.currentItem).fontSize(30)
Text('currentIndex: ' + this.currentIndex).fontSize(30)
Text('index: ' + this.index).fontSize(30)
}
}
}
}
\ No newline at end of file
... ...
/**
* 详情view&播放器view的容器布局组件
*/
@Entry
@Component
export struct PlayerDetailContainer {
@BuilderParam playerView: () => void
... ... @@ -77,9 +77,10 @@ export struct PlayerDetailContainer {
.zIndex(1)
}
.width('100%')
.height('100%')
// .aspectRatio(this.isFullScreen ? 0.1 : 16 / 9.0) // 若width值确定,当aspectRatio值越小,则height值越大
.height(this.isFullScreen ? '100%' : this.buildVideoHeight())
.margin({ top: this.isFullScreen ? 0 : this.buildVideoTo() })
// .height(this.isFullScreen ? '100%' : this.buildVideoHeight())
// .margin({ top: this.isFullScreen ? 0 : this.buildVideoTo() })
// .margin({ bottom: this.isFullScreen ? 0 : this.buildVideoBottom() })
.alignRules({
top: { anchor: '__container__', align: VerticalAlign.Top },
... ... @@ -102,5 +103,6 @@ export struct PlayerDetailContainer {
}
.width('100%')
.height('100%')
}
}
\ No newline at end of file
... ...
... ... @@ -29,33 +29,33 @@ export struct PlayerTitleComment {
build() {
Column() {
Column() {
Row() {
Image($r('app.media.ic_switch_orientation'))
.width(34)
.aspectRatio(1)
.objectFit(ImageFit.Contain)
.padding({ left: 10, right: 5 })
Text("全屏观看")
.fontColor(Color.White)
.fontSize('14fp')
.maxLines(2)
.layoutWeight(1)
}
.width(100)
.backgroundColor(Color.Gray)
.borderRadius(10)
.alignItems(VerticalAlign.Center)
.visibility(this.videoLandScape == 2 ? Visibility.Hidden : Visibility.Visible)
.onClick(() => {
this.isFullScreen = !this.isFullScreen;
WindowModel.shared.setPreferredOrientation(window.Orientation.LANDSCAPE);
devicePLSensorManager.devicePLSensorOn(window.Orientation.LANDSCAPE);
})
}
.width('100%')
// .margin({ bottom: 120 })
.alignItems(HorizontalAlign.Center)
// Column() {
// Row() {
// Image($r('app.media.ic_switch_orientation'))
// .width(34)
// .aspectRatio(1)
// .objectFit(ImageFit.Contain)
// .padding({ left: 10, right: 5 })
// Text("全屏观看")
// .fontColor(Color.White)
// .fontSize('14fp')
// .maxLines(2)
// .layoutWeight(1)
// }
// .width(100)
// .backgroundColor(Color.Gray)
// .borderRadius(10)
// .alignItems(VerticalAlign.Center)
// .visibility(this.videoLandScape == 2 ? Visibility.Hidden : Visibility.Visible)
// .onClick(() => {
// this.isFullScreen = !this.isFullScreen;
// WindowModel.shared.setPreferredOrientation(window.Orientation.LANDSCAPE);
// devicePLSensorManager.devicePLSensorOn(window.Orientation.LANDSCAPE);
// })
// }
// .width('100%')
// // .margin({ bottom: 120 })
// .alignItems(HorizontalAlign.Center)
Row() {
Column() {
... ...
... ... @@ -26,25 +26,48 @@ export class PlayViewModel {
canStart?: boolean
message?: string
constructor() {
constructor(contentId: string = '', relId: string = '', relType: string = '') {
// todo:
this.contentId = '30013266075'
this.relId = '500000301942'
this.relType = '1'
this.contentId = contentId // '30013266075'
this.relId = relId // '500000301942'
this.relType = relType // '1'
// this.getGlobalInfo();
}
playWithContentId(contentId: string) {
this.contentId = contentId;
this.getContentDetailData() // 包括播放地址PlayUrl
// this.getContentDetailData() // 包括播放地址PlayUrl
}
playWithIds(contentId: string, relId: string, relType: string) {
this.contentId = contentId;
this.relId = relId;
this.relType = relType;
this.getContentDetailData() // 包括播放地址PlayUrl
// this.getContentDetailData() // 包括播放地址PlayUrl
}
setContentDetailData(data: ContentDetailDTO | undefined) {
if (!data) {
Logger.error(TAG, 'setContentDetailData is empty');
return
}
Logger.info(TAG, JSON.stringify(data))
this.newsTitle = data.newsTitle
this.editorName = data.editorName
this.newsSummary = data.newsSummary
this.userInfo = data.userInfo
this.rmhInfo = data.rmhInfo
if (data.videoInfo?.length > 0) {
this.url = data.videoInfo[0].videoUrl
this.videoLandScape = data.videoInfo[0].videoLandScape
}
if (data.authorList?.length > 0) {
this.newsSourceName = data.authorList[0].authorName
}
this.canStart = true;
this.message = '';
}
getContentDetailData() {
... ...
{
"src": [
"pages/DetailPlayShortVideoPage"
"pages/DetailVideoListPage",
"pages/Test"
]
}
\ No newline at end of file
... ...
{
"lockfileVersion": 2,
"lockfileVersion": 1,
"ATTENTION": "THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.",
"specifiers": {
"@ohos/axios@^2.1.1": "@ohos/axios@2.2.0"
},
"packages": {
"@ohos/axios@2.2.0": {
"resolved": "https://repo.harmonyos.com/ohpm/@ohos/axios/-/axios-2.2.0.har",
"integrity": "sha512-v1QBWk6DfcN8wUW3D0ieFbHTR1taSI5cOgxp5l6B5cegXuNYhSc8ggKlAIXe6h/14LsfM+NW0ZGfSXcNEIM5yA==",
"registryType": "ohpm"
}
}
"specifiers": {},
"packages": {}
}
\ No newline at end of file
... ...
import { WDRouterRule } from 'wdRouter';
import { WDRouterPage } from 'wdRouter';
@Entry
@Component
struct GuidePages {
guideImage = [$r('app.media.guide_static1'), $r('app.media.guide_static2'), $r('app.media.guide_static3'), $r('app.media.guide_static4')]
guideTitle = [$r('app.media.guide_title1'), $r('app.media.guide_title2'), $r('app.media.guide_title3'), $r('app.media.guide_title4')]
guideIndex = [$r('app.media.guide_index1'), $r('app.media.guide_index2'), $r('app.media.guide_index3'), $r('app.media.guide_button')]
build() {
Column() {
Swiper() {
ForEach(this.guideImage, (item: number, index: number) => {
this.ChildItem(index)
}, (item: number) => JSON.stringify(item))
}.loop(false)
.indicator(false)
.width('100%')
.height('100%')
}.width('100%')
.height('100%')
}
@Builder
ChildItem(index: number) {
RelativeContainer() {
Image(this.guideImage[index])
.alignRules({
top: { anchor: "__container__", align: VerticalAlign.Top },
bottom: { anchor: "__container__", align: VerticalAlign.Bottom }
})
.width('100%')
.height('100%')
.id('image')
Image(this.guideTitle[index])
.objectFit(ImageFit.ScaleDown)
.alignRules({
bottom: { anchor: "__container__", align: VerticalAlign.Bottom },
left: { anchor: "__container__", align: HorizontalAlign.Start },
right: { anchor: "__container__", align: HorizontalAlign.End },
})
.margin({ left: 60, bottom: 150, right: 60 })
.alignSelf(ItemAlign.Center)
.id('title')
Image(this.guideIndex[index])
.objectFit(ImageFit.ScaleDown)
.alignRules({
bottom: { anchor: "__container__", align: VerticalAlign.Bottom },
left: { anchor: "__container__", align: HorizontalAlign.Start },
right: { anchor: "__container__", align: HorizontalAlign.End },
})
.margin({ bottom: 85 })
.height(40)
.onClick(() => {
if (index == 3) {
// 跳转到首页
WDRouterRule.jumpWithReplacePage(WDRouterPage.mainPage)
}
})
.id('index')
}.width('100%').height('100%')
}
}
\ No newline at end of file
... ...
export interface LoginBean {
// {"code":"0","data":{"firstMark":1,"id":569350079889669,"jwtToken":"eyJhbGciOiJIUzI1NiIsImtpZCI6ImQ4WkI2QkhxSEZrdjJ2U25BNlRwZEdKRjBHcjItVzBvS2FaYzdLOUUycmcifQ.eyJpc3MiOiJwZW9wbGVzLWRhaWx5LWZvdXJhIiwic3ViIjoicGVvcGxlcy1kYWlseS1mb3VyYSIsImV4cCI6MTcxMDY0NzE0MiwidXNlcklkIjo1NjkzNTAwNzk4ODk2NjksInVzZXJWZXJzaW9uIjoiNTY5MzUwMDc5ODg5NjY5XzAiLCJ1c2VyTmFtZSI6IiVFNCVCQSVCQSVFNiVCMCU5MSVFNiU5NyVBNSVFNiU4QSVBNSVFNyVCRCU5MSVFNSU4RiU4QjJrRDJ4VyIsInVzZXJUeXBlIjoxLCJjcmVhdG9ySWQiOm51bGx9.1M0E_6V60opL7AxamGzINpieTHP11fRbiXKDPc-ywWg","longTimeNoLoginMark":0,"refreshToken":"83fe2f1a-77af-4f73-8490-1cebed037f73","status":1,"userName":"人民日报网友2kD2xW","userType":1},"message":"Success","success":true,"timestamp":1710467142214}
// {"code":"0",
// "data":{
// "firstMark":1,
// "id":569350079889669,
// "jwtToken":"eyJhbGciOiJIUzI1NiIsImtpZCI6ImQ4WkI2QkhxSEZrdjJ2U25BNlRwZEdKRjBHcjItVzBvS2FaYzdLOUUycmcifQ.eyJpc3MiOiJwZW9wbGVzLWRhaWx5LWZvdXJhIiwic3ViIjoicGVvcGxlcy1kYWlseS1mb3VyYSIsImV4cCI6MTcxMDY0NzE0MiwidXNlcklkIjo1NjkzNTAwNzk4ODk2NjksInVzZXJWZXJzaW9uIjoiNTY5MzUwMDc5ODg5NjY5XzAiLCJ1c2VyTmFtZSI6IiVFNCVCQSVCQSVFNiVCMCU5MSVFNiU5NyVBNSVFNiU4QSVBNSVFNyVCRCU5MSVFNSU4RiU4QjJrRDJ4VyIsInVzZXJUeXBlIjoxLCJjcmVhdG9ySWQiOm51bGx9.1M0E_6V60opL7AxamGzINpieTHP11fRbiXKDPc-ywWg",
// "longTimeNoLoginMark":0,
// "refreshToken":"83fe2f1a-77af-4f73-8490-1cebed037f73",
// "status":1,
// "userName":"人民日报网友2kD2xW",
// "userType":1
// },"message":"Success","success":true,"timestamp":1710467142214}
firstMark: number
id: number
jwtToken: string
... ...
... ... @@ -305,7 +305,7 @@ struct LoginPage {
router.back({
params: { userName: data.userName,
userId:data.id},
url: 'pages/MainPage'
url: `${WDRouterPage.getBundleInfo()}`
}
)
})
... ...
... ... @@ -3,6 +3,14 @@
{
"name": "white",
"value": "#FFFFFF"
},
{
"name": "start_window_background",
"value": "#FFFFFF"
},
{
"name": "color_F9F9F9",
"value": "#F9F9F9"
}
]
}
\ No newline at end of file
... ...
... ... @@ -5,6 +5,7 @@
"pages/login/ForgetPasswordPage",
"pages/login/LoginProtocolWebview",
"pages/login/SettingPasswordPage",
"pages/login/SettingPasswordLayout"
"pages/login/SettingPasswordLayout",
"pages/guide/GuidePages"
]
}
... ...
... ... @@ -72,7 +72,7 @@ export class WDPlayerController {
if (this.startTime) {
this.setSeekTime(this.startTime, SliderChangeMode.Begin);
}
this.avPlayer.play();
// this.avPlayer.play();
this.duration = this.avPlayer.duration;
break;
case AVPlayerStatus.PLAYING:
... ... @@ -162,6 +162,16 @@ export class WDPlayerController {
this.avPlayer.pause();
}
async play() {
if (this.avPlayer == null) {
await this.initPromise;
}
if (this.avPlayer == null) {
return
}
this.avPlayer.play();
}
async stop() {
if (this.avPlayer == null) {
await this.initPromise;
... ...
... ... @@ -80,6 +80,9 @@ export struct WDPlayerRenderView {
})
.onLoad(async (event) => {
Logger.info(TAG, 'onLoad')
let surfaceId = this.xComponentController.getXComponentSurfaceId()
console.log('surfaceId===', surfaceId)
console.log('insId===', this.insId)
this.xComponentController.setXComponentSurfaceSize({
surfaceWidth: 1920,
surfaceHeight: 1080
... ... @@ -94,7 +97,7 @@ export struct WDPlayerRenderView {
}
.id(this.insId)
.onAreaChange(() => {
this.updateLayout()
// this.updateLayout()
})
.backgroundColor("#000000")
.justifyContent(FlexAlign.Center)
... ...
{
"name": "entry",
"name": "phone",
"lockfileVersion": 2,
"requires": true,
"packages": {}
... ...
@Component
export struct AVPlayer {
@State outSetValueOne:number = 40
build() {
Column(){
// 进度条
Row(){
Slider({
value: this.outSetValueOne,
min: 0,
max: 100,
style: SliderStyle.OutSet
})
.trackColor('rgba(0,0,0,0.5)')
.selectedColor('#ED2800')
.showTips(true)
.onChange((value: number, mode: SliderChangeMode) => {
this.outSetValueOne = value
console.info('value:' + value + 'mode:' + mode.toString())
})
}
.width('100%')
.padding({left:24,right:24})
.margin({top:110})
// 播放按钮
Row(){
Image($r('app.media.loop'))
.width(24)
.height(24)
Image($r('app.media.Backward'))
.width(24)
.height(24)
Stack(){
Image($r("app.media.playicon"))
.width(32)
.height(32)
}
.backgroundColor('rgba(255,255,255,0.1)')
.width(60)
.height(60)
.padding(14)
.borderRadius(50)
.onClick(()=>{
// this.avPlayerUrl()
})
Image($r('app.media.fastForward'))
.width(24)
.height(24)
Image($r('app.media.doubleSpeed'))
.width(24)
.height(24)
}
.width('100%')
.justifyContent(FlexAlign.SpaceBetween)
.margin({top:56})
.padding({left:32,right:32})
}
}
}
\ No newline at end of file
... ...
... ... @@ -32,7 +32,8 @@ export default class EntryAbility extends UIAbility {
.catch((err: Error) => {
hilog.error(0x0000, 'testTag', `setPreferredOrientation catch, error error.name : ${err.name}, error.message:${err.message}`);
})
windowStage.loadContent('pages/MainPage', (err, data) => {
//../../../../../../features/wdLogin/src/main/ets/pages/launchPage/LaunchPage
windowStage.loadContent('pages/launchPage/LaunchPage', (err, data) => {
if (err.code) {
hilog.error(0x0000, 'testTag', 'Failed to load the content. Cause: %{public}s', JSON.stringify(err) ?? '');
return;
... ...
... ... @@ -4,6 +4,7 @@ import { BreakpointConstants } from 'wdConstant';
import { BreakpointSystem, Logger } from 'wdKit';
import router from '@ohos.router';
const TAG = 'MainPage';
@Entry
... ...
import media from '@ohos.multimedia.media';
import { Song } from '../viewModel/Song'
import { AVPlayer } from '../../components/AVPlayer'
@Entry
@Component
struct AudioDetail {
@State message: string = '大自然的奇迹展览在中国国家博物馆拉开帷幕';
@State iocClock: string = '定时';
@State iconTheOriginal: string = '原文';
@State iconList: string = '列表';
@State text: string = ''
@State showList: boolean = false
controller: TextInputController = new TextInputController()
// 音频
@State songs: Song[] = []
// private avPlayer:media.AVPlayer
async aboutToAppear() {
//加载音乐列表
// let response = await axios({
// method:'get',
// url:''
// })
// //创建avPlayer实例对象
// this.avPlayer = await media.createAVPlayer()
// //创建状态机变化回调函数
// this.setAVPlayerCallback()
// // this.avPlayer.url =
}
// 注册avplayer回调函数
// setAVPlayerCallback() {
// // seek操作结果回调函数
// this.avPlayer.on('seekDone', (seekDoneTime) => {
// console.info(`AVPlayer seek succeeded, seek time is ${seekDoneTime}`);
// })
// // error回调监听函数,当avPlayer在操作过程中出现错误时调用reset接口触发重置流程
// this.avPlayer.on('error', (err) => {
// console.error(`Invoke avPlayer failed, code is ${err.code}, message is ${err.message}`);
// this.avPlayer.reset(); // 调用reset重置资源,触发idle状态
// })
// // 状态机变化回调函数
// this.avPlayer.on('stateChange', async (state, reason) => {
// switch (state) {
// case 'idle': // 成功调用reset接口后触发该状态机上报
// console.info('AVPlayer state idle called.');
// this.avPlayer.release(); // 调用release接口销毁实例对象
// break;
// case 'initialized': // avplayer 设置播放源后触发该状态上报
// console.info('AVPlayerstate initialized called.');
// this.avPlayer.prepare().then(() => {
// console.info('AVPlayer prepare succeeded.');
// })
// break;
// case 'prepared': // prepare调用成功后上报该状态机
// console.info('AVPlayer state prepared called.');
// this.avPlayer.play(); // 调用播放接口开始播放
// break;
// case 'playing': // play成功调用后触发该状态机上报
// console.info('AVPlayer state playing called.');
// break;
// case 'paused': // pause成功调用后触发该状态机上报
// console.info('AVPlayer state paused called.');
// this.avPlayer.play(); // 再次播放接口开始播放
// break;
// case 'completed': // 播放结束后触发该状态机上报
// console.info('AVPlayer state completed called.');
// this.avPlayer.stop(); //调用播放结束接口
// break;
// case 'stopped': // stop接口成功调用后触发该状态机上报
// console.info('AVPlayer state stopped called.');
// this.avPlayer.reset(); // 调用reset接口初始化avplayer状态
// break;
// case 'released':
// console.info('AVPlayer state released called.');
// break;
// default:
// console.info('AVPlayer state unknown called.');
// break;
// }
// })
// }
build() {
Column() {
Row() {
Column() {
// 封面
Row() {
Image($r('app.media.audio'))
.width(240)
.height(160)
.borderRadius('0.00vp')
}
.justifyContent(FlexAlign.Center)
.width('100%')
.margin({ top: 64 })
// 标题
Row() {
Text(this.message)
.fontSize(20)
.fontWeight(FontWeight.Bold)
.fontColor('#ffffff')
.textAlign(TextAlign.Center)
.lineHeight(28)
.fontFamily('PingFang SC, PingFang SC')
}
.padding({ left: 34, right: 34 })
.margin({ top: 32 })
// 操作矩阵
Row() {
// 定时
Column() {
Image($r('app.media.clock'))
.width(28)
.height(28)
Text(this.iocClock)
.fontColor('#fff')
.fontSize(12)
.lineHeight(16)
.margin(2)
}
// 原文
Column() {
Image($r('app.media.theOriginal'))
.width(28)
.height(28)
Text(this.iconTheOriginal)
.fontColor('#fff')
.fontSize(12)
.lineHeight(16)
.margin(2)
}
// 列表
Column() {
Image($r('app.media.list'))
.width(28)
.height(28)
Text(this.iconList)
.fontColor('#fff')
.fontSize(12)
.lineHeight(16)
.margin(2)
}
.onClick(() => {
this.showList = !this.showList
console.log('列表', this.showList)
})
}
.width('100%')
.padding({ left: 49, right: 49 })
.justifyContent(FlexAlign.SpaceBetween)
.margin({ top: 60 })
AVPlayer()
}
}
.height('100%-56')
Row() {
Image($r('app.media.leftArrow'))
.width(24)
.height(24)
TextInput({ text: this.text, placeholder: 'input your word...', controller: this.controller })
.placeholderColor('#999999')
.placeholderFont({ size: 12, weight: 400 })
.caretColor(Color.White)
.height(30)
.width(115)
.fontSize(12)
.fontColor('#999999')
.backgroundColor('rgba(255,255,255,0.1)')
.borderRadius(0)
.backgroundColor('[UIColor colorWithRed:255/255.0 green:255/255.0 blue:255/255.0 alpha:1.0].CGColor')
.onChange((value: string) => {
this.text = value
})
// 消息
Badge({
count: 100,
style: { fontSize: 12, badgeColor: '#FA2A2D' },
}) {
Image($r('app.media.news'))
.width(24)
.height(24)
}
// 点赞
Badge({
count: 100,
style: { fontSize: 12, badgeColor: '#FA2A2D' },
}) {
Image($r('app.media.like'))
.width(24)
.height(24)
}
// 收藏
Image($r('app.media.collection'))
.width(24)
.height(24)
// 分享
Image($r('app.media.share'))
.width(24)
.height(24)
}
.height(56)
.width('100%')
.padding(13)
.justifyContent(FlexAlign.SpaceBetween)
// 播放列表
}
.height('100%')
.backgroundColor('#20272E')
.justifyContent(FlexAlign.SpaceBetween)
}
}
\ No newline at end of file
... ...
import { Logger } from 'wdKit';
import { MultiPictureDetailPageComponent } from 'wdComponent';
import router from '@ohos.router';
import { Params, Action } from 'wdBean';
const TAG = 'MultiPictureDetailPage';
... ... @@ -10,10 +12,18 @@ const TAG = 'MultiPictureDetailPage';
@Component
struct MultiPictureDetailPage {
@State relId: string = ''
@State contentId: string = ''
@State relType: string = ''
build() {
Row() {
Column() {
MultiPictureDetailPageComponent()
MultiPictureDetailPageComponent({
relId: this.relId,
contentId: this.contentId,
relType: this.relType
})
}
}
}
... ... @@ -28,7 +38,13 @@ struct MultiPictureDetailPage {
}
aboutToAppear() {
let par:Action = router.getParams() as Action;
let params = par?.params;
this.relId = params?.extra?.relId || '';
this.relType = params?.extra?.relType || '';
this.contentId = params?.contentID || '';
Logger.info(TAG, 'aboutToAppear');
Logger.info(TAG, 'params', JSON.stringify(params));
}
aboutToDisappear() {
... ...
import router from '@ohos.router'
import { WDRouterRule } from 'wdRouter';
import { WDRouterPage } from 'wdRouter';
@Entry
@Component
struct LaunchAdvertisingPage {
@State time: number = 4
timer :number = -1
enter() {
// router.replaceUrl({
// url:'pages/MainPage'
// })
WDRouterRule.jumpWithReplacePage(WDRouterPage.mainPage)
}
onPageShow(){
this.timer = setInterval(() => {
this.time--
if (this.time < 1) {
this.enter()
clearInterval(this.timer)
}
},1000)
}
build(){
Column(){
Stack({alignContent:Alignment.Bottom}){
Stack({alignContent:Alignment.Bottom}){
Column(){
Image($r('app.media.app_icon'))
.margin({
top:'128lpx',left:'48lpx',right:'48lpx',bottom:'128lpx'
})
}
.justifyContent(FlexAlign.Center)
.width('100%')
.height('100%')
.margin({
bottom: 0
})
Stack({alignContent:Alignment.TopEnd}){
Button(){
Text(this.time + 's 跳过')
.fontSize('27lpx')
.fontColor(Color.White)
.margin({left:'28lpx',right:'28lpx'})
}
.width('148lpx')
.height('56lpx')
.margin({top:'54lpx',right:'19lpx'})
.backgroundColor('#80000000')
.onClick(() => {
this.enter()
})
}
.width('100%')
.height('100%')
Button(){
Row(){
Text('点击跳转至详情或第三方应用')
.fontSize('31lpx')
.fontColor(Color.White)
.margin({
left:'55lpx'
})
Image($r('app.media.Slice'))
.width('46lpx')
.height('46lpx')
.margin({right:'55lpx'})
}.alignItems(VerticalAlign.Center)
}
.width('566lpx')
.height('111lpx')
.margin({
bottom: '51lpx'
})
.backgroundColor('#80000000')
}
}
.width('100%')
.height('84%')
.backgroundColor('#FF6C75')
.margin({top:'0'})
Image($r('app.media.LaunchPage_logo'))
.width('278lpx')
.height('154lpx')
.margin({bottom: '48lpx'})
}
.width('100%')
.height('100%')
.backgroundColor(Color.White)
}
}
\ No newline at end of file
... ...
import media from '@ohos.multimedia.media'
import App from '@system.app'
import Router from '@system.router'
import router from '@ohos.router'
import common from '@ohos.app.ability.common'
import CustomDialogComponent from '../view/CustomDialogComponent'
import preferences from '@ohos.data.preferences'
import { GlobalContext } from '../../utils/GlobalContext'
import { WDRouterRule } from 'wdRouter';
import { WDRouterPage } from 'wdRouter';
@Entry
@Component
struct LaunchPage {
private context?: common.UIAbilityContext;
private timerId: number = 0;
private isJumpToAdvertising: boolean = false;
private isJumpToGuide: boolean = false;
dialogController: CustomDialogController = new CustomDialogController({
builder: CustomDialogComponent(
{
cancel: () => {
this.onCancel();
},
confirm: () => {
this.onConfirm();
}
}),
alignment: DialogAlignment.Center,
offset: { dx: 0, dy: '-24' },
customStyle: true,
autoCancel: false
});
onCancel() {
// Exit the application.
this.context?.terminateSelf();
}
onConfirm() {
// Save privacy agreement status.
this.saveIsPrivacy();
//跳转引导页
this.jumpToGuidePage();
}
jumpToAdvertisingPage() {
this.timerId = setTimeout(() => {
this.isJumpToAdvertising = true;
WDRouterRule.jumpWithPage(WDRouterPage.launchAdvertisingPage)
// router.pushUrl({
// url: 'pages/LaunchAdvertisingPage'
// }).catch((error: Error) => {
// //Logger.error(CommonConstants.LAUNCHER_PAGE_TAG, 'LauncherPage pushUrl error ' + JSON.stringify(error));
// });
}, 1000);
}
jumpToGuidePage() {
this.timerId = setTimeout(() => {
this.isJumpToGuide = true;
WDRouterRule.jumpWithPage(WDRouterPage.guidePage)
// router.pushUrl({
// url: 'pages/LaunchAdvertisingPage'
// }).catch((error: Error) => {
// //Logger.error(CommonConstants.LAUNCHER_PAGE_TAG, 'LauncherPage pushUrl error ' + JSON.stringify(error));
// });
}, 1000);
}
onPageShow() {
this.context = getContext(this) as common.UIAbilityContext;
// Get the operation class for saving data.
this.getDataPreferences(this).then((preferences: preferences.Preferences) => {
preferences.get('isPrivacy', true).then((value: preferences.ValueType) => {
//Logger.info(CommonConstants.LAUNCHER_PAGE_TAG, 'onPageShow value: ' + value);
if (value) {
// let isJumpPrivacy: boolean = globalThis.isJumpPrivacy ?? false;
// let isJumpPrivacy: boolean = (GlobalContext.getContext().getObject('isJumpPrivacy') as boolean) ?? false;
//if (!isJumpPrivacy) {
this.dialogController.open();
// }
} else {
//跳转广告页
this.jumpToAdvertisingPage();
}
});
});
}
onPageHide() {
if (this.isJumpToAdvertising) {
router.clear();
}
if (this.isJumpToGuide) {
router.clear();
}
// globalThis.isJumpPrivacy = true;
// GlobalContext.getContext().setObject('isJumpPrivacy', true);
clearTimeout(this.timerId);
this.dialogController.close();
}
getDataPreferences(common: Object) {
return preferences.getPreferences(getContext(common), 'myStore');
}
saveIsPrivacy() {
let preferences: Promise<preferences.Preferences> = this.getDataPreferences(this);
preferences.then((result: preferences.Preferences) => {
let privacyPut = result.put('isPrivacy', false);
result.flush();
privacyPut.then(() => {
//Logger.info('LauncherPage', 'Put the value of startup Successfully.');
}).catch((err: Error) => {
//Logger.error('LauncherPage', 'Put the value of startup Failed, err: ' + err);
});
}).catch((err: Error) => {
//Logger.error('LauncherPage', 'Get the preferences Failed, err: ' + err);
});
}
build(){
Stack({alignContent:Alignment.Bottom}){
Image($r('app.media.app_icon'))
.width('278lpx')
.height('154lpx')
.margin({
bottom:'48lpx'
})
}
.width('100%')
.height('100%')
.backgroundColor(Color.White)
}
}
\ No newline at end of file
... ...
import webview from '@ohos.web.webview';
import router from '@ohos.router';
import { GlobalContext } from '../../utils/GlobalContext'
import { WDRouterRule } from 'wdRouter';
@Entry
@Component
struct PrivacyPage {
@State message: string = 'Hello World'
webController: webview.WebviewController = new webview.WebviewController();
//@State params: object = router.getParams();
build() {
Row() {
Column() {
// Web component loading H5.
Web({ src: 'https://www.baidu.com', controller: this.webController })
.zoomAccess(false)
.width('100%')
.height('100%')
.aspectRatio(1)
// .onConfirm((event) => {
// AlertDialog.show({
// message: Const.WEB_ALERT_DIALOG_TEXT_VALUE + event?.message,
// confirm: {
// value: $r('app.string.web_alert_dialog_button_value'),
// action: () => {
// event?.result.handleConfirm();
// }
// },
// cancel: () => {
// event?.result.handleCancel();
// }
// });
// return true;
// })
// .onErrorReceive((event) => {
// if (event?.error.getErrorInfo() === 'ERR_INTERNET_DISCONNECTED') {
// prompt.showToast({
// message: $r('app.string.internet_err'),
// duration: Const.WebConstant_DURATION
// })
// }
// if (event?.error.getErrorInfo() === 'ERR_CONNECTION_TIMED_OUT') {
// prompt.showToast({
// message: $r('app.string.internet_err'),
// duration: Const.WebConstant_DURATION
// })
// }
// })
// .onProgressChange((event) => {
// if (event?.newProgress === Const.WebConstant_PROGRESS_MAX) {
// this.isLoading = false;
// clearInterval(this.intervalLoading);
// this.intervalLoading = -1;
// }
// })
}
.width('100%')
}
.height('100%')
}
}
\ No newline at end of file
... ...
import router from '@ohos.router';
import { GlobalContext } from '../../utils/GlobalContext'
import { NavigatorModel } from '../viewModel/NavigatorModel';
import { WDRouterRule } from 'wdRouter';
import { WDRouterPage } from 'wdRouter';
import { Params } from 'wdBean';
@CustomDialog
export default struct CustomDialogComponent {
controller: CustomDialogController = new CustomDialogController({'builder': ''})
cancel: Function = () => {}
confirm: Function = () => {}
build(){
Column(){
Text($r('app.string.dialog_text_title'))
.width("90%")
.fontColor($r('app.color.dialog_text_color'))
.fontSize($r('app.float.dialog_text_privacy_size'))
.textAlign(TextAlign.Center)
.fontWeight('500')
.margin({
top: $r('app.float.dialog_text_privacy_top'),
bottom: $r('app.float.dialog_text_privacy_bottom')
})
Text($r('app.string.dialog_text_subTitle'))
.fontSize($r('app.float.dialog_common_text_size'))
.width('90%')
Text($r('app.string.dialog_text_privacy_content'))
.fontSize($r('app.float.dialog_common_text_size'))
.width('90%')
Row(){
// Button(){
// Text($r('app.string.privacy_text_title_policy'))
// .fontSize('27lpx')
// .fontColor(Color.Red)
// .margin({left:'10lpx',right:'10lpx'})
// }
// .width('90%')
// .height('56lpx')
// .margin({top:'54lpx',right:'19lpx'})
// .backgroundColor('#80000000')
// .onClick(() => {
//
// })
// Button(){
// Text($r('app.string.privacy_text_title_protocol'))
// .fontSize('27lpx')
// .fontColor(Color.Red)
// .margin({left:'10lpx',right:'10lpx'})
// }
// .width('90%')
// .height('56lpx')
// .margin({top:'54lpx',right:'19lpx'})
// .backgroundColor('#80000000')
// .onClick(() => {
//
// })
// Navigator({ target: 'pages/PrivacyPage', type: NavigationType.Push }) {
// Button($r('app.string.privacy_text_title_policy'))
// .onClick(()=>{
// GlobalContext.getContext().setObject('isJumpPrivacy', true);
// })
// {
// // Text($r('app.string.privacy_text_title_policy'))
// // .fontSize($r('app.float.dialog_common_text_size'))
// // .width('50%')
// // .fontColor(Color.Red)
// // .onClick(() => {
// // GlobalContext.getContext().setObject('isJumpPrivacy', true);
// // })
// }
// .fancy(Const.MainConstant_BUTTON_MARGIN_TOP)
// }
// .params({ path: 'https://www.baidu.com', tips: '在线' } as NavigatorModel)
Text($r('app.string.privacy_text_title_policy'))
.fontSize($r('app.float.dialog_common_text_size'))
.width('40%')
.fontColor(Color.Red)
.onClick(() => {
let bean={contentId:"1",pageID:""} as Params
WDRouterRule.jumpWithPage(WDRouterPage.loginProtocolPage,bean)
//GlobalContext.getContext().setObject('isJumpPrivacy', true);
//WDRouterRule.jumpWithPage(WDRouterPage.privacyPage)
// router.pushUrl({
// url: 'pages/PrivacyPage'
// }).catch((error: Error) => {
// //Logger.error(CommonConstants.CUSTOM_DIALOG_TAG, 'CustomDialog pushUrl error ' + JSON.stringify(error));
// });
})
Text($r('app.string.privacy_text_title_protocol'))
.fontSize($r('app.float.dialog_common_text_size'))
.width('40%')
.fontColor(Color.Red)
.onClick(() => {
let bean={contentId:"2",pageID:""} as Params
WDRouterRule.jumpWithPage(WDRouterPage.loginProtocolPage,bean)
//GlobalContext.getContext().setObject('isJumpPrivacy', true);
//WDRouterRule.jumpWithPage(WDRouterPage.privacyPage)
// router.pushUrl({
// url: 'pages/PrivacyPage'
// }).catch((error: Error) => {
// //Logger.error(CommonConstants.CUSTOM_DIALOG_TAG, 'CustomDialog pushUrl error ' + JSON.stringify(error));
// });
})
}
.margin({
top:'36lpx',
bottom:'21lpx'
})
Text($r('app.string.dialog_text_privacy_statement'))
.width('90%')
.fontColor($r('app.color.dialog_text_color'))
.fontSize($r('app.float.dialog_common_text_size'))
Row() {
Text($r('app.string.dialog_button_disagree'))
.fancy()
.onClick(() => {
this.controller.close();
this.cancel();
})
Blank()
.backgroundColor($r('app.color.dialog_blank_background_color'))
.width($r('app.float.dialog_blank_width'))
.height($r('app.float.dialog_blank_height'))
Text($r('app.string.dialog_button_agree'))
.fancyAgree()
.onClick(() => {
this.controller.close();
this.confirm();
})
}
.margin({ bottom: '21lpx',top:'42lpx' })
}
.width('528lpx')
.borderRadius('15')
.backgroundColor(Color.White)
}
}
// Common text styles.
@Extend(Text) function fancy () {
.fontColor($r("app.color.dialog_fancy_text_left_color"))
.fontSize($r("app.float.dialog_fancy_text_size"))
.textAlign(TextAlign.Center)
.fontWeight(FontWeight.Medium)
.layoutWeight('1')
}
// Common text styles.
@Extend(Text) function fancyAgree () {
.fontColor($r("app.color.dialog_fancy_text_right_color"))
.fontSize($r("app.float.dialog_fancy_text_size"))
.textAlign(TextAlign.Center)
.fontWeight(FontWeight.Medium)
.layoutWeight('1')
}
\ No newline at end of file
... ...
/**
* NewsData params info.
*/
export class NavigatorModel {
/**
* Jumping Path.
*/
path: Resource | string = '';
/**
* Prompt message.
*/
tips: Resource | string = '';
}
\ No newline at end of file
... ...
export class Song{
}
\ No newline at end of file
... ...
export class GlobalContext {
private constructor() { }
private static instance: GlobalContext;
private _objects = new Map<string, Object>();
public static getContext(): GlobalContext {
if (!GlobalContext.instance) {
GlobalContext.instance = new GlobalContext();
}
return GlobalContext.instance;
}
getObject(value: string): Object | undefined {
return this._objects.get(value);
}
setObject(key: string, objectClass: Object): void {
this._objects.set(key, objectClass);
}
}
\ No newline at end of file
... ...
... ... @@ -3,6 +3,54 @@
{
"name": "start_window_background",
"value": "#FFFFFF"
},
{
"name": "color_F9F9F9",
"value": "#F9F9F9"
},
{
"name": "privacy_back_text",
"value": "#007DFF"
},
{
"name": "launcher_text_title_color",
"value": "#182431"
},
{
"name": "launcher_text_introduce_color",
"value": "#182431"
},
{
"name": "advertising_text_title_color",
"value": "#182431"
},
{
"name": "advertising_text_background_color",
"value": "#33000000"
},
{
"name": "home_page_text_color",
"value": "#14224D"
},
{
"name": "dialog_fancy_text_left_color",
"value": "#999999"
},
{
"name": "dialog_fancy_text_right_color",
"value": "#ED2800"
},
{
"name": "dialog_text_color",
"value": "#222222"
},
{
"name": "dialog_blank_background_color",
"value": "#F5F5F5"
},
{
"name": "dialog_text_statement_color",
"value": "#007DFF"
}
]
}
... ...
{
"float": [
{
"name": "float_1",
"value": "30.6"
},
{
"name": "launcher_logo_size",
"value": "119vp"
},
{
"name": "launcher_life_text_width",
"value": "105vp"
},
{
"name": "launcher_life_text_height",
"value": "35vp"
},
{
"name": "launcher_text_title_size",
"value": "26fp"
},
{
"name": "launcher_text_introduce_size",
"value": "16fp"
},
{
"name": "launcher_text_opacity",
"value": "0.6"
},
{
"name": "advertising_text_opacity",
"value": "0.4"
},
{
"name": "advertising_image_width",
"value": "54vp"
},
{
"name": "advertising_image_height",
"value": "54vp"
},
{
"name": "advertising_text_font_size",
"value": "12fp"
},
{
"name": "advertising_text_introduce_size",
"value": "16fp"
},
{
"name": "advertising_text_title_size",
"value": "26fp"
},
{
"name": "advertising_text_border_width",
"value": "1"
},
{
"name": "advertising_title_text_margin_top",
"value": "30vp"
},
{
"name": "advertising_title_text_margin_left",
"value": "260vp"
},
{
"name": "advertising_text_padding_top",
"value": "8vp"
},
{
"name": "advertising_text_padding_bottom",
"value": "8vp"
},
{
"name": "advertising_text_padding_left",
"value": "12vp"
},
{
"name": "advertising_text_padding_right",
"value": "12vp"
},
{
"name": "advertising_text_radius",
"value": "18vp"
},
{
"name": "dialog_blank_height",
"value": "32vp"
},
{
"name": "dialog_blank_width",
"value": "1vp"
},
{
"name": "dialog_common_text_size",
"value": "18fp"
},
{
"name": "dialog_text_privacy_size",
"value": "20fp"
},
{
"name": "dialog_fancy_text_size",
"value": "18fp"
},
{
"name": "dialog_text_button_left_color",
"value": "#999999"
},
{
"name": "dialog_text_button_right_color",
"value": "#ED2800"
},
{
"name": "dialog_text_privacy_bottom",
"value": "23lpx"
},
{
"name": "dialog_text_privacy_top",
"value": "38lpx"
},
{
"name": "dialog_text_declaration_bottom",
"value": "24"
},
{
"name": "dialog_text_opacity",
"value": "0.6"
},
{
"name": "privacy_text_title_size",
"value": "20fp"
},
{
"name": "privacy_back_text_size",
"value": "20fp"
},
{
"name": "privacy_text_margin_top",
"value": "10"
},
{
"name": "privacy_text_margin_bottom",
"value": "10"
},
{
"name": "privacy_bottom_text_margin",
"value": "12"
},
{
"name": "privacy_text_content_left",
"value": "24"
},
{
"name": "privacy_text_content_right",
"value": "24"
},
{
"name": "home_page_text_size",
"value": "30vp"
}
]
}
\ No newline at end of file
... ...
... ... @@ -11,6 +11,39 @@
{
"name": "EntryAbility_label",
"value": "$string:app_name"
},
{
"name": "dialog_text_title",
"value": "个人隐私保护指引"
},
{
"name": "dialog_text_subTitle",
"value": "欢迎您使用人民日报客户端!"
},
{
"name": "dialog_text_privacy_content",
"value": "为了更好地为您提供阅读新闻、发布评论等相关服务,我们会根据您使用服务的具体功能需要,收集必要的用户信息。您可通过阅读《隐私政策》和《用户协议》了解我们收集、使用、存储和共享个人信息的情况,以及对您个人隐私的保护措施。人民日报客户端深知个人信息对您的重要性,我们将以最高标准遵守法律法规要求,尽全力保护您的个人信息安全。"
},
{
"name": "dialog_text_privacy_statement",
"value": "如您同意,请点击“同意”开始接受"
},
{
"name": "dialog_button_disagree",
"value": "暂不使用"
},
{
"name": "dialog_button_agree",
"value": "同意"
},
{
"name": "privacy_text_title_policy",
"value": "《隐私政策》"
},
{
"name": "privacy_text_title_protocol",
"value": "《用户协议》"
}
]
}
\ No newline at end of file
... ...
... ... @@ -5,6 +5,10 @@
"pages/ENewspaper",
"pages/ImageAndTextDetailPage",
"pages/MorningEveningPaperPage",
"pages/detail/MultiPictureDetailPage"
"pages/detail/AudioDetail",
"pages/detail/MultiPictureDetailPage",
"pages/launchPage/PrivacyPage",
"pages/launchPage/LaunchPage",
"pages/launchPage/LaunchAdvertisingPage"
]
}
... ...
... ... @@ -11,6 +11,39 @@
{
"name": "EntryAbility_label",
"value": "$string:app_name"
},
{
"name": "dialog_text_title",
"value": "个人隐私保护指引"
},
{
"name": "dialog_text_subTitle",
"value": "欢迎您使用人民日报客户端!"
},
{
"name": "dialog_text_privacy_content",
"value": "为了更好地为您提供阅读新闻、发布评论等相关服务,我们会根据您使用服务的具体功能需要,收集必要的用户信息。您可通过阅读《隐私政策》和《用户协议》了解我们收集、使用、存储和共享个人信息的情况,以及对您个人隐私的保护措施。人民日报客户端深知个人信息对您的重要性,我们将以最高标准遵守法律法规要求,尽全力保护您的个人信息安全。"
},
{
"name": "dialog_text_privacy_statement",
"value": "如您同意,请点击“同意”开始接受"
},
{
"name": "dialog_button_disagree",
"value": "暂不使用"
},
{
"name": "dialog_button_agree",
"value": "同意"
},
{
"name": "privacy_text_title_policy",
"value": "《隐私政策》"
},
{
"name": "privacy_text_title_protocol",
"value": "《用户协议》"
}
]
}
\ No newline at end of file
... ...
{
"code": "0",
"message": "Success",
"requestId": "9a63f8f9e61d442880a7537763fd1769",
"success": true,
"timestamp": 1711589284588
}
\ No newline at end of file
... ...
This diff could not be displayed because it is too large.
{
"code": "0",
"data": null,
"message": "Success",
"meta": null,
"requestId": "",
"success": true,
"timestamp": 1711609914928
}
\ No newline at end of file
... ...
{
"code": "0",
"data": null,
"message": "Success",
"meta": null,
"requestId": "",
"success": true,
"timestamp": 1711609966231
}
\ No newline at end of file
... ...
... ... @@ -11,6 +11,38 @@
{
"name": "EntryAbility_label",
"value": "$string:app_name"
},
{
"name": "dialog_text_title",
"value": "个人隐私保护指引"
},
{
"name": "dialog_text_subTitle",
"value": "欢迎您使用人民日报客户端!"
},
{
"name": "dialog_text_privacy_content",
"value": "为了更好地为您提供阅读新闻、发布评论等相关服务,我们会根据您使用服务的具体功能需要,收集必要的用户信息。您可通过阅读《隐私政策》和《用户协议》了解我们收集、使用、存储和共享个人信息的情况,以及对您个人隐私的保护措施。人民日报客户端深知个人信息对您的重要性,我们将以最高标准遵守法律法规要求,尽全力保护您的个人信息安全。"
},
{
"name": "dialog_text_privacy_statement",
"value": "如您同意,请点击“同意”开始接受"
},
{
"name": "dialog_button_disagree",
"value": "暂不使用"
},
{
"name": "dialog_button_agree",
"value": "同意"
},
{
"name": "privacy_text_title_policy",
"value": "《隐私政策》"
},
{
"name": "privacy_text_title_protocol",
"value": "《用户协议》"
}
]
}
\ No newline at end of file
... ...