zhangbo1_wd
Showing 52 changed files with 4494 additions and 118 deletions

Too many changes to show.

To preserve performance only 52 of 52+ files are displayed.

import { AppointmentListUI} from 'wdComponent';
const TAG = "AppointmentListPage"
@Entry
@Component
struct AppointmentListPage {
build() {
Column(){
AppointmentListUI()
}
}
}
\ No newline at end of file
... ...
import { FollowFirstTabsComponent } from 'wdComponent'
@Entry
@Component
struct FollowListPage {
build() {
Column() {
//Tab 详情
FollowFirstTabsComponent()
}
.backgroundColor($r('app.color.color_F9F9F9'))
.height('100%')
.width('100%')
}
}
\ No newline at end of file
... ...
import { PrivacySettingComponents} from 'wdComponent';
@Entry
@Component
struct PrivacySettingPage {
build() {
Column(){
PrivacySettingComponents()
}
}
}
\ No newline at end of file
... ...
import { AboutPageUI} from 'wdComponent';
@Entry
@Component
struct PrivacySettingPage {
build() {
Column(){
AboutPageUI()
}
}
}
\ 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 = '';
@State params:any = router.getParams();
onPageShow() {
this.pageType = this.params.pageType;
// this.pageType = 'mainSetting';// 获取info属性的值
}
build() {
Column() {
if (this.pageType == 'mainSetting') {
MineSettingComponent()
} else {
AccountAndSecurityLayout()
}
}.setFullWidth()
}
// 私有方法
@Styles setFullWidth(){
.width('100%')
}
}
/*
* */
\ No newline at end of file
... ...
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
... ...
@Entry
@Component
struct TestPage {
build() {
Column() {
}
.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
... ...
... ... @@ -3,6 +3,10 @@
{
"name": "start_window_background",
"value": "#FFFFFF"
},
{
"name": "color_F9F9F9",
"value": "#F9F9F9"
}
]
}
\ No newline at end of file
... ...
... ... @@ -2,6 +2,13 @@
"src": [
"pages/Index",
"pages/MainPage",
"pages/ColumnPage"
"pages/ColumnPage",
"pages/TestPage",
"components/page/SettingPage",
"components/page/PrivacySettingPage",
"components/page/SettingAboutPage",
"pages/AppointmentListPage",
"components/page/SettingPasswordPage",
"pages/FollowListPage"
]
}
\ No newline at end of file
}
... ...
{
"code": "0",
"data": {
"list": [{
"appStyle": "15",
"imageUrl": ["https://sitcontentjdcdn.aikan.pdnews.cn/sjbj-20231204/image/live/563cc8ce1ecc43b288f6cf60da66579c.jpeg?x-oss-process=image/resize,l_550,m_fill,h_450,w_800/quality,q_90/format,jpg"],
"liveId": 20000007348,
"planStartTime": "2023-12-05 15:26:10",
"relId": "500000017021",
"relType": 1,
"startTime": "",
"status": "wait",
"title": "视界运营位加权-加权中删除"
}, {
"appStyle": "null",
"imageUrl": ["https://sitcontentjdcdn.aikan.pdnews.cn/sjbj-20230914/image/display/9af825a00abf490d8a8698f4fc079447.jpg?x-oss-process=image/resize,l_550,m_fill,h_450,w_800/quality,q_90/format,jpg"],
"liveId": 20000007492,
"planStartTime": "2024-01-12 20:00:00",
"relId": "500000020284",
"relType": 1,
"startTime": "",
"status": "wait",
"title": "QA|汉阴县凤堰古梯田"
}, {
"appStyle": "null",
"imageUrl": ["https://sitcontentjdcdn.aikan.pdnews.cn/sjbj-20230915/image/display/e908748c62a44109bbb7214f3fed458c.jpg?x-oss-process=image/resize,l_550,m_fill,h_450,w_800/quality,q_90/format,jpg"],
"liveId": 20000007493,
"planStartTime": "2024-01-12 20:00:00",
"relId": "500000020286",
"relType": 1,
"startTime": "",
"status": "wait",
"title": "二十四节气-夏至"
}, {
"appStyle": "null",
"imageUrl": ["https://sitcontentjdcdn.aikan.pdnews.cn/sjbj-20240118/image/display/732d6166103d4d2f9fbf512b128a3486.jpeg?x-oss-process=image/resize,l_550,m_fill,h_450,w_800/quality,q_90/format,jpg"],
"liveId": 20000007495,
"planStartTime": "2024-01-18 10:51:33",
"relId": "500000030122",
"relType": 1,
"startTime": "",
"status": "wait",
"title": "01181050文字直播没有预告片"
}, {
"appStyle": "null",
"imageUrl": ["https://sitcontentjdcdn.aikan.pdnews.cn/sjbj-20240127/image/live/6359d000bba24812b7ca1765bb106a49.png?x-oss-process=image/resize,l_550,m_fill,h_450,w_800/quality,q_90/format,jpg"],
"liveId": 20000007519,
"planStartTime": "2024-02-27 18:18:16",
"relId": "500000034054",
"relType": 1,
"startTime": "",
"status": "wait",
"title": "错搞民宿33"
}, {
"appStyle": "15",
"imageUrl": ["https://sitcontentjdcdn.aikan.pdnews.cn/sjbj-20240228/image/live/e6998ab547af472dbc19ba2fd68959b9.jpeg?x-oss-process=image/resize,l_550,m_fill,h_450,w_800/quality,q_90/format,jpg"],
"liveId": 20000007521,
"planStartTime": "2024-02-28 19:01:50",
"relId": "500000034162",
"relType": 1,
"startTime": "",
"status": "wait",
"title": "保存编辑弹幕开关"
}],
"pageNum": 1,
"pageSize": 20,
"totalCount": 6
},
"message": "Success",
"requestId": "65289f1217934cffb7587ff4d6ce4689",
"success": true,
"timestamp": 1710555152344
}
\ No newline at end of file
... ...
{
"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
}
\ No newline at end of file
... ...
{
"code": "0",
"data": {
"list": [{
"attentionNum": 0,
"authIcon": "",
"authId": 0,
"authPersonal": "",
"authTitle": "",
"categoryAuth": "",
"city": "110100",
"cnAttentionNum": 0,
"cnCollectNum": 0,
"cnCommentNum": 0,
"cnFansNum": 4,
"cnIsAttention": 1,
"cnIsComment": 1,
"cnIsLike": 1,
"cnLikeNum": 0,
"cnLiveCommentControl": 1,
"cnLiveGiftControl": 1,
"cnLiveLikeControl": 1,
"cnLiveShareControl": 1,
"cnMainControl": 1,
"cnRegistTime": 1695280071000,
"cnShareControl": 1,
"cnShareNum": 0,
"cnUserId": "444937588589253",
"cnUserName": "QACrawler2115",
"cnUserType": "2",
"collectNum": 0,
"creatorId": "3004862",
"district": "110101",
"fansNum": 0,
"headPhotoUrl": "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",
"honoraryIcon": "",
"honoraryTitle": "",
"introduction": "知识博主",
"isAttention": 1,
"isComment": 1,
"isLike": 1,
"isVisiable": 1,
"likeNum": 0,
"liveCommentControl": 1,
"liveGiftControl": 1,
"liveLikeControl": 1,
"liveShareControl": 1,
"posterShareControl": 1,
"province": "110000",
"publishNum": 0,
"region": "",
"shareControl": 1,
"shareNum": 0,
"shopOpen": 0,
"storeUrl": "",
"subjectType": 0,
"userId": "",
"userName": "QACrawler2115",
"userType": "2",
"waresSwitch": 1
}, {
"attentionNum": 0,
"authIcon": "",
"authId": 0,
"authPersonal": "",
"authTitle": "",
"categoryAuth": "",
"city": "230100",
"cnAttentionNum": 0,
"cnCollectNum": 0,
"cnCommentNum": 0,
"cnFansNum": 4,
"cnIsAttention": 1,
"cnIsComment": 1,
"cnIsLike": 1,
"cnLikeNum": 0,
"cnLiveCommentControl": 1,
"cnLiveGiftControl": 1,
"cnLiveLikeControl": 1,
"cnLiveShareControl": 1,
"cnMainControl": 1,
"cnRegistTime": 1695276994000,
"cnShareControl": 1,
"cnShareNum": 0,
"cnUserId": "444911718724933",
"cnUserName": "一休哥",
"cnUserType": "2",
"collectNum": 0,
"creatorId": "3004861",
"district": "230102",
"fansNum": 0,
"headPhotoUrl": "https://sitcontentjdcdn.aikan.pdnews.cn/vod/content/202309/202309Th141630857/Ptx.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,
"isVisiable": 1,
"likeNum": 0,
"liveCommentControl": 1,
"liveGiftControl": 1,
"liveLikeControl": 1,
"liveShareControl": 1,
"posterShareControl": 1,
"province": "230000",
"publishNum": 0,
"region": "安徽",
"shareControl": 1,
"shareNum": 0,
"shopOpen": 0,
"storeUrl": "",
"subjectType": 2,
"userId": "",
"userName": "一休哥",
"userType": "2",
"waresSwitch": 1
}, {
"attentionNum": 0,
"authIcon": "",
"authId": 0,
"authPersonal": "",
"authTitle": "",
"categoryAuth": "",
"city": "110100",
"cnAttentionNum": 0,
"cnCollectNum": 0,
"cnCommentNum": 12,
"cnFansNum": 8,
"cnIsAttention": 1,
"cnIsComment": 1,
"cnIsLike": 1,
"cnLikeNum": 2,
"cnLiveCommentControl": 1,
"cnLiveGiftControl": 1,
"cnLiveLikeControl": 1,
"cnLiveShareControl": 1,
"cnMainControl": 1,
"cnRegistTime": 1695275999000,
"cnShareControl": 1,
"cnShareNum": 1,
"cnUserId": "444903323309381",
"cnUserName": "0921媒体",
"cnUserType": "3",
"collectNum": 0,
"creatorId": "3004860",
"district": "110101",
"fansNum": 0,
"headPhotoUrl": "https://sitcontentjdcdn.aikan.pdnews.cn/vod/content/202309/202309Th135954709/qdL.png?x-oss-process=image/resize,l_400/auto-orient,1/quality,q_90/format,jpg",
"honoraryIcon": "",
"honoraryTitle": "",
"introduction": "0921媒体",
"isAttention": 1,
"isComment": 1,
"isLike": 1,
"isVisiable": 1,
"likeNum": 0,
"liveCommentControl": 1,
"liveGiftControl": 1,
"liveLikeControl": 1,
"liveShareControl": 1,
"posterShareControl": 0,
"province": "110000",
"publishNum": 0,
"region": "上海",
"shareControl": 1,
"shareNum": 0,
"shopOpen": 0,
"storeUrl": "",
"subjectType": 1,
"userId": "",
"userName": "0921媒体",
"userType": "3",
"waresSwitch": 1
}, {
"attentionNum": 0,
"authIcon": "https://sitcontentjdcdn.aikan.pdnews.cn/creator-category/icon/auth/blue.png",
"authId": 1,
"authPersonal": "",
"authTitle": "黄袍加身V",
"categoryAuth": "黄袍加身V",
"city": "340100",
"cnAttentionNum": 9,
"cnCollectNum": 0,
"cnCommentNum": 3,
"cnFansNum": 9,
"cnIsAttention": 1,
"cnIsComment": 1,
"cnIsLike": 1,
"cnLikeNum": 7,
"cnLiveCommentControl": 1,
"cnLiveGiftControl": 1,
"cnLiveLikeControl": 1,
"cnLiveShareControl": 1,
"cnMainControl": 1,
"cnRegistTime": 1695260417000,
"cnShareControl": 1,
"cnShareNum": 0,
"cnUserId": "444776025830725",
"cnUserName": "李智恩3",
"cnUserType": "2",
"collectNum": 0,
"creatorId": "3004855",
"district": "340102",
"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",
"isAttention": 1,
"isComment": 1,
"isLike": 1,
"isVisiable": 1,
"likeNum": 0,
"liveCommentControl": 1,
"liveGiftControl": 1,
"liveLikeControl": 1,
"liveShareControl": 1,
"posterShareControl": 0,
"province": "340000",
"publishNum": 0,
"region": "安徽",
"shareControl": 1,
"shareNum": 0,
"shopOpen": 1,
"storeUrl": "",
"subjectType": 1,
"userId": "",
"userName": "李智恩3",
"userType": "2",
"waresSwitch": 0
}, {
"attentionNum": 0,
"authIcon": "https://sitcontentjdcdn.aikan.pdnews.cn/creator-category/icon/auth/yellow.png",
"authId": 2,
"authPersonal": "",
"authTitle": "黄VV",
"categoryAuth": "黄VV",
"city": "120100",
"cnAttentionNum": 1,
"cnCollectNum": 1,
"cnCommentNum": 7,
"cnFansNum": 13,
"cnIsAttention": 1,
"cnIsComment": 1,
"cnIsLike": 1,
"cnLikeNum": 0,
"cnLiveCommentControl": 1,
"cnLiveGiftControl": 1,
"cnLiveLikeControl": 1,
"cnLiveShareControl": 1,
"cnMainControl": 1,
"cnRegistTime": 1695202406000,
"cnShareControl": 1,
"cnShareNum": 0,
"cnUserId": "444300764043333",
"cnUserName": "创作者账号7777",
"cnUserType": "2",
"collectNum": 0,
"creatorId": "3004853",
"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",
"honoraryIcon": "",
"honoraryTitle": "",
"introduction": "协作平台是进行团队开发、协作的系统,一般是基于互联网,也有用专业网的情况。协作平台的主要功能是:分工合作、进度控制、版本控制等功能。协作平台是进行团队开发、协作的系统,一般是基于互联网,也有用专业网的情况。协作平台的主要功能是:分工合作、进度控制、版本控制等功能。协作平台是进行团队开发、协作的系统,一般是基于互联网,也有用专业网的情况。协作平台的主要功能是:分工合作、进度控制、版本控制等功能。协作",
"isAttention": 1,
"isComment": 1,
"isLike": 1,
"isVisiable": 1,
"likeNum": 0,
"liveCommentControl": 1,
"liveGiftControl": 1,
"liveLikeControl": 1,
"liveShareControl": 1,
"posterShareControl": 0,
"province": "120000",
"publishNum": 0,
"region": "安徽",
"shareControl": 1,
"shareNum": 0,
"shopOpen": 1,
"storeUrl": "",
"subjectType": 0,
"userId": "",
"userName": "创作者账号7777",
"userType": "2",
"waresSwitch": 0
}, {
"attentionNum": 0,
"authIcon": "",
"authId": 0,
"authPersonal": "",
"authTitle": "",
"categoryAuth": "",
"city": "110100",
"cnAttentionNum": 0,
"cnCollectNum": 0,
"cnCommentNum": 0,
"cnFansNum": 9,
"cnIsAttention": 1,
"cnIsComment": 1,
"cnIsLike": 1,
"cnLikeNum": 6,
"cnLiveCommentControl": 1,
"cnLiveGiftControl": 1,
"cnLiveLikeControl": 1,
"cnLiveShareControl": 1,
"cnMainControl": 1,
"cnRegistTime": 1695201858000,
"cnShareControl": 1,
"cnShareNum": 0,
"cnUserId": "444296355502149",
"cnUserName": "0920个人",
"cnUserType": "2",
"collectNum": 0,
"creatorId": "3004851",
"district": "110101",
"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": "账号简介",
"isAttention": 1,
"isComment": 1,
"isLike": 1,
"isVisiable": 1,
"likeNum": 0,
"liveCommentControl": 1,
"liveGiftControl": 1,
"liveLikeControl": 1,
"liveShareControl": 1,
"posterShareControl": 1,
"province": "110000",
"publishNum": 0,
"region": "上海",
"shareControl": 1,
"shareNum": 0,
"shopOpen": 0,
"storeUrl": "",
"subjectType": 0,
"userId": "",
"userName": "0920个人",
"userType": "2",
"waresSwitch": 1
}, {
"attentionNum": 0,
"authIcon": "",
"authId": 0,
"authPersonal": "",
"authTitle": "",
"categoryAuth": "",
"city": "120100",
"cnAttentionNum": 0,
"cnCollectNum": 0,
"cnCommentNum": 0,
"cnFansNum": 10,
"cnIsAttention": 1,
"cnIsComment": 1,
"cnIsLike": 1,
"cnLikeNum": 0,
"cnLiveCommentControl": 1,
"cnLiveGiftControl": 1,
"cnLiveLikeControl": 1,
"cnLiveShareControl": 1,
"cnMainControl": 1,
"cnRegistTime": 1695190066000,
"cnShareControl": 1,
"cnShareNum": 0,
"cnUserId": "444200272593477",
"cnUserName": "zhuaqu005",
"cnUserType": "2",
"collectNum": 0,
"creatorId": "3004849",
"district": "120101",
"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",
"honoraryIcon": "",
"honoraryTitle": "",
"introduction": "aaa",
"isAttention": 1,
"isComment": 1,
"isLike": 1,
"isVisiable": 1,
"likeNum": 0,
"liveCommentControl": 1,
"liveGiftControl": 1,
"liveLikeControl": 1,
"liveShareControl": 1,
"posterShareControl": 1,
"province": "120000",
"publishNum": 0,
"region": "上海",
"shareControl": 1,
"shareNum": 0,
"shopOpen": 0,
"storeUrl": "",
"subjectType": 0,
"userId": "",
"userName": "zhuaqu005",
"userType": "2",
"waresSwitch": 1
}],
"pageNum": 1,
"pageSize": 20,
"totalCount": 7
},
"message": "Success",
"success": true,
"timestamp": 1710742034894
}
\ No newline at end of file
... ...
... ... @@ -27,3 +27,17 @@ export { TriPicCardComponent } from "./components/view/TriPicCardComponent"
export { BigPicCardComponent } from "./components/view/BigPicCardComponent"
export { HeadPictureCardComponent } from "./components/view/HeadPictureCardComponent"
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"
... ...
... ... @@ -4,14 +4,22 @@ import { BannerComponent } from './view/BannerComponent';
import { LabelComponent } from './view/LabelComponent';
import { TitleAbbrComponent } from './view/TitleAbbrComponent';
import { TitleAllComponent } from './view/TitleAllComponent';
import { HorizontalStrokeCardThreeTwoRadioForOneComponent } from './view/HorizontalStrokeCardThreeTwoRadioForOneComponent';
import { HorizontalStrokeCardThreeTwoRadioForMoreComponent } from './view/HorizontalStrokeCardThreeTwoRadioForMoreComponent';
import {
HorizontalStrokeCardThreeTwoRadioForOneComponent
} from './view/HorizontalStrokeCardThreeTwoRadioForOneComponent';
import {
HorizontalStrokeCardThreeTwoRadioForMoreComponent
} from './view/HorizontalStrokeCardThreeTwoRadioForMoreComponent';
import { BigPicCardComponent } from './view/BigPicCardComponent';
import { TriPicCardComponent } from './view/TriPicCardComponent';
import { HeadPictureCardComponent } from './view/HeadPictureCardComponent';
import { LiveHorizontalCardComponent } from './view/LiveHorizontalCardComponent';
import { SmallVideoCardComponent } from './view/SmallVideoCardComponent';
import { SmallVideoCardHorComponent } from './view/SmallVideoCardHorComponent';
/**
* comp适配器.
*/
... ... @@ -32,7 +40,7 @@ export struct CompParser {
TitleAbbrComponent({ compDTO: compDTO })
} else if (compDTO.compStyle === '3') {
TitleAllComponent({ compDTO: compDTO })
} else if (compDTO.compStyle === CompStyle.Carousel_Layout_01) {
} else if (compDTO.compStyle === CompStyle.Zh_Carousel_Layout_01) {
BannerComponent({ compDTO: compDTO })
} else if (compDTO.compStyle === "2") {
BigPicCardComponent({ compDTO: compDTO })
... ... @@ -48,7 +56,14 @@ export struct CompParser {
}
} else if (compDTO.compStyle === CompStyle.Zh_Single_Column_02) {
HeadPictureCardComponent({ compDTO: compDTO })
} else {
} else if (compDTO.compStyle === CompStyle.Zh_Single_Row_02) {
if (compDTO.operDataList.length > 1) {
SmallVideoCardHorComponent({ compDTO: compDTO })
} else {
SmallVideoCardComponent({ compDTO: compDTO })
}
}
else {
// todo:组件未实现 / Component Not Implemented
Text(compDTO.compStyle)
.width(CommonConstants.FULL_PARENT)
... ...
// @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';
import router from '@ohos.router';
@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 + "")
if (index == 1) {
router.pushUrl({
url:"pages/SettingPasswordPage",
params : {'currentType' : 4}
})
}
})
}, 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
... ...
const TAG = 'PageComponent';
import MinePagePersonalFunctionsItem from '../../viewmodel/MinePagePersonalFunctionsItem'
import MinePageCreatorFunctionsItem from '../../viewmodel/MinePageCreatorFunctionsItem'
import MinePageMoreFunctionModel from '../../viewmodel/MinePageMoreFunctionModel'
import MinePageDatasModel from '../../model/MinePageDatasModel'
import MinePageUserSimpleInfoUI from '../page/mine/MinePageUserSimpleInfoUI'
import MinePagePersonFunctionUI from '../page/mine/MinePagePersonFunctionUI'
import MinePageCardUI from '../page/mine/MinePageCardUI'
import MinePageCreatorFunctionUI from '../page/mine/MinePageCreatorFunctionUI'
import MinePageMoreFunctionUI from '../page/mine/MinePageMoreFunctionUI'
const TAG = 'MinePageComponent';
/**
* 我的页面
*/
@Component
export struct MinePageComponent {
// TODO 待完善
//是否是创作者
@State isCreator:boolean = false
@State isLogin:boolean = true
@State personalData:MinePagePersonalFunctionsItem[] = []
@State creatorData:MinePageCreatorFunctionsItem[] = []
@State moreData:MinePageMoreFunctionModel[] = []
scroller: Scroller = new Scroller()
aboutToAppear(){
//登录信息 TODO
this.getFunctionData()
}
getFunctionData(){
//个人功能数据
this.personalData = MinePageDatasModel.getPersonalFunctionsData()
//创作者功能数据
this.creatorData = MinePageDatasModel.getCreatorFunctionsData()
//更多功能数据
this.moreData = MinePageDatasModel.getMoreFunctionsData()
}
build() {
Text('我的页面')
Scroll(this.scroller){
Stack(){
Image($r('app.media.mine_head_bg'))
.width('100%')
.height('657lpx')
.objectFit(ImageFit.Auto)
this.MinePageUI()
}
.alignContent(Alignment.Top)
}
.setFullWidthAndHeight()
.backgroundColor($r('app.color.color_F9F9F9'))
.scrollable(ScrollDirection.Vertical)
.scrollBar(BarState.Off)
}
}
@Builder MinePageUI(){
Column(){
//头像层
MinePageUserSimpleInfoUI({isLogin:this.isLogin})
//Grid 区域
MinePagePersonFunctionUI({personalData:$personalData})
//Card
MinePageCardUI()
//创作者区域
MinePageCreatorFunctionUI({creatorData:$creatorData})
//更多功能
MinePageMoreFunctionUI({moreData:$moreData})
}.width('100%')
}
@Styles setFullWidthAndHeight(){
.width('100%')
.height('100%')
}
}
... ...
// @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 RouteManager from '../../utils/RouteManager'
import storageStatistics from "@ohos.file.storageStatistics";
import { BusinessError } from '@ohos.base';
import RouteManager from '../../utils/RouteManager'
import router from '@ohos.router';
@Component
export struct MineSettingComponent {
@State listData: Array<string | Array<string>> = new Array();
@State privacySwitch: boolean = false
@State cacheSice: number = 0
aboutToAppear() {
// 获取设置页面数据
this.getSettingPageData()
// 获取缓存数据
storageStatistics.getCurrentBundleStats((err: BusinessError, bundleStats: storageStatistics.BundleStats) => {
if (err) {
console.error(`Invoke getCurrentBundleStats failed, code is ${err.code}, message is ${err.message}`);
} else {
this.cacheSice = bundleStats.appSize / 1024.00 / 1024.00.toFixed(2);
}
});
}
getSettingPageData() {
let listArr = [['账户与安全', '接收推送', '隐私设罝', '仅WiFi网络加载图片', 'WiFi网络情况下自动播放视频', '开户播放器悬浮窗'], ['清除缓存', '去评分']];
this.listData = listArr;
}
build() {
Navigation() {
//滑动区域
this.settingList()
}.titleMode(NavigationTitleMode.Mini)
.title('设置')
}
// 页面布局
@Builder settingList() {
Column() {
List() {
// 循环渲染ListItemGroup,contactsGroups为多个分组联系人contacts和标题title的数据集合
ForEach(this.listData, (item: Array<string>, index: number) => {
ListItemGroup({ header: index === 0 ? this.itemHead("") : this.itemHead("1") }) {
// 循环渲染ListItem
ForEach(item, (subItem: string, subIndex: number) => {
ListItem() {
if (subIndex == 6) {
this.getArrowCell(subItem, subIndex, index)
} else if (subIndex == 1 || subIndex == 3 || subIndex == 4 || subIndex == 5) {
this.getSwitchCell(subItem, subIndex)
} else {
this.getArrowCell(subItem, subIndex, index)
}
}.padding({ left: '27lpx' })
.onClick(() => {
// // 在Home页面中
// let paramsInfo: object = {
// pageId: 123,
// pageType:'AccountAndSecurityLayout'
// };
console.log(subIndex + "")
if (subIndex == 0) {
// router.pushUrl({
// url:"pages/SettingPasswordPage",
// params : {'currentType' : 4}
// })
router.pushUrl({
url:"pages/SettingPage",
params : {'pageType' : 'AccountAndSecurityLayout'}
})
//SettingPage
// RouteManager.jumpNewPage("pages/SettingPasswordPage", {'currentType' : 4}) // 调用跳转方法,跳转新页面
}else if (subIndex == 2) {
// RouteManager.jumpNewPage("pages/SettingPage") // 调用跳转方法,跳转新页面
RouteManager.jumpNewPage("pages/PrivacySettingPage")
}
})
.height('117lpx')
}, subItem => subItem)
}
.divider({
strokeWidth: 1,
startMargin: 15,
endMargin: 10,
color: '#f0f0f0'
})
})
}.onScrollFrameBegin((offset, state) => {
return { offsetRemain: 0 }
})
}
.backgroundColor(Color.White)
.borderRadius(8)
}
@Builder itemHead(text: string) {
// 列表分组的头部组件,对应联系人分组A、B等位置的组件
if (text.length > 0) {
Row().width('100%').height('20lpx').backgroundColor(0xf0f0f0)
}
}
// 右侧开关cell
@Builder getSwitchCell(item, index) {
Column() {
Row() {
// 左侧logo和标题
Row() {
// 判断有没有图片
if (0) {
Image('https://pic.rmb.bdstatic.com/e182cf67c341d1128d2a6cc05886bf62.jpeg@s_0,h_2000')
.height('38lpx')
.margin({ right: '5lpx' })
Text(`${item}`)
.margin({ top: '8lpx' })
.height('38lpx')
.fontColor('#333333')
.fontSize('29lpx')
} else {
Text(`${item}`)
.margin({ top: '8lpx' })
.height('38lpx')
.fontColor('#333333')
.fontSize('29lpx')
}
}.width('60%')
// 右侧文案和右箭头
Row() {
Toggle({ type: ToggleType.Switch, isOn: false })
.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, index, mainIndex) {
Column() {
Row() {
// 左侧logo和标题
Row() {
// 判断有没有图片
if (this.privacySwitch) {
Image('https://pic.rmb.bdstatic.com/e182cf67c341d1128d2a6cc05886bf62.jpeg@s_0,h_2000')
.height('38lpx')
.margin({ right: '5lpx' })
}
Text(`${item}`)
.margin({ top: '8lpx' })
.height('38lpx')
.fontColor('#333333')
.fontSize('29lpx')
}.width('60%')
// 右侧文案和右箭头
Row() {
Text((index == 0 && mainIndex != 0) ? this.cacheSice.toFixed(2) + 'MB' : '')
.fontColor('#999999')
.maxLines(1)
Image($r('app.media.mine_user_arrow'))
.width('27lpx')
.height('27lpx')
.objectFit(ImageFit.Auto)
Column().width('29lpx')
}.width('40%')
.margin({ right: '29lpx' })
.justifyContent(FlexAlign.End)
}
.alignItems(VerticalAlign.Center)
.justifyContent(FlexAlign.SpaceBetween)
}
.height('54lpx')
}
}
\ No newline at end of file
... ...
import 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
... ...
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(){
//
// }.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()
Image($r('app.media.app_icon'))
.width('192lpx')
.height('192lpx')
Text(this.version)
.fontSize('25lpx')
.textAlign(TextAlign.Center)
.fontColor($r("app.color.color_666666"))
.margin({bottom:'31lpx'})
Text(this.message)
.fontSize('19lpx')
.textAlign(TextAlign.Center)
.fontColor($r("app.color.color_999999"))
.margin({bottom:'35lpx'})
}
.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'})
}
}
... ...
import { MineAppointmentItem } from '../../../viewmodel/MineAppointmentItem'
@Component
export struct AppointmentListChildComponent{
@ObjectLink item: MineAppointmentItem
build() {
Column(){
Stack(){
Image(this.item?.imageUrl[0])
.objectFit(ImageFit.Auto)
if(this.item.relType === 1){
Row(){
Row(){
Image($r('app.media.reserve_icon'))
.width('42lpx')
.height('35lpx')
.objectFit(ImageFit.Auto)
Text("预约")
.fontWeight(400)
.fontSize('21lpx')
.backgroundColor($r('app.color.color_4D000000'))
.fontColor($r('app.color.white'))
.lineHeight('31lpx')
.layoutWeight(1)
.textAlign(TextAlign.Center)
}.width('94lpx')
.margin({bottom:'15lpx',right:'15lpx'})
}.width('100%')
.height('100%')
.alignItems(VerticalAlign.Bottom)
.justifyContent(FlexAlign.End)
}
}.width('100%')
.height('376lpx')
Column(){
Text(this.item.title)
.fontWeight('400lpx')
.fontSize('33lpx')
.fontColor($r('app.color.color_222222'))
.lineHeight('48lpx')
.maxLines(2)
.textOverflow({ overflow: TextOverflow.Ellipsis })
.margin({bottom:'23lpx'})
.textAlign(TextAlign.Start)
.width('100%')
Row(){
Row(){
if(this.item.relType === 2){
Image($r('app.media.play_status_history_icon'))
.objectFit(ImageFit.Auto)
.width('38lpx')
.height('38lpx')
.margin({right:'12lpx'})
Text('已结束').fontColor($r('app.color.color_999999'))
.fontWeight('500lpx')
.fontSize('23lpx')
}else {
Image($r('app.media.play_status_icon'))
.objectFit(ImageFit.Auto)
.width('38lpx')
.height('38lpx')
.margin({right:'12lpx'})
Text(this.item.timePre).fontColor($r('app.color.color_ED2800'))
.fontWeight('500lpx')
.fontSize('23lpx')
Image($r('app.media.point_icon'))
.objectFit(ImageFit.Auto)
.width('12lpx')
.height('31lpx')
.margin({right:'4lpx'})
Text(`${this.item.timeBack}开始`).fontColor($r('app.color.color_ED2800'))
.fontWeight('500lpx')
.fontSize('23lpx')
.lineHeight('31lpx')
}
}.padding({left:'19lpx',right:'19lpx'})
.height('46lpx')
.alignItems(VerticalAlign.Center)
.backgroundColor($r('app.color.color_F5F5F5'))
.borderRadius('4lpx')
Blank()
.layoutWeight(1)
if(this.item.relType === 1){
Text(this.item.isAppointment?"已预约":"预约")
.fontWeight(400)
.fontSize('23lpx')
.backgroundColor(this.item.isAppointment?$r('app.color.color_F5F5F5'):$r('app.color.color_ED2800'))
.fontColor(this.item.isAppointment?$r('app.color.color_CCCCCC'):$r('app.color.white'))
.lineHeight('31lpx')
.textAlign(TextAlign.Center)
.width('100lpx')
.height('46lpx')
.borderRadius('6lpx')
.onClick(()=>{
this.item.isAppointment = !this.item.isAppointment
//TODO 预约动作
})
}else {
Text(this.item.relType === 2?"去观看":"看回放")
.fontWeight(400)
.fontSize('23lpx')
.backgroundColor($r('app.color.color_ED2800'))
.fontColor($r('app.color.white'))
.lineHeight('31lpx')
.textAlign(TextAlign.Center)
.width('100lpx')
.height('46lpx')
.borderRadius('6lpx')
}
}
}
.padding({left:'23lpx',right:'23lpx',top:'15lpx',bottom:'23lpx'})
}.margin({ left: 10, right: 10 })
.backgroundColor($r('app.color.white'))
.borderRadius('8lpx')
}
}
\ No newline at end of file
... ...
import { AppointmentListChildComponent } from '../mine/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';
const TAG = "AppointmentListUI"
@Component
export struct AppointmentListUI{
@State data: LazyDataSource<MineAppointmentItem> = new LazyDataSource();
@State isLoading:boolean = false
@State hasMore:boolean = true
curPageNum:number = 1;
aboutToAppear() {
this.getNewPageData()
}
build() {
Column() {
//标题栏目
CustomTitleUI({titleName:"预约列表"})
//刷新控件 TODO
//List
List({ space: '6lpx' }) {
LazyForEach(this.data, (item: MineAppointmentItem, index: number) => {
ListItem() {
AppointmentListChildComponent({item:item})
}
.onClick(()=>{
//TODO 跳转
})
}, (item: MineAppointmentItem, index: number) => index.toString())
//没有更多数据 显示提示
if(!this.hasMore){
ListItem(){
ListHasNoMoreDataUI()
}
}
}.cachedCount(4)
.margin({top:'23lpx',left:'23lpx',right:'23lpx'})
.layoutWeight(1)
.onReachEnd(()=>{
console.log(TAG,"触底了");
if(!this.isLoading){
//加载分页数据
this.getNewPageData()
}
})
}
.backgroundColor($r('app.color.color_F9F9F9'))
.height('100%')
.width('100%')
}
getNewPageData(){
this.isLoading = true
if(this.hasMore){
MinePageDatasModel.getAppointmentListData("20",`${this.curPageNum}`,getContext(this)).then((value)=>{
if (!this.data || value.list.length == 0){
this.hasMore = false
}else{
value.list.forEach((value)=>{
let dealTime = this.DealStartTime(value.planStartTime)
if(dealTime!=null && dealTime.length === 2){
this.data.push(new MineAppointmentItem(value.imageUrl,value.status,value.title,true,dealTime[0],dealTime[1],value.relType))
}else {
this.data.push(new MineAppointmentItem(value.imageUrl,value.status,value.title,true,"","",value.relType))
}
})
this.data.notifyDataReload()
if (this.data.totalCount() < value.totalCount) {
this.curPageNum++
}else {
this.hasMore = false
}
}
})
}
this.isLoading = false
}
DealStartTime(planStartTime:string):string[]{
let dealData:string[] = []
if(!StringUtils.isNotEmpty(planStartTime)){
console.log(TAG,"格式有误")
return dealData
}
if(planStartTime.indexOf(" ") === -1){
console.log(TAG,"格式有误")
return dealData
}
let arr = planStartTime.split(" ")
if(arr!=null && StringUtils.isNotEmpty(arr[0])){ //处理年月日
let time = arr[0].split("-");
if(time.length === 3){
let month = time[1].indexOf("0") === 0 ? time[1].substring(1):time[1]
let day = time[2]
dealData[0] = `${month}月${day}日`
let today = `${new Date().getMonth()+1}月${new Date().getDate()}日`
if(dealData[0] === today){
dealData[0] = "今日"
}
}
}
if(arr!=null && StringUtils.isNotEmpty(arr[1])){ //处理时分
let time = arr[1].split(":");
if(time.length === 3){
dealData[1] = `${time[0]}:${time[1]}`
}
}
console.log(TAG,JSON.stringify(dealData))
return dealData
}
}
\ No newline at end of file
... ...
@Component
export default struct MinePageCardUI {
build(){
Flex(){
Stack(){
Image($r('app.media.mine_card_01'))
.setFullWidthAndHeight()
.objectFit(ImageFit.Auto)
Column(){
Text("积分商城")
.fontColor($r('app.color.color_994D00'))
.width('119lpx')
.height('35lpx')
.textAlign(TextAlign.Start)
.fontSize('29lpx')
.fontWeight(600)
Text("华为MATE40手机")
.width('159lpx')
.height('23lpx')
.fontColor($r('app.color.color_994D00'))
.fontSize('19lpx')
.fontWeight(400)
.textAlign(TextAlign.Start)
.margin({top:'10lpx'})
}.padding({left:'29lpx'})
.alignItems(HorizontalAlign.Start)
}.alignContent(Alignment.Start)
.width('349lpx')
.height('115lpx')
Stack(){
Image($r('app.media.mine_card_02'))
.setFullWidthAndHeight()
.objectFit(ImageFit.Auto)
Column(){
Text("数字藏品")
.fontColor($r('app.color.color_B15900'))
.width('119lpx')
.height('35lpx')
.textAlign(TextAlign.Start)
.fontSize('29lpx')
.fontWeight(600)
Text("黑胶唱片NFT")
.width('159lpx')
.height('23lpx')
.fontColor($r('app.color.color_B15900'))
.fontSize('19lpx')
.textAlign(TextAlign.Start)
.margin({top:'10lpx'})
.fontWeight(400)
}.padding({left:'67lpx'})
.alignItems(HorizontalAlign.Start)
}.alignContent(Alignment.Start)
.width('348lpx')
.height('115lpx')
}.setFullWidth()
.height('115lpx')
.padding({left:'23lpx',right:'23lpx'})
.margin({top:'24lpx'})
}
@Styles setFullWidthAndHeight(){
.width('100%')
.height('100%')
}
@Styles setFullWidth(){
.width('100%')
}
@Styles setFullHeight(){
.height('100%')
}
}
\ No newline at end of file
... ...
import MinePageCreatorFunctionsItem from '../../../viewmodel/MinePageCreatorFunctionsItem'
@Component
export default struct MinePageCreatorFunctionUI {
@Link creatorData:MinePageCreatorFunctionsItem[]
build(){
Column(){
Row(){
Text("创作者中心")
.fontSize('29lpx')
.width('148lpx')
.height('46lpx')
.fontWeight(600)
.fontColor($r('app.color.color_222222'))
Blank()
Row(){
Text("内容管理")
.fontSize('27lpx')
.width('113lpx')
.height('35lpx')
.fontColor($r('app.color.color_999999'))
Image($r('app.media.mine_right_arrow'))
.width('27lpx')
.height('27lpx')
.objectFit(ImageFit.Auto)
}
}.setFullWidth()
.height('92lpx')
.padding({left:'29lpx',top:'23lpx',right:'31lpx'})
Row(){
Grid(){
ForEach(this.creatorData,(item:MinePageCreatorFunctionsItem,index:number)=>{
GridItem(){
Row(){
Column(){
Image(item.imgSrc)
.width('50lpx')
.height('50lpx')
Text(`${item.msg}`)
.margin({top:'15lpx'})
.width('96lpx')
.height('23lpx')
.fontColor($r('app.color.color_666666'))
.fontSize('23lpx')
}
.alignItems(HorizontalAlign.Center)
.width('100%')
Blank()
.layoutWeight(1)
if(index % 4 < 3 && index != this.creatorData.length){
Text().backgroundColor($r('app.color.color_222222'))
.opacity(0.1)
.width('2lpx')
.height('29lpx')
}
}
}.onClick(()=>{
console.log(index+"")
}).width('169lpx')
.height('117lpx')
}, item => item)
}
.rowsTemplate('1fr')
.columnsTemplate('1fr 1fr 1fr 1fr')
.height('88lpx')
}.setFullWidth()
.height('127lpx')
}
.height('219lpx')
.borderRadius(8)
.margin({top:'19lpx',left:'23lpx',right:'23lpx'})
.setBackGroundWhite()
}
@Styles setFullWidthAndHeight(){
.width('100%')
.height('100%')
}
@Styles setFullWidth(){
.width('100%')
}
@Styles setFullHeight(){
.height('100%')
}
@Styles setBackGroundWhite(){
.backgroundColor($r('app.color.white'))
}
}
\ No newline at end of file
... ...
import MinePageMoreFunctionModel from '../../../viewmodel/MinePageMoreFunctionModel'
import RouteManager from '../../../utils/RouteManager'
import router from '@ohos.router'
@Component
export default struct MinePageMoreFunctionUI{
@Link moreData:MinePageMoreFunctionModel[]
build(){
Column(){
Column(){
Text(`更多功能`)
.width('456lpx')
.height('38lpx')
.fontColor($r('app.color.color_666666'))
.fontSize('29lpx')
.margin({left:"31lpx"})
.fontWeight(600)
}.height('92lpx')
.width('100%')
.justifyContent(FlexAlign.Center)
.alignItems(HorizontalAlign.Start)
Text().backgroundColor($r('app.color.color_F5F5F5'))
.width('100%')
.height('1lpx')
List(){
ForEach(this.moreData,(item:MinePageMoreFunctionModel,index:number)=>{
ListItem(){
Column(){
Column(){
Row(){
if(item.imgSrc){
Image(item.imgSrc)
.width('38lpx')
.height('38lpx')
.margin({right:'15lpx'})
}
Text(`${item.msg}`)
.width('456lpx')
.height('38lpx')
.fontColor($r('app.color.color_666666'))
.fontSize('29lpx')
.fontWeight(400)
Blank()
Image($r('app.media.mine_user_arrow'))
.width('27lpx')
.height('27lpx')
.objectFit(ImageFit.Auto)
.margin({left:'81lpx',right:'29lpx'})
}.alignItems(VerticalAlign.Center)
.justifyContent(FlexAlign.Center)
}.height('108lpx')
.justifyContent(FlexAlign.Center)
.alignItems(HorizontalAlign.Start)
.padding({left:'27lpx'})
if(index != this.moreData.length -1 ){
Text().backgroundColor($r('app.color.color_F5F5F5'))
.width('612lpx')
.height('1lpx')
}
}
}
.onClick(()=>{
console.log(index+"")
if (index == 3) {
router.pushUrl({
url:"pages/SettingPage",
params : {'pageType' : 'mainSetting'}
})
} else if (index == 2) {
// RouteManager.jumpNewPage("pages/PrivacySettingPage")
} else if (index == 4) {
RouteManager.jumpNewPage("pages/SettingAboutPage")
}
})
.height('117lpx')
}, item => item)
}.onScrollFrameBegin((offset, state) => {
return { offsetRemain: 0 }
})
}
.backgroundColor($r('app.color.white'))
.borderRadius(8)
.margin({left:'23lpx',right:'23lpx',top:"19lpx"})
}
}
\ No newline at end of file
... ...
import RouteManager from '../../../utils/RouteManager'
import MinePagePersonalFunctionsItem from '../../../viewmodel/MinePagePersonalFunctionsItem'
@Component
export default struct MinePagePersonFunctionUI {
@Link personalData:MinePagePersonalFunctionsItem[]
build() {
Grid(){
ForEach(this.personalData,(item:MinePagePersonalFunctionsItem,index:number)=>{
GridItem(){
Row(){
Column(){
Image(item.imgSrc)
.width('46lpx')
.height('46lpx')
Text(`${item.msg}`)
.margin({top:'8lpx'})
.width('50lpx')
.height('23lpx')
.fontColor($r('app.color.color_222222'))
.fontSize('23lpx')
}
.alignItems(HorizontalAlign.Center)
.width('100%')
Blank()
.layoutWeight(1)
if(index % 4 < 3 && index != this.personalData.length-1){
Text().backgroundColor($r('app.color.color_222222'))
.opacity(0.1)
.width('2lpx')
.height('29lpx')
}
}
}.onClick(()=>{
console.log(index+"")
switch (item.msg){
case "预约":{
RouteManager.jumpNewPage("pages/AppointmentListPage")
break;
}
case "关注":{
RouteManager.jumpNewPage("pages/FollowListPage")
break;
}
}
}).width('169lpx')
.height('117lpx')
}, item => item)
}
.rowsTemplate('1fr 1fr')
.columnsTemplate('1fr 1fr 1fr 1fr')
.height('234lpx')
.margin({top:'31lpx',left:'23lpx',right:'23lpx' })
}
}
\ No newline at end of file
... ...
import RouteManager from '../../../utils/RouteManager'
@Component
export default struct MinePageUserSimpleInfoUI {
@Prop isLogin:boolean
build(){
Row(){
//头像
Stack(){
Button({type:ButtonType.Circle})
.backgroundColor($r('app.color.main_red'))
.width('110lpx')
.height('110lpx')
Image($r('app.media.mine_head_icon'))
.width('108lpx')
.height('108lpx')
.objectFit(ImageFit.Cover)
.borderRadius(50)
}.width('110lpx')
.height('110lpx')
.alignContent(Alignment.Center)
.onClick(()=>{
RouteManager.jumpNewPage("pages/TestPage")
})
if(this.isLogin){
//昵称信息
Column(){
Row(){
Text("人民日报6G5E3T")
.fontColor($r('app.color.color_222222'))
.maxLines(1)
.textOverflow({ overflow: TextOverflow.Ellipsis })
.fontSize('33lpx')
Image($r('app.media.mine_user_edit'))
.width('27lpx')
.height('27lpx')
.margin({left:'15lpx'})
.objectFit(ImageFit.Cover)
Blank()
}.width('100%')
Stack(){
Image($r('app.media.mine_grade_bg'))
.width('84lpx')
.height('29lpx')
.objectFit(ImageFit.Auto)
Text("等级8")
.textAlign(TextAlign.Center)
.fontColor($r('app.color.white'))
.fontSize('19lpx')
.width('50lpx')
.height('29lpx')
}.margin({top:'15lpx'})
}.alignItems(HorizontalAlign.Start)
.margin({top:'12lpx',left:'17lpx'})
.width('352lpx')
}else{
Row(){
Text("登录注册")
.fontColor($r('app.color.color_222222'))
.textOverflow({ overflow: TextOverflow.Ellipsis })
.fontSize('33lpx')
Image($r('app.media.mine_user_edit'))
.width('11lpx')
.height('20lpx')
.margin({left:'15lpx'})
.objectFit(ImageFit.Cover)
Blank()
}
.margin({top:'11lpx',left:'17lpx'})
.width('352lpx')
}
Blank()
Stack({alignContent:Alignment.Start}){
Text("签到")
.textAlign(TextAlign.Start)
.width('108lpx')
.height('46lpx')
.fontColor($r('app.color.color_AD6000'))
.backgroundColor($r('app.color.color_FFC460'))
.fontWeight(500)
.position({x:'23lpx'})
.padding({left:'35lpx'})
Image($r("app.media.mine_sign_icon"))
.width('50lpx')
.height('50lpx')
}.width('131lpx')
}.backgroundColor($r('app.color.white'))
.setFullWidth()
.padding({top:'31lpx',left:'46lpx'})
}
@Styles setFullWidthAndHeight(){
.width('100%')
.height('100%')
}
@Styles setFullWidth(){
.width('100%')
}
@Styles setFullHeight(){
.height('100%')
}
}
... ...
import { ResourcesUtils } from 'wdKit'
import { ResponseDTO } from 'wdNetwork'
import { FollowListItem } from '../../../../viewmodel/FollowListItem'
import { CustomTitleUI } from '../../../reusable/CustomTitleUI'
import { FollowSecondTabsComponent } from './FollowSecondTabsComponent'
@Component
export struct FollowFirstTabsComponent{
@State currentIndex: number = 0
private controller: TabsController = new TabsController()
@State data:FollowListItem[] = []
fontColor: string = '#999999'
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[]>>('follow_list_data.json', getContext(this)).then((success)=>{
success.data?.forEach(element => {
this.data.push(element)
});
console.log("ycg",this.data.length.toString());
})
}
@Builder TabBuilder(index: number, item: FollowListItem) {
Stack(){
Text(item.directoryName)
.height('38lpx')
.fontSize('33lpx')
.fontWeight(this.currentIndex === index ? 600 : 400)
.fontColor(this.currentIndex === index ? this.selectedFontColor : this.fontColor)
.lineHeight('38lpx')
if(this.currentIndex === index){
Divider()
.width('31lpx')
.height('4lpx')
.color('#ED2800')
.strokeWidth('4lpx')
.margin({top:'50lpx'})
.id("divTag")
}
}.onClick(()=>{
this.currentIndex = index
this.controller.changeIndex(this.currentIndex)
})
.height('100%')
.margin({right:'9lpx'})
.padding({left:'31lpx',right:index === this.data.length-1?"31lpx":"0lpx"})
}
build() {
Column() {
//标题栏目
CustomTitleUI({titleName:"关注列表"})
Tabs({ barPosition: BarPosition.Start, controller: this.controller }) {
ForEach(this.data, (item: FollowListItem, index: number ) => {
TabContent(){
FollowSecondTabsComponent({data:$data,firstIndex:index})
}.tabBar(this.TabBuilder(index,item))
}, (item: FollowListItem, index: number) => index.toString())
}
.vertical(false)
.barMode(BarMode.Scrollable)
.barWidth('100%')
.barHeight('84lpx')
.animationDuration(0)
.onChange((index: number) => {
this.currentIndex = index
})
.width('100%')
.height('100%')
}.width('100%')
}
}
\ No newline at end of file
... ...
import { LazyDataSource } from 'wdKit';
import { FollowListDetailItem } from '../../../../viewmodel/FollowListDetailItem'
import { ListHasNoMoreDataUI } from '../../../reusable/ListHasNoMoreDataUI';
const TAG = "FollowListDetailUI"
@Component
export struct FollowListDetailUI{
@State creatorDirectoryId:number = -1;
@State data: LazyDataSource<FollowListDetailItem> = new LazyDataSource();
@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);
this.getNewPageData()
}
build(){
Column(){
List({ space: 3 }) {
LazyForEach(this.data, (item: FollowListDetailItem, index: number = 0) => {
ListItem() {
ChildComponent({data: item})
}
.onClick(() => {
})
}, (item: FollowListDetailItem, index: number) => index.toString())
//没有更多数据 显示提示
if(!this.hasMore){
ListItem(){
ListHasNoMoreDataUI()
}
}
}.cachedCount(7)
.padding({left:'31lpx',right:'31lpx'})
.layoutWeight(1)
.onReachEnd(()=>{
console.log(TAG,"触底了");
if(!this.isLoading){
this.isLoading = true
//加载分页数据
this.getNewPageData()
}
})
}.layoutWeight(1)
}
getNewPageData(){
if(this.hasMore){
if(this.curPageNum>=4){
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
this.curPageNum++
}
}
}
@Component
struct ChildComponent {
@ObjectLink data: FollowListDetailItem
build() {
Column(){
Blank().height('27lpx')
Row() {
Image(this.data.headPhotoUrl)
.objectFit(ImageFit.Auto)
.width('92lpx')
.height('92lpx')
.margin({right:'15lpx'})
Column(){
Text(this.data.cnUserName)
.fontWeight('400lpx')
.fontSize('31lpx')
.lineHeight('38lpx')
.fontColor($r('app.color.color_222222'))
Text(`粉丝${this.data.cnFansNum}`)
.fontColor($r('app.color.color_B0B0B0'))
.fontSize('23lpx')
.maxLines(1)
Text(`${this.data.introduction}`)
.fontColor($r('app.color.color_B0B0B0'))
.fontSize('23lpx')
.maxLines(2)
.textOverflow({ overflow: TextOverflow.Ellipsis })
}.layoutWeight(1)
.alignItems(HorizontalAlign.Start)
if(this.data.isFollow){
Row(){
Text(`已关注`)
.fontColor($r('app.color.color_CCCCCC'))
.fontSize('23lpx')
.fontWeight('500lpx')
.lineHeight('35lpx')
}.backgroundColor($r('app.color.color_F5F5F5'))
.borderRadius('6lpx')
.borderWidth('2lpx')
.justifyContent(FlexAlign.Center)
.width('100lpx')
.height('46lpx')
.margin({left:'4lpx',top:'23lpx'})
.onClick(()=>{
this.data.isFollow = false
})
}else{
Row(){
Image($r('app.media.follow_icon'))
.margin({right:'4lpx'})
.width('23lpx')
.height('23lpx')
Text(`关注`)
.fontColor($r('app.color.color_ED2800'))
.fontSize('23lpx')
.fontWeight('500lpx')
.lineHeight('35lpx')
}.borderColor($r('app.color.color_ED2800'))
.borderRadius('6lpx')
.borderWidth('2lpx')
.justifyContent(FlexAlign.Center)
.width('100lpx')
.height('46lpx')
.margin({left:'4lpx',top:'23lpx'})
.onClick(()=>{
this.data.isFollow = true
})
}
}.alignItems(VerticalAlign.Top)
.width('100%')
.layoutWeight(1)
Divider().width('100%')
.height('2lpx')
.strokeWidth('1lpx')
.backgroundColor($r('app.color.color_EDEDED'))
}.height('146lpx')
.justifyContent(FlexAlign.Center)
}
}
\ No newline at end of file
... ...
import { FollowListItem, FollowSecondListItem } from '../../../../viewmodel/FollowListItem'
import { FollowListDetailUI } from './FollowListDetailUI'
import { FollowThirdTabsComponent } from './FollowThirdTabsComponent'
@Component
export struct FollowSecondTabsComponent{
@Link data:FollowListItem[]
@State firstIndex:number = 0
@State currentIndex: number = 0
private controller: TabsController = new TabsController()
fontColor: string = '#000000'
selectedFontColor: string = '#ED2800'
aboutToAppear(){
}
build(){
Column(){
Divider().width('100%')
.height('2lpx')
.strokeWidth('1lpx')
.backgroundColor($r('app.color.color_EDEDED'))
if(this.data != null){
if(this.data[this.firstIndex].children == null || this.data[this.firstIndex].children.length == 0){
FollowListDetailUI({creatorDirectoryId:this.data[this.firstIndex].id})
}else{
this.FollowSecondUI()
}
}
}
.width('100%')
.height('100%')
}
@Builder FollowSecondUI(){
Row() {
Tabs({ barPosition: BarPosition.Start, controller: this.controller }) {
ForEach(this.data[this.firstIndex].children, (item: FollowSecondListItem, index: number ) => {
TabContent(){
FollowThirdTabsComponent({data:$data,firstIndex:$firstIndex,secondIndex:index})
}.tabBar(this.TabBuilder(index,item))
.backgroundColor($r('app.color.white'))
}, (item: FollowListItem, index: number) => index.toString())
}
.vertical(true)
.barMode(BarMode.Scrollable)
.barWidth('140lpx')
.animationDuration(0)
.onChange((index: number) => {
this.currentIndex = index
})
.width('100%')
}.width('100%')
.alignItems(VerticalAlign.Top)
}
@Builder TabBuilder(index: number, item: FollowSecondListItem) {
Column(){
Text(item.directoryName)
.width('100%')
.height('38lpx')
.fontSize('30lpx')
.textAlign(TextAlign.Center)
.fontWeight(this.currentIndex === index ? 600 : 400)
.fontColor(this.currentIndex === index ? this.selectedFontColor : this.fontColor)
.lineHeight('38lpx')
}
.onClick(()=>{
this.currentIndex = index
this.controller.changeIndex(this.currentIndex)
})
.justifyContent(FlexAlign.Center)
.height('84lpx')
.backgroundColor(this.currentIndex === index?$r('app.color.white'):$r('app.color.color_F9F9F9'))
}
}
\ No newline at end of file
... ...
import { FollowListItem, FollowThirdListItem } from '../../../../viewmodel/FollowListItem'
import { FollowListDetailUI } from './FollowListDetailUI'
@Component
export struct FollowThirdTabsComponent{
@Link data:FollowListItem[]
@State currentIndex: number = 0
@Link firstIndex: number
@State secondIndex:number = -1
private controller: TabsController = new TabsController()
fontColor: string = '#999999'
selectedFontColor: string = '#000000'
build(){
if(this.data != null){
if(this.data[this.firstIndex].children[this.secondIndex].children == null || this.data[this.firstIndex].children[this.secondIndex].children.length == 0){
FollowListDetailUI({creatorDirectoryId:this.data[this.firstIndex].children[this.secondIndex].id})
}else{
this.FollowThirdUI()
}
}
}
@Builder TabBuilder(index: number, item: FollowThirdListItem) {
Column(){
Text(item.directoryName)
.fontSize('30lpx')
.textAlign(TextAlign.Center)
.fontWeight(this.currentIndex === index ? 600 : 400)
.fontColor(this.currentIndex === index ? this.selectedFontColor : this.fontColor)
.lineHeight('38lpx')
.backgroundColor($r('app.color.color_F9F9F9'))
.padding('13lpx')
}
.onClick(()=>{
this.currentIndex = index
this.controller.changeIndex(this.currentIndex)
})
.height('100%')
.margin({right:'9lpx'})
.padding({left:'20lpx',right:index === this.data[this.firstIndex].children[this.secondIndex].children.length-1?"20lpx":"0lpx"})
.justifyContent(FlexAlign.Center)
}
@Builder FollowThirdUI(){
Row() {
Tabs({ barPosition: BarPosition.Start, controller: this.controller }) {
ForEach(this.data[this.firstIndex].children[this.secondIndex].children, (item: FollowThirdListItem, index: number ) => {
TabContent(){
Column(){
Divider().width('100%')
.height('2lpx')
.strokeWidth('1lpx')
.backgroundColor($r('app.color.color_EDEDED'))
.margin({left:'20lpx'})
FollowListDetailUI({creatorDirectoryId:this.data[this.firstIndex].children[this.secondIndex].children[index].id})
}
}.tabBar(this.TabBuilder(index,item))
.backgroundColor($r('app.color.white'))
}, (item: FollowListItem, index: number) => index.toString())
}
.vertical(false)
.barMode(BarMode.Scrollable)
.barWidth('100%')
.barHeight('84lpx')
.animationDuration(0)
.onChange((index: number) => {
this.currentIndex = index
})
.width('100%')
}.width('100%')
}
}
\ No newline at end of file
... ...
import router from '@ohos.router'
@Component
export struct CustomTitleUI {
imgBack:boolean = true
titleName:string = "默认标题"
build() {
RelativeContainer() {
//标题栏目
if(this.imgBack){
Image($r('app.media.back_icon'))
.width('46lpx')
.height('46lpx')
.objectFit(ImageFit.Auto)
.id("back_icon")
.alignRules({
center: {anchor: "__container__", align: VerticalAlign.Center},
left: {anchor: "__container__", align: HorizontalAlign.Start}
})
.margin({left:'31lpx'})
.onClick(()=>{
router.back()
})
}
Text(this.titleName)
.height('42lpx')
.maxLines(1)
.id("title")
.fontSize('35lpx')
.fontWeight(400)
.fontColor($r('app.color.color_222222'))
.lineHeight('42lpx')
.alignRules({
center: {anchor: "__container__", align: VerticalAlign.Center},
middle: {anchor: "__container__", align: HorizontalAlign.Center}
})
}
.height('84lpx')
.width('100%')
.backgroundColor($r('app.color.white'))
}
}
\ No newline at end of file
... ...
@Component
export struct ListHasNoMoreDataUI{
build(){
Row(){
Text("已显示全部内容")
.fontColor($r('app.color.color_999999'))
.fontWeight('500lpx')
.fontSize('23lpx')
}.justifyContent(FlexAlign.Center)
.width('100%')
.margin({top:'20lpx',bottom:'20lpx'})
}
}
\ No newline at end of file
... ...
@Component
export struct AlbumCard {
// @Link isRefreshData: boolean; // Timer to fresh
// @State title: Resource = $r('app.string.title_default');
build() {
Flex({direction:FlexDirection.Column}) {
Text('测试文字测试文字测试文字测试文字测试文字测试文字测试文字测试文字测试文字测试文字测试文字测试文字测试文字测试文字测试文字测试文字' +
'测试文字测试文字测试文字测试文字测试文字测试文字测试文字测试文字测试文字测试文字测试文字测试文字测试文字测试文字测试文字测试文字测试文字' +
'测试文字测试文字测试文字测试文字测试文字测试文字测试文字测试文字测试文字测试文字')
.textOverflow({ overflow: TextOverflow.Ellipsis })
.fontSize(17)
.fontColor(0x222222)
.lineHeight(25)
.maxLines(3)
// .padding({ top: 6,
// left: 16,
// right: 16 })
.width('100%')
.height(75)
Grid() {
GridItem() {
Image($r('app.media.icon'))
.width('100%')
.height('100%')
}
.rowStart(1)
.rowEnd(2)
.backgroundColor(0xFF0000)
GridItem() {
Image($r('app.media.icon'))
.width('100%')
.height('100%')
}
.backgroundColor(0x00FF00)
GridItem() {
Stack({alignContent:Alignment.BottomEnd}) {
Image($r('app.media.icon'))
.width('100%')
.height('100%')
Shape() {
Rect().width(33).height(18)
}
// .viewPort({ x: -2, y: -2, width: 304, height: 130 })
.fill(0x000000)
.fillOpacity(0.3)
// .strokeDashArray([20])
// .strokeDashOffset(10)
.strokeLineCap(LineCapStyle.Round)
.strokeLineJoin(LineJoinStyle.Round)
.antiAlias(true)
.align(Alignment.BottomEnd)
.margin({bottom:4,right:4})
Image($r('app.media.album_card_shape'))
.width(22)
.height(18)
.align(Alignment.BottomEnd)
.margin({bottom:4,right:15})
Text('6')
.fontSize(13)
.fontColor(0xFFFFFF)
// .id('pageIndex')
// .alignRules({
// right: {anchor: "shape", align: HorizontalAlign.End},
// top: {anchor: "shape", align: VerticalAlign.Top}
// })
.textAlign(TextAlign.Center)
.width(17)
.height(17)
.align(Alignment.BottomEnd)
.margin({bottom:4,right:4})
}
.width('100%')
.height('100%')
}
.backgroundColor(0x0000FF)
}
.rowsTemplate('1fr 1fr')
.columnsTemplate('2fr 1fr')
.columnsGap(2)
.rowsGap(2)
.width('100%')
.height(154)
// .aspectRatio(343/154)
.margin({top:8})
Row() {
Text('人民日报')
.fontSize(13)
.fontColor(0xB0B0B0)
Image($r('app.media.album_card_divide'))
.width(16)
.height(16)
Text('46分钟前')
.fontSize(13)
.fontColor(0xB0B0B0)
Text('328评')
.fontSize(13)
.fontColor(0xB0B0B0)
.margin({
left:6
})
}
.width('100%')
.height(16)
.margin({top:8})
}
.width('100%')
.height(289)
.padding({top: 14,left: 16,right: 16,bottom: 14})
// .aspectRatio(375 / 289)
.backgroundColor(0x000000)
}
}
\ No newline at end of file
... ...
... ... @@ -55,10 +55,21 @@ export struct BannerComponent {
Image(item.coverUrl)
.objectFit(ImageFit.Fill)
.borderRadius(5)
.onClick(()=>{
AlertDialog.show({
title: '🥟id : ' + item.objectId,
message: '标题:' + item.newsTitle,
confirm: {
value: "OK",
action: () => {
},
}
})
})
// 底部标题和时间
Column() {
Text(item.description)
Text(item.newsTitle)
.fontSize(18)
.margin({ bottom: 4 })
.fontColor(Color.White)
... ... @@ -113,7 +124,7 @@ export struct BannerComponent {
// 底部标题和时间
Row() {
// 标题
Text(this.bannerContent.description.toString())
Text(this.bannerContent.newsTitle.toString())
.fontSize(18)
.fontColor(Color.White)
.fontWeight(600)
... ...
... ... @@ -29,7 +29,10 @@ export struct BigPicCardComponent {
//大图
Stack() {
Image(this.compDTO.operDataList[0].coverUrl)
.backgroundColor('#888888')
.borderRadius(4)
.width('100%')
.aspectRatio(343 / 192)
//播放状态+时长
... ... @@ -50,7 +53,6 @@ export struct BigPicCardComponent {
}
.width('100%')
.height(192)
.alignContent(Alignment.BottomEnd)
.margin({top:8})
... ... @@ -91,97 +93,6 @@ export struct BigPicCardComponent {
}
/**
* 大图卡 中部
* 包括:视频图、视频时长
*/
@Component
export struct myBigCard_body {
private newsSrc:string ="https://k.sinaimg.cn/n/default/crawl/190/w550h440/20240118/6772-7c2385bb2741c6f88906af3514d27343.png/w700d1q75cms.jpg";
private newsTitle:string ="时政微观察丨新征程金融工作怎么干?“新年第一课”这样讲";
build() {
Column() {
//新闻标题
Text(this.newsTitle)
.fontSize(17)
.fontColor('#222222')
.maxLines(3)
.textOverflow({ overflow: TextOverflow.Ellipsis }) // 超出的部分显示省略号。
//大图
Stack() {
Image(this.newsSrc)
.borderRadius(4)
//播放状态+时长
Row() {
Image($r('app.media.icon_live'))
.width(22)
.height(18)
Stack() {
Text('直播中')
.fontColor('#FFFFFF')
.fontSize(11)
}
.width(44)
.height(18)
.backgroundColor('#4d000000')
}.margin({right:8,bottom:8})
}
.width('100%')
.height(192)
.alignContent(Alignment.BottomEnd)
.margin({top:8})
}
.width('100%')
.justifyContent(FlexAlign.Start)
}
}
/**
* 大图卡 底部
* 包括:分享、评论、点赞 三个按钮
*/
@Component
export struct myBigCard_bottom {
private bottom_height:number = 18
private itemSubtitle1:string = "人民日报"
private itemSubtitle2:string = "25分钟前"
private itemSubtitle3:string = "786条评论"
build() {
//子标题
Row() {
Text(this.itemSubtitle1)
.bottomTextStyle()
//间隔点
Image($r('app.media.point'))
.width(12)
.height(12)
Text(this.itemSubtitle2)
.bottomTextStyle()
Text(' ')
Text(this.itemSubtitle3)
.bottomTextStyle()
}
.width('100%')
.height(this.bottom_height)
.justifyContent(FlexAlign.Start)
}
}
@Extend(Text) function bottomTextStyle() {
.fontSize(12)
.fontColor('#B0B0B0')
... ...
import { CommonConstants } from 'wdConstant';
import thermal from '@ohos.thermal';
import { CompDTO } from '../../repository/bean/CompDTO';
import { ContentDTO } from '../../repository/bean/ContentDTO';
import { CompUtils } from '../../utils/CompUtils';
@Component
export struct HeadPictureCardComponent {
@State compDTO: CompDTO = {} as CompDTO
private item: ContentDTO
aboutToAppear() {
// Data Initialization.
this.item = this.compDTO.operDataList[0];
}
build() {
Stack() {
Image(this.compDTO.backgroundImgUrl)
Image(this.item.coverUrl)
.width(CommonConstants.FULL_WIDTH)
.height(CommonConstants.FULL_HEIGHT)
if (this.compDTO.extraData.length > 0) {
if (this.item.newsTitle != null) {
Row()
.width(CommonConstants.FULL_WIDTH)
.height(59)
... ... @@ -22,20 +31,34 @@ export struct HeadPictureCardComponent {
]
})
Row() {
Text(CompUtils.getLabelTitle(this.compDTO.extraData))
Text(this.item.newsTitle)
.width(CommonConstants.FULL_WIDTH)
.height(CommonConstants.FULL_HEIGHT)
.fontColor(Color.White)
.fontSize($r('app.float.normal_text_size'))
.fontWeight(FontWeight.Bold)
.maxLines(2)
.align(Alignment.Bottom)
}
.height(25)
.height(40)
.margin({left: 12, bottom: 10, right: 12})
}
}
.alignContent(Alignment.Bottom)
.width(CommonConstants.FULL_WIDTH)
.aspectRatio(imageSizeRatio(this.item.coverSize))
.height(200)
}
}
function imageSizeRatio(size: string): number {
if (size != null) {
let parts: string[] = size.split("*");
let f = Number(parts[0])
let s = Number(parts[1])
return f / s;
} else {
return 1.0
}
}
... ...
// import { CommonConstants } from 'wdConstant/src/main/ets/constants/CommonConstants'
@Entry
import { CompDTO } from '../../repository/bean/CompDTO';
/**
* 小视频卡
*/
@Component
export struct SmallVideoCardComponent {
@State compDTO: CompDTO = {} as CompDTO
build() {
Row() {
Column() {
... ...
import { CompDTO } from '../../repository/bean/CompDTO'
import { ContentDTO } from '../../repository/bean/ContentDTO'
/**
* 通用 小视频卡3张以下
*/
@Component
export struct SmallVideoCardHorComponent {
@State compDTO: CompDTO = {} as CompDTO
build() {
Column() {
this.labelTabStyle()
List({ space: 8 }) {
ForEach(this.compDTO.operDataList, (item: ContentDTO, index: number) => {
ListItem() {
this.itemStyle(item)
}
}, (item: string, index: number) => {
return index.toString()
})
}
.listDirection(Axis.Horizontal)
.margin({
left: 16
})
}
}
@Builder
itemStyle(item: ContentDTO) {
Stack({ alignContent: Alignment.Bottom }) {
Image(item.coverUrl)
.width(156)
.aspectRatio(156 / 208)
Row() {
Text(item.title)
.fontColor('#FFFFFF')
.fontSize('14fp')
.fontWeight(600)
}
.height(80)
.aspectRatio(156 / 80)
.linearGradient({ angle: 0, colors: [['#0000000', 0], ['#4d000000', 0.7], [Color.Transparent, 1]] })
.alignItems(VerticalAlign.Bottom)
.padding({ left: 8,
right: 8,
bottom: 8 })
}.border({ radius: 2 })
}
@Builder
labelTabStyle() {
Row() {
Image($r('app.media.iv_line_vertical_label'))
.width(3)
.height(16)
Text(this.compDTO.name)
.fontSize('17sp')
.fontColor('#222222')
.fontWeight(600)
.maxLines(1)
.textOverflow({ overflow: TextOverflow.Ellipsis })
.layoutWeight(1)
.margin({
left: 5
})
if (this.compDTO.operDataList.length >= 3) {
Text('更多')
.fontSize('14sp')
.fontColor('#999999')
.fontWeight(400)
Image($r('app.media.iv_arrow_right_gray'))
.width(14)
.height(14)
}
}
.width('100%')
.height('44vp')
.padding({
left: 16,
right: 16
})
}
}
\ No newline at end of file
... ...
//全标题 "compStyle":"4",
import { CommonConstants } from 'wdConstant'
import { DateTimeUtils } from 'wdKit';
import { CompDTO } from '../../repository/bean/CompDTO'
const TAG: string = 'TriPicCardComponent';
... ... @@ -10,7 +11,7 @@ const TAG: string = 'TriPicCardComponent';
* 卡片宽度:充满父窗口
* 卡片高度,仅包含横板图片:图片高度由图片的宽度及宽高比决定,图片宽度占父窗口'100%',宽高比为16:9:
*/
// @Entry
@Entry
@Component
export struct TriPicCardComponent {
@State compDTO: CompDTO = {} as CompDTO
... ... @@ -31,23 +32,21 @@ export struct TriPicCardComponent {
Row() {
Image(this.compDTO.operDataList[0].fullColumnImgUrls[0]?.url)
.width('32%')
.height(75)
.aspectRatio(113 / 75)
.borderRadius({ topLeft:4,bottomLeft:4 })
Image(this.compDTO.operDataList[0].fullColumnImgUrls[1]?.url)
.width('32%')
.height(75)
.aspectRatio(113 / 75)
Image(this.compDTO.operDataList[0].fullColumnImgUrls[2]?.url)
.width('32%')
.height(75)
.aspectRatio(113 / 75)
.borderRadius({ topRight:4,bottomRight:4 })
}
.justifyContent(FlexAlign.SpaceBetween)
.width('100%')
.height(75)
.margin({top:8})
.borderRadius(8)
... ... @@ -67,7 +66,7 @@ export struct TriPicCardComponent {
.width(12)
.height(12)
Text(this.compDTO.operDataList[0].publishTime)
Text(DateTimeUtils.getCommentTime(Number.parseFloat(this.compDTO.operDataList[0].publishTime)))
.bottomTextStyle()
Text(' ')
... ...
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 { MineAppointmentListItem } from '../viewmodel/MineAppointmentListItem';
import { Logger, ResourcesUtils } from 'wdKit';
const TAG = "MinePageDatasModel"
/**
* 我的页面 所有数据 获取封装类
*/
class MinePageDatasModel{
private static instance: MinePageDatasModel;
personalData:MinePagePersonalFunctionsItem[] = []
creatorData:MinePageCreatorFunctionsItem[] = []
moreData:MinePageMoreFunctionModel[] = []
private constructor() { }
/**
* 单例模式
* @returns
*/
public static getInstance(): MinePageDatasModel {
if (!MinePageDatasModel.instance) {
MinePageDatasModel.instance = new MinePageDatasModel();
}
return MinePageDatasModel.instance;
}
/**
* 评论 关注 收藏 等7个数据
* 包含名字和图标
*/
getPersonalFunctionsData():MinePagePersonalFunctionsItem[]{
if(this.personalData.length === 7){
return this.personalData
}
this.personalData.push(new MinePagePersonalFunctionsItem("评论",$r('app.media.mine_comment_icon')))
this.personalData.push(new MinePagePersonalFunctionsItem("关注",$r('app.media.mine_order_icon')))
this.personalData.push(new MinePagePersonalFunctionsItem("收藏",$r('app.media.mine_collect_icon')))
this.personalData.push(new MinePagePersonalFunctionsItem("历史",$r('app.media.mine_history_icon')))
this.personalData.push(new MinePagePersonalFunctionsItem("消息",$r('app.media.mine_msg_icon')))
this.personalData.push(new MinePagePersonalFunctionsItem("留言板",$r('app.media.mine_msgboard_icon')))
this.personalData.push(new MinePagePersonalFunctionsItem("预约",$r('app.media.mine_order_icon')))
return this.personalData
}
/**
* 发布文章 发布视频 等4个数据
* 包含名字和图标
*/
getCreatorFunctionsData():MinePageCreatorFunctionsItem[]{
if(this.creatorData.length === 4){
return this.creatorData
}
this.creatorData.push(new MinePageCreatorFunctionsItem("发布文章",$r('app.media.mine_active_create_article')))
this.creatorData.push(new MinePageCreatorFunctionsItem("发布视频",$r('app.media.mine_active_create_video')))
this.creatorData.push(new MinePageCreatorFunctionsItem("发布动态",$r('app.media.mine_active_create_video')))
this.creatorData.push(new MinePageCreatorFunctionsItem("发布图集",$r('app.media.mine_active_create_pics')))
return this.creatorData
}
/**
* 扫一扫 我的奖品 等5个数据
* 包含名字和图标
*/
getMoreFunctionsData():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
}
/**
* 扫一扫 我的奖品 等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();
return WDHttp.get<ResponseDTO<MineAppointmentListItem>>(url, headers)
};
getAppointmentListData(pageSize:string,pageNum:string,context?: Context): 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");
success(this.getAppointmentListDataLocal(context))
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);
success(this.getAppointmentListDataLocal(context))
})
})
}
async getAppointmentListDataLocal(context?: Context): Promise<MineAppointmentListItem> {
Logger.info(TAG, `getBottomNavDataMock start`);
let compRes: ResponseDTO<MineAppointmentListItem> | null = await ResourcesUtils.getResourcesJson<ResponseDTO<MineAppointmentListItem>>('appointment_list_data.json', context);
if (!compRes || !compRes.data) {
Logger.info(TAG, `getAppointmentListDataLocal compRes is empty`);
return null
}
Logger.info(TAG, `getAppointmentListDataLocal getResourcesJsonSync compRes : ${JSON.stringify(compRes)}`);
return compRes.data
}
}
const minePageDatasModel = MinePageDatasModel.getInstance()
export default minePageDatasModel as MinePageDatasModel
\ No newline at end of file
... ...
import MinePagePersonalFunctionsItem from '../../../../../../../../PeopleDaily_Harmony/wdComponent/src/main/ets/viewmodel/MinePagePersonalFunctionsItem'
import MinePageCreatorFunctionsItem from '../../../../../../../../PeopleDaily_Harmony/wdComponent/src/main/ets/viewmodel/MinePageCreatorFunctionsItem'
import MinePageMoreFunctionModel from '../../../../../../../../PeopleDaily_Harmony/wdComponent/src/main/ets/viewmodel/MinePageMoreFunctionModel';
import { HttpUrlUtils } from '../../../../../../../../PeopleDaily_Harmony/wdComponent/src/main/ets/network/HttpUrlUtils';
import HashMap from '@ohos.util.HashMap';
import { ResponseDTO, WDHttp } from 'wdNetwork';
import { Logger } from 'wdKit';
import { MineMainSettingFunctionItem } from '../../../../../../../../PeopleDaily_Harmony/wdComponent/src/main/ets/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.account_qqicon'), '绑定QQ', '立即绑定', 0, false))
this.accountAndSecurityData.push(new MineMainSettingFunctionItem($r('app.media.account_wechaticon'), '绑定微信', '立即绑定', 0, false))
this.accountAndSecurityData.push(new MineMainSettingFunctionItem($r('app.media.account_weiboicon'), '绑定新浪微博', '立即绑定', 0, false))
this.accountAndSecurityData.push(new MineMainSettingFunctionItem($r('app.media.account_appleicon'), 'Apple ID', null, 0, false))
this.accountAndSecurityData.push(new MineMainSettingFunctionItem(null, null, null, 2, null))
this.accountAndSecurityData.push(new MineMainSettingFunctionItem(null, '注销账号', null, 0, false))
return this.accountAndSecurityData
}
// 网络请求设置数据
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
... ...
... ... @@ -47,6 +47,11 @@ export class HttpUrlUtils {
* 批查接口,查询互动相关数据,如收藏数、评论数等
*/
static readonly INTERACT_DATA_PATH: string = "/api/rmrb-contact/contact/zh/c/content/interactData";
/**
* 个人中心 我的预约列表
*/
static readonly APPOINTMENT_LIST_DATA_PATH: string = "/api/live-center-message/zh/c/live/subscribe";
private static hostUrl: string = HttpUrlUtils.HOST_UAT;
static getCommonHeaders(): HashMap<string, string> {
... ... @@ -86,6 +91,44 @@ export class HttpUrlUtils {
return headers;
}
static getYcgCommonHeaders(): HashMap<string, string> {
let headers: HashMap<string, string> = new HashMap<string, string>()
headers.set('mpassid', 'XGt6jfGUx8ADAKruTyAMdhHj')
headers.set('city', "%E5%90%88%E8%82%A5%E5%B8%82")
headers.set('User-Agent', 'Dalvik/2.1.0 (Linux; U; Android 10; PCT-AL10 Build/HUAWEIPCT-AL10)')
headers.set('channel', "rmrb_china_0000")
headers.set('appCode', "0af1f9085e484c97b2a44704bae72c07")
headers.set('Authorization', "APPCODE 0af1f9085e484c97b2a44704bae72c07")
headers.set('X-Ca-Stage', "TEST")
headers.set('plat', "Phone")
headers.set('Content-Type', 'application/json; charset=utf-8')
headers.set('timestamp', "649773304")
headers.set('RMRB-X-TOKEN', "eyJhbGciOiJIUzI1NiIsImtpZCI6IklFazBGclhfV2RYMEx1ZktDU01iYTVYd0VmUHZ6a043T0F5UTRFLWIwWU0ifQ.eyJpc3MiOiJwZW9wbGVzLWRhaWx5LWZvdXJhIiwic3ViIjoicGVvcGxlcy1kYWlseS1mb3VyYSIsImV4cCI6MTcxMDU4Mzk0MywidXNlcklkIjo1NjczODc0NzcwNjM2MjEsInVzZXJWZXJzaW9uIjoiNTY3Mzg3NDc3MDYzNjIxXzAiLCJ1c2VyTmFtZSI6IiVFNCVCQSVCQSVFNiVCMCU5MSVFNiU5NyVBNSVFNiU4QSVBNSVFNyVCRCU5MSVFNSU4RiU4QmFQcnRxNSIsInVzZXJUeXBlIjoxLCJjcmVhdG9ySWQiOm51bGwsInVzZXJJZFpoIjpudWxsfQ._LTKrUxQozpCj1XMhx1TWOIxn5gjDveoPuMFGpI0g_8")
headers.set('device_id', "5156098c-6c44-3514-af70-04a0139a9327")
headers.set('cookie', 'RMRB-X-TOKEN=eyJhbGciOiJIUzI1NiIsImtpZCI6IklFazBGclhfV2RYMEx1ZktDU01iYTVYd0VmUHZ6a043T0F5UTRFLWIwWU0ifQ.eyJpc3MiOiJwZW9wbGVzLWRhaWx5LWZvdXJhIiwic3ViIjoicGVvcGxlcy1kYWlseS1mb3VyYSIsImV4cCI6MTcxMDU4Mzk0MywidXNlcklkIjo1NjczODc0NzcwNjM2MjEsInVzZXJWZXJzaW9uIjoiNTY3Mzg3NDc3MDYzNjIxXzAiLCJ1c2VyTmFtZSI6IiVFNCVCQSVCQSVFNiVCMCU5MSVFNiU5NyVBNSVFNiU4QSVBNSVFNyVCRCU5MSVFNSU4RiU4QmFQcnRxNSIsInVzZXJUeXBlIjoxLCJjcmVhdG9ySWQiOm51bGwsInVzZXJJZFpoIjpudWxsfQ._LTKrUxQozpCj1XMhx1TWOIxn5gjDveoPuMFGpI0g_8')
headers.set('build_version', "202403112023")
headers.set('adcode', "340000")
headers.set('os_version', "10")
headers.set('city_dode', "340100")
headers.set('userId', "567387477063621")
headers.set('versionCode', "7302")
headers.set('system', "Android")
headers.set('version_name', "7.3.0.2")
headers.set('EagleEye-TraceID', '5C3D0800CF2C4440A43E5B131187629B')
headers.set('imei', "5156098c-6c44-3514-af70-04a0139a9327")
headers.set('userType', "1")
headers.set('Accept-Language', 'zh')
// HttpUrlUtils.addSpecialHeaders(headers);
// Logger.debug("TAG", '******************* commonHeaders headers start ******************************** ');
// headers.forEach((v,k)=>{
// Logger.debug("TAG", 'getCommonHeaders header: ' + k + ': ' + v);
// })
// Logger.debug("TAG", '******************* commonHeaders headers end ******************************** ');
return headers;
}
static getHost() {
return this.hostUrl;
}
... ... @@ -149,6 +192,11 @@ export class HttpUrlUtils {
return url;
}
static getAppointmentListDataUrl() {
let url = this.HOST_SIT + this.APPOINTMENT_LIST_DATA_PATH;
return url;
}
static addSpecialHeaders(headers: HashMap<string, string>) {
switch (this.hostUrl) {
case this.HOST_UAT:
... ...
... ... @@ -44,4 +44,5 @@ export class PageRepository {
let headers: HashMap<string, string> = HttpUrlUtils.getCommonHeaders();
return WDHttp.post<ResponseDTO<InteractDataDTO[]>>(url, param, headers)
};
}
\ No newline at end of file
... ...
import router from '@ohos.router';
const TAG = 'RouteManager';
/**
* 跳转页面封装类
*/
class RouteManager{
jumpNewPage(target_url: string,params?: Object){
router.pushUrl({
url: target_url,
params: {
params
}
}).catch((error: Error) => {
console.log(TAG,JSON.stringify(error));
});
}
}
const routeManager = new RouteManager()
export default routeManager as RouteManager
\ No newline at end of file
... ...
/**
*
"attentionNum": 0,
"authIcon": "",
"authId": 0,
"authPersonal": "",
"authTitle": "",
"categoryAuth": "",
"city": "110100",
"cnAttentionNum": 0,
"cnCollectNum": 0,
"cnCommentNum": 0,
"cnFansNum": 4,
"cnIsAttention": 1,
"cnIsComment": 1,
"cnIsLike": 1,
"cnLikeNum": 0,
"cnLiveCommentControl": 1,
"cnLiveGiftControl": 1,
"cnLiveLikeControl": 1,
"cnLiveShareControl": 1,
"cnMainControl": 1,
"cnRegistTime": 1695280071000,
"cnShareControl": 1,
"cnShareNum": 0,
"cnUserId": "444937588589253",
"cnUserName": "QACrawler2115",
"cnUserType": "2",
"collectNum": 0,
"creatorId": "3004862",
"district": "110101",
"fansNum": 0,
"headPhotoUrl": "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",
"honoraryIcon": "",
"honoraryTitle": "",
"introduction": "知识博主",
"isAttention": 1,
"isComment": 1,
"isLike": 1,
"isVisiable": 1,
"likeNum": 0,
"liveCommentControl": 1,
"liveGiftControl": 1,
"liveLikeControl": 1,
"liveShareControl": 1,
"posterShareControl": 1,
"province": "110000",
"publishNum": 0,
"region": "",
"shareControl": 1,
"shareNum": 0,
"shopOpen": 0,
"storeUrl": "",
"subjectType": 0,
"userId": "",
"userName": "QACrawler2115",
"userType": "2",
"waresSwitch": 1
*/
@Observed
export class FollowListDetailItem{
headPhotoUrl:string //头像
cnUserName:string //昵称
cnFansNum:number //粉丝数
introduction:string //介绍
isFollow:boolean = false //是否已经关注
constructor(headPhotoUrl:string,cnUserName:string,cnFansNum:number,introduction:string) {
this.headPhotoUrl = headPhotoUrl
this.cnUserName = cnUserName
this.cnFansNum = cnFansNum
this.introduction = introduction
}
}
... ...
/**
* {
"directoryName": "创作",
"directoryWeight": 3,
"id": 74,
"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": 1,
"id": 75,
"isShow": 1,
"level": 2,
"parentId": 74,
"rootId": 74
}
]
}
*/
@Observed
export class FollowListItem{
constructor(directoryName:string) {
this.directoryName = directoryName
}
directoryName:string
directoryWeight:number
id:number
isShow:number
level:number
parentId:number
rootId:number
children:FollowSecondListItem[]
}
@Observed
export class FollowSecondListItem{
directoryName:string
directoryWeight:number
id:number
isShow:number
level:number
parentId:number
rootId:number
children:FollowThirdListItem[]
}
@Observed
export class FollowThirdListItem{
directoryName:string
directoryWeight:number
id:number
isShow:number
level:number
parentId:number
rootId:number
}
\ No newline at end of file
... ...
export default class FunctionsItem {
imgSrc:Resource
msg:string
constructor(msg:string,imgSrc:Resource){
this.msg = msg
this.imgSrc = imgSrc
}
}
\ No newline at end of file
... ...
@Observed
export class MineAppointmentItem{
appStyle:string //"15"
/*[
"https://sitcontentjdcdn.aikan.pdnews.cn/sjbj-20231204/image/live/563cc8ce1ecc43b288f6cf60da66579c.jpeg?x-oss-process=image/resize,l_550,m_fill,h_450,w_800/quality,q_90/format,jpg"
]*/
imageUrl:string[]
liveId:number //20000007348
planStartTime:string //2023-12-05 15:26:10
timePre:string //12月05日
timeBack:string //15:26
relId:string //"500000017021"
relType:number //1
startTime:string //""
status:string //"wait"
title:string //"视界运营位加权-加权中删除"
isAppointment:boolean
constructor(imageUrl:string[],status:string,title:string,isAppointment:boolean,timePre:string,timeBack:string,relType:number ) {
this.imageUrl=imageUrl
this.status=status
this.title=title
this.isAppointment=isAppointment
this.timePre = timePre
this.timeBack = timeBack
this.relType = relType
}
}
\ No newline at end of file
... ...
import { MineAppointmentItem } from './MineAppointmentItem'
export class MineAppointmentListItem{
list:MineAppointmentItem[]
pageNum: number
pageSize: number
totalCount: number
}
\ No newline at end of file
... ...