wangliang_wd

desc:解决冲突

Showing 79 changed files with 3719 additions and 308 deletions
import { AboutPageUI} from 'wdComponent';
import { PrivacySettingComponents} from 'wdComponent';
@Entry
@Component
struct PrivacySettingPage {
build() {
Column(){
AboutPageUI()
PrivacySettingComponents()
}
}
}
\ No newline at end of file
... ...
import ArrayList from '@ohos.util.ArrayList'
import { MineSettingComponent } from 'wdComponent';
import { AccountAndSecurityLayout } from 'wdComponent';
import router from '@ohos.router';
@Entry
@Component
struct SettingPage {
@State message: string = 'Hello World 02'
@State pageType: string = '';
onPageShow() {
const params = router.getParams(); // 获取传递过来的参数对象
this.pageType = 'mainSetting';// 获取info属性的值
}
build() {
Column() {
if (this.pageType == 'mainSetting') {
MineSettingComponent()
} else {
AccountAndSecurityLayout()
}
}.setFullWidth()
}
... ...
import { SettingPasswordLayout } from 'wdComponent';
@Entry
@Component
struct SettingPasswordPage {
@State message: string = 'Hello World'
build() {
Row() {
Column() {
SettingPasswordLayout()
}
.width('100%')
}
.height('100%')
}
}
\ No newline at end of file
... ...
... ... @@ -32,6 +32,58 @@
}
]
}
],
"requestPermissions": [
{
"name": "ohos.permission.CAMERA",
"reason": "$string:EntryAbility_desc",
"usedScene": {
"abilities": [
"FormAbility"
],
"when": "inuse"
}
},
{
"name": "ohos.permission.READ_MEDIA",
"reason": "$string:EntryAbility_desc",
"usedScene": {
"abilities": [
"FormAbility"
],
"when": "inuse"
}
},
{
"name": "ohos.permission.WRITE_MEDIA",
"reason": "$string:EntryAbility_desc",
"usedScene": {
"abilities": [
"FormAbility"
],
"when": "inuse"
}
},
{
"name": "ohos.permission.LOCATION",
"reason": "$string:EntryAbility_desc",
"usedScene": {
"abilities": [
"FormAbility"
],
"when": "inuse"
}
},
{
"name": "ohos.permission.MICROPHONE",
"reason": "$string:EntryAbility_desc",
"usedScene": {
"abilities": [
"FormAbility"
],
"when": "inuse"
}
}
]
}
}
\ No newline at end of file
... ...
... ... @@ -8,6 +8,7 @@
"pages/PrivacySettingPage",
"pages/SettingAboutPage",
"pages/AppointmentListPage",
"pages/SettingPasswordPage",
"pages/FollowListPage"
]
}
... ...
... ... @@ -32,6 +32,12 @@ export { MineSettingComponent } from "./components/page/MineSettingComponent"
export { AboutPageUI } from "./components/page/about/AboutPageUI"
export { PrivacySettingComponents } from "./components/page/PrivacySettingComponents"
export { AppointmentListUI } from "./components/page/mine/AppointmentListUI"
export { AccountAndSecurityLayout } from "./components/page/AccountAndSecurityLayout"
export { SettingPasswordLayout } from "./components/page/SettingPasswordLayout"
export { FollowFirstTabsComponent } from "./components/page/mine/follow/FollowFirstTabsComponent"
... ...
// @ts-nocheck
import { BottomNavi, CommonConstants } from 'wdConstant';
import { Logger } from 'wdKit';
import { TopNavigationComponent } from './TopNavigationComponent';
import { BottomNavDTO } from '../../repository/bean/BottomNavDTO';
import { UIUtils } from '../../repository/UIUtils';
import { MinePageComponent } from './MinePageComponent';
import PageViewModel from '../../viewmodel/PageViewModel';
import MineSettingDatasModel from '../../model/MineSettingDatasModel';
import { MineMainSettingFunctionItem } from '../viewmodel/MineMainSettingFunctionItem'
import storageStatistics from "@ohos.file.storageStatistics";
import { BusinessError } from '@ohos.base';
import ArrayList from '@ohos.util.ArrayList';
@Component
export struct AccountAndSecurityLayout {
@State listData: ArrayList<any> = new ArrayList();
@State privacySwitch: boolean = false
@State cacheSice: number = 0
aboutToAppear() {
// 获取设置页面数据
this.getAccountAndSecurityData()
}
getAccountAndSecurityData() {
this.listData = MineSettingDatasModel.getAccountAndSecuritySettingData()
}
build() {
Navigation() {
//滑动区域
this.settingList()
}.titleMode(NavigationTitleMode.Mini)
.title('账号与安全')
}
// 页面布局
@Builder settingList() {
Stack({ alignContent: Alignment.Bottom }) {
Column() {
List() {
ForEach(this.listData, (item: MineMainSettingFunctionItem, index: number) => {
ListItem() {
if (item.type == 0) {
Column() {
this.getArrowCell(item)
}.padding({ left: '27lpx' }).height('117lpx').justifyContent(FlexAlign.Center)
} else if (item.type == 1) {
Column() {
this.getSwitchCell(item)
}.padding({ left: '27lpx' }).height('117lpx').justifyContent(FlexAlign.Center)
} else {
Column().width('100%').height('15lpx').backgroundColor(0xf0f0f0)
}
}
.onClick(() => {
console.log(index + "")
RouteManager.jumpNewPage("pages/SettingPasswordPage") // 调用跳转方法,跳转新页面
})
}, item => item)
}
.divider({
strokeWidth: 1,
startMargin: 15,
endMargin: 10,
color: '#f0f0f0'
})
.onScrollFrameBegin((offset, state) => {
return { offsetRemain: 0 }
})
}.height("100%")
Column() {
Button('退出登录',{ stateEffect: true }).width('90%').height('80lpx').backgroundColor('#da3e22').fontColor('#fff').margin('20lpx').onClick(()=>{
AlertDialog.show({
title: '🥟id : ' + "button",
message: '标题:' + '退出登录',
confirm: {
value: "OK",
action: () => {
},
}
})
})
}
}
}
@Builder itemHead(text: string) {
// 列表分组的头部组件,对应联系人分组A、B等位置的组件
if (text.length > 0) {
Row().width('100%').height('20lpx').backgroundColor(0xf0f0f0)
}
}
// 右侧开关cell
@Builder getSwitchCell(item: MineMainSettingFunctionItem) {
Column() {
Row() {
// 左侧logo和标题
Row() {
// 判断有没有图片
if (item.imgSrc) {
Image(item.imgSrc).height('38lpx').margin({ right: '5lpx' })
Text(`${item.title}`).margin({ top: '8lpx' }).height('38lpx').fontColor('#333333').fontSize('29lpx')
} else {
Text(`${item.title}`).margin({ top: '8lpx' }).height('38lpx').fontColor('#333333').fontSize('29lpx')
}
}.width('60%')
// 右侧文案和右箭头
Row() {
Toggle({ type: ToggleType.Switch, isOn: item.switchState })
.height('50lpx')
.margin({ left: '81lpx', right: '29lpx' })
.selectedColor(Color.Pink)
.onChange((isOn: boolean) => {
this.privacySwitch = isOn;
})
}.width('40%')
.margin({ right: '29lpx' })
.justifyContent(FlexAlign.End)
}
.alignItems(VerticalAlign.Center)
.justifyContent(FlexAlign.SpaceBetween)
}.height('54lpx')
}
// 右文字+箭头cell
@Builder getArrowCell(item: MineMainSettingFunctionItem) {
Column() {
Row() {
// 左侧logo和标题
Row() {
// 判断有没有图片
if (item.imgSrc) {
Image(item.imgSrc)
.height('38lpx')
.margin({ right: '5lpx' })
}
Text(`${item.title}`)
.margin({ top: '8lpx' })
.height('38lpx')
.fontColor('#333333')
.fontSize('29lpx')
}.width('60%')
// 右侧文案和右箭头
Row() {
Text(item.subTitle ? item.subTitle : '')
.fontColor('#999999')
.maxLines(1)
Image($r('app.media.mine_user_arrow'))
.width('27lpx')
.height('27lpx')
.objectFit(ImageFit.Auto)
Column().width('29lpx')
}.width('40%')
.margin({ right: '29lpx' })
.justifyContent(FlexAlign.End)
}
.alignItems(VerticalAlign.Center)
.justifyContent(FlexAlign.SpaceBetween)
}
.height('54lpx')
}
}
\ No newline at end of file
... ...
... ... @@ -6,16 +6,18 @@ import { BottomNavDTO } from '../../repository/bean/BottomNavDTO';
import { UIUtils } from '../../repository/UIUtils';
import { MinePageComponent } from './MinePageComponent';
import PageViewModel from '../../viewmodel/PageViewModel';
import RouteManager from '../../utils/RouteManager'
import storageStatistics from "@ohos.file.storageStatistics";
import { BusinessError } from '@ohos.base';
import RouteManager from '../../utils/RouteManager'
@Component
export struct MineSettingComponent {
@State listData: Array<string | Array<string>> = new Array();
@State privacySwitch:boolean = false
@State cacheSice:number = 0
@State privacySwitch: boolean = false
@State cacheSice: number = 0
aboutToAppear() {
// 获取设置页面数据
... ... @@ -64,10 +66,20 @@ export struct MineSettingComponent {
}.padding({ left: '27lpx' })
.onClick(() => {
// 在Home页面中
let paramsInfo: object = {
pageId: 123,
pageType:'AccountAndSecurityLayout'
};
RouteManager.jumpNewPage("pages/SettingPasswordPage") // 调用跳转方法,跳转新页面
console.log(subIndex + "")
if (subIndex == 4) {
if (subIndex == 2) {
// RouteManager.jumpNewPage("pages/SettingPage") // 调用跳转方法,跳转新页面
RouteManager.jumpNewPage("pages/PrivacySettingPage")
}
})
.height('117lpx')
}, subItem => subItem)
... ...
import dataPreferences from '@ohos.data.preferences';
import { PermissionUtil } from 'wdKit'
import { SPHelper } from 'wdKit'
import hilog from '@ohos.hilog';
import {PrivacySettingModel} from '../../viewmodel/PrivacySettingModel'
const TAG = 'PrivacySettingComponents';
@Component
export struct PrivacySettingComponents {
@State listData: Array<PrivacySettingModel> = [new PrivacySettingModel('开启个性推荐', false, null), new PrivacySettingModel('相册权限', false, 'ohos.permission.READ_MEDIA'), new PrivacySettingModel('相机权限', false, 'ohos.permission.CAMERA'), new PrivacySettingModel('定位权限', false, 'ohos.permission.LOCATION'), new PrivacySettingModel('麦克风权限', false, 'ohos.permission.MICROPHONE')];
@State tips: string = '设置前可查阅'
@State privacyTips: string = '《隐私政策》'
aboutToAppear() {
// 获取权限=
// SPHelper.default.save('sdf','sdf');
// this.initListData();
this.getPermissionStatus();
RefreshStatus;
}
// initListData(){
// let model1 = new PrivacySettingModel('开启个性推荐', false, null);
// let model2 = new PrivacySettingModel('相册权限', false, 'ohos.permission.READ_MEDIA');
// let model3 = new PrivacySettingModel('相机权限', false, 'ohos.permission.CAMERA');
// let model4 = new PrivacySettingModel('定位权限', false, 'ohos.permission.LOCATION');
// let model5 = new PrivacySettingModel('麦克风权限', false, 'ohos.permission.MICROPHONE');
//
// this.listData.push(model1, model2, model3, model4, model5);
// }
async getPermissionStatus(){
const permissionUtil = new PermissionUtil();
for (const element of this.listData) {
if (!element.permissionKey) {
continue;
}
const result = await permissionUtil.checkPermissions(element.permissionKey);
element.permission = result;
}
}
build() {
Navigation() {
//滑动区域
this.PrivacySettingComponentsUI()
}.titleMode(NavigationTitleMode.Mini)
.title('隐私设置')
.backgroundColor('#F8F8F8')
}
@Builder PrivacySettingComponentsUI() {
Column() {
List({space:'23lpx'}){
ForEach(this.listData, (item:PrivacySettingModel, index) =>{
ListItem() {
if (index == 0) {
getTuiJianCell({item, index});
}else{
getArrowCell({item, index});
}
}.onClick(()=>{
if (index != 0) {
if (!item.permission){
//跳转权限设置
const permissionUtil = new PermissionUtil();
PermissionUtil.reqPermissionsFromUser([item.permissionKey]);
}
}
})
}, item => item)
}
.padding({left:'29lpx', right:'29lpx'})
.margin({top:'38lpx'})
Row(){
Text(this.tips)
.fontSize('25lpx')
.textAlign(TextAlign.Start)
.fontColor($r("app.color.color_666666"))
.margin({left:'29lpx', top:'46lpx'})
// .backgroundColor(Color.Orange)
Text(this.privacyTips)
.fontSize('25lpx')
.textAlign(TextAlign.Start)
.fontColor('#ED2800')
.margin({top:'46lpx'})
.onClick(()=>{
//跳转隐私政策
})
}
}
.width('100%')
.height('100%')
.backgroundColor('#F8F8F8')
.alignItems(HorizontalAlign.Start)
}
}
@Component
struct getArrowCell {
@ObjectLink item: PrivacySettingModel;
index;
// 右文字+箭头cell
// @Builder getArrowCell(item:PrivacySettingModel, index) {
build() {
Row() {
// 左侧标题
Text(this.item.privacyName)
.fontColor('#666666')
.fontSize('31lpx')
Row() {
Text(this.item.permission ? '已开启' : '去设置')
.fontColor(this.item.permission ? '#666666' : '#CCCCCC')
.fontSize('31lpx')
.margin({ right: '8lpx' })
Image($r('app.media.mine_user_arrow'))
.width('27lpx')
.height('27lpx')
.objectFit(ImageFit.Auto)
}
}
.alignItems(VerticalAlign.Center)
.justifyContent(FlexAlign.SpaceBetween)
.height('97lpx')
.width('100%')
.padding({ left: '29lpx', right: '29lpx' })
.backgroundColor('#FFFFFF')
.borderRadius('8lpx')
}
}
@Component
struct getTuiJianCell{
@ObjectLink item :PrivacySettingModel;
index;
build() {
//@Builder getTuiJianCell(item:PrivacySettingModel, index)
Column() {
Row() {
// 左侧标题
Text(this.item.privacyName)
.fontColor('#666666')
.fontSize('31lpx')
Row() {
Toggle({ type: ToggleType.Switch, isOn: this.item.permission })
.height('58lpx')
.width('96lpx')
// .selectedColor(Color.Pink)
.onChange((isOn: boolean) => {
// this.privacySwitch = isOn;
})
}
}
.alignItems(VerticalAlign.Center)
.justifyContent(FlexAlign.SpaceBetween)
.height('97lpx')
.width('100%')
Blank()
.backgroundColor('#EDEDED')
.height('1lpx')
Text('关闭后,将无法看到个性化推荐的服务')
.fontColor('#999999')
.fontSize('23lpx')
.margin({ right: '8lpx' })
.height('69lpx')
}
.alignItems(HorizontalAlign.Start)
.backgroundColor('#FFFFFF')
.borderRadius('8lpx')
.padding({ left: '29lpx', right: '29lpx' })
}
}
... ...
import ArrayList from '@ohos.util.ArrayList';
import promptAction from '@ohos.promptAction';
export default class AccoutPageDataModel {
// 页面数据
compType: number // 0:标题 / 1:密码输入框 / 2:验证码输入框 / 3:desc描述 / 4:按钮 / 5:logo / 6:子标题 7:手机号输入框 7:空白
compLogo: string
compTitle: string
compSubTitle: string
compDesc: string
compButtonTitle: string
inputPlacholder: string
inputTag: number
constructor(compType: number, compTitle: string, compLogo: string, compDesc: string, compButtonTitle: string, inputPlacholder: string, inputTag: number) {
this.compType = compType
this.compTitle = compTitle
this.compLogo = compLogo
this.compDesc = compDesc
this.compButtonTitle = compButtonTitle
this.inputPlacholder = inputPlacholder
this.inputTag = inputTag
}
}
@Component
export struct SettingPasswordLayout {
@State listData: Array<AccoutPageDataModel> = new Array(); // 页面配置数据
@State btnStatus: boolean = false
password01: string
password02: string
passwordOri: string
aboutToAppear() {
this.getPageListData(4)
}
getPageListData(pageId:number) {
switch (pageId) {
case 0:
// 验证/更换手机号
this.listData.push(new AccoutPageDataModel(0, '更换手机号', null, null, null, null, null))
this.listData.push(new AccoutPageDataModel(7, null, null, null, null, '请输入手机号', 10010))
this.listData.push(new AccoutPageDataModel(2, null, null, null, null, '验证码', 10088))
this.listData.push(new AccoutPageDataModel(4, null, null, null, '确认', null, null))
break;
case 1:
// 设置密码
this.listData.push(new AccoutPageDataModel(0, '设置密码', null, null, null, null, null))
this.listData.push(new AccoutPageDataModel(1, null, null, null, null, '请输入密码', 10086))
this.listData.push(new AccoutPageDataModel(1, null, null, null, null, '再次输入密码', 10087))
this.listData.push(new AccoutPageDataModel(4, null, null, '提示:密码长度6-20位,需答谢字母、小写字母、数字、特殊字符中组合三种及三种以上组成', null, null, null))
this.listData.push(new AccoutPageDataModel(5, null, null, null, '确认', null, null))
break;
case 2:
// 修改密码
this.listData.push(new AccoutPageDataModel(0, '修改密码', null, null, null, null, null))
this.listData.push(new AccoutPageDataModel(1, null, null, null, null, '请输入原密码', 10010))
this.listData.push(new AccoutPageDataModel(1, null, null, null, null, '请输入新密码', 10086))
this.listData.push(new AccoutPageDataModel(1, null, null, null, null, '请再请输入原密码', 10087))
this.listData.push(new AccoutPageDataModel(3, null, null, '提示:密码长度6-20位,需答谢字母、小写字母、数字、特殊字符中组合三种及三种以上组成', null, null, null))
this.listData.push(new AccoutPageDataModel(4, null, null, null, '确认', null, null))
this.listData.push(new AccoutPageDataModel(3, null, null, '忘记密码', null, null, null))
break;
case 3:
// 绑定手机号
this.listData.push(new AccoutPageDataModel(0, '绑定手机号', null, null, null, null, null))
this.listData.push(new AccoutPageDataModel(7, null, null, null, null, '请输入手机号', 10010))
this.listData.push(new AccoutPageDataModel(2, null, null, null, null, '验证码', 10088))
this.listData.push(new AccoutPageDataModel(4, null, null, null, '确认', null, null))
break;
case 4:
// 有logo的
this.listData.push(new AccoutPageDataModel(5, null, 'https://img-blog.csdnimg.cn/24f43f4d626d428891ebb2adb5c2c2e9.png?x-oss-process=image/watermark,type_ZHJvaWRzYW5zZmFsbGJhY2s,shadow_50,text_Q1NETiBA5YyX5aSn5Z-55paH5byg6ICB5biI,size_20,color_FFFFFF,t_70,g_se,x_16', null, null, null , null))
this.listData.push(new AccoutPageDataModel(0, '修改密码', null, null, null, null, null))
this.listData.push(new AccoutPageDataModel(1, null, null, null, null, '请输入原密码', 10010))
this.listData.push(new AccoutPageDataModel(1, null, null, null, null, '请输入新密码', 10086))
this.listData.push(new AccoutPageDataModel(1, null, null, null, null, '请再请输入原密码', 10087))
this.listData.push(new AccoutPageDataModel(2, null, null, null, null, '验证码', 10088))
this.listData.push(new AccoutPageDataModel(3, null, null, '提示:密码长度6-20位,需答谢字母、小写字母、数字、特殊字符中组合三种及三种以上组成', null, null, null))
this.listData.push(new AccoutPageDataModel(4, null, null, null, '确认', null, null))
this.listData.push(new AccoutPageDataModel(3, null, null, '忘记密码', null, null, null))
break;
default:
break;
}
}
build() {
Navigation() {
this.settingList() //滑动区域
}.titleMode(NavigationTitleMode.Mini)
.title('')
}
// 页面布局
@Builder settingList() {
Column() {
List() {
ForEach(this.listData, (item: AccoutPageDataModel, index: number) => {
ListItem() {
if (item.compType == 0) {
this.getTitleCell(item, HorizontalAlign.Start)
} else if (item.compType == 1) {
this.getPasswordCell(item)
} else if (item.compType == 2) {
this.getCodeCell(item)
} else if (item.compType == 3) {
if (index == this.listData.length - 1) {
this.getDescCell(item, HorizontalAlign.Center)
} else {
this.getDescCell(item, HorizontalAlign.Start)
}
} else if (item.compType == 4) {
this.getButtonCell(item)
} else if (item.compType == 5) {
this.getLogoCell(item)
} else if (item.compType == 7) {
this.getPhoneCell(item)
} else {
Text('' + item.compType)
}
}
})
}
// .divider({
// strokeWidth: 1,
// startMargin: 15,
// endMargin: 10,
// color: '#f0f0f0'
// })
}.width('100%').padding('30lpx')
}
/***************************** UI元素 ******************************************/
// 标题
@Builder getTitleCell(item: AccoutPageDataModel, alignTitle: HorizontalAlign) {
Column() {
Text(item.compTitle).fontWeight(FontWeight.Bold).fontSize(20).maxLines(1)
}
.width('100%')
.height('75lpx')
.alignItems(alignTitle)
}
// 密码输入框
@Builder getPasswordCell(item: AccoutPageDataModel) {
Row() {
Row() {
TextInput({ placeholder: item.inputPlacholder })
.type(InputType.Password)
.backgroundColor('#00000000')
.onChange((value: string) => {
this.inputTextChange(value, item.inputTag)
})
.onSubmit((EnterKeyType) => {
promptAction.showToast({ message: 'submit' })
})
}
.alignItems(VerticalAlign.Center)
.height('80lpx')
.backgroundColor('#f5f5f5')
.borderRadius('4vp')
}
.width('100%')
.height('110lpx')
.backgroundColor(0xffffff0)
.alignItems(VerticalAlign.Center)
}
// 手机号输入框
@Builder getPhoneCell(item: AccoutPageDataModel) {
Row() {
Row() {
TextInput({ placeholder: item.inputPlacholder })
.backgroundColor('#00000000')
.onChange((value: string) => {
this.inputTextChange(value, item.inputTag)
})
.onSubmit((EnterKeyType) => {
promptAction.showToast({ message: 'submit' })
})
}
.alignItems(VerticalAlign.Center)
.height('80lpx')
.backgroundColor('#f5f5f5')
.borderRadius('4vp')
}
.width('100%')
.height('110lpx')
.backgroundColor(0xffffff0)
.alignItems(VerticalAlign.Center)
}
// 验证码码输入框
@Builder getCodeCell(item: AccoutPageDataModel) {
Row() {
Stack() {
Image($r('app.media.get_code_bg')).width('100%').borderRadius('4vp')
Row() {
TextInput({ placeholder: item.inputPlacholder })
.backgroundColor('#00000000')
.width('67.28%')
.onChange((value: string) => {
this.inputTextChange(value, item.inputTag)
})
Button('发送验证码')
.width('32.71%')
.backgroundColor('#00000000')
.fontColor('#da3e22')
}
.width('100%')
}.height('80lpx')
}
.width('100%')
.height('110lpx')
.backgroundColor(0xffffff0)
.alignItems(VerticalAlign.Center)
}
// desc
@Builder getDescCell(item: AccoutPageDataModel, alignTitle: HorizontalAlign) {
Column() {
Text(item.compDesc).fontSize(12).maxLines(3).fontColor(0x999999).padding({top:'10lpx'})
.onClick(()=>{
if (item.compDesc == '忘记密码') {
promptAction.showToast({ message: '密码不符合密码规范' })
}
})
}
.width('100%')
.height('85lpx')
.alignItems(alignTitle)
}
// 按钮
@Builder getButtonCell(item: AccoutPageDataModel) {
Row() {
Button(item.compButtonTitle, { type: ButtonType.Normal, stateEffect: true })
.width('100%')
.height('80lpx')
.backgroundColor(this.btnStatus ? '#da3e22' : '#e5856d')
.fontColor('#fff')
.borderRadius('4vp')
.onClick(() => {
this.buttonClick()
})
}
.padding({top:'25lpx'})
.alignItems(VerticalAlign.Center)
.width('100%')
.height('120lpx')
}
// 标题
@Builder getLogoCell(item: AccoutPageDataModel) {
Column() {
Image(item.compLogo).height('150lpx').width('150lpx')
}
.width('100%')
.height('200lpx')
}
/***************************** 事件处理 ******************************************/
// 提交按钮点击事件
buttonClick() {
if (this.btnStatus) {
// 需要+手机号校验
if (this.password01.length < 6 || this.password01.length > 20) {
promptAction.showToast({ message: '密码不符合密码规范' })
return
}
promptAction.showToast({ message: '请求接口' })
}
}
// 输入框数据变动:输入数据处理
inputTextChange(text: string, tag: number) {
if (tag == 10086) {
this.password01 = text;
} else if (tag == 10087) {
this.password02 = text;
} else {
this.passwordOri = text;
}
if (this.password01) {
if (this.password01 == this.password02 && this.password01.length >= 6 && this.password01.length <= 20) {
this.btnStatus = true;
} else {
this.btnStatus = false;
}
}
}
}
\ No newline at end of file
... ...
... ... @@ -2,28 +2,53 @@ const TAG = 'AboutPageUI';
@Component
export struct AboutPageUI {
@State listData: Array<string | Array<string>> = ['隐私授权协议', '软件许可及用户协议'];
@State message: string = '京ICP备16066560号-6A Copyright © 人民日报客户端\nall rights reserved.'
@State version: string = '版本号:v8.0.1.1'
build() {
Navigation() {
//滑动区域
this.aboutUi()
}.titleMode(NavigationTitleMode.Mini)
.title('关于')
}
@Builder aboutUi() {
Column() {
Image($r('app.media.setting_about_logo'))
.width('278lpx')
.height('154lpx')
.margin({top:'173lpx',bottom:'154lpx'})
Row(){
// Row(){
//
// }.backgroundColor(Color.Yellow)
// .width('100%')
// .height('97lpx')
}.backgroundColor(Color.Yellow)
.width('100%')
.height('97lpx')
// Row(){
//
// }.backgroundColor(Color.Yellow)
// .width('100%')
// .height('97lpx')
Row(){
}.backgroundColor(Color.Yellow)
.width('100%')
.height('97lpx')
List(){
ForEach(this.listData, (item, index) =>{
ListItem() {
this.getArrowCell(item, index)
}
}, item => item)
}.divider({
strokeWidth: 1,
startMargin: '29lpx',
endMargin: '29lpx',
color: '#EDEDED'
})
Blank()
... ... @@ -46,4 +71,31 @@ export struct AboutPageUI {
.width('100%')
.height('100%')
}
// 右文字+箭头cell
@Builder getArrowCell(item, index) {
Row() {
// 左侧标题
Text(`${item}`)
.fontColor('#666666')
.fontSize('31lpx')
Image($r('app.media.mine_user_arrow'))
.width('27lpx')
.height('27lpx')
.objectFit(ImageFit.Auto)
}
.alignItems(VerticalAlign.Center)
.justifyContent(FlexAlign.SpaceBetween)
.height('97lpx')
.width('100%')
.padding({left:'29lpx',right:'29lpx'})
}
}
... ...
... ... @@ -67,9 +67,19 @@ export default struct MinePageMoreFunctionUI{
console.log(index+"")
if (index == 3) {
RouteManager.jumpNewPage("pages/SettingPage")
} else {
} else if (index == 2) {
RouteManager.jumpNewPage("pages/PrivacySettingPage")
} else if (index == 4) {
RouteManager.jumpNewPage("pages/SettingAboutPage")
}else {
// 在Home页面中
let paramsInfo: object = {
pageId: 123,
pageType:'mainSetting'
};
RouteManager.jumpNewPage("pages/PrivacySettingPage",paramsInfo)
}
})
.height('117lpx')
}, item => item)
... ...
... ... @@ -84,6 +84,22 @@ class MinePageDatasModel{
return this.moreData
}
/**
* 扫一扫 我的奖品 等5个数据
* 包含名字和图标
*/
getSettingFunctionsData():MinePageCreatorFunctionsItem[]{
if(this.moreData.length === 5){
return this.moreData
}
this.moreData.push(new MinePageMoreFunctionModel("扫一扫",$r('app.media.mine_scan')))
this.moreData.push(new MinePageMoreFunctionModel("我的奖品",$r('app.media.mine_mygift')))
this.moreData.push(new MinePageMoreFunctionModel("意见反馈",$r('app.media.mine_suggest')))
this.moreData.push(new MinePageMoreFunctionModel("设置",$r('app.media.mine_setting')))
this.moreData.push(new MinePageMoreFunctionModel("关于",$r('app.media.mine_about')))
return this.moreData
}
fetchAppointmentListData(pageSize:string,pageNum:string) {
let url = HttpUrlUtils.getAppointmentListDataUrl()+ `?pageSize=${pageSize}&pageNum=${pageNum}`
let headers: HashMap<string, string> = HttpUrlUtils.getYcgCommonHeaders();
... ...
import MinePagePersonalFunctionsItem from '../viewmodel/MinePagePersonalFunctionsItem'
import MinePageCreatorFunctionsItem from '../viewmodel/MinePageCreatorFunctionsItem'
import MinePageMoreFunctionModel from '../viewmodel/MinePageMoreFunctionModel';
import { HttpUrlUtils } from '../network/HttpUrlUtils';
import HashMap from '@ohos.util.HashMap';
import { ResponseDTO, WDHttp } from 'wdNetwork';
import { Logger } from 'wdKit';
import { MineMainSettingFunctionItem } from '../viewmodel/MineMainSettingFunctionItem'
const TAG = "MineSettingDatasModel"
/**
* 我的设置页面 所有数据 获取封装类
*/
class MineSettingDatasModel{
private static instance: MineSettingDatasModel;
mainSettingData:MineMainSettingFunctionItem[] = []
accountAndSecurityData:MineMainSettingFunctionItem[] = []
private constructor() { }
/**
* 单例模式
* @returns
*/
public static getInstance(): MineSettingDatasModel {
if (!MineSettingDatasModel.instance) {
MineSettingDatasModel.instance = new MineSettingDatasModel();
}
return MineSettingDatasModel.instance;
}
/**
* 评论 关注 收藏 等7个数据
* 包含名字和图标
*/
getMineMainSettingFunctionItemData():MineMainSettingFunctionItem[]{
if(this.mainSettingData.length === 7){
return this.mainSettingData
}
this.mainSettingData = []
this.mainSettingData.push(new MineMainSettingFunctionItem(null, '账户与安全', '18888888888', 0, false))
this.mainSettingData.push(new MineMainSettingFunctionItem(null, '接收推送', null, 1, false))
this.mainSettingData.push(new MineMainSettingFunctionItem(null, '隐私设罝', null, 0, false))
this.mainSettingData.push(new MineMainSettingFunctionItem(null, '仅WiFi网络加载图片', null, 1, false))
this.mainSettingData.push(new MineMainSettingFunctionItem(null, 'WiFi网络情况下自动播放视频', null, 1, false))
this.mainSettingData.push(new MineMainSettingFunctionItem(null, '开户播放器悬浮窗', null, 1, false))
this.mainSettingData.push(new MineMainSettingFunctionItem(null, null, null, 2, null))
this.mainSettingData.push(new MineMainSettingFunctionItem(null, '清除缓存', '32MB', 0, false))
this.mainSettingData.push(new MineMainSettingFunctionItem(null, '去评分', null, 0, false))
return this.mainSettingData
}
/**
* 评论 关注 收藏 等7个数据
* 包含名字和图标
*/
getAccountAndSecuritySettingData():MineMainSettingFunctionItem[]{
if(this.accountAndSecurityData.length === 7){
return this.accountAndSecurityData
}
this.accountAndSecurityData = []
this.accountAndSecurityData.push(new MineMainSettingFunctionItem(null, '更换手机号', '18888888888', 0, false))
this.accountAndSecurityData.push(new MineMainSettingFunctionItem(null, '设置密码', null, 0, false))
this.accountAndSecurityData.push(new MineMainSettingFunctionItem(null, null, null, 2, null))
this.accountAndSecurityData.push(new MineMainSettingFunctionItem($r('app.media.mine_order_icon'), '绑定QQ', '立即绑定', 0, false))
this.accountAndSecurityData.push(new MineMainSettingFunctionItem($r('app.media.mine_order_icon'), '绑定微信', '立即绑定', 0, false))
this.accountAndSecurityData.push(new MineMainSettingFunctionItem($r('app.media.mine_order_icon'), '绑定新浪微博', '立即绑定', 0, false))
this.accountAndSecurityData.push(new MineMainSettingFunctionItem(null, 'Apple ID', null, 0, false))
this.accountAndSecurityData.push(new MineMainSettingFunctionItem(null, null, null, 2, null))
this.accountAndSecurityData.push(new MineMainSettingFunctionItem(null, '注销账号', null, 0, false))
return this.accountAndSecurityData
}
// 网络请求设置数据
fetchAppointmentListData(pageSize:string,pageNum:string) {
// let url = HttpUrlUtils.getAppointmentListDataUrl()+ `?pageSize=${pageSize}&pageNum=${pageNum}`
// let headers: HashMap<string, string> = HttpUrlUtils.getYcgCommonHeaders();
// return WDHttp.get<ResponseDTO<MineAppointmentListItem>>(url, headers)
};
// getAppointmentListData(pageSize:string,pageNum:string): Promise<MineAppointmentListItem> {
// return new Promise<MineAppointmentListItem>((success, error) => {
// Logger.info(TAG, `getAppointmentList start`);
// this.fetchAppointmentListData(pageSize,pageNum).then((navResDTO: ResponseDTO<MineAppointmentListItem>) => {
// if (!navResDTO) {
// error("page data invalid");
// return
// }
// Logger.info(TAG, "getAppointmentList then,AppointmentResDTO.timeStamp:" + navResDTO.timestamp);
// let navigationBean = navResDTO.data
// success(navigationBean);
// }).catch((err: Error) => {
// Logger.error(TAG, `fetchAppointmentListDataApi catch, error.name : ${err.name}, error.message:${err.message}`);
// error(err);
// })
// })
// }
}
const mineSettingDatasModel = MineSettingDatasModel.getInstance()
export default mineSettingDatasModel as MineSettingDatasModel
\ No newline at end of file
... ...
@Observed
export class MineMainSettingFunctionItem {
imgSrc:Resource // 图标
title:string // 标题
subTitle:string // 副标题
type:number // 数据类型 0默认箭头类型,1右侧switch按钮类型
switchState:boolean // 右侧switch按钮状态
constructor(imgSrc:Resource,title:string,subTitle:string,type:number,switchState:boolean){
this.imgSrc = imgSrc
this.title = title
this.subTitle = subTitle
this.type = type
this.switchState = switchState
}
}
\ No newline at end of file
... ...
import abilityAccessCtrl, { Permissions } from '@ohos.abilityAccessCtrl';
@Observed
export class PrivacySettingModel{
privacyName: string
permission: boolean
permissionKey: Permissions
constructor(privacyName: string, permission: boolean, permissionKey: Permissions) {
this.privacyName = privacyName;
this.permission = permission;
this.permissionKey = permissionKey;
}
}
\ No newline at end of file
... ...
... ... @@ -14,3 +14,6 @@ export { DateTimeUtils } from './utils/DateTimeUtils'
export { AppContext } from './utils/AppContext'
export { PermissionUtil } from './utils/PermissionUtil'
export { SPHelper } from './utils/SPHelper'
\ No newline at end of file
... ...
import bundleManager from '@ohos.bundle.bundleManager';
import abilityAccessCtrl, { Permissions } from '@ohos.abilityAccessCtrl';
import common from '@ohos.app.ability.common';
import featureAbility from '@ohos.ability.featureAbility';
import wantConstant from '@ohos.ability.wantConstant';
export class PermissionUtil {
async checkAccessToken(permission: Permissions): Promise<abilityAccessCtrl.GrantStatus> {
let atManager = abilityAccessCtrl.createAtManager();
let grantStatus: abilityAccessCtrl.GrantStatus;
// 获取应用程序的accessTokenID
let tokenId: number;
try {
let bundleInfo: bundleManager.BundleInfo = await bundleManager.getBundleInfoForSelf(bundleManager.BundleFlag.GET_BUNDLE_INFO_WITH_APPLICATION);
let appInfo: bundleManager.ApplicationInfo = bundleInfo.appInfo;
tokenId = appInfo.accessTokenId;
} catch (err) {
console.error(`getBundleInfoForSelf failed, code is ${err.code}, message is ${err.message}`);
}
// 校验应用是否被授予权限
try {
grantStatus = await atManager.checkAccessToken(tokenId, permission);
} catch (err) {
console.error(`checkAccessToken failed, code is ${err.code}, message is ${err.message}`);
}
return grantStatus;
}
async checkPermissions(permission: Permissions): Promise<boolean> {
let hasPermissions = false;
let grantStatus: abilityAccessCtrl.GrantStatus = await this.checkAccessToken(permission);
if (grantStatus === abilityAccessCtrl.GrantStatus.PERMISSION_GRANTED) {
// 已经授权,可以继续访问目标操作
hasPermissions = true;
} else {
hasPermissions = false;
// 申请日历权限
}
return hasPermissions;
}
static reqPermissionsFromUser(permissions: Array<Permissions>): void {
let context = getContext(this) as common.UIAbilityContext;
let atManager = abilityAccessCtrl.createAtManager();
// requestPermissionsFromUser会判断权限的授权状态来决定是否唤起弹窗
atManager.requestPermissionsFromUser(context, permissions).then((data) => {
let grantStatus: Array<number> = data.authResults;
let length: number = grantStatus.length;
for (let i = 0; i < length; i++) {
if (grantStatus[i] === 0) {
// 用户授权,可以继续访问目标操作
} else {
this.jumpSetting();
// 用户拒绝授权,提示用户必须授权才能访问当前页面的功能,并引导用户到系统设置中打开相应的权限
AlertDialog.show({
title: '权限设置',
message: '到系统设置中打开相应的权限',
confirm: {
value: "OK",
action: () => {
},
}
})
return;
}
}
// 授权成功
}).catch((err) => {
console.error(`requestPermissionsFromUser failed, code is ${err.code}, message is ${err.message}`);
})
}
static jumpSetting() {
}
}
... ...
... ... @@ -4,8 +4,8 @@
*/
export const enum BottomNavi {
NEWS = 0,
PEOPLE,
VIDEO,
SERVICE,
MINE,
PEOPLE=1,
VIDEO=2,
SERVICE=3,
MINE=4,
}
... ...
... ... @@ -61,7 +61,22 @@ export class HttpUrlUtils {
* 资料编辑 获取用户信息
*/
static readonly APPOINTMENT_AccountOwner_PATH: string = "/api/rmrb-contact/contact/zh/c/my/detail";
/**
* 个人中心 关注列表详情
*/
static readonly FOLLOW_LIST_DETAIL_DATA_PATH: string = "/api/rmrb-creator-user/c/creatorDirectory/getContactMasterDetaiPage";
/**
* 个人中心 关注列表
*/
static readonly FOLLOW_LIST_DATA_PATH: string = "/api/rmrb-creator-user/c/creatorDirectory/getCreatorDirectoryTree";
/**
* 个人中心 我的关注列表
*/
static readonly MINE_FOLLOW_LIST_DATA_PATH: string = "/api/rmrb-interact/interact/zh/c/attention/list";
/**
* 个人中心 关注列表状态
*/
static readonly FOLLOW_LIST_STATUS_DATA_PATH: string = "/api/rmrb-interact/interact/zh/c/batchAttention/status";
/**
* 我的收藏
*/
... ... @@ -79,7 +94,7 @@ export class HttpUrlUtils {
static readonly MORNING_EVENING_COMP_INFO_PATH: string = "/api/rmrb-bff-display-zh/display/zh/c/compInfo";
private static hostUrl: string = HttpUrlUtils.HOST_UAT;
private static hostUrl: string = HttpUrlUtils.HOST_PRODUCT;
private static userId=''
private static userType=''
private static token=''
... ... @@ -270,6 +285,26 @@ export class HttpUrlUtils {
return url
}
static getFollowListDetailDataUrl() {
let url = HttpUrlUtils.HOST_SIT + HttpUrlUtils.FOLLOW_LIST_DETAIL_DATA_PATH
return url
}
static getFollowListDataUrl() {
let url = HttpUrlUtils.HOST_SIT + HttpUrlUtils.FOLLOW_LIST_DATA_PATH
return url
}
static getMineFollowListDataUrl() {
let url = HttpUrlUtils.HOST_SIT + HttpUrlUtils.MINE_FOLLOW_LIST_DATA_PATH
return url
}
static getFollowListStatusDataUrl() {
let url = HttpUrlUtils.HOST_SIT + HttpUrlUtils.FOLLOW_LIST_STATUS_DATA_PATH
return url
}
static getYcgCommonHeaders(): HashMap<string, string> {
let headers: HashMap<string, string> = new HashMap<string, string>()
... ... @@ -282,10 +317,10 @@ export class HttpUrlUtils {
headers.set('X-Ca-Stage', "TEST")
headers.set('plat', "Phone")
headers.set('Content-Type', 'application/json; charset=utf-8')
headers.set('timestamp', "649773304")
headers.set('RMRB-X-TOKEN', "eyJhbGciOiJIUzI1NiIsImtpZCI6IklFazBGclhfV2RYMEx1ZktDU01iYTVYd0VmUHZ6a043T0F5UTRFLWIwWU0ifQ.eyJpc3MiOiJwZW9wbGVzLWRhaWx5LWZvdXJhIiwic3ViIjoicGVvcGxlcy1kYWlseS1mb3VyYSIsImV4cCI6MTcxMDU4Mzk0MywidXNlcklkIjo1NjczODc0NzcwNjM2MjEsInVzZXJWZXJzaW9uIjoiNTY3Mzg3NDc3MDYzNjIxXzAiLCJ1c2VyTmFtZSI6IiVFNCVCQSVCQSVFNiVCMCU5MSVFNiU5NyVBNSVFNiU4QSVBNSVFNyVCRCU5MSVFNSU4RiU4QmFQcnRxNSIsInVzZXJUeXBlIjoxLCJjcmVhdG9ySWQiOm51bGwsInVzZXJJZFpoIjpudWxsfQ._LTKrUxQozpCj1XMhx1TWOIxn5gjDveoPuMFGpI0g_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('cookie', 'RMRB-X-TOKEN=eyJhbGciOiJIUzI1NiIsImtpZCI6IklFazBGclhfV2RYMEx1ZktDU01iYTVYd0VmUHZ6a043T0F5UTRFLWIwWU0ifQ.eyJpc3MiOiJwZW9wbGVzLWRhaWx5LWZvdXJhIiwic3ViIjoicGVvcGxlcy1kYWlseS1mb3VyYSIsImV4cCI6MTcxMDU4Mzk0MywidXNlcklkIjo1NjczODc0NzcwNjM2MjEsInVzZXJWZXJzaW9uIjoiNTY3Mzg3NDc3MDYzNjIxXzAiLCJ1c2VyTmFtZSI6IiVFNCVCQSVCQSVFNiVCMCU5MSVFNiU5NyVBNSVFNiU4QSVBNSVFNyVCRCU5MSVFNSU4RiU4QmFQcnRxNSIsInVzZXJUeXBlIjoxLCJjcmVhdG9ySWQiOm51bGwsInVzZXJJZFpoIjpudWxsfQ._LTKrUxQozpCj1XMhx1TWOIxn5gjDveoPuMFGpI0g_8')
headers.set('build_version', "202403112023")
headers.set('adcode', "340000")
headers.set('os_version', "10")
... ... @@ -294,7 +329,7 @@ export class HttpUrlUtils {
headers.set('versionCode', "7302")
headers.set('system', "Android")
headers.set('version_name', "7.3.0.2")
headers.set('EagleEye-TraceID', '5C3D0800CF2C4440A43E5B131187629B')
headers.set('EagleEye-TraceID', '101118E4D006453DA549A82AA8CAFBFE')
headers.set('imei', "5156098c-6c44-3514-af70-04a0139a9327")
headers.set('userType', "1")
headers.set('Accept-Language', 'zh')
... ...
... ... @@ -46,4 +46,6 @@ export class WDRouterPage {
static editUserNikeNamePage = new WDRouterPage("wdComponent", "ets/components/page/EditUserNikeNamePage");
//修改简介
static editUserIntroductionPage = new WDRouterPage("wdComponent", "ets/components/page/EditUserIntroductionPage");
static loginProtocolPage = new WDRouterPage("wdLogin", "ets/pages/login/LoginProtocolWebview");
}
... ...
import bundleManager from '@ohos.bundle.bundleManager'
export class WDRouterPage {
private moduleName: string
private pagePath: string
constructor(moduleName: string, pagePath: string) {
this.moduleName = moduleName
this.pagePath = pagePath
}
url() {
let bundleInfo = bundleManager.getBundleInfoForSelfSync(bundleManager.BundleFlag.GET_BUNDLE_INFO_DEFAULT)
return `@bundle:${bundleInfo.name}/${this.moduleName}/${this.pagePath}`
}
// 主页
static index = new WDRouterPage("phone", "ets/pages/Index");
// 关于页面
// static aboutPage = new WDRouterPage("entry", "ets/pages/about/AboutPage");
// web默认页面
static defaultWebPage = new WDRouterPage("phone", "ets/pages/web/DefaultWebPage");
// 电子报页面
static eNewspaper = new WDRouterPage("phone", "ets/pages/ENewspaper")
// 早晚报页面
static morningEveningPaperPage = new WDRouterPage("phone", "ets/pages/MorningEveningPaperPage")
// 图文详情页
static imageTextDetailPage = new WDRouterPage("phone", "ets/pages/ImageAndTextDetailPage");
// 短视频详情页
static detailPlayShortVideoPage = new WDRouterPage("wdDetailPlayShortVideo", "ets/pages/DetailPlayShortVideoPage");
// 点播详情页
static detailPlayVodPage = new WDRouterPage("wdDetailPlayVod", "ets/pages/DetailPlayVodPage");
// 直播详情页
static detailPlayLivePage = new WDRouterPage("wdDetailPlayLive", "ets/pages/DetailPlayLivePage");
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");
//我的 关注
static followListPage = new WDRouterPage("wdComponent", "ets/components/page/FollowListPage");
//资料编辑
static editUserInfoPage = new WDRouterPage("wdComponent", "ets/components/page/EditUserInfoPage");
//修改昵称
static editUserNikeNamePage = new WDRouterPage("wdComponent", "ets/components/page/EditUserNikeNamePage");
//修改简介
static editUserIntroductionPage = new WDRouterPage("wdComponent", "ets/components/page/EditUserIntroductionPage");
static loginProtocolPage = new WDRouterPage("wdLogin", "ets/pages/login/LoginProtocolWebview");
}
... ...
import bundleManager from '@ohos.bundle.bundleManager'
export class WDRouterPage {
private moduleName: string
private pagePath: string
constructor(moduleName: string, pagePath: string) {
this.moduleName = moduleName
this.pagePath = pagePath
}
url() {
let bundleInfo = bundleManager.getBundleInfoForSelfSync(bundleManager.BundleFlag.GET_BUNDLE_INFO_DEFAULT)
return `@bundle:${bundleInfo.name}/${this.moduleName}/${this.pagePath}`
}
// 主页
static index = new WDRouterPage("phone", "ets/pages/Index");
// 关于页面
// static aboutPage = new WDRouterPage("entry", "ets/pages/about/AboutPage");
// web默认页面
static defaultWebPage = new WDRouterPage("phone", "ets/pages/web/DefaultWebPage");
// 电子报页面
static eNewspaper = new WDRouterPage("phone", "ets/pages/ENewspaper")
// 早晚报页面
static morningEveningPaperPage = new WDRouterPage("phone", "ets/pages/MorningEveningPaperPage")
// 图文详情页
static imageTextDetailPage = new WDRouterPage("phone", "ets/pages/ImageAndTextDetailPage");
// 短视频详情页
static detailPlayShortVideoPage = new WDRouterPage("wdDetailPlayShortVideo", "ets/pages/DetailPlayShortVideoPage");
// 点播详情页
static detailPlayVodPage = new WDRouterPage("wdDetailPlayVod", "ets/pages/DetailPlayVodPage");
// 直播详情页
static detailPlayLivePage = new WDRouterPage("wdDetailPlayLive", "ets/pages/DetailPlayLivePage");
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");
//我的 关注
static followListPage = new WDRouterPage("wdComponent", "ets/components/page/FollowListPage");
}
... ...
import bundleManager from '@ohos.bundle.bundleManager'
export class WDRouterPage {
private moduleName: string
private pagePath: string
constructor(moduleName: string, pagePath: string) {
this.moduleName = moduleName
this.pagePath = pagePath
}
url() {
let bundleInfo = bundleManager.getBundleInfoForSelfSync(bundleManager.BundleFlag.GET_BUNDLE_INFO_DEFAULT)
return `@bundle:${bundleInfo.name}/${this.moduleName}/${this.pagePath}`
}
// 主页
static index = new WDRouterPage("phone", "ets/pages/Index");
// 关于页面
// static aboutPage = new WDRouterPage("entry", "ets/pages/about/AboutPage");
// web默认页面
static defaultWebPage = new WDRouterPage("phone", "ets/pages/web/DefaultWebPage");
// 电子报页面
static eNewspaper = new WDRouterPage("phone", "ets/pages/ENewspaper")
// 早晚报页面
static morningEveningPaperPage = new WDRouterPage("phone", "ets/pages/MorningEveningPaperPage")
// 图文详情页
static imageTextDetailPage = new WDRouterPage("phone", "ets/pages/ImageAndTextDetailPage");
// 短视频详情页
static detailPlayShortVideoPage = new WDRouterPage("wdDetailPlayShortVideo", "ets/pages/DetailPlayShortVideoPage");
// 点播详情页
static detailPlayVodPage = new WDRouterPage("wdDetailPlayVod", "ets/pages/DetailPlayVodPage");
// 直播详情页
static detailPlayLivePage = new WDRouterPage("wdDetailPlayLive", "ets/pages/DetailPlayLivePage");
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");
//我的 关注
static followListPage = new WDRouterPage("wdComponent", "ets/components/page/FollowListPage");
//资料编辑
static editUserInfoPage = new WDRouterPage("wdComponent", "ets/components/page/EditUserInfoPage");
//修改昵称
static editUserNikeNamePage = new WDRouterPage("wdComponent", "ets/components/page/EditUserNikeNamePage");
//修改简介
static editUserIntroductionPage = new WDRouterPage("wdComponent", "ets/components/page/EditUserIntroductionPage");
}
... ...
import bundleManager from '@ohos.bundle.bundleManager'
export class WDRouterPage {
private moduleName: string
private pagePath: string
constructor(moduleName: string, pagePath: string) {
this.moduleName = moduleName
this.pagePath = pagePath
}
url() {
let bundleInfo = bundleManager.getBundleInfoForSelfSync(bundleManager.BundleFlag.GET_BUNDLE_INFO_DEFAULT)
return `@bundle:${bundleInfo.name}/${this.moduleName}/${this.pagePath}`
}
// 主页
static index = new WDRouterPage("phone", "ets/pages/Index");
// 关于页面
// static aboutPage = new WDRouterPage("entry", "ets/pages/about/AboutPage");
// web默认页面
static defaultWebPage = new WDRouterPage("phone", "ets/pages/web/DefaultWebPage");
// 电子报页面
static eNewspaper = new WDRouterPage("phone", "ets/pages/ENewspaper")
// 早晚报页面
static morningEveningPaperPage = new WDRouterPage("phone", "ets/pages/MorningEveningPaperPage")
// 图文详情页
static imageTextDetailPage = new WDRouterPage("phone", "ets/pages/ImageAndTextDetailPage");
// 短视频详情页
static detailPlayShortVideoPage = new WDRouterPage("wdDetailPlayShortVideo", "ets/pages/DetailPlayShortVideoPage");
// 点播详情页
static detailPlayVodPage = new WDRouterPage("wdDetailPlayVod", "ets/pages/DetailPlayVodPage");
// 直播详情页
static detailPlayLivePage = new WDRouterPage("wdDetailPlayLive", "ets/pages/DetailPlayLivePage");
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");
//我的 关注
static followListPage = new WDRouterPage("wdComponent", "ets/components/page/FollowListPage");
static loginProtocolPage = new WDRouterPage("wdLogin", "ets/pages/login/LoginProtocolWebview");
}
... ...
... ... @@ -70,3 +70,19 @@ export { ResponseBean } from './src/main/ets/bean/h5/ResponseBean';
export { MorningEveningPaperDTO } from './src/main/ets/bean/component/MorningEveningPaperDTO';
export { FrontLinkObject } from './src/main/ets/bean/component/FrontLinkObject';
export { PageInfoBean } from './src/main/ets/bean/morningevening/PageInfoBean';
export { Group } from './src/main/ets/bean/morningevening/Group';
export { TopicInfo } from './src/main/ets/bean/morningevening/TopicInfo';
export { CompInfoBean } from './src/main/ets/bean/morningevening/CompInfoBean';
export { CompList } from './src/main/ets/bean/morningevening/CompList';
export { OperDataList } from './src/main/ets/bean/morningevening/OperDataList';
export { ShareInfo } from './src/main/ets/bean/morningevening/ShareInfo';
... ...
import { CompList } from './CompList';
export interface CompInfoBean {
blockDesc: string;
// compAdList: any[];
compList: CompList[];
id: number;
name: string;
pageId: string;
pageNum: number;
pageSize: number;
recommend: number;
totalCount: number;
}
\ No newline at end of file
... ...
import { OperDataList } from './OperDataList';
export interface CompList {
// audioDataList: any[];
backgroundImgUrl: string;
// bottomNavId?: any;
cardItemId: string;
// cardUpdateStrategy?: any;
compStyle: string;
compType: string;
dataSourceType: string;
expIds: string;
extraData: string;
// fullColumnImgUrls: any[];
hasMore: number;
id: number;
// imageScale?: any;
imgSize: string;
itemId: string;
itemType: string;
itemTypeCode: string;
linkUrl: string;
// localGovernance?: any;
name: string;
objectId: string;
objectLevel: string;
objectSummary: string;
objectTitle: string;
objectType: string;
// openComment?: any;
// openLikes?: any;
operDataList: OperDataList[];
pageId: string;
// position?: any;
posterSize: string;
posterUrl: string;
// questionSection?: any;
recommend: number;
relId: number;
sceneId: string;
sortValue: number;
subSceneId: string;
summaryName: string;
// tabOperDataList: any[];
titleShowPolicy: number;
// topicTemplate?: any;
traceId: string;
traceInfo: string;
viewTime: string;
// viewTimeBlurred?: any;
}
\ No newline at end of file
... ...
export interface Group {
blockDesc: string;
groupStrategy: number;
id: number;
showType: number;
sortValue: number;
}
\ No newline at end of file
... ...
import { ShareInfo } from './ShareInfo';
export interface OperDataList {
// activityExt?: any;
appStyle: string;
// askInfo?: any;
axisColor: string;
// bestNoticer?: any;
// bottomNavId?: any;
cardItemId: string;
channelId: number;
// commentInfo?: any;
corner: string;
coverSize: string;
coverType: number;
coverUrl: string;
expIds: string;
extra: string;
// fullColumnImgUrls: any[];
// hasMore?: any;
itemId: string;
itemType: string;
itemTypeCode: string;
keyArticle: number;
// landscape?: any;
// likeStyle?: any;
linkUrl: string;
// liveInfo?: any;
menuShow: number;
newTags: string;
newsAuthor: string;
newsSubTitle: string;
newsSummary: string;
newsTitle: string;
newsTitleColor: string;
objectId: string;
objectLevel: string;
objectType: string;
// openComment?: any;
// openLikes?: any;
pageId: string;
// photoNum?: any;
// position?: any;
publishTime: string;
// pushTime?: any;
// pushUnqueId?: any;
readFlag: number;
// recommend?: any;
relId: number;
relObjectId: string;
relType: number;
// rmhInfo?: any;
rmhPlatform: number;
sceneId: string;
shareInfo: ShareInfo;
// slideShows: any[];
sortValue: number;
source: string;
subSceneId: string;
// tagIds: any[];
// tagWord?: any;
// titleShow?: any;
// titleShowPolicy?: any;
// topicTemplate?: any;
traceId: string;
traceInfo: string;
// userInfo?: any;
// videoInfo?: any;
visitorComment: number;
// voiceInfo?: any;
}
\ No newline at end of file
... ...
// export interface Group {
// blockDesc: string;
// groupStrategy: number;
// id: number;
// itemNum?: any;
// showType: number;
// sortValue: number;
// }
//
// export interface TopicInfo {
// axisColor: string;
// channelId?: any;
// commentFlag: number;
// commentPreviewFlag: number;
// commentShowFlag: number;
// frontFlag?: any;
// frontLinkObject?: any;
// posterFlag: number;
// posterUrl: string;
// relId?: any;
// relObjectId?: any;
// relType?: any;
// shareCoverUrl: string;
// shareOpen: number;
// sharePosterCoverUrl: string;
// sharePosterOpen?: any;
// shareSummary: string;
// shareTitle: string;
// shareUrl: string;
// slideColor: string;
// summary: string;
// title: string;
// titleShow: number;
// topicDate: string;
// topicId: string;
// topicPattern: number;
// topicTemplate?: any;
// topicType: number;
// transluceImgUrl: string;
// visitorComment: number;
// voteInfo?: any;
// }
//
// export interface PageInfoBean {
// backIconUrl: string;
// backgroundColor: string;
// backgroundImgUrl: string;
// baselineColor: string;
// baselineCopywriting: string;
// baselineShow: number;
// description: string;
// groups: Group[];
// hasAdInfo: number;
// hasPopUp: number;
// id: number;
// mainLogoImgUrl: string;
// name: string;
// pageTopParams?: any;
// pageTopType: number;
// pageType: number;
// popUps: any[];
// pushupLogoImgUrl: string;
// shareCoverUrl: string;
// shareIconUrl: string;
// shareName: string;
// shareSummary: string;
// shareUrl: string;
// statusBarColor: string;
// templateType: number;
// titleColor: string;
// topicInfo: TopicInfo;
// }
//
// export interface Meta {
// md5: string;
// }
//
// export interface RootObject {
// code: string;
// data: Data;
// message: string;
// meta: Meta;
// requestId: string;
// success: boolean;
// timestamp: number;
// }
\ No newline at end of file
import { Group } from './Group';
import { TopicInfo } from './TopicInfo';
export interface PageInfoBean {
backIconUrl: string;
backgroundColor: string;
backgroundImgUrl: string;
baselineColor: string;
baselineCopywriting: string;
baselineShow: number;
description: string;
groups: Group[];
hasAdInfo: number;
hasPopUp: number;
id: number;
mainLogoImgUrl: string;
name: string;
pageTopType: number;
pageType: number;
pushupLogoImgUrl: string;
shareCoverUrl: string;
shareIconUrl: string;
shareName: string;
shareSummary: string;
shareUrl: string;
statusBarColor: string;
templateType: number;
titleColor: string;
topicInfo: TopicInfo;
}
... ...
export interface ShareInfo {
shareCoverUrl: string;
shareOpen: number;
sharePosterCoverUrl: string;
sharePosterOpen: number;
shareSummary: string;
shareTitle: string;
shareUrl: string;
}
\ No newline at end of file
... ...
export interface TopicInfo {
axisColor: string;
commentFlag: number;
commentPreviewFlag: number;
commentShowFlag: number;
posterFlag: number;
posterUrl: string;
shareCoverUrl: string;
shareOpen: number;
sharePosterCoverUrl: string;
shareSummary: string;
shareTitle: string;
shareUrl: string;
slideColor: string;
summary: string;
title: string;
titleShow: number;
topicDate: string;
topicId: string;
topicPattern: number;
topicType: number;
transluceImgUrl: string;
visitorComment: number;
}
\ No newline at end of file
... ...
... ... @@ -5,15 +5,25 @@ import { Logger } from 'wdKit';
import { ENewspaperItemComponent } from './ENewspaperItemComponent';
import { ENewspaperListDialog } from '../dialog/ENewspaperListDialog';
import display from '@ohos.display';
import { ENewspaperCalendarDialog } from '../dialog/ENewspaperCalendarDialog';
import font from '@ohos.font';
@Component
export struct ENewspaperPageComponent {
@State newspaperListBean: NewspaperListBean = {} as NewspaperListBean
@State currentPageNum: string = '01'
@State pageNumPopup: boolean = false
@State date: string = '2024-01-26'
@State calendarPopup: boolean = false
@State calendarDateTitle: string = ''
@State picHeight: number = 0
private swiperController: SwiperController = new SwiperController()
calendarDialogController: CustomDialogController = new CustomDialogController({
builder: ENewspaperCalendarDialog(),
alignment: DialogAlignment.Top,
offset: { dx: 0, dy: 80 },
customStyle: true,
// cornerRadius: 4
})
listDialogController: CustomDialogController = new CustomDialogController({
builder: ENewspaperListDialog({ newspaperListBean: this.newspaperListBean,
currentPageNum: this.currentPageNum,
... ... @@ -64,9 +74,10 @@ export struct ENewspaperPageComponent {
})
Row() {
Text(this.date)
Text(this.calendarDateTitle)
.fontSize($r('app.float.font_size_20'))
.fontColor($r('app.color.white'))
.fontFamily('BebasNeue_Regular')
Image($r('app.media.icon_triangle'))
.width($r('app.float.border_radius_6'))
... ... @@ -77,6 +88,14 @@ export struct ENewspaperPageComponent {
.alignRules({ middle: { anchor: "__container__", align: HorizontalAlign.Center },
center: { anchor: "__container__", align: VerticalAlign.Center } })
.id('e_newspaper_date')
.onClick(() => {
this.calendarPopup = !this.calendarPopup
if (this.calendarPopup) {
this.calendarDialogController.open()
} else {
this.calendarDialogController.close()
}
})
Image($r('app.media.icon_share'))
.height($r('app.float.top_arrow_size'))
... ... @@ -193,25 +212,25 @@ export struct ENewspaperPageComponent {
}
async aboutToAppear() {
//注册字体
font.registerFont({
familyName: 'BebasNeue_Regular',
// familySrc: '/font/roboto_medium_numbers.ttf' // font文件夹与pages目录同级
familySrc: $rawfile('font/BebasNeue_Regular.otf')
})
let newspaperTimes = await NewspaperViewModel.getNewspaperTime()
if (newspaperTimes && newspaperTimes.length > 0) {
this.date = newspaperTimes[0].date
this.calendarDateTitle = newspaperTimes[0].date
}
try {
let displayTool = display.getDefaultDisplaySync()
let screenWidth = displayTool.width
let picWidth = screenWidth - vp2px(52)
this.picHeight = picWidth * 566 / 378
let listBean = await NewspaperViewModel.getNewspaperList(this.date, picWidth + 'x' + this.picHeight)
let listBean = await NewspaperViewModel.getNewspaperList(this.calendarDateTitle, picWidth + 'x' + this.picHeight)
this.newspaperListBean = listBean;
} catch (exception) {
}
}
aboutToDisappear() {
}
}
\ No newline at end of file
... ...
import { MorningEveningPaperDTO } from 'wdBean'
import { MorningEveningPaperDTO, PageInfoBean } from 'wdBean'
import { Logger } from 'wdKit/Index';
import { DateTimeUtils } from 'wdKit/src/main/ets/utils/DateTimeUtils';
import { MorningEveningViewModel } from '../../viewmodel/MorningEveningViewModel';
import { AudioBarView } from './AudioBarView';
import { PaperTitleComponent } from './PaperTitleComponent';
import { SingleColumn999Component } from './SingleColumn999Component';
... ... @@ -12,6 +14,8 @@ const PATTERN_DATE_CN_RN: string = 'yyyy年\nMM月dd日'; // 日期中包含包
@Entry
@Component
export struct MorningEveningPaperComponent {
@State pageInfoBean: PageInfoBean = {} as PageInfoBean
@State morningEveningPaperDTO: MorningEveningPaperDTO = {
name: "新闻夜读",
topicInfo: {
... ... @@ -30,10 +34,21 @@ export struct MorningEveningPaperComponent {
} as MorningEveningPaperDTO
@State subTitle: string = ''
aboutToAppear() {
async aboutToAppear() {
console.info(TAG, `aboutToAppear`);
let dateTime = DateTimeUtils.parseDate(this.morningEveningPaperDTO?.topicInfo?.topicDate ?? '', DateTimeUtils.PATTERN_DATE_HYPHEN);
this.subTitle = DateTimeUtils.formatDate(dateTime, PATTERN_DATE_CN_RN)
try {
let listBean = await MorningEveningViewModel.getMorningEveningPageInfo("28927")
Logger.info(TAG,"listBean title = "+listBean.topicInfo.title)
Logger.info(TAG,"listBean topicDate = "+listBean.topicInfo.topicDate)
this.pageInfoBean = listBean;
let compInfoBean = await MorningEveningViewModel.getMorningEveningCompInfo("28927")
Logger.info(TAG,"compInfoBean compStyle = "+compInfoBean.compList[0].compStyle)
} catch (exception) {
}
}
build() {
... ...
import { RMCalendarBean } from './RMCalendarBean'
import { RMCalenderCell } from './RMCalendarCell'
const TAG = "RMCalendar"
@Component
export struct RMCalendar {
@State selectItem: RMCalendarBean = new RMCalendarBean()
private today: Date = new Date() // 当天
// 开始日期
startDate: Date = new Date()
// 截止日期
endDate: Date = new Date()
//当前日期-当前显示的月份的第一天
private startDay: Date = new Date(
this.today.getFullYear(),
this.today.getMonth(),
1
)
// 是否有上一个月
@State private hasPre: boolean = true
// 是否有下一个月
@State private hasNext: boolean = true
// 标题栏高度
titleHeight: Length = '50vp'
// 星期标题
weeks: string[] = ["日", "一", "二", "三", "四", "五", "六",]
// 星期标题字体大小
weekTitleFontSize: number | string | Resource = 12
// 星期标题字体颜色
weekTitleFontColor: ResourceColor = "#999999"
// 星期标栏高度
weekTitleHeight: Length = 30
weekFontWeight: FontWeight = FontWeight.Bold
// 标题字体大小
titleFontSize: number | string | Resource = 16
// 标题字体颜色
titleFontColor: ResourceColor = "#333333"
titleFontWeight: FontWeight = FontWeight.Bold
// 日期每一项字体大小
itemFontSize: number | string | Resource = 14
itemFontColor: ResourceColor = "#333333"
itemFontWeight: FontWeight = FontWeight.Bold
// 今日字体颜色
todayFontColor: ResourceColor = "#ED2800"
// 不能使用的日期字体颜色
disabledFontColor: ResourceColor = "#CCCCCC"
// 选中日期字体颜色
selectFontColor: ResourceColor = "#FFFFFF"
// 选中日期背景颜色, 默认与todayFontColor一致
selectItemBgColor: ResourceColor = "#ED2800"
@State private title: string = ''
// 计算的总加载
@State dates: Array<RMCalendarBean> = new Array()
// 已选日期
@State selectedDates: Array<RMCalendarBean> = new Array()
// 自定义每一项布局
public cellLayout?: (item: RMCalendarBean) => void
// 仅自定义 今日 样式,当使用cellLayout时,tadayLayout无效
todayLayout?: (item: RMCalendarBean) => void
// 计算item时,如需添加更多自定义属性时使用
reBuildDateItem?: (item: RMCalendarBean) => RMCalendarBean
// 选择变化监听,
onDateChange?: (date1: RMCalendarBean) => void
onMonthChange?: (after: Date, befor: Date) => void
// 不可选中项的点击事件
disableCellClick?: (item: RMCalendarBean) => void
@Builder
createWeekTitle(item: string) {
Text(item)
.textAlign(TextAlign.Center)
.fontColor(this.weekTitleFontColor)
.fontSize(this.weekTitleFontSize)
.fontWeight(this.weekFontWeight)
.layoutWeight(1)
}
@Builder
createCell() {
ForEach(this.dates, (item: RMCalendarBean) => {
RMCalenderCell({
item: item,
cellLayout: this.cellLayout,
itemFontSize: this.itemFontSize,
itemFontColor: this.itemFontColor,
today: this.today.getTime(),
itemFontWeight: this.itemFontWeight,
todayFontColor: this.todayFontColor,
todayLayout: this.todayLayout,
selectItem: $selectItem,
selectFontColor: this.selectFontColor,
selectItemBgColor: this.selectItemBgColor,
selectedDates: $selectedDates,
disabledFontColor: this.disabledFontColor,
hasPre: this.hasPre,
hasNext: this.hasNext,
disableClick: (item: RMCalendarBean) => {
if (this.disableCellClick) {
this.disableCellClick(item)
}
},
cellClick: (item: RMCalendarBean) => {
if (item.isPre) {
this.preMonth()
} else if (item.isNext) {
this.nextMonth()
}
if (this.onDateChange) {
this.onDateChange(item)
if (item.fullYear && item.month) {
this.title = `${item.fullYear}年${item.month + 1}月`
}
}
}
})
.width(`14.28%`)
}, (item: RMCalendarBean) => JSON.stringify(item))
}
/**
* 属性初始化
*/
initAttr() {
if (!this.selectItemBgColor) {
this.selectItemBgColor = this.todayFontColor
}
this.today = new Date(
this.today.getFullYear(),
this.today.getMonth(),
this.today.getDate(),
)
// 开始日期
if (!this.startDate) {
this.startDate = new Date(1970, 0, 1)
}
// 截止日期
if (!this.endDate) {
this.endDate = new Date(this.today.getFullYear() + 10, 11, 31)
}
if (this.today.getTime() < this.startDate.getTime()) {
this.startDay.setTime(this.startDate.getTime())
} else if (this.today.getTime() > this.endDate.getTime()) {
this.startDay.setTime(this.endDate.getTime())
} else {
this.startDay.setTime(this.today.getTime())
}
}
aboutToAppear() {
this.initAttr()
let temp = new RMCalendarBean()
temp.time = this.today.getTime()
this.selectItem = temp
this.calcDatas()
}
/**
* 下一个月
*/
private nextMonth() {
// this.dates.slice(0, this.dates.length)
this.dates = []
const beforDate = new Date(this.startDay.getFullYear(), this.startDay.getMonth())
this.startDay.setMonth(this.startDay.getMonth() + 1)
if (this.onMonthChange) {
this.onMonthChange(new Date(this.startDay.getFullYear(), this.startDay.getMonth()), beforDate)
}
this.calcDatas()
}
/**
* 上一个月
*/
private preMonth() {
// this.dates.slice(0, this.dates.length)
this.dates = []
const beforDate = new Date(this.startDay.getFullYear(), this.startDay.getMonth())
this.startDay.setMonth(this.startDay.getMonth() - 1)
if (this.onMonthChange) {
this.onMonthChange(new Date(this.startDay.getFullYear(), this.startDay.getMonth()), beforDate)
}
this.calcDatas()
}
/**
* 具体计算
*/
private calcDatas() {
const startDay = this.startDay
this.title = `${startDay.getFullYear()}年${startDay.getMonth() + 1}月`
startDay.setDate(1)
if (startDay.getFullYear() < this.startDate.getFullYear()
|| (startDay.getFullYear() == this.startDate.getFullYear() && startDay.getMonth() <= this.startDate.getMonth())) {
this.hasPre = false
} else {
this.hasPre = true
}
if (startDay.getFullYear() > this.endDate.getFullYear()
|| (startDay.getFullYear() == this.endDate.getFullYear() && startDay.getMonth() >= this.endDate.getMonth())) {
this.hasNext = false
} else {
this.hasNext = true
}
// 计算第一个月
// 获取第一个月总天数
let endDay: Date = new Date(
startDay.getFullYear(),
startDay.getMonth() + 1,
0, 23, 59, 59)
let tempDate: Date = new Date(
startDay.getFullYear(),
startDay.getMonth(),
startDay.getDate()
)
const count = endDay.getDate()
const preCount = startDay.getDay()
// const nextCount = 6 - endDay.getDay()
const nextCount = 0
const finilCount = count + preCount + nextCount
// 补齐上一个月
tempDate.setDate(tempDate.getDate() - preCount)
// 添加日期
for (let index = 0; index < finilCount; index++) {
let item = new RMCalendarBean(
tempDate.getFullYear(),
tempDate.getMonth(),
tempDate.getDate(),
tempDate.getDay(),
tempDate.getTime(),
// @ ts-ignore
// LunarCalendar.convertSolarToLunar(tempDate),
(index < preCount ? true : false) || this.startDate.getTime() > tempDate.getTime(),
(index >= preCount + count ? true : false) || this.endDate.getTime() < tempDate.getTime(),
)
if (this.reBuildDateItem) {
this.reBuildDateItem(item)
}
this.dates.push(item)
tempDate.setDate(tempDate.getDate() + 1)
}
}
build() {
Column() {
Image($r("app.media.iv_e_news_pager_calendar_arrow_up"))
.width(18).height(8.5)
Column() {
Row() {
Column() {
Image(this.hasPre ? $r("app.media.iv_e_news_pager_calendar_arrow_pre")
: $r("app.media.iv_e_news_pager_calendar_arrow_pre_gray"))
.width(22)
.aspectRatio(1)
}
.justifyContent(FlexAlign.Center)
.height("100%")
.aspectRatio(1)
.onClick(() => {
if (this.hasPre) {
this.preMonth()
}
})
Blank()
Row() {
Text(this.title)
.fontSize(this.titleFontSize)
.fontColor(this.titleFontColor)
.fontWeight(this.titleFontWeight)
}
Blank()
Column() {
Image(this.hasNext ? $r("app.media.iv_e_news_pager_calendar_arrow_next")
: $r("app.media.iv_e_news_pager_calendar_arrow_next_gray"))
.width(22)
.aspectRatio(1)
}
.justifyContent(FlexAlign.Center)
.height("100%")
.aspectRatio(1)
.onClick(() => {
if (this.hasNext) {
this.nextMonth()
}
})
}
.alignItems(VerticalAlign.Center)
.width("100%")
.height(this.titleHeight)
// 星期title
Row() {
ForEach(this.weeks, (item: string) => {
this.createWeekTitle(item)
}, (item: string) => {
return item
})
}
.alignItems(VerticalAlign.Center)
.height(this.weekTitleHeight)
Flex({ wrap: FlexWrap.Wrap }) {
this.createCell()
}
.width("100%")
}
.backgroundColor(Color.White)
.margin({
left: 35,
right: 35
})
.border({ radius: 4 })
}
}
}
\ No newline at end of file
... ...
@Observed
export class RMCalendarBean {
fullYear?: number
month?: number
date?: number
week?: number
time?: number
isPre?: boolean // 是否是上一个月的 / 在startDate 之前
isNext?: boolean // 是否是下一个月的 / 在endDate 之后
constructor(fullYear?: number, month?: number,
date?: number, day?: number,
time?: number,
isPre?: boolean,
isNext?: boolean) {
this.fullYear = fullYear
this.month = month
this.date = date
this.week = day
this.time = time
this.isPre = isPre
this.isNext = isNext
}
}
\ No newline at end of file
... ...
import { RMCalendarBean } from './RMCalendarBean';
import font from '@ohos.font';
@Component
export struct RMCalenderCell {
private selectOpacity: number = 0.15
itemFontSize: Length = 0
itemFontColor: ResourceColor = {} as ResourceColor
itemFontWeight: FontWeight = FontWeight.Normal
todayFontColor: ResourceColor = {} as ResourceColor
selectFontColor: ResourceColor = {} as ResourceColor
selectItemBgColor: ResourceColor = {} as ResourceColor
disabledFontColor: ResourceColor = {} as ResourceColor
// 今日时间戳
today: number = 0
@Link selectItem: RMCalendarBean
@Link selectedDates: Array<RMCalendarBean>
@Prop hasPre: boolean
@Prop hasNext: boolean
@ObjectLink item: RMCalendarBean
// 自定义每一项布局
cellLayout?: (item: RMCalendarBean) => void
todayLayout?: (item: RMCalendarBean) => void
cellClick?: (item: RMCalendarBean) => void
disableClick?: (item: RMCalendarBean) => void
/**
* 检测是否包含在数组中
*/
checkInArrays() {
for (let index = 0; index < this.selectedDates.length; index++) {
if (this.item.time == this.selectedDates[index].time) {
return index
}
}
return -1
}
getItemColor() {
if (this.item.isPre) {
return this.disabledFontColor
} else if (this.item.isNext) {
return this.disabledFontColor
} else if (this.selectItem && this.selectItem.time == this.item.time) {
return this.selectFontColor
} else if (this.item.time == this.today) {
return this.todayFontColor
}
return this.itemFontColor
}
getBorder() {
if (this.selectItem && this.selectItem.time == this.item.time) {
return this.border({
width: 1,
color: this.getItemColor()
})
} else {
return this.border({
width: 0,
}
)
}
}
/**
* 获取选中项背景颜色
*/
getSelectItemBg() {
return this.selectItemBgColor
}
/**
* 获取选中项背景透明度
* @returns
*/
getSelectItemBgOpa() {
return this.item.isPre || this.item.isNext ? this.selectOpacity : 1
}
/**
* 是否需要显示选项背景
*/
isShowSelectBg() {
return this.selectItem && this.selectItem.time == this.item.time
}
build() {
Column() {
Stack() {
if (!this.item.isPre) {
if (this.isShowSelectBg()) {
Column()// .position({ x: "10%", y: "10%" })
.height("80%")
.aspectRatio(1)// .borderRadius(999)
.backgroundColor(this.getSelectItemBg())
.opacity(this.getSelectItemBgOpa())
.transition({ type: TransitionType.Insert, opacity: 1 })
.transition({ type: TransitionType.Delete, opacity: 0 })
}
Text(this.item.date + '')
.fontSize(this.itemFontSize)
.fontColor(this.getItemColor())
.fontWeight(this.itemFontWeight)
.fontFamily('BebasNeue_Regular')
}
}
// .justifyContent(FlexAlign.Center)
.aspectRatio(1)
// .border(this.getBorder())
.width("80%")
}
.justifyContent(FlexAlign.Center)
// .width("100%")
// .aspectRatio(1)
.onClick(() => {
// animateTo({ duration: 200 }, () => {
//
// })
if (this.item.isNext) {
if (!this.hasNext) {
if (this.disableClick) {
this.disableClick(this.item)
}
return
}
}
if (this.item.isPre) {
// if (!this.hasPre) {
if (this.disableClick) {
this.disableClick(this.item)
}
return
// }
}
this.selectItem = this.item
if (this.cellClick) {
this.cellClick(this.item)
}
})
}
}
\ No newline at end of file
... ...
import { Logger, StringUtils } from 'wdKit'
import { WDRouterPage, WDRouterRule } from 'wdRouter'
@Component
export default struct MinePageUserSimpleInfoUI {
@Prop isLogin:boolean
@Prop userName:string
@Consume('isLogin')@Watch('loginChange') isLogin2:Record<string,string>
loginChange(){
Logger.debug("isLogin",'MinePageUserSimpleInfoUI')
if(this.isLogin2){
this.isLogin=true
this.userName=this.isLogin2['userName']
}
}
build(){
Row(){
... ... @@ -21,14 +31,16 @@ export default struct MinePageUserSimpleInfoUI {
.height('110lpx')
.alignContent(Alignment.Center)
.onClick(()=>{
if(!this.isLogin){
WDRouterRule.jumpWithPage(WDRouterPage.loginPage)
}
})
if(this.isLogin){
//昵称信息
Column(){
Row(){
Text("人民日报6G5E3T")
Text(this.userName)
.fontColor($r('app.color.color_222222'))
.maxLines(1)
.textOverflow({ overflow: TextOverflow.Ellipsis })
... ...
import { MineAppointmentItem } from '../../viewmodel/MineAppointmentItem'
import { MineAppointmentItem } from '../../../viewmodel/MineAppointmentItem'
@Component
export struct AppointmentListChildComponent{
... ...
import { AppointmentListChildComponent } from '../mine/AppointmentListChildComponent';
import { CustomTitleUI } from '../reusable/CustomTitleUI'
import { ListHasNoMoreDataUI } from '../reusable/ListHasNoMoreDataUI';
import { MineAppointmentItem } from '../../viewmodel/MineAppointmentItem';
import { AppointmentListChildComponent } from './AppointmentListChildComponent';
import { CustomTitleUI } from '../../reusable/CustomTitleUI'
import { ListHasNoMoreDataUI } from '../../reusable/ListHasNoMoreDataUI';
import { MineAppointmentItem } from '../../../viewmodel/MineAppointmentItem';
import { LazyDataSource, StringUtils } from 'wdKit';
import MinePageDatasModel from '../../model/MinePageDatasModel';
import MinePageDatasModel from '../../../model/MinePageDatasModel';
const TAG = "AppointmentListUI"
@Component
export struct AppointmentListUI{
@State data: LazyDataSource<MineAppointmentItem> = new LazyDataSource();
@State count:number = 0;
@State isLoading:boolean = false
@State hasMore:boolean = true
curPageNum:number = 1;
... ... @@ -21,6 +22,9 @@ export struct AppointmentListUI{
Column() {
//标题栏目
CustomTitleUI({titleName:"预约列表"})
if(this.count == 0){
ListHasNoMoreDataUI({style:2})
}else{
//刷新控件 TODO
//List
List({ space: '6lpx' }) {
... ... @@ -51,6 +55,7 @@ export struct AppointmentListUI{
}
})
}
}
.backgroundColor($r('app.color.color_F9F9F9'))
.height('100%')
.width('100%')
... ... @@ -72,6 +77,7 @@ export struct AppointmentListUI{
}
})
this.data.notifyDataReload()
this.count = this.data.totalCount()
if (this.data.totalCount() < value.totalCount) {
this.curPageNum++
}else {
... ...
import { ResourcesUtils } from 'wdKit'
import { ResponseDTO } from 'wdNetwork'
import MinePageDatasModel from '../../../model/MinePageDatasModel'
import { FollowListItem } from '../../../viewmodel/FollowListItem'
import { CustomTitleUI } from '../../reusable/CustomTitleUI'
import { FollowSecondTabsComponent } from './FollowSecondTabsComponent'
const TAG = "FollowFirstTabsComponent"
@Component
export struct FollowFirstTabsComponent{
@State currentIndex: number = 0
... ... @@ -13,17 +12,18 @@ export struct FollowFirstTabsComponent{
selectedFontColor: string = '#000000'
aboutToAppear(){
this.data.push(new FollowListItem("我的"))
// 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)
// });
ResourcesUtils.getResourcesJson<ResponseDTO<FollowListItem[]>>(getContext(this),'follow_list_data.json').then((success)=>{
success.data?.forEach(element => {
MinePageDatasModel.getFollowListData(getContext(this)).then((value)=>{
this.data.push(new FollowListItem("我的"))
value.forEach((element)=>{
this.data.push(element)
});
})
console.log("ycg",this.data.length.toString());
}).catch((err:Error)=>{
console.log(TAG,JSON.stringify(err))
})
}
... ...
import { LazyDataSource } from 'wdKit';
import { LazyDataSource, StringUtils } from 'wdKit';
import MinePageDatasModel from '../../../model/MinePageDatasModel';
import { FollowListDetailItem } from '../../../viewmodel/FollowListDetailItem'
import { FollowListDetailRequestItem } from '../../../viewmodel/FollowListDetailRequestItem';
import { FollowListStatusRequestItem } from '../../../viewmodel/FollowListStatusRequestItem';
import { MineFollowListDetailItem } from '../../../viewmodel/MineFollowListDetailItem';
import { QueryListIsFollowedItem } from '../../../viewmodel/QueryListIsFollowedItem';
import { ListHasNoMoreDataUI } from '../../reusable/ListHasNoMoreDataUI';
const TAG = "FollowListDetailUI"
... ... @@ -7,11 +12,10 @@ const TAG = "FollowListDetailUI"
export struct FollowListDetailUI{
@State creatorDirectoryId:number = -1;
@State data: LazyDataSource<FollowListDetailItem> = new LazyDataSource();
@State count:number = 0;
@State isLoading:boolean = false
@State hasMore:boolean = true
curPageNum:number = 1;
headUrl = "https://sitcontentjdcdn.aikan.pdnews.cn/vod/content/202309/202309Th211436299/GLN.png?x-oss-process=image/resize,l_400/auto-orient,1/quality,q_90/format,jpg"
aboutToAppear(){
console.log("YCG","aboutToAppear==="+this.creatorDirectoryId);
... ... @@ -20,6 +24,10 @@ export struct FollowListDetailUI{
build(){
Column(){
if(this.count === 0){
ListHasNoMoreDataUI({style:2})
.height('100%')
}else{
List({ space: 3 }) {
LazyForEach(this.data, (item: FollowListDetailItem, index: number = 0) => {
ListItem() {
... ... @@ -29,7 +37,6 @@ export struct FollowListDetailUI{
})
}, (item: FollowListDetailItem, index: number) => index.toString())
//没有更多数据 显示提示
if(!this.hasMore){
ListItem(){
... ... @@ -39,6 +46,7 @@ export struct FollowListDetailUI{
}.cachedCount(7)
.padding({left:'31lpx',right:'31lpx'})
.layoutWeight(1)
.scrollBar(BarState.Off)
.onReachEnd(()=>{
console.log(TAG,"触底了");
if(!this.isLoading){
... ... @@ -47,32 +55,98 @@ export struct FollowListDetailUI{
this.getNewPageData()
}
})
}.layoutWeight(1)
}
}
.width('100%')
}
getNewPageData(){
this.isLoading = true
//我的关注列表
if (this.creatorDirectoryId === -1){
if(this.hasMore){
if(this.curPageNum>=4){
let object = new FollowListDetailRequestItem(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"))
})
this.data.notifyDataReload()
this.count = this.data.totalCount()
if (this.data.totalCount() < value.totalCount) {
this.curPageNum++
}else {
this.hasMore = false
}
}
this.isLoading = false
}).catch((err:Error)=>{
console.log(TAG,"请求失败")
this.isLoading = false
})
}
}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)=>{
if (!this.data || value.list.length == 0){
this.hasMore = false
return
}
if(this.curPageNum == 1){
this.data.push(new FollowListDetailItem(this.headUrl,"人之初,性本善",10,"人之初,性本善"));
this.data.push(new FollowListDetailItem(this.headUrl,"性相近,习相远",20,"性相近,习相远"));
this.data.push(new FollowListDetailItem(this.headUrl,"苟不教,性乃迁",30,"苟不教,性乃迁"));
this.data.push(new FollowListDetailItem(this.headUrl,"教之道,贵以专",40,"教之道,贵以专"));
this.data.push(new FollowListDetailItem(this.headUrl,"AAAAAAA",50,"教之道,贵以专"));
this.data.push(new FollowListDetailItem(this.headUrl,"BBBBBBB",60,"教之道,贵以专"));
this.data.push(new FollowListDetailItem(this.headUrl,"CCCCCCC",70,"教之道,贵以专"));
}else if(this.curPageNum == 2){
this.data.push(new FollowListDetailItem(this.headUrl,"昔孟母,择邻处",40,"昔孟母,择邻处"));
}else if(this.curPageNum == 3){
this.data.push(new FollowListDetailItem(this.headUrl,"子不学,断机杼",40,"子不学,断机杼"));
this.isLoading = false
}else{
this.getFollowListStatus(value)
}
}).catch((err:Error)=>{
console.log(TAG,"请求失败")
this.isLoading = false
})
}
}
}
getFollowListStatus(value:MineFollowListDetailItem){
let status = new FollowListStatusRequestItem()
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"))
})
MinePageDatasModel.getFollowListStatusData(status,getContext(this)).then((newValue)=>{
newValue.forEach((item)=>{
data.forEach((list)=>{
if (item.creatorId == list.creatorId) {
list.status = item.status
}
})
})
data.forEach((item)=>{
this.data.push(new FollowListDetailItem(item.headPhotoUrl,item.cnUserName,item.cnFansNum,item.introduction,item.creatorId,item.status))
})
this.data.notifyDataReload()
this.count = this.data.totalCount()
if (this.data.totalCount() < value.totalCount) {
this.curPageNum++
}else {
this.hasMore = false
}
this.isLoading = false
}).catch((err:Error)=>{
console.log(TAG,"请求失败")
this.isLoading = false
})
}
}
@Component
... ... @@ -84,7 +158,7 @@ struct ChildComponent {
Blank().height('27lpx')
Row() {
Image(this.data.headPhotoUrl)
Image(StringUtils.isEmpty(this.data.headPhotoUrl)?$r('app.media.default_head'):this.data.headPhotoUrl)
.objectFit(ImageFit.Auto)
.width('92lpx')
.height('92lpx')
... ... @@ -108,7 +182,7 @@ struct ChildComponent {
}.layoutWeight(1)
.alignItems(HorizontalAlign.Start)
if(this.data.isFollow){
if(this.data.status == "1"){
Row(){
Text(`已关注`)
.fontColor($r('app.color.color_CCCCCC'))
... ... @@ -117,13 +191,14 @@ struct ChildComponent {
.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.isFollow = false
this.data.status = "0"
})
}else{
Row(){
... ... @@ -136,7 +211,7 @@ struct ChildComponent {
.fontSize('23lpx')
.fontWeight('500lpx')
.lineHeight('35lpx')
}.borderColor($r('app.color.color_ED2800'))
}.borderColor($r('app.color.color_1AED2800'))
.borderRadius('6lpx')
.borderWidth('2lpx')
.justifyContent(FlexAlign.Center)
... ... @@ -144,7 +219,7 @@ struct ChildComponent {
.height('46lpx')
.margin({left:'4lpx',top:'23lpx'})
.onClick(()=>{
this.data.isFollow = true
this.data.status = "1"
})
}
}.alignItems(VerticalAlign.Top)
... ...
import { AppointmentListUI } from '../mine/AppointmentListUI'
import { AppointmentListUI } from '../mine/appointment/AppointmentListUI'
const TAG = "AppointmentListPage"
... ...
... ... @@ -16,7 +16,7 @@ export struct BottomNavigationComponent {
// 底导/顶导全部数据
@State @Watch('onBottomNavigationDataUpdated') bottomNavList: BottomNavDTO[] = []
// 底导当前选中/焦点下标
@Provide currentNavIndex: number = BottomNavi.NEWS;
@State currentNavIndex: number = BottomNavi.NEWS;
// 底导TabsController
private navController: TabsController = new TabsController();
readonly ASPECT_RATIO_1_1: number = 1 / 1; // 底导图片宽高比
... ... @@ -51,7 +51,7 @@ export struct BottomNavigationComponent {
// 我的页面组件数据列表
MinePageComponent()
} else {
TopNavigationComponent({ topNavList: navItem.topNavChannelList })
TopNavigationComponent({ topNavList: navItem.topNavChannelList, _currentNavIndex: this.currentNavIndex })
}
}
}
... ... @@ -85,6 +85,7 @@ export struct BottomNavigationComponent {
}
.height($r('app.float.bottom_navigation_barHeight'))
.hoverEffect(HoverEffect.Highlight)
// .justifyContent(FlexAlign.Center)
// .onClick(() => {
// Logger.info(TAG, `onClick, index: ${index}`);
... ...
... ... @@ -7,6 +7,8 @@ import MinePagePersonFunctionUI from '../mine/MinePagePersonFunctionUI'
import MinePageCardUI from '../mine/MinePageCardUI'
import MinePageCreatorFunctionUI from '../mine/MinePageCreatorFunctionUI'
import MinePageMoreFunctionUI from '../mine/MinePageMoreFunctionUI'
import { SPHelper, StringUtils } from 'wdKit'
import { SpConstants } from 'wdConstant'
const TAG = 'MinePageComponent';
... ... @@ -18,14 +20,14 @@ export struct MinePageComponent {
//是否是创作者
@State isCreator:boolean = false
@State isLogin:boolean = false
@State userName:string = "登陆注册"
@State personalData:MinePagePersonalFunctionsItem[] = []
@State creatorData:MinePageCreatorFunctionsItem[] = []
@State moreData:MinePageMoreFunctionModel[] = []
scroller: Scroller = new Scroller()
aboutToAppear(){
//登录信息 TODO
this.getUserLogin()
this.getFunctionData()
}
... ... @@ -59,7 +61,7 @@ export struct MinePageComponent {
@Builder MinePageUI(){
Column(){
//头像层
MinePageUserSimpleInfoUI({isLogin:this.isLogin})
MinePageUserSimpleInfoUI({isLogin:this.isLogin,userName:this.userName})
//Grid 区域
MinePagePersonFunctionUI({personalData:$personalData})
//Card
... ... @@ -77,4 +79,16 @@ export struct MinePageComponent {
.height('100%')
}
async getUserLogin() {
let userid = await SPHelper.default.get(SpConstants.USER_ID,"")
if(StringUtils.isNotEmpty(userid)){
this.isLogin = true
let userName = await SPHelper.default.get(SpConstants.USER_NAME,"") as string
this.userName = userName
}else{
this.isLogin = false
}
}
}
... ...
... ... @@ -10,6 +10,7 @@ const TAG = 'TopNavigationComponent';
*/
@Component
export struct TopNavigationComponent {
@Prop _currentNavIndex?: number;
// 顶导当前选中/焦点下标
@State currentTopNavSelectedIndex: number = 0;
// 顶导数据
... ... @@ -19,15 +20,15 @@ export struct TopNavigationComponent {
build() {
Column() {
RelativeContainer(){
Stack({ alignContent: Alignment.Center }){
RelativeContainer() {
Stack({ alignContent: Alignment.Center }) {
Image($r('app.media.background_search'))
.width('100%')
.height('100%')
.objectFit(ImageFit.Contain)
Row(){
Row() {
Image($r('app.media.icon_search'))
.width(18)
.height(18)
... ... @@ -62,12 +63,12 @@ export struct TopNavigationComponent {
.alignRules({ middle: { anchor: "__container__", align: HorizontalAlign.Center },
center: { anchor: "__container__", align: VerticalAlign.Center } })
Stack({ alignContent: Alignment.Center }){
Stack({ alignContent: Alignment.Center }) {
Image($r('app.media.background_read_paper_home'))
.width('100%')
.height('100%')
.objectFit(ImageFit.Contain)
Row(){
Row() {
Image($r('app.media.icon_read_paper_home'))
.width(18)
.height(18)
... ... @@ -84,7 +85,7 @@ export struct TopNavigationComponent {
.id('read')
.alignRules({ right: { anchor: "__container__", align: HorizontalAlign.End },
center: { anchor: "__container__", align: VerticalAlign.Center } })
.onClick((event: ClickEvent)=>{
.onClick((event: ClickEvent) => {
let taskAction: Action = {
type: 'JUMP_INNER_NEW_PAGE',
... ... @@ -97,6 +98,7 @@ export struct TopNavigationComponent {
}
.width('100%')
.height(40)
.visibility(this._currentNavIndex == 0 ? Visibility.Visible : Visibility.None)
Tabs() {
ForEach(this.topNavList, (navItem: TopNavDTO, index: number) => {
... ... @@ -132,7 +134,7 @@ export struct TopNavigationComponent {
.maxLines(this.MAX_LINE)
Divider()
.width(16)
.strokeWidth(2) // 分割线粗细度。
.strokeWidth(2)// 分割线粗细度。
.padding({ top: 2 })
.color(Color.Red)
.opacity(this.currentTopNavSelectedIndex === index ? 1 : 0)
... ...
@Component
export struct ListHasNoMoreDataUI{
@State style:number = 1;
build(){
if (this.style === 1){
Row(){
Text("已显示全部内容")
.fontColor($r('app.color.color_999999'))
... ... @@ -9,5 +12,22 @@ export struct ListHasNoMoreDataUI{
}.justifyContent(FlexAlign.Center)
.width('100%')
.margin({top:'20lpx',bottom:'20lpx'})
}else if (this.style === 2){
Column(){
Image($r('app.media.empty_icon'))
.width('200lpx')
.height('200lpx')
.objectFit(ImageFit.Auto)
Text("暂无内容")
.fontColor($r('app.color.color_999999'))
.fontWeight('500lpx')
.fontSize('23lpx')
}
.justifyContent(FlexAlign.Center)
.width('100%')
.height('100%')
}
}
}
\ No newline at end of file
... ...
import { RMCalendar } from '../components/calendar/RMCalendar'
import { RMCalendarBean } from '../components/calendar/RMCalendarBean'
@CustomDialog
export struct ENewspaperCalendarDialog {
calendarDialogController?: CustomDialogController
build() {
RMCalendar({
// 开始日期
startDate: new Date(2023, 8, 1),
// 截止日期
endDate: new Date(2024, 2, 20),
// 日期选择变化监听
onDateChange: (date1: RMCalendarBean) => {
console.log("onDateChange", "date1:", JSON.stringify(date1))
if (this.calendarDialogController) {
this.calendarDialogController.close()
}
}
})
}
}
\ No newline at end of file
... ...
... ... @@ -6,6 +6,13 @@ import HashMap from '@ohos.util.HashMap';
import { HttpUrlUtils, ResponseDTO, WDHttp } from 'wdNetwork';
import { MineAppointmentListItem } from '../viewmodel/MineAppointmentListItem';
import { Logger, ResourcesUtils } from 'wdKit';
import { MineFollowListDetailItem } from '../viewmodel/MineFollowListDetailItem';
import { FollowListDetailRequestItem } from '../viewmodel/FollowListDetailRequestItem';
import { FollowListItem } from '../viewmodel/FollowListItem';
import { MineFollowListItem } from '../viewmodel/MineFollowListItem';
import { QueryListIsFollowedItem } from '../viewmodel/QueryListIsFollowedItem';
import { FollowListStatusRequestItem } from '../viewmodel/FollowListStatusRequestItem';
const TAG = "MinePageDatasModel"
/**
... ... @@ -83,6 +90,12 @@ class MinePageDatasModel{
return this.moreData
}
/**
* 预约
* @param pageSize
* @param pageNum
* @returns
*/
fetchAppointmentListData(pageSize:string,pageNum:string) {
let url = HttpUrlUtils.getAppointmentListDataUrl()+ `?pageSize=${pageSize}&pageNum=${pageNum}`
let headers: HashMap<string, string> = HttpUrlUtils.getYcgCommonHeaders();
... ... @@ -93,8 +106,7 @@ class MinePageDatasModel{
return new Promise<MineAppointmentListItem>((success, error) => {
Logger.info(TAG, `getAppointmentList start`);
this.fetchAppointmentListData(pageSize,pageNum).then((navResDTO: ResponseDTO<MineAppointmentListItem>) => {
if (!navResDTO) {
error("page data invalid");
if (!navResDTO || navResDTO.code != 0) {
success(this.getAppointmentListDataLocal(context))
return
}
... ... @@ -103,7 +115,6 @@ class MinePageDatasModel{
success(navigationBean);
}).catch((err: Error) => {
Logger.error(TAG, `fetchAppointmentListDataApi catch, error.name : ${err.name}, error.message:${err.message}`);
// error(err);
success(this.getAppointmentListDataLocal(context))
})
})
... ... @@ -120,6 +131,169 @@ class MinePageDatasModel{
return compRes.data
}
/**
* 关注频道详情
* @param pageSize
* @param pageNum
* @param context
* @returns
*/
getFollowListDetailData(params:FollowListDetailRequestItem,context: Context): Promise<MineFollowListDetailItem> {
return new Promise<MineFollowListDetailItem>((success, error) => {
Logger.info(TAG, `getAppointmentList start`);
this.fetchFollowListDetailData(params).then((navResDTO: ResponseDTO<MineFollowListDetailItem>) => {
if (!navResDTO || navResDTO.code != 0) {
success(this.getFollowListDetailDataLocal(context))
return
}
Logger.info(TAG, "getAppointmentList then,AppointmentResDTO.timeStamp:" + navResDTO.timestamp);
let navigationBean = navResDTO.data as MineFollowListDetailItem
success(navigationBean);
}).catch((err: Error) => {
Logger.error(TAG, `fetchAppointmentListDataApi catch, error.name : ${err.name}, error.message:${err.message}`);
success(this.getFollowListDetailDataLocal(context))
})
})
}
async getFollowListDetailDataLocal(context: Context): Promise<MineFollowListDetailItem> {
Logger.info(TAG, `getBottomNavDataMock start`);
let compRes: ResponseDTO<MineFollowListDetailItem> | null = await ResourcesUtils.getResourcesJson<ResponseDTO<MineFollowListDetailItem>>(context,'follow_list_detail_data_id120.json' );
if (!compRes || !compRes.data) {
Logger.info(TAG, `getAppointmentListDataLocal compRes is empty`);
return new MineFollowListDetailItem()
}
Logger.info(TAG, `getAppointmentListDataLocal getResourcesJsonSync compRes : ${JSON.stringify(compRes)}`);
return compRes.data
}
fetchFollowListDetailData(object:FollowListDetailRequestItem) {
let url = HttpUrlUtils.getFollowListDetailDataUrl()
let headers: HashMap<string, string> = HttpUrlUtils.getYcgCommonHeaders();
return WDHttp.post<ResponseDTO<MineFollowListDetailItem>>(url, object,headers)
};
/**
* 关注频道列表
* @returns
*/
fetchFollowListData() {
let url = HttpUrlUtils.getFollowListDataUrl()
let headers: HashMap<string, string> = HttpUrlUtils.getYcgCommonHeaders();
return WDHttp.get<ResponseDTO<FollowListItem[]>>(url, headers)
};
getFollowListData(context: Context): Promise<FollowListItem[]> {
return new Promise<FollowListItem[]>((success, error) => {
Logger.info(TAG, `getAppointmentList start`);
this.fetchFollowListData().then((navResDTO: ResponseDTO<FollowListItem[]>) => {
if (!navResDTO || navResDTO.code != 0) {
success(this.getFollowListDataLocal(context))
return
}
Logger.info(TAG, "getAppointmentList then,AppointmentResDTO.timeStamp:" + navResDTO.timestamp);
let navigationBean = navResDTO.data as FollowListItem[]
success(navigationBean);
}).catch((err: Error) => {
Logger.error(TAG, `fetchAppointmentListDataApi catch, error.name : ${err.name}, error.message:${err.message}`);
success(this.getFollowListDataLocal(context))
})
})
}
async getFollowListDataLocal(context: Context): Promise<FollowListItem[]> {
Logger.info(TAG, `getFollowListDataLocal start`);
let compRes: ResponseDTO<FollowListItem[]> | null = await ResourcesUtils.getResourcesJson<ResponseDTO<FollowListItem[]>>(context,'follow_list_data.json' );
if (!compRes || !compRes.data) {
Logger.info(TAG, `getFollowListDataLocal compRes is empty`);
return []
}
Logger.info(TAG, `getFollowListDataLocal getResourcesJsonSync compRes : ${JSON.stringify(compRes)}`);
return compRes.data
}
/**
* 我的关注列表
* @param params
* @param context
* @returns
*/
getMineFollowListData(params:FollowListDetailRequestItem,context: Context): Promise<MineFollowListItem> {
return new Promise<MineFollowListItem>((success, error) => {
Logger.info(TAG, `getAppointmentList start`);
this.fetchMineDetailFollowListData(params).then((navResDTO: ResponseDTO<MineFollowListItem>) => {
if (!navResDTO || navResDTO.code != 0) {
success(this.getMineFollowListDataLocal(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.getMineFollowListDataLocal(context))
})
})
}
fetchMineDetailFollowListData(object:FollowListDetailRequestItem) {
let url = HttpUrlUtils.getMineFollowListDataUrl()+`?pageSize=${object.pageSize}&pageNum=${object.pageNum}`
let headers: HashMap<string, string> = HttpUrlUtils.getYcgCommonHeaders();
return WDHttp.get<ResponseDTO<MineFollowListItem>>(url, headers)
};
async getMineFollowListDataLocal(context: Context): Promise<MineFollowListItem> {
Logger.info(TAG, `getMineFollowListDataLocal start`);
let compRes: ResponseDTO<MineFollowListItem> | null = await ResourcesUtils.getResourcesJson<ResponseDTO<MineFollowListItem>>(context,'mine_follow_list_data.json' );
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
*/
getFollowListStatusData(params:FollowListStatusRequestItem,context: Context): Promise<QueryListIsFollowedItem[]> {
return new Promise<QueryListIsFollowedItem[]>((success, error) => {
Logger.info(TAG, `getAppointmentList start`);
this.fetchFollowListStatusData(params).then((navResDTO: ResponseDTO<QueryListIsFollowedItem[]>) => {
if (!navResDTO || navResDTO.code != 0) {
success(this.getFollowListStatusDataLocal(context))
return
}
Logger.info(TAG, "getAppointmentList then,AppointmentResDTO.timeStamp:" + navResDTO.timestamp);
let navigationBean = navResDTO.data as QueryListIsFollowedItem[]
success(navigationBean);
}).catch((err: Error) => {
Logger.error(TAG, `fetchAppointmentListDataApi catch, error.name : ${err.name}, error.message:${err.message}`);
success(this.getFollowListStatusDataLocal(context))
})
})
}
fetchFollowListStatusData(object:FollowListStatusRequestItem) {
let url = HttpUrlUtils.getFollowListStatusDataUrl()
let headers: HashMap<string, string> = HttpUrlUtils.getYcgCommonHeaders();
return WDHttp.post<ResponseDTO<QueryListIsFollowedItem[]>>(url,object, headers)
};
async getFollowListStatusDataLocal(context: Context): Promise<QueryListIsFollowedItem[]> {
Logger.info(TAG, `getMineFollowListDataLocal start`);
let compRes: ResponseDTO<QueryListIsFollowedItem[]> | null = await ResourcesUtils.getResourcesJson<ResponseDTO<QueryListIsFollowedItem[]>>(context,'follow_list_id120_isfocus_data.json' );
if (!compRes || !compRes.data) {
Logger.info(TAG, `getMineFollowListDataLocal compRes is empty`);
return []
}
Logger.info(TAG, `getMineFollowListDataLocal getResourcesJsonSync compRes : ${JSON.stringify(compRes)}`);
return compRes.data
}
}
... ...
import HashMap from '@ohos.util.HashMap';
import { HttpUrlUtils, ResponseDTO, WDHttp } from 'wdNetwork';
import { DateTimeUtils } from 'wdKit';
import { DateTimeUtils, Logger } from 'wdKit';
import { ContentDetailDTO, NavigationBodyDTO, PageDTO,InteractDataDTO, MorningEveningPaperDTO,
NewspaperTimeInfoBean,
NewspaperListBean
NewspaperListBean,
PageInfoBean,
CompInfoBean
} from 'wdBean';
const TAG = 'HttpRequest';
export class PageRepository {
static getBottomNavGroupUrl() {
// https: //pd-apis-uat.pdnews.cn/api/rmrb-bff-display-zh/display/zh/c/bottomNavGroup
... ... @@ -22,6 +24,7 @@ export class PageRepository {
+ "&refreshTime=" + DateTimeUtils.getTimeStamp()
+ "&pageId=" + pageId
// Logger.debug("TAG", 'getCompInfoUrl url: '+url);
Logger.info(TAG,"getPageInfoUrl url = "+url)
return url;
}
... ... @@ -39,6 +42,7 @@ export class PageRepository {
+ "&pageSize=" + pageSize
+ "&pageNum=" + currentPage;
// Logger.debug("TAG", 'getCompInfoUrl url: '+url);
Logger.info(TAG,"getCompInfoUrl url = "+url)
return url;
}
... ... @@ -48,16 +52,19 @@ export class PageRepository {
+ "&contentId=" + contentId
+ "&relType=" + relType;
// Logger.debug("TAG", 'getCompInfoUrl url: '+url);
Logger.info(TAG,"getDetailInfoUrl url = "+url)
return url;
}
static getInteractDataUrl() {
let url = HttpUrlUtils.getHost() + HttpUrlUtils.INTERACT_DATA_PATH;
Logger.info(TAG,"getInteractDataUrl url = "+url)
return url;
}
static getNewspaperInfoUrl() {
let url = HttpUrlUtils.getHost() + HttpUrlUtils.E_NEWSPAPER_INFO_PATH;
Logger.info(TAG,"getNewspaperInfoUrl url = "+url)
return url;
}
... ... @@ -65,6 +72,28 @@ export class PageRepository {
let url = HttpUrlUtils.getHost() + HttpUrlUtils.E_NEWSPAPER_LIST_PATH;
url = url + "?date=" + date
+ "&pagesSize=" + pageSize;
Logger.info(TAG,"getNewspaperListUrl url = "+url)
return url;
}
/**
* 早晚报pageInfo请求
* */
static getMorningEveningPageInfoUrl(pageId: string) {
let url = HttpUrlUtils.getHost() + HttpUrlUtils.MORNING_EVENING_PAGE_INFO_PATH;
url = url + "?pageId=" + pageId;
Logger.info(TAG,"getMorningEveningPageInfoUrl url = "+url)
return url;
}
/**
* 早晚报compInfo请求
* */
static getMorningEveningCompInfoUrl(pageId: string) {
let url = HttpUrlUtils.getHost() + HttpUrlUtils.MORNING_EVENING_COMP_INFO_PATH;
url = url + "?loadStrategy=first_load&pageNum=1&refreshTime=1710853254592&pageId="
+pageId+"&channelStrategy=2&groupId=40621&topicId=10000009445&pageSize=20";
Logger.info(TAG,"getMorningEveningCompInfoUrl url = "+url)
return url;
}
... ... @@ -118,4 +147,22 @@ export class PageRepository {
let headers: HashMap<string, string> = HttpUrlUtils.getCommonHeaders();
return WDHttp.get<ResponseDTO<NewspaperListBean>>(url, headers)
};
/**
* 获取早晚报pageInfo
* */
static fetchMorningEveningPageInfo(pageId: string) {
let url = PageRepository.getMorningEveningPageInfoUrl(pageId)
let headers: HashMap<string, string> = HttpUrlUtils.getCommonHeaders();
return WDHttp.get<ResponseDTO<PageInfoBean>>(url, headers)
};
/**
* 获取早晚报compInfo
* */
static fetchMorningEveningCompInfo(pageId: string) {
let url = PageRepository.getMorningEveningCompInfoUrl(pageId)
let headers: HashMap<string, string> = HttpUrlUtils.getCommonHeaders();
return WDHttp.get<ResponseDTO<CompInfoBean>>(url, headers)
};
}
\ No newline at end of file
... ...
... ... @@ -65,12 +65,20 @@ export class FollowListDetailItem{
cnUserName:string //昵称
cnFansNum:number //粉丝数
introduction:string //介绍
isFollow:boolean = false //是否已经关注
status:string = "0" //是否已经关注
creatorId:string = ""
constructor(headPhotoUrl:string,cnUserName:string,cnFansNum:number,introduction:string) {
attentionCreatorId:string = ""
attentionHeadPhotoUrl:string = ""
attentionUserName:string = ""
fansNum :number = 0
constructor(headPhotoUrl:string,cnUserName:string,cnFansNum:number,introduction:string,creatorId:string,status:string ) {
this.headPhotoUrl = headPhotoUrl
this.cnUserName = cnUserName
this.cnFansNum = cnFansNum
this.introduction = introduction
this.creatorId = creatorId
this.status = status
}
}
... ...
export class FollowListDetailRequestItem{
creatorDirectoryId:number = -1
pageSize:number = 20
pageNum:number = 1
constructor(creatorDirectoryId: number = -1,
pageSize: number = 20,
pageNum: number = 1) {
this.creatorDirectoryId = creatorDirectoryId
this.pageSize = pageSize
this.pageNum = pageNum
}
}
\ No newline at end of file
... ...
... ... @@ -40,7 +40,7 @@ export class FollowListItem{
}
directoryName:string = ""
directoryWeight:number = 0
id:number = 0
id:number = -1
isShow:number = 1
level:number = 1
parentId:number = 0
... ...
import { QueryListIsFollowedItem } from './QueryListIsFollowedItem'
// {"creatorIds":[{"creatorId":"3004862"},{"creatorId":"3004855"}]}
export class FollowListStatusRequestItem{
creatorIds:QueryListIsFollowedItem[] = []
}
\ No newline at end of file
... ...
import { FollowListDetailItem } from './FollowListDetailItem'
export class MineFollowListDetailItem{
list:FollowListDetailItem[] = []
pageNum: number = 0
pageSize: number = 20
totalCount: number = 0
constructor(list?:FollowListDetailItem[],pageNum?: number,pageSize?: number,totalCount?: number) {
}
}
\ No newline at end of file
... ...
import { MineFollowListDetailItem } from './MineFollowListDetailItem'
export class MineFollowListItem extends MineFollowListDetailItem{
hasNext: number = 0
}
\ No newline at end of file
... ...
import { CompInfoBean, PageInfoBean } from 'wdBean/Index';
import { Logger } from 'wdKit/Index';
import { ResponseDTO } from 'wdNetwork/Index';
import { PageRepository } from '../repository/PageRepository';
const TAG = 'MorningEveningViewModel'
export class MorningEveningViewModel {
static async getNewspaperList(date: string, pageSize: string): Promise<NewspaperListBean> {
return new Promise<NewspaperListBean>((success, error) => {
Logger.info(TAG, `getNavData start`);
PageRepository.fetchNewspaperList(date, pageSize).then((resDTO: ResponseDTO<NewspaperListBean>) => {
static async getMorningEveningPageInfo(pageId: string): Promise<PageInfoBean> {
return new Promise<PageInfoBean>((success, error) => {
Logger.info(TAG, `getMorningEveningPageInfo pageInfo start`);
PageRepository.fetchMorningEveningPageInfo(pageId).then((resDTO: ResponseDTO<PageInfoBean>) => {
if (!resDTO || !resDTO.data) {
Logger.error(TAG, 'getMorningEveningPageInfo then navResDTO is empty');
error('resDTO is empty');
return
}
if (resDTO.code != 0) {
Logger.error(TAG, `getMorningEveningPageInfo then code:${resDTO.code}, message:${resDTO.message}`);
error('resDTO Response Code is failure');
return
}
// let navResStr = JSON.stringify(navResDTO);
Logger.info(TAG, "getMorningEveningPageInfo then,navResDTO.timestamp:" + resDTO.timestamp);
success(resDTO.data);
}).catch((err: Error) => {
Logger.error(TAG, `getMorningEveningPageInfo catch, error.name : ${err.name}, error.message:${err.message}`);
error(err);
})
})
}
static async getMorningEveningCompInfo(pageId: string): Promise<CompInfoBean> {
return new Promise<CompInfoBean>((success, error) => {
Logger.info(TAG, `getMorningEveningCompInfo pageInfo start`);
PageRepository.fetchMorningEveningCompInfo(pageId).then((resDTO: ResponseDTO<CompInfoBean>) => {
if (!resDTO || !resDTO.data) {
Logger.error(TAG, 'getNewspaperList then navResDTO is empty');
Logger.error(TAG, 'getMorningEveningCompInfo then navResDTO is empty');
error('resDTO is empty');
return
}
if (resDTO.code != 0) {
Logger.error(TAG, `getNewspaperList then code:${resDTO.code}, message:${resDTO.message}`);
Logger.error(TAG, `getMorningEveningCompInfo then code:${resDTO.code}, message:${resDTO.message}`);
error('resDTO Response Code is failure');
return
}
// let navResStr = JSON.stringify(navResDTO);
Logger.info(TAG, "getNewspaperList then,navResDTO.timestamp:" + resDTO.timestamp);
Logger.info(TAG, "getMorningEveningCompInfo then,navResDTO.timestamp:" + resDTO.timestamp);
success(resDTO.data);
}).catch((err: Error) => {
Logger.error(TAG, `getNewspaperList catch, error.name : ${err.name}, error.message:${err.message}`);
Logger.error(TAG, `getMorningEveningCompInfo catch, error.name : ${err.name}, error.message:${err.message}`);
error(err);
})
})
... ...
// "creatorId": "3004862",
// "status": "0",
// "userId": "567387477063621"
export class QueryListIsFollowedItem{
creatorId:string = "-1"
status:string = "0"
userId:string = ""
constructor(creatorId: string) {
this.creatorId = creatorId
}
}
\ No newline at end of file
... ...
... ... @@ -98,6 +98,10 @@
{
"name":"color_EDEDED",
"value": "#EDEDED"
},
{
"name": "color_1AED2800",
"value": "#1AED2800"
}
]
}
\ No newline at end of file
... ...
import { WDRouterPage } from 'wdRouter/src/main/ets/router/WDRouterPage'
import { WDRouterRule } from 'wdRouter/src/main/ets/router/WDRouterRule'
import { Params } from '../../../../../../../commons/wdRouter/oh_modules/wdBean/Index'
@CustomDialog
export struct CustomProtocolDialog {
controller: CustomDialogController
... ... @@ -19,9 +23,17 @@ export struct CustomProtocolDialog {
.margin({ top: 20 })
Text() {
Span("为保障您的合法权益,请阅读并同意").fontSize(14).fontColor("#666666")
Span("《用户协议》").fontSize(14).fontColor("#ED2800")
Span("《用户协议》").fontSize(14).fontColor("#ED2800").onClick(()=>{
let bean={contentId:"1",pageID:""} as Params
WDRouterRule.jumpWithPage(WDRouterPage.loginProtocolPage,bean)
this.controller.close()
})
Span("及").fontSize(14).fontColor("#666666")
Span("《隐私政策》").fontSize(14).fontColor("#ED2800")
Span("《隐私政策》").fontSize(14).fontColor("#ED2800").onClick(()=>{
let bean={contentId:"2",pageID:""} as Params
WDRouterRule.jumpWithPage(WDRouterPage.loginProtocolPage,bean)
this.controller.close()
})
Span("后进行登录").fontSize(14).fontColor("#666666")
}.margin({ top: 12, left: 16, right: 16 })
... ...
... ... @@ -8,6 +8,7 @@ export struct LoginInputComponent {
@State codeBtnState: boolean = false //发送验证码控件是否可以 默认不可用
@Link isCodeSend: boolean //验证码控件是否点击 默认没有 发送接口
@Link isSubmit: boolean //是否可以提交
isFirst:boolean=true//是否第一次获取验证码
build() {
Column() {
... ... @@ -50,7 +51,7 @@ export struct LoginInputComponent {
this.isSubmit = (this.phoneContent.length >= 11 && this.codeContent.length >= 6)
})
Text(this.isCodeSend ? this.timeCount + "s" : "发送验证码")
Text(this.isCodeSend ? this.timeCount + "s" : this.isFirst?"发送验证码":'重新发送')
.backgroundImage($r('app.media.login_code_bg'), ImageRepeat.NoRepeat)
.backgroundImageSize(ImageSize.Cover)
.fontColor('#ED2800')
... ... @@ -65,6 +66,7 @@ export struct LoginInputComponent {
return
}
this.isCodeSend = true
this.isFirst=false
let time = setInterval(() => {
Logger.debug("倒计时:" + this.timeCount)
this.timeCount--
... ...
... ... @@ -7,6 +7,7 @@ import promptAction from '@ohos.promptAction'
import { SPHelper } from 'wdKit'
import { WDRouterPage } from 'wdRouter/src/main/ets/router/WDRouterPage';
import { WDRouterRule } from 'wdRouter/src/main/ets/router/WDRouterRule';
import { Params } from '../../../../../../../commons/wdRouter/oh_modules/wdBean/src/main/ets/bean/content/Params'
@Extend(Row)
function otherStyle() {
... ... @@ -95,9 +96,6 @@ struct LoginPage {
Row() {
// Checkbox().selectedColor("#ED2800").onChange((value) => {
// this.protocolState = value
// })
Image(this.protocolState ? $r('app.media.login_checkbox_select') : $r('app.media.login_checkbox_unselected'))
.width(15)
.height(15)
... ... @@ -109,10 +107,14 @@ struct LoginPage {
Span("我已阅读并同意").fontColor("#999999").fontSize(12)
Span("《用户协议》").fontColor("#ED2800").fontSize(12).onClick(() => {
//todo 协议
let bean={contentId:"1",pageID:""} as Params
WDRouterRule.jumpWithPage(WDRouterPage.loginProtocolPage,bean)
})
Span("及").fontColor("#999999").fontSize(12)
Span("《隐私政策》").fontColor("#ED2800").fontSize(12).onClick(() => {
//todo 协议
let bean={contentId:"2",pageID:""} as Params
WDRouterRule.jumpWithPage(WDRouterPage.loginProtocolPage,bean)
})
}
}.margin({ top: 28 }).alignItems(VerticalAlign.Center)
... ... @@ -299,19 +301,22 @@ struct LoginPage {
if (this.checkCodePage) {
this.loginViewModel.appLogin(this.phoneContent, 2, this.codeContent).then((data) => {
Logger.debug(TAG, "requestLogin: " + data.jwtToken)
let dd = SPHelper.default.get('userName', 'dd').then((value) => {
Logger.debug(TAG, 'SP:' + value)
})
router.back()
router.back({
params: { userName: data.userName,
userId:data.id},
url: 'pages/MainPage'
}
)
})
} else {
this.loginViewModel.appLoginByPassword(this.accountContent, 0, this.passwordContent, "").then((data) => {
Logger.debug(TAG, "requestLogin: " + data.jwtToken)
let dd = SPHelper.default.get('userName', 'dd').then((value) => {
Logger.debug(TAG, 'SP:' + value)
})
promptAction.showToast({ message: '登录成功' })
router.back()
router.back({
params: { userName: data.userName,
userId:data.id},
url: 'pages/MainPage'
})
}).catch((value: string) => {
promptAction.showToast({ message: value })
})
... ...
import router from '@ohos.router';
import webview from '@ohos.web.webview';
import { Logger } from 'wdKit';
import { Params } from '../../../../../../../commons/wdRouter/oh_modules/wdBean/src/main/ets/bean/content/Params';
const TAG = 'LoginProtocolWebview';
@Entry
@Component
struct LoginProtocolWebview {
webUrl: string = ''
webviewController: webview.WebviewController = new webview.WebviewController()
aboutToAppear() {
if (router.getParams()) {
let params = router.getParams() as Params
if (params.contentID == "1") {
this.webUrl = "https://cdnpeoplefrontuat.aikan.pdnews.cn/rmrb/rmrb-protocol-zh-web/0.0.1/app/protocol-1005.html"
} else {
this.webUrl = "https://cdnpeoplefrontuat.aikan.pdnews.cn/rmrb/rmrb-protocol-zh-web/0.0.1/app/protocol-1001.html"
}
}
}
build() {
Column() {
Row() {
Image($r("app.media.login_back_icon"))
.width(24)
.aspectRatio(1)
.onClick(() => {
router.back();
}).margin({left:16})
Text()
}
.alignItems(VerticalAlign.Center)
.width('100%')
.height(44)
Web({ src: this.webUrl, controller: this.webviewController })
.domStorageAccess(true)
.databaseAccess(true)
.javaScriptAccess(true)
.zoomAccess(false)
.horizontalScrollBarAccess(false)
.verticalScrollBarAccess(false)
.onHttpErrorReceive((event) => {
//TODO 页面加载不成功的时候处理
Logger.info(TAG, 'onHttpErrorReceive event.request.getRequestUrl:' + event?.request.getRequestUrl());
Logger.info(TAG, 'onHttpErrorReceive event.response.getResponseCode:' + event?.response.getResponseCode());
})
}
}
}
\ No newline at end of file
... ...
... ... @@ -2,6 +2,7 @@
"src": [
"pages/Index",
"pages/login/LoginPage",
"pages/login/ForgetPasswordPage"
"pages/login/ForgetPasswordPage",
"pages/login/LoginProtocolWebview"
]
}
... ...
... ... @@ -2,12 +2,15 @@ import { BottomNavigationComponent} from 'wdComponent';
import { BreakpointConstants } from 'wdConstant';
import { BreakpointSystem, Logger } from 'wdKit';
import router from '@ohos.router';
const TAG = 'MainPage';
@Entry
@Component
struct MainPage {
@Provide('isLogin') isLogin:Record<string,string>={}
private breakpointSystem: BreakpointSystem = new BreakpointSystem()
@StorageLink('currentBreakpoint') @Watch('watchCurrentBreakpoint') currentBreakpoint: string = BreakpointConstants.BREAKPOINT_XS;
... ... @@ -27,6 +30,8 @@ struct MainPage {
onPageShow() {
Logger.info(TAG, 'onPageShow');
let params=router.getParams() as Record<string,string>
this.isLogin=params
}
onPageHide() {
... ...
{
"code": "0",
"data": {
"list": [{
"list": [
{
"attentionNum": 0,
"authIcon": "",
"authId": 0,
... ... @@ -58,7 +59,8 @@
"userName": "QACrawler2115",
"userType": "2",
"waresSwitch": 1
}, {
},
{
"attentionNum": 0,
"authIcon": "",
"authId": 0,
... ... @@ -115,7 +117,8 @@
"userName": "一休哥",
"userType": "2",
"waresSwitch": 1
}, {
},
{
"attentionNum": 0,
"authIcon": "",
"authId": 0,
... ... @@ -172,41 +175,42 @@
"userName": "0921媒体",
"userType": "3",
"waresSwitch": 1
}, {
},
{
"attentionNum": 0,
"authIcon": "https://sitcontentjdcdn.aikan.pdnews.cn/creator-category/icon/auth/blue.png",
"authId": 1,
"authIcon": "",
"authId": 0,
"authPersonal": "",
"authTitle": "黄袍加身V",
"categoryAuth": "黄袍加身V",
"city": "340100",
"cnAttentionNum": 9,
"authTitle": "",
"categoryAuth": "",
"city": "110100",
"cnAttentionNum": 0,
"cnCollectNum": 0,
"cnCommentNum": 3,
"cnCommentNum": 0,
"cnFansNum": 9,
"cnIsAttention": 1,
"cnIsComment": 1,
"cnIsLike": 1,
"cnLikeNum": 7,
"cnLikeNum": 6,
"cnLiveCommentControl": 1,
"cnLiveGiftControl": 1,
"cnLiveLikeControl": 1,
"cnLiveShareControl": 1,
"cnMainControl": 1,
"cnRegistTime": 1695260417000,
"cnRegistTime": 1695201858000,
"cnShareControl": 1,
"cnShareNum": 0,
"cnUserId": "444776025830725",
"cnUserName": "李智恩3",
"cnUserId": "444296355502149",
"cnUserName": "0920个人",
"cnUserType": "2",
"collectNum": 0,
"creatorId": "3004855",
"district": "340102",
"creatorId": "3004851",
"district": "110101",
"fansNum": 0,
"headPhotoUrl": "https://sitcontentjdcdn.aikan.pdnews.cn/vod/content/202309/202309Th094010643/N5o.png?x-oss-process=image/resize,l_400/auto-orient,1/quality,q_90/format,jpg",
"honoraryIcon": "",
"honoraryTitle": "",
"introduction": "IU",
"headPhotoUrl": "https://sitcontentjdcdn.aikan.pdnews.cn/vod/content/202309/202309We172415100/h2j.png?x-oss-process=image/resize,l_400/auto-orient,1/quality,q_90/format,jpg",
"honoraryIcon": "https://cdn.aikan.pdnews.cn/image/picture/202312/20231223173451966FdV.png",
"honoraryTitle": "快乐星球",
"introduction": "账号简介",
"isAttention": 1,
"isComment": 1,
"isLike": 1,
... ... @@ -216,31 +220,32 @@
"liveGiftControl": 1,
"liveLikeControl": 1,
"liveShareControl": 1,
"posterShareControl": 0,
"province": "340000",
"posterShareControl": 1,
"province": "110000",
"publishNum": 0,
"region": "安徽",
"region": "上海",
"shareControl": 1,
"shareNum": 0,
"shopOpen": 1,
"shopOpen": 0,
"storeUrl": "",
"subjectType": 1,
"subjectType": 0,
"userId": "",
"userName": "李智恩3",
"userName": "0920个人",
"userType": "2",
"waresSwitch": 0
}, {
"waresSwitch": 1
},
{
"attentionNum": 0,
"authIcon": "https://sitcontentjdcdn.aikan.pdnews.cn/creator-category/icon/auth/yellow.png",
"authId": 2,
"authIcon": "",
"authId": 0,
"authPersonal": "",
"authTitle": "黄VV",
"categoryAuth": "黄VV",
"authTitle": "",
"categoryAuth": "",
"city": "120100",
"cnAttentionNum": 1,
"cnCollectNum": 1,
"cnCommentNum": 7,
"cnFansNum": 13,
"cnAttentionNum": 0,
"cnCollectNum": 0,
"cnCommentNum": 0,
"cnFansNum": 10,
"cnIsAttention": 1,
"cnIsComment": 1,
"cnIsLike": 1,
... ... @@ -250,20 +255,20 @@
"cnLiveLikeControl": 1,
"cnLiveShareControl": 1,
"cnMainControl": 1,
"cnRegistTime": 1695202406000,
"cnRegistTime": 1695190066000,
"cnShareControl": 1,
"cnShareNum": 0,
"cnUserId": "444300764043333",
"cnUserName": "创作者账号7777",
"cnUserId": "444200272593477",
"cnUserName": "zhuaqu005",
"cnUserType": "2",
"collectNum": 0,
"creatorId": "3004853",
"creatorId": "3004849",
"district": "120101",
"fansNum": 0,
"headPhotoUrl": "https://sitcontentjdcdn.aikan.pdnews.cn/image/creator/2023092715/4727ab5db7604dbbac9ffb94ed03614e.png?x-oss-process=image/resize,l_400/auto-orient,1/quality,q_90/format,jpg",
"headPhotoUrl": "https://sitcontentjdcdn.aikan.pdnews.cn/vod/content/202309/202309We140931534/CIX.png?x-oss-process=image/resize,l_400/auto-orient,1/quality,q_90/format,jpg",
"honoraryIcon": "",
"honoraryTitle": "",
"introduction": "协作平台是进行团队开发、协作的系统,一般是基于互联网,也有用专业网的情况。协作平台的主要功能是:分工合作、进度控制、版本控制等功能。协作平台是进行团队开发、协作的系统,一般是基于互联网,也有用专业网的情况。协作平台的主要功能是:分工合作、进度控制、版本控制等功能。协作平台是进行团队开发、协作的系统,一般是基于互联网,也有用专业网的情况。协作平台的主要功能是:分工合作、进度控制、版本控制等功能。协作",
"introduction": "aaa",
"isAttention": 1,
"isComment": 1,
"isLike": 1,
... ... @@ -273,54 +278,55 @@
"liveGiftControl": 1,
"liveLikeControl": 1,
"liveShareControl": 1,
"posterShareControl": 0,
"posterShareControl": 1,
"province": "120000",
"publishNum": 0,
"region": "安徽",
"region": "上海",
"shareControl": 1,
"shareNum": 0,
"shopOpen": 1,
"shopOpen": 0,
"storeUrl": "",
"subjectType": 0,
"userId": "",
"userName": "创作者账号7777",
"userName": "zhuaqu005",
"userType": "2",
"waresSwitch": 0
}, {
"waresSwitch": 1
},
{
"attentionNum": 0,
"authIcon": "",
"authId": 0,
"authIcon": "https://sitcontentjdcdn.aikan.pdnews.cn/creator-category/icon/auth/yellow.png",
"authId": 2,
"authPersonal": "",
"authTitle": "",
"categoryAuth": "",
"city": "110100",
"cnAttentionNum": 0,
"cnCollectNum": 0,
"cnCommentNum": 0,
"cnFansNum": 9,
"authTitle": "黄VV",
"categoryAuth": "黄VV",
"city": "120100",
"cnAttentionNum": 1,
"cnCollectNum": 1,
"cnCommentNum": 7,
"cnFansNum": 13,
"cnIsAttention": 1,
"cnIsComment": 1,
"cnIsLike": 1,
"cnLikeNum": 6,
"cnLikeNum": 0,
"cnLiveCommentControl": 1,
"cnLiveGiftControl": 1,
"cnLiveLikeControl": 1,
"cnLiveShareControl": 1,
"cnMainControl": 1,
"cnRegistTime": 1695201858000,
"cnRegistTime": 1695202406000,
"cnShareControl": 1,
"cnShareNum": 0,
"cnUserId": "444296355502149",
"cnUserName": "0920个人",
"cnUserId": "444300764043333",
"cnUserName": "创作者账号7777",
"cnUserType": "2",
"collectNum": 0,
"creatorId": "3004851",
"district": "110101",
"creatorId": "3004853",
"district": "120101",
"fansNum": 0,
"headPhotoUrl": "https://sitcontentjdcdn.aikan.pdnews.cn/vod/content/202309/202309We172415100/h2j.png?x-oss-process=image/resize,l_400/auto-orient,1/quality,q_90/format,jpg",
"honoraryIcon": "https://cdn.aikan.pdnews.cn/image/picture/202312/20231223173451966FdV.png",
"honoraryTitle": "快乐星球",
"introduction": "账号简介",
"headPhotoUrl": "https://sitcontentjdcdn.aikan.pdnews.cn/image/creator/2023092715/4727ab5db7604dbbac9ffb94ed03614e.png?x-oss-process=image/resize,l_400/auto-orient,1/quality,q_90/format,jpg",
"honoraryIcon": "",
"honoraryTitle": "",
"introduction": "协作平台是进行团队开发、协作的系统,一般是基于互联网,也有用专业网的情况。协作平台的主要功能是:分工合作、进度控制、版本控制等功能。协作平台是进行团队开发、协作的系统,一般是基于互联网,也有用专业网的情况。协作平台的主要功能是:分工合作、进度控制、版本控制等功能。协作平台是进行团队开发、协作的系统,一般是基于互联网,也有用专业网的情况。协作平台的主要功能是:分工合作、进度控制、版本控制等功能。协作",
"isAttention": 1,
"isComment": 1,
"isLike": 1,
... ... @@ -330,54 +336,55 @@
"liveGiftControl": 1,
"liveLikeControl": 1,
"liveShareControl": 1,
"posterShareControl": 1,
"province": "110000",
"posterShareControl": 0,
"province": "120000",
"publishNum": 0,
"region": "上海",
"region": "安徽",
"shareControl": 1,
"shareNum": 0,
"shopOpen": 0,
"shopOpen": 1,
"storeUrl": "",
"subjectType": 0,
"userId": "",
"userName": "0920个人",
"userName": "创作者账号7777",
"userType": "2",
"waresSwitch": 1
}, {
"waresSwitch": 0
},
{
"attentionNum": 0,
"authIcon": "",
"authId": 0,
"authIcon": "https://sitcontentjdcdn.aikan.pdnews.cn/creator-category/icon/auth/blue.png",
"authId": 1,
"authPersonal": "",
"authTitle": "",
"categoryAuth": "",
"city": "120100",
"cnAttentionNum": 0,
"authTitle": "黄袍加身V",
"categoryAuth": "黄袍加身V",
"city": "340100",
"cnAttentionNum": 9,
"cnCollectNum": 0,
"cnCommentNum": 0,
"cnFansNum": 10,
"cnCommentNum": 3,
"cnFansNum": 9,
"cnIsAttention": 1,
"cnIsComment": 1,
"cnIsLike": 1,
"cnLikeNum": 0,
"cnLikeNum": 7,
"cnLiveCommentControl": 1,
"cnLiveGiftControl": 1,
"cnLiveLikeControl": 1,
"cnLiveShareControl": 1,
"cnMainControl": 1,
"cnRegistTime": 1695190066000,
"cnRegistTime": 1695260417000,
"cnShareControl": 1,
"cnShareNum": 0,
"cnUserId": "444200272593477",
"cnUserName": "zhuaqu005",
"cnUserId": "444776025830725",
"cnUserName": "李智恩3",
"cnUserType": "2",
"collectNum": 0,
"creatorId": "3004849",
"district": "120101",
"creatorId": "3004855",
"district": "340102",
"fansNum": 0,
"headPhotoUrl": "https://sitcontentjdcdn.aikan.pdnews.cn/vod/content/202309/202309We140931534/CIX.png?x-oss-process=image/resize,l_400/auto-orient,1/quality,q_90/format,jpg",
"headPhotoUrl": "https://sitcontentjdcdn.aikan.pdnews.cn/vod/content/202309/202309Th094010643/N5o.png?x-oss-process=image/resize,l_400/auto-orient,1/quality,q_90/format,jpg",
"honoraryIcon": "",
"honoraryTitle": "",
"introduction": "aaa",
"introduction": "IU",
"isAttention": 1,
"isComment": 1,
"isLike": 1,
... ... @@ -387,25 +394,26 @@
"liveGiftControl": 1,
"liveLikeControl": 1,
"liveShareControl": 1,
"posterShareControl": 1,
"province": "120000",
"posterShareControl": 0,
"province": "340000",
"publishNum": 0,
"region": "上海",
"region": "安徽",
"shareControl": 1,
"shareNum": 0,
"shopOpen": 0,
"shopOpen": 1,
"storeUrl": "",
"subjectType": 0,
"subjectType": 1,
"userId": "",
"userName": "zhuaqu005",
"userName": "李智恩3",
"userType": "2",
"waresSwitch": 1
}],
"waresSwitch": 0
}
],
"pageNum": 1,
"pageSize": 20,
"totalCount": 7
},
"message": "Success",
"success": true,
"timestamp": 1710742034894
"timestamp": 1710989443354
}
\ No newline at end of file
... ...
{
"code": "0",
"data": [
{
"creatorId": "3004862",
"status": "0",
"userId": "567387477063621"
},
{
"creatorId": "3004861",
"status": "0",
"userId": "567387477063621"
},
{
"creatorId": "3004860",
"status": "0",
"userId": "567387477063621"
},
{
"creatorId": "3004851",
"status": "1",
"userId": "567387477063621"
},
{
"creatorId": "3004849",
"status": "1",
"userId": "567387477063621"
},
{
"creatorId": "3004853",
"status": "1",
"userId": "567387477063621"
},
{
"creatorId": "3004855",
"status": "0",
"userId": "567387477063621"
}
],
"message": "Success",
"meta": null,
"requestId": "",
"success": true,
"timestamp": 1710989443648
}
\ No newline at end of file
... ...
{
"code": "0",
"data": {
"hasNext": 0,
"list": [
{
"attentionCreatorId": "3214877",
"attentionHeadPhotoUrl": "https://sitcontentjdcdn.aikan.pdnews.cn//upload/ueditor/image/20231227/a_924511395855200256.png?x-oss-process=image/resize,l_400/auto-orient,1/quality,q_90/format,jpg",
"attentionNum": 0,
"attentionUserId": "508051203257158",
"attentionUserName": "北京交通运输职业学院",
"attentionUserType": 2,
"authIcon": "",
"authId": 0,
"authPersional": "",
"authTitle": "",
"banControl": 0,
"categoryAuth": "",
"cnLiveCommentControl": 1,
"cnLiveGiftControl": 1,
"cnLiveLikeControl": 1,
"cnLiveShareControl": 1,
"cnShareControl": 1,
"collectNum": 0,
"commentNum": 0,
"createTime": 1710742365000,
"fansNum": 1,
"honoraryIcon": "",
"honoraryTitle": "",
"id": 100704,
"introduction": "北京交通运输职业学院",
"isAttention": null,
"isComment": 1,
"isLike": 1,
"isVisiable": 1,
"likeNum": 0,
"liveCommentControl": 1,
"liveGiftControl": 1,
"liveLikeControl": 1,
"liveShareControl": 1,
"mainControl": 1,
"posterShareControl": 1,
"registTime": 1599214346000,
"shareControl": 1,
"shareNum": 0,
"status": 1,
"subjectType": null,
"updateTime": 1710742365000,
"userId": "567387477063621",
"userType": 1
},
{
"attentionCreatorId": "3092827",
"attentionHeadPhotoUrl": "https://sitcontentjdcdn.aikan.pdnews.cn//upload/user_app/201907/rmrb_Mw5PyAQe1563349003.jpg?x-oss-process=image/resize,l_400/auto-orient,1/quality,q_90/format,jpg",
"attentionNum": 0,
"attentionUserId": "507982569927494",
"attentionUserName": "3G楼市周刊合肥站",
"attentionUserType": 5,
"authIcon": "",
"authId": 0,
"authPersional": "",
"authTitle": "",
"banControl": 0,
"categoryAuth": "",
"cnLiveCommentControl": 1,
"cnLiveGiftControl": 1,
"cnLiveLikeControl": 1,
"cnLiveShareControl": 1,
"cnShareControl": 1,
"collectNum": 0,
"commentNum": 0,
"createTime": 1710410008000,
"fansNum": 1,
"honoraryIcon": "",
"honoraryTitle": "",
"id": 200711,
"introduction": "3G楼市周刊合肥站官方",
"isAttention": null,
"isComment": 1,
"isLike": 1,
"isVisiable": 1,
"likeNum": 0,
"liveCommentControl": 1,
"liveGiftControl": 1,
"liveLikeControl": 1,
"liveShareControl": 1,
"mainControl": 0,
"posterShareControl": 1,
"registTime": 1559098504000,
"shareControl": 1,
"shareNum": 0,
"status": 1,
"subjectType": null,
"updateTime": 1710410008000,
"userId": "567387477063621",
"userType": 1
},
{
"attentionCreatorId": "3022148",
"attentionHeadPhotoUrl": "https://sitcontentjdcdn.aikan.pdnews.cn//upload/zw/bjh_image/1550310502_bb68cf1fc0ba566b3bdd77bb8648d7a8.jpeg?x-oss-process=image/resize,l_400/auto-orient,1/quality,q_90/format,jpg",
"attentionNum": 0,
"attentionUserId": "504980189045893",
"attentionUserName": "庐州房产网",
"attentionUserType": 2,
"authIcon": "",
"authId": 0,
"authPersional": "",
"authTitle": "",
"banControl": 0,
"categoryAuth": "",
"cnLiveCommentControl": 1,
"cnLiveGiftControl": 1,
"cnLiveLikeControl": 1,
"cnLiveShareControl": 1,
"cnShareControl": 1,
"collectNum": 0,
"commentNum": 0,
"createTime": 1710410008000,
"fansNum": 1,
"honoraryIcon": "",
"honoraryTitle": "",
"id": 200709,
"introduction": "专注古城庐州楼市资讯",
"isAttention": null,
"isComment": 1,
"isLike": 1,
"isVisiable": 1,
"likeNum": 0,
"liveCommentControl": 1,
"liveGiftControl": 1,
"liveLikeControl": 1,
"liveShareControl": 1,
"mainControl": 1,
"posterShareControl": 1,
"registTime": 1550310442000,
"shareControl": 1,
"shareNum": 0,
"status": 1,
"subjectType": null,
"updateTime": 1710410008000,
"userId": "567387477063621",
"userType": 1
},
{
"attentionCreatorId": "3214944",
"attentionHeadPhotoUrl": "https://sitcontentjdcdn.aikan.pdnews.cn//upload/article_resource/image/1562575034_a1790012453b8d5e937e.jpeg?x-oss-process=image/resize,l_400/auto-orient,1/quality,q_90/format,jpg",
"attentionNum": 0,
"attentionUserId": "508051247641414",
"attentionUserName": "民警李建国",
"attentionUserType": 5,
"authIcon": "",
"authId": 0,
"authPersional": "",
"authTitle": "",
"banControl": 0,
"categoryAuth": "",
"cnLiveCommentControl": 1,
"cnLiveGiftControl": 1,
"cnLiveLikeControl": 1,
"cnLiveShareControl": 1,
"cnShareControl": 1,
"collectNum": 0,
"commentNum": 0,
"createTime": 1710410006000,
"fansNum": 1,
"honoraryIcon": "",
"honoraryTitle": "",
"id": 200708,
"introduction": "常州市公安局新北分局民警",
"isAttention": null,
"isComment": 1,
"isLike": 1,
"isVisiable": 1,
"likeNum": 0,
"liveCommentControl": 1,
"liveGiftControl": 1,
"liveLikeControl": 1,
"liveShareControl": 1,
"mainControl": 0,
"posterShareControl": 1,
"registTime": 1560152360000,
"shareControl": 1,
"shareNum": 0,
"status": 1,
"subjectType": null,
"updateTime": 1710410006000,
"userId": "567387477063621",
"userType": 1
},
{
"attentionCreatorId": "3215205",
"attentionHeadPhotoUrl": "https://sitcontentjdcdn.aikan.pdnews.cn//upload/zw/bjh_image/1561779596_b5cdde910817d66e7561cf35cdb3b896.jpeg?x-oss-process=image/resize,l_400/auto-orient,1/quality,q_90/format,jpg",
"attentionNum": 0,
"attentionUserId": "504980472120453",
"attentionUserName": "日语酱",
"attentionUserType": 2,
"authIcon": "",
"authId": 0,
"authPersional": "",
"authTitle": "",
"banControl": 0,
"categoryAuth": "",
"cnLiveCommentControl": 1,
"cnLiveGiftControl": 1,
"cnLiveLikeControl": 1,
"cnLiveShareControl": 1,
"cnShareControl": 1,
"collectNum": 0,
"commentNum": 0,
"createTime": 1710410006000,
"fansNum": 1,
"honoraryIcon": "",
"honoraryTitle": "",
"id": 200707,
"introduction": "付出不亚于任何人的努力",
"isAttention": null,
"isComment": 1,
"isLike": 1,
"isVisiable": 1,
"likeNum": 0,
"liveCommentControl": 1,
"liveGiftControl": 1,
"liveLikeControl": 1,
"liveShareControl": 1,
"mainControl": 1,
"posterShareControl": 1,
"registTime": 1560474105000,
"shareControl": 1,
"shareNum": 0,
"status": 1,
"subjectType": null,
"updateTime": 1710410006000,
"userId": "567387477063621",
"userType": 1
},
{
"attentionCreatorId": "3258463",
"attentionHeadPhotoUrl": "",
"attentionNum": 0,
"attentionUserId": "508670671396102",
"attentionUserName": "西北大学4e82",
"attentionUserType": 5,
"authIcon": "",
"authId": 0,
"authPersional": "",
"authTitle": "",
"banControl": 0,
"categoryAuth": "",
"cnLiveCommentControl": 1,
"cnLiveGiftControl": 1,
"cnLiveLikeControl": 1,
"cnLiveShareControl": 1,
"cnShareControl": 1,
"collectNum": 0,
"commentNum": 0,
"createTime": 1710409996000,
"fansNum": 1,
"honoraryIcon": "",
"honoraryTitle": "",
"id": 200706,
"introduction": "西北大学",
"isAttention": null,
"isComment": 1,
"isLike": 1,
"isVisiable": 1,
"likeNum": 0,
"liveCommentControl": 1,
"liveGiftControl": 1,
"liveLikeControl": 1,
"liveShareControl": 1,
"mainControl": 0,
"posterShareControl": 1,
"registTime": 1555554106000,
"shareControl": 1,
"shareNum": 0,
"status": 1,
"subjectType": null,
"updateTime": 1710409996000,
"userId": "567387477063621",
"userType": 1
},
{
"attentionCreatorId": "3258486",
"attentionHeadPhotoUrl": "",
"attentionNum": 0,
"attentionUserId": "508670696660230",
"attentionUserName": "扬州大学93ba",
"attentionUserType": 5,
"authIcon": "",
"authId": 0,
"authPersional": "",
"authTitle": "",
"banControl": 0,
"categoryAuth": "",
"cnLiveCommentControl": 1,
"cnLiveGiftControl": 1,
"cnLiveLikeControl": 1,
"cnLiveShareControl": 1,
"cnShareControl": 1,
"collectNum": 0,
"commentNum": 0,
"createTime": 1710409996000,
"fansNum": 1,
"honoraryIcon": "",
"honoraryTitle": "",
"id": 200705,
"introduction": "扬州大学",
"isAttention": null,
"isComment": 1,
"isLike": 1,
"isVisiable": 1,
"likeNum": 0,
"liveCommentControl": 1,
"liveGiftControl": 1,
"liveLikeControl": 1,
"liveShareControl": 1,
"mainControl": 0,
"posterShareControl": 1,
"registTime": 1555659355000,
"shareControl": 1,
"shareNum": 0,
"status": 1,
"subjectType": null,
"updateTime": 1710409996000,
"userId": "567387477063621",
"userType": 1
},
{
"attentionCreatorId": "3258575",
"attentionHeadPhotoUrl": "https://sitcontentjdcdn.aikan.pdnews.cn//upload/zw/bjh_image/1539067744_5149cb078d4ed272af470630be272023.jpeg?x-oss-process=image/resize,l_400/auto-orient,1/quality,q_90/format,jpg",
"attentionNum": 0,
"attentionUserId": "509369589284102",
"attentionUserName": "旅途",
"attentionUserType": 2,
"authIcon": "",
"authId": 0,
"authPersional": "",
"authTitle": "",
"banControl": 0,
"categoryAuth": "",
"cnLiveCommentControl": 1,
"cnLiveGiftControl": 1,
"cnLiveLikeControl": 1,
"cnLiveShareControl": 1,
"cnShareControl": 1,
"collectNum": 0,
"commentNum": 0,
"createTime": 1710409989000,
"fansNum": 1,
"honoraryIcon": "",
"honoraryTitle": "",
"id": 200704,
"introduction": "背包、骑车、旅行、一个人目睹沿途的风景~",
"isAttention": null,
"isComment": 1,
"isLike": 1,
"isVisiable": 1,
"likeNum": 0,
"liveCommentControl": 1,
"liveGiftControl": 1,
"liveLikeControl": 1,
"liveShareControl": 1,
"mainControl": 1,
"posterShareControl": 1,
"registTime": 1528884167000,
"shareControl": 1,
"shareNum": 0,
"status": 1,
"subjectType": null,
"updateTime": 1710409989000,
"userId": "567387477063621",
"userType": 1
},
{
"attentionCreatorId": "3258577",
"attentionHeadPhotoUrl": "https://sitcontentjdcdn.aikan.pdnews.cn//upload/rmh/image/201905/201905160519269845.png?x-oss-process=image/resize,l_400/auto-orient,1/quality,q_90/format,jpg",
"attentionNum": 0,
"attentionUserId": "509369595993350",
"attentionUserName": "陇海在线",
"attentionUserType": 2,
"authIcon": "",
"authId": 0,
"authPersional": "",
"authTitle": "",
"banControl": 0,
"categoryAuth": "",
"cnLiveCommentControl": 1,
"cnLiveGiftControl": 1,
"cnLiveLikeControl": 1,
"cnLiveShareControl": 1,
"cnShareControl": 1,
"collectNum": 0,
"commentNum": 0,
"createTime": 1710409989000,
"fansNum": 1,
"honoraryIcon": "",
"honoraryTitle": "",
"id": 200703,
"introduction": "在这里阅读陇海沿线城市暨淮海地区最新生活资讯!",
"isAttention": null,
"isComment": 1,
"isLike": 1,
"isVisiable": 1,
"likeNum": 0,
"liveCommentControl": 1,
"liveGiftControl": 1,
"liveLikeControl": 1,
"liveShareControl": 1,
"mainControl": 1,
"posterShareControl": 1,
"registTime": 1529015167000,
"shareControl": 1,
"shareNum": 0,
"status": 1,
"subjectType": null,
"updateTime": 1710409989000,
"userId": "567387477063621",
"userType": 1
},
{
"attentionCreatorId": "3258596",
"attentionHeadPhotoUrl": "https://sitcontentjdcdn.aikan.pdnews.cn//upload/rmh/image/201911/201911271018567208.png?x-oss-process=image/resize,l_400/auto-orient,1/quality,q_90/format,jpg",
"attentionNum": 0,
"attentionUserId": "509403474238726",
"attentionUserName": "建筑界",
"attentionUserType": 2,
"authIcon": "",
"authId": 0,
"authPersional": "",
"authTitle": "",
"banControl": 0,
"categoryAuth": "",
"cnLiveCommentControl": 1,
"cnLiveGiftControl": 1,
"cnLiveLikeControl": 1,
"cnLiveShareControl": 1,
"cnShareControl": 1,
"collectNum": 0,
"commentNum": 0,
"createTime": 1710409988000,
"fansNum": 1,
"honoraryIcon": "",
"honoraryTitle": "",
"id": 200702,
"introduction": "匠者仁心",
"isAttention": null,
"isComment": 1,
"isLike": 1,
"isVisiable": 1,
"likeNum": 0,
"liveCommentControl": 1,
"liveGiftControl": 1,
"liveLikeControl": 1,
"liveShareControl": 1,
"mainControl": 1,
"posterShareControl": 1,
"registTime": 1550712472000,
"shareControl": 1,
"shareNum": 0,
"status": 1,
"subjectType": null,
"updateTime": 1710409988000,
"userId": "567387477063621",
"userType": 1
},
{
"attentionCreatorId": "3258601",
"attentionHeadPhotoUrl": "https://sitcontentjdcdn.aikan.pdnews.cn//upload/zw/bjh_image/1552718233_f0290f15dcbbb41d3af7ad9ed3099621.jpeg?x-oss-process=image/resize,l_400/auto-orient,1/quality,q_90/format,jpg",
"attentionNum": 0,
"attentionUserId": "509403475746054",
"attentionUserName": "芳芳喜欢的科技课堂",
"attentionUserType": 2,
"authIcon": "",
"authId": 0,
"authPersional": "",
"authTitle": "",
"banControl": 0,
"categoryAuth": "",
"cnLiveCommentControl": 1,
"cnLiveGiftControl": 1,
"cnLiveLikeControl": 1,
"cnLiveShareControl": 1,
"cnShareControl": 1,
"collectNum": 0,
"commentNum": 0,
"createTime": 1710409987000,
"fansNum": 1,
"honoraryIcon": "",
"honoraryTitle": "",
"id": 200701,
"introduction": "每天分享与科技有关的新鲜事儿",
"isAttention": null,
"isComment": 1,
"isLike": 1,
"isVisiable": 1,
"likeNum": 0,
"liveCommentControl": 1,
"liveGiftControl": 1,
"liveLikeControl": 1,
"liveShareControl": 1,
"mainControl": 1,
"posterShareControl": 1,
"registTime": 1552718173000,
"shareControl": 1,
"shareNum": 0,
"status": 1,
"subjectType": null,
"updateTime": 1710409987000,
"userId": "567387477063621",
"userType": 1
},
{
"attentionCreatorId": "3258611",
"attentionHeadPhotoUrl": "https://sitcontentjdcdn.aikan.pdnews.cn//upload/zw/bjh_image/1551495924_33f73482b19cd64f0f3906b19043113a.jpeg?x-oss-process=image/resize,l_400/auto-orient,1/quality,q_90/format,jpg",
"attentionNum": 0,
"attentionUserId": "509403509734662",
"attentionUserName": "西平微传媒",
"attentionUserType": 2,
"authIcon": "",
"authId": 0,
"authPersional": "",
"authTitle": "",
"banControl": 0,
"categoryAuth": "",
"cnLiveCommentControl": 1,
"cnLiveGiftControl": 1,
"cnLiveLikeControl": 1,
"cnLiveShareControl": 1,
"cnShareControl": 1,
"collectNum": 0,
"commentNum": 0,
"createTime": 1710409986000,
"fansNum": 1,
"honoraryIcon": "",
"honoraryTitle": "",
"id": 200700,
"introduction": "西平县本地信息服务、热点追踪、关注民生。",
"isAttention": null,
"isComment": 1,
"isLike": 1,
"isVisiable": 1,
"likeNum": 0,
"liveCommentControl": 1,
"liveGiftControl": 1,
"liveLikeControl": 1,
"liveShareControl": 1,
"mainControl": 1,
"posterShareControl": 1,
"registTime": 1551495864000,
"shareControl": 1,
"shareNum": 0,
"status": 1,
"subjectType": null,
"updateTime": 1710409986000,
"userId": "567387477063621",
"userType": 1
},
{
"attentionCreatorId": "3258613",
"attentionHeadPhotoUrl": "https://sitcontentjdcdn.aikan.pdnews.cn//upload/ueditor/image/20191011/a_367272241198526464.jpg?x-oss-process=image/resize,l_400/auto-orient,1/quality,q_90/format,jpg",
"attentionNum": 0,
"attentionUserId": "504980253394053",
"attentionUserName": "安庆生活",
"attentionUserType": 2,
"authIcon": "",
"authId": 0,
"authPersional": "",
"authTitle": "",
"banControl": 0,
"categoryAuth": "",
"cnLiveCommentControl": 1,
"cnLiveGiftControl": 1,
"cnLiveLikeControl": 1,
"cnLiveShareControl": 1,
"cnShareControl": 1,
"collectNum": 0,
"commentNum": 0,
"createTime": 1710409985000,
"fansNum": 1,
"honoraryIcon": "",
"honoraryTitle": "",
"id": 200699,
"introduction": "传播有价值的声音,记录生活,共享精彩!\n",
"isAttention": null,
"isComment": 1,
"isLike": 1,
"isVisiable": 1,
"likeNum": 0,
"liveCommentControl": 1,
"liveGiftControl": 1,
"liveLikeControl": 1,
"liveShareControl": 1,
"mainControl": 1,
"posterShareControl": 1,
"registTime": 1551433741000,
"shareControl": 1,
"shareNum": 0,
"status": 1,
"subjectType": null,
"updateTime": 1710409985000,
"userId": "567387477063621",
"userType": 1
},
{
"attentionCreatorId": "3004851",
"attentionHeadPhotoUrl": "https://sitcontentjdcdn.aikan.pdnews.cn/vod/content/202309/202309We172415100/h2j.png?x-oss-process=image/resize,l_400/auto-orient,1/quality,q_90/format,jpg",
"attentionNum": 0,
"attentionUserId": "444296355502149",
"attentionUserName": "0920个人",
"attentionUserType": 2,
"authIcon": "",
"authId": 0,
"authPersional": "",
"authTitle": "",
"banControl": 0,
"categoryAuth": "",
"cnLiveCommentControl": 1,
"cnLiveGiftControl": 1,
"cnLiveLikeControl": 1,
"cnLiveShareControl": 1,
"cnShareControl": 1,
"collectNum": 0,
"commentNum": 0,
"createTime": 1710409979000,
"fansNum": 9,
"honoraryIcon": "https://cdn.aikan.pdnews.cn/image/picture/202312/20231223173451966FdV.png",
"honoraryTitle": "快乐星球",
"id": 200698,
"introduction": "账号简介",
"isAttention": null,
"isComment": 1,
"isLike": 1,
"isVisiable": 1,
"likeNum": 6,
"liveCommentControl": 1,
"liveGiftControl": 1,
"liveLikeControl": 1,
"liveShareControl": 1,
"mainControl": 1,
"posterShareControl": 1,
"registTime": 1695201858000,
"shareControl": 1,
"shareNum": 0,
"status": 1,
"subjectType": null,
"updateTime": 1710409979000,
"userId": "567387477063621",
"userType": 1
},
{
"attentionCreatorId": "3004853",
"attentionHeadPhotoUrl": "https://sitcontentjdcdn.aikan.pdnews.cn/image/creator/2023092715/4727ab5db7604dbbac9ffb94ed03614e.png?x-oss-process=image/resize,l_400/auto-orient,1/quality,q_90/format,jpg",
"attentionNum": 1,
"attentionUserId": "444300764043333",
"attentionUserName": "创作者账号7777",
"attentionUserType": 2,
"authIcon": "https://sitcontentjdcdn.aikan.pdnews.cn/creator-category/icon/auth/yellow.png",
"authId": 2,
"authPersional": "",
"authTitle": "黄VV",
"banControl": 0,
"categoryAuth": "黄VV",
"cnLiveCommentControl": 1,
"cnLiveGiftControl": 1,
"cnLiveLikeControl": 1,
"cnLiveShareControl": 1,
"cnShareControl": 1,
"collectNum": 1,
"commentNum": 7,
"createTime": 1710409979000,
"fansNum": 13,
"honoraryIcon": "",
"honoraryTitle": "",
"id": 200697,
"introduction": "协作平台是进行团队开发、协作的系统,一般是基于互联网,也有用专业网的情况。协作平台的主要功能是:分工合作、进度控制、版本控制等功能。协作平台是进行团队开发、协作的系统,一般是基于互联网,也有用专业网的情况。协作平台的主要功能是:分工合作、进度控制、版本控制等功能。协作平台是进行团队开发、协作的系统,一般是基于互联网,也有用专业网的情况。协作平台的主要功能是:分工合作、进度控制、版本控制等功能。协作",
"isAttention": null,
"isComment": 1,
"isLike": 1,
"isVisiable": 1,
"likeNum": 0,
"liveCommentControl": 1,
"liveGiftControl": 1,
"liveLikeControl": 1,
"liveShareControl": 1,
"mainControl": 1,
"posterShareControl": 0,
"registTime": 1695202406000,
"shareControl": 1,
"shareNum": 0,
"status": 1,
"subjectType": null,
"updateTime": 1710409979000,
"userId": "567387477063621",
"userType": 1
},
{
"attentionCreatorId": "3004849",
"attentionHeadPhotoUrl": "https://sitcontentjdcdn.aikan.pdnews.cn/vod/content/202309/202309We140931534/CIX.png?x-oss-process=image/resize,l_400/auto-orient,1/quality,q_90/format,jpg",
"attentionNum": 0,
"attentionUserId": "444200272593477",
"attentionUserName": "zhuaqu005",
"attentionUserType": 2,
"authIcon": "",
"authId": 0,
"authPersional": "",
"authTitle": "",
"banControl": 0,
"categoryAuth": "",
"cnLiveCommentControl": 1,
"cnLiveGiftControl": 1,
"cnLiveLikeControl": 1,
"cnLiveShareControl": 1,
"cnShareControl": 1,
"collectNum": 0,
"commentNum": 0,
"createTime": 1710409978000,
"fansNum": 10,
"honoraryIcon": "",
"honoraryTitle": "",
"id": 200696,
"introduction": "aaa",
"isAttention": null,
"isComment": 1,
"isLike": 1,
"isVisiable": 1,
"likeNum": 0,
"liveCommentControl": 1,
"liveGiftControl": 1,
"liveLikeControl": 1,
"liveShareControl": 1,
"mainControl": 1,
"posterShareControl": 1,
"registTime": 1695190066000,
"shareControl": 1,
"shareNum": 0,
"status": 1,
"subjectType": null,
"updateTime": 1710409978000,
"userId": "567387477063621",
"userType": 1
},
{
"attentionCreatorId": "3004841",
"attentionHeadPhotoUrl": "https://sitcontentjdcdn.aikan.pdnews.cn/vod/content/202309/202309Tu155358686/Clu.png?x-oss-process=image/resize,l_400/auto-orient,1/quality,q_90/format,jpg",
"attentionNum": 0,
"attentionUserId": "443539162419717",
"attentionUserName": "好主播007",
"attentionUserType": 2,
"authIcon": "",
"authId": 0,
"authPersional": "",
"authTitle": "",
"banControl": 0,
"categoryAuth": "",
"cnLiveCommentControl": 1,
"cnLiveGiftControl": 1,
"cnLiveLikeControl": 1,
"cnLiveShareControl": 1,
"cnShareControl": 1,
"collectNum": 0,
"commentNum": 0,
"createTime": 1710409975000,
"fansNum": 12,
"honoraryIcon": "",
"honoraryTitle": "",
"id": 200695,
"introduction": "qqq",
"isAttention": null,
"isComment": 1,
"isLike": 1,
"isVisiable": 1,
"likeNum": 0,
"liveCommentControl": 1,
"liveGiftControl": 1,
"liveLikeControl": 1,
"liveShareControl": 1,
"mainControl": 0,
"posterShareControl": 1,
"registTime": 1695110042000,
"shareControl": 1,
"shareNum": 0,
"status": 1,
"subjectType": null,
"updateTime": 1710409975000,
"userId": "567387477063621",
"userType": 1
},
{
"attentionCreatorId": "3004835",
"attentionHeadPhotoUrl": "https://sitcontentjdcdn.aikan.pdnews.cn/vod/content/202309/20230919113007795/7uI.png?x-oss-process=image/resize,l_400/auto-orient,1/quality,q_90/format,jpg",
"attentionNum": 0,
"attentionUserId": "443416920261445",
"attentionUserName": "随风而起",
"attentionUserType": 2,
"authIcon": "",
"authId": 0,
"authPersional": "",
"authTitle": "",
"banControl": 0,
"categoryAuth": "",
"cnLiveCommentControl": 1,
"cnLiveGiftControl": 1,
"cnLiveLikeControl": 1,
"cnLiveShareControl": 1,
"cnShareControl": 1,
"collectNum": 0,
"commentNum": 0,
"createTime": 1710409975000,
"fansNum": 2291,
"honoraryIcon": "",
"honoraryTitle": "",
"id": 200694,
"introduction": "灰度号主",
"isAttention": null,
"isComment": 1,
"isLike": 1,
"isVisiable": 1,
"likeNum": 0,
"liveCommentControl": 1,
"liveGiftControl": 1,
"liveLikeControl": 1,
"liveShareControl": 1,
"mainControl": 0,
"posterShareControl": 1,
"registTime": 1695094442000,
"shareControl": 1,
"shareNum": 0,
"status": 1,
"subjectType": null,
"updateTime": 1710409975000,
"userId": "567387477063621",
"userType": 1
}
],
"pageNum": 1,
"pageSize": 20,
"totalCount": 18
},
"message": "Success",
"meta": null,
"requestId": "",
"success": true,
"timestamp": 1710989304704
}
\ No newline at end of file
... ...