Showing
41 changed files
with
2724 additions
and
120 deletions
| 1 | import { StringUtils } from './StringUtils'; | 1 | import { StringUtils } from './StringUtils'; |
| 2 | - | 2 | +import getLunar from './GetLunar' |
| 3 | /** | 3 | /** |
| 4 | * 日期/时间工具 | 4 | * 日期/时间工具 |
| 5 | */ | 5 | */ |
| @@ -457,6 +457,15 @@ export class DateTimeUtils { | @@ -457,6 +457,15 @@ export class DateTimeUtils { | ||
| 457 | return timeStr; | 457 | return timeStr; |
| 458 | } | 458 | } |
| 459 | 459 | ||
| 460 | + /** | ||
| 461 | + * 获取农历日期 | ||
| 462 | + * @param _date eg: '2024-02-01 12:12:12' or '2024-02-01' 如果不传,取当前时间 | ||
| 463 | + * @returns eg: '二月廿五' | ||
| 464 | + * 如果后面有其他农历需求,可以引入农历插件。这个引入的getLunar文件可以删除 | ||
| 465 | + */ | ||
| 466 | + static getLunar(_date?: string) { | ||
| 467 | + return getLunar(_date) | ||
| 468 | + } | ||
| 460 | } | 469 | } |
| 461 | 470 | ||
| 462 | // const dateTimeUtils = new DateTimeUtils() | 471 | // const dateTimeUtils = new DateTimeUtils() |
| 1 | +/** | ||
| 2 | + * 获取某个日期的农历 | ||
| 3 | + * @parmas {newDate} 日期 年-月-日 | ||
| 4 | + */ | ||
| 5 | +export default function getLunar(newDate){ | ||
| 6 | + var nyear; | ||
| 7 | + var nmonth; | ||
| 8 | + var nday = -1; | ||
| 9 | + var nwday; | ||
| 10 | + var nhrs; | ||
| 11 | + var nmin; | ||
| 12 | + var nsec; | ||
| 13 | + var newDate = newDate; | ||
| 14 | + | ||
| 15 | + var lmonth, lday, lleap; //农历参数 | ||
| 16 | + | ||
| 17 | + function Draw() { | ||
| 18 | + NewTick(); | ||
| 19 | + | ||
| 20 | + //显示时间 | ||
| 21 | + var s = nyear + '年' + nmonth + '月' + nday + '日 ' + '星期' + cweekday(nwday) + ' ' + shapetime(nhrs, nmin, nsec); | ||
| 22 | + s += " 农历" + lmonth + "月" + lday; //农历 | ||
| 23 | + var lunar_month_day=lmonth + "月" + lday; | ||
| 24 | + return lunar_month_day; | ||
| 25 | + } | ||
| 26 | + | ||
| 27 | + | ||
| 28 | + function NewTick() { | ||
| 29 | + console.warn('noww---', newDate) | ||
| 30 | + var noww = newDate ? new Date(newDate) : new Date(); | ||
| 31 | + if (noww.getDate() != nday) { | ||
| 32 | + nyear = noww.getFullYear(); | ||
| 33 | + nmonth = noww.getMonth() + 1; | ||
| 34 | + nwday = noww.getDay(); | ||
| 35 | + nday = noww.getDate(); | ||
| 36 | + | ||
| 37 | + getlunar(); //获取农历 | ||
| 38 | + } | ||
| 39 | + nhrs = noww.getHours(); | ||
| 40 | + nmin = noww.getMinutes(); | ||
| 41 | + nsec = noww.getSeconds(); | ||
| 42 | + } | ||
| 43 | + | ||
| 44 | + | ||
| 45 | + //辅助函数 | ||
| 46 | + var hzWeek = new Array("日", "一", "二", "三", "四", "五", "六", "日"); | ||
| 47 | + function cweekday(wday) { | ||
| 48 | + return hzWeek[wday]; | ||
| 49 | + } | ||
| 50 | + function shapetime(vhrs, vmin, vsec) { | ||
| 51 | + if (vsec <= 9) vsec = "0" + vsec; | ||
| 52 | + if (vmin <= 9) vmin = "0" + vmin; | ||
| 53 | + if (vhrs <= 9) vhrs = "0" + vhrs; | ||
| 54 | + return vhrs + ":" + vmin + ":" + vsec | ||
| 55 | + } | ||
| 56 | + | ||
| 57 | + //农历函数开始 | ||
| 58 | + var lunarInfo = new Array(0x04bd8, 0x04ae0, 0x0a570, 0x054d5, 0x0d260, 0x0d950, 0x16554, 0x056a0, 0x09ad0, 0x055d2, 0x04ae0, 0x0a5b6, 0x0a4d0, 0x0d250, 0x1d255, 0x0b540, 0x0d6a0, 0x0ada2, 0x095b0, 0x14977, 0x04970, 0x0a4b0, 0x0b4b5, 0x06a50, 0x06d40, 0x1ab54, 0x02b60, 0x09570, 0x052f2, 0x04970, 0x06566, 0x0d4a0, 0x0ea50, 0x06e95, 0x05ad0, 0x02b60, 0x186e3, 0x092e0, 0x1c8d7, 0x0c950, 0x0d4a0, 0x1d8a6, 0x0b550, 0x056a0, 0x1a5b4, 0x025d0, 0x092d0, 0x0d2b2, 0x0a950, 0x0b557, 0x06ca0, 0x0b550, 0x15355, 0x04da0, 0x0a5b0, 0x14573, 0x052b0, 0x0a9a8, 0x0e950, 0x06aa0, 0x0aea6, 0x0ab50, 0x04b60, 0x0aae4, 0x0a570, 0x05260, 0x0f263, 0x0d950, 0x05b57, 0x056a0, 0x096d0, 0x04dd5, 0x04ad0, 0x0a4d0, 0x0d4d4, 0x0d250, 0x0d558, 0x0b540, 0x0b6a0, 0x195a6, 0x095b0, 0x049b0, 0x0a974, 0x0a4b0, 0x0b27a, 0x06a50, 0x06d40, 0x0af46, 0x0ab60, 0x09570, 0x04af5, 0x04970, 0x064b0, 0x074a3, 0x0ea50, 0x06b58, 0x05ac0, 0x0ab60, 0x096d5, 0x092e0, //1990 | ||
| 59 | + 0x0c960, 0x0d954, 0x0d4a0, 0x0da50, 0x07552, 0x056a0, 0x0abb7, 0x025d0, 0x092d0, 0x0cab5, 0x0a950, 0x0b4a0, 0x0baa4, 0x0ad50, 0x055d9, 0x04ba0, 0x0a5b0, 0x15176, 0x052b0, 0x0a930, 0x07954, 0x06aa0, 0x0ad50, 0x05b52, 0x04b60, 0x0a6e6, 0x0a4e0, 0x0d260, 0x0ea65, 0x0d530, 0x05aa0, 0x076a3, 0x096d0, 0x04bd7, 0x04ad0, 0x0a4d0, 0x1d0b6, 0x0d250, 0x0d520, 0x0dd45, 0x0b5a0, 0x056d0, 0x055b2, 0x049b0, 0x0a577, 0x0a4b0, 0x0aa50, 0x1b255, 0x06d20, 0x0ada0, 0x14b63); | ||
| 60 | + function lYearDays(y) { | ||
| 61 | + var i, sum = 348; | ||
| 62 | + for (i = 0x8000; i > 0x8; i >>= 1) sum += (lunarInfo[y - 1900] & i) ? 1 : 0; | ||
| 63 | + return (sum + leapDays(y)); | ||
| 64 | + } | ||
| 65 | + function leapDays(y) { | ||
| 66 | + if (leapMonth(y)) return ((lunarInfo[y - 1900] & 0x10000) ? 30 : 29); | ||
| 67 | + else return (0); | ||
| 68 | + } | ||
| 69 | + function leapMonth(y) { | ||
| 70 | + return (lunarInfo[y - 1900] & 0xf); | ||
| 71 | + } | ||
| 72 | + function monthDays(y, m) { | ||
| 73 | + return ((lunarInfo[y - 1900] & (0x10000 >> m)) ? 30 : 29); | ||
| 74 | + } | ||
| 75 | + function Lunar(y, m, d) { | ||
| 76 | + var i, leap = 0, | ||
| 77 | + temp = 0; | ||
| 78 | + var offset = (Date.UTC(y, m, d) - Date.UTC(1900, 0, 31)) / 86400000; | ||
| 79 | + for (i = 1900; i < 2050 && offset > 0; i++) { | ||
| 80 | + temp = lYearDays(i); | ||
| 81 | + offset -= temp; | ||
| 82 | + } | ||
| 83 | + if (offset < 0) { | ||
| 84 | + offset += temp; | ||
| 85 | + i--; | ||
| 86 | + } | ||
| 87 | + this.year = i; | ||
| 88 | + leap = leapMonth(i); | ||
| 89 | + this.isLeap = false; | ||
| 90 | + for (i = 1; i < 13 && offset > 0; i++) { | ||
| 91 | + if (leap > 0 && i == (leap + 1) && this.isLeap == false) {--i; | ||
| 92 | + this.isLeap = true; | ||
| 93 | + temp = leapDays(this.year); | ||
| 94 | + } else { | ||
| 95 | + temp = monthDays(this.year, i); | ||
| 96 | + } | ||
| 97 | + if (this.isLeap == true && i == (leap + 1)) this.isLeap = false; | ||
| 98 | + offset -= temp; | ||
| 99 | + } | ||
| 100 | + if (offset == 0 && leap > 0 && i == leap + 1) if (this.isLeap) { | ||
| 101 | + this.isLeap = false; | ||
| 102 | + } else { | ||
| 103 | + this.isLeap = true; --i; | ||
| 104 | + } | ||
| 105 | + if (offset < 0) { | ||
| 106 | + offset += temp; --i; | ||
| 107 | + } | ||
| 108 | + this.month = i; | ||
| 109 | + this.day = offset + 1; | ||
| 110 | + } | ||
| 111 | + var nStr1 = new Array('', '一', '二', '三', '四', '五', '六', '七', '八', '九', '十', '十一', '十二'); | ||
| 112 | + var nStr2 = new Array('初', '十', '廿', '卅', '□'); | ||
| 113 | + function GetcDay(d) { | ||
| 114 | + var s; | ||
| 115 | + switch (d) { | ||
| 116 | + case 10: | ||
| 117 | + s = '初十'; | ||
| 118 | + break; | ||
| 119 | + case 20: | ||
| 120 | + s = '二十'; | ||
| 121 | + break; | ||
| 122 | + case 30: | ||
| 123 | + s = '三十'; | ||
| 124 | + break; | ||
| 125 | + default: | ||
| 126 | + s = nStr2[Math.floor(d / 10)]; | ||
| 127 | + s += nStr1[d % 10]; | ||
| 128 | + break; | ||
| 129 | + } | ||
| 130 | + return (s); | ||
| 131 | + } | ||
| 132 | + function GetcMon(m) { | ||
| 133 | + if (m == 1) return '正'; | ||
| 134 | + else return nStr1[m]; | ||
| 135 | + } | ||
| 136 | + function getlunar() { | ||
| 137 | + var lObj = new Lunar(nyear, nmonth - 1, nday); | ||
| 138 | + lmonth = GetcMon(lObj.month); | ||
| 139 | + lday = GetcDay(lObj.day); | ||
| 140 | + lleap = lObj.isLeap; | ||
| 141 | + if (lleap == 1) { | ||
| 142 | + lmonth = "闰" + lmonth; | ||
| 143 | + } | ||
| 144 | + } | ||
| 145 | + //农历函数结束 | ||
| 146 | + return Draw(); | ||
| 147 | +} |
| @@ -56,6 +56,10 @@ export class HttpUrlUtils { | @@ -56,6 +56,10 @@ export class HttpUrlUtils { | ||
| 56 | */ | 56 | */ |
| 57 | static readonly INTERACT_EXECUTECOLLECTRECORD: string = "/api/rmrb-interact/interact/zh/c/collect/executeCollcetRecord"; | 57 | static readonly INTERACT_EXECUTECOLLECTRECORD: string = "/api/rmrb-interact/interact/zh/c/collect/executeCollcetRecord"; |
| 58 | /** | 58 | /** |
| 59 | + * 关注号主 | ||
| 60 | + */ | ||
| 61 | + static readonly INTERACT_ACCENTION_OPERATION: string = "/api/rmrb-interact/interact/zh/c/attention/operation"; | ||
| 62 | + /** | ||
| 59 | * 用户等级/积分-APP根据业务场景动态增减成长值(APP) | 63 | * 用户等级/积分-APP根据业务场景动态增减成长值(APP) |
| 60 | */ | 64 | */ |
| 61 | static readonly USERPOINT_OPERATE: string = "/api/rmrb-user-point/auth/pointLevel/zh/operate"; | 65 | static readonly USERPOINT_OPERATE: string = "/api/rmrb-user-point/auth/pointLevel/zh/operate"; |
| @@ -144,12 +148,10 @@ export class HttpUrlUtils { | @@ -144,12 +148,10 @@ export class HttpUrlUtils { | ||
| 144 | * 个人中心 我的关注列表 | 148 | * 个人中心 我的关注列表 |
| 145 | */ | 149 | */ |
| 146 | static readonly OTHER_USER_FOLLOW_LIST_DATA_PATH: string = "/api/rmrb-interact/interact/zh/c/userAttention/list"; | 150 | static readonly OTHER_USER_FOLLOW_LIST_DATA_PATH: string = "/api/rmrb-interact/interact/zh/c/userAttention/list"; |
| 147 | - | ||
| 148 | /** | 151 | /** |
| 149 | * 预约操作 | 152 | * 预约操作 |
| 150 | */ | 153 | */ |
| 151 | static readonly APPOINTMENT_OPERATION_STATUS_PATH: string = "/api/live-center-message/zh/c/live/subscribe"; | 154 | static readonly APPOINTMENT_OPERATION_STATUS_PATH: string = "/api/live-center-message/zh/c/live/subscribe"; |
| 152 | - | ||
| 153 | /** | 155 | /** |
| 154 | * 点赞操作 | 156 | * 点赞操作 |
| 155 | */ | 157 | */ |
| @@ -169,11 +171,12 @@ export class HttpUrlUtils { | @@ -169,11 +171,12 @@ export class HttpUrlUtils { | ||
| 169 | * */ | 171 | * */ |
| 170 | static readonly MORNING_EVENING_PAGE_INFO_PATH: string = "/api/rmrb-bff-display-zh/display/zh/c/pageInfo"; | 172 | static readonly MORNING_EVENING_PAGE_INFO_PATH: string = "/api/rmrb-bff-display-zh/display/zh/c/pageInfo"; |
| 171 | static readonly MORNING_EVENING_COMP_INFO_PATH: string = "/api/rmrb-bff-display-zh/display/zh/c/compInfo"; | 173 | static readonly MORNING_EVENING_COMP_INFO_PATH: string = "/api/rmrb-bff-display-zh/display/zh/c/compInfo"; |
| 172 | - private static _hostUrl: string = HttpUrlUtils.HOST_PRODUCT; | 174 | + private static _hostUrl: string = HttpUrlUtils.HOST_UAT; |
| 173 | 175 | ||
| 174 | public static set hostUrl(value: string) { | 176 | public static set hostUrl(value: string) { |
| 175 | HttpUrlUtils._hostUrl = value; | 177 | HttpUrlUtils._hostUrl = value; |
| 176 | } | 178 | } |
| 179 | + | ||
| 177 | private static userId = '' | 180 | private static userId = '' |
| 178 | private static userType = '' | 181 | private static userType = '' |
| 179 | private static token = '' | 182 | private static token = '' |
| @@ -189,8 +192,8 @@ export class HttpUrlUtils { | @@ -189,8 +192,8 @@ export class HttpUrlUtils { | ||
| 189 | headers.set('timestamp', HttpUrlUtils.getTimestamp()) | 192 | headers.set('timestamp', HttpUrlUtils.getTimestamp()) |
| 190 | headers.set('RMRB-X-TOKEN', HttpUrlUtils.getXToken()) | 193 | headers.set('RMRB-X-TOKEN', HttpUrlUtils.getXToken()) |
| 191 | headers.set('device_id', HttpUrlUtils.getDeviceId()) | 194 | headers.set('device_id', HttpUrlUtils.getDeviceId()) |
| 192 | - if(HttpUrlUtils.getXToken()!=''){ | ||
| 193 | - headers.set('cookie', 'RMRB-X-TOKEN='+HttpUrlUtils.getXToken()) | 195 | + if (HttpUrlUtils.getXToken() != '') { |
| 196 | + headers.set('cookie', 'RMRB-X-TOKEN=' + HttpUrlUtils.getXToken()) | ||
| 194 | } | 197 | } |
| 195 | headers.set('build_version', HttpUrlUtils.getVersion()) | 198 | headers.set('build_version', HttpUrlUtils.getVersion()) |
| 196 | headers.set('adcode', HttpUrlUtils.getAdCode()) | 199 | headers.set('adcode', HttpUrlUtils.getAdCode()) |
| @@ -271,20 +274,20 @@ export class HttpUrlUtils { | @@ -271,20 +274,20 @@ export class HttpUrlUtils { | ||
| 271 | } | 274 | } |
| 272 | 275 | ||
| 273 | private static getXToken() { | 276 | private static getXToken() { |
| 274 | - if(StringUtils.isNotEmpty(HttpUrlUtils.token)){ | 277 | + if (StringUtils.isNotEmpty(HttpUrlUtils.token)) { |
| 275 | return HttpUrlUtils.token | 278 | return HttpUrlUtils.token |
| 276 | } | 279 | } |
| 277 | - HttpUrlUtils.token = SPHelper.default.getSync(SpConstants.USER_JWT_TOKEN,"") as string | ||
| 278 | - if(StringUtils.isNotEmpty(HttpUrlUtils.token)) { | ||
| 279 | - return HttpUrlUtils.token | 280 | + HttpUrlUtils.token = SPHelper.default.getSync(SpConstants.USER_JWT_TOKEN, "") as string |
| 281 | + if (StringUtils.isNotEmpty(HttpUrlUtils.token)) { | ||
| 282 | + return HttpUrlUtils.token | ||
| 280 | } | 283 | } |
| 281 | return 'eyJhbGciOiJIUzI1NiIsImtpZCI6ImQ4WkI2QkhxSEZrdjJ2U25BNlRwZEdKRjBHcjItVzBvS2FaYzdLOUUycmcifQ.eyJpc3MiOiJwZW9wbGVzLWRhaWx5LWZvdXJhIiwic3ViIjoicGVvcGxlcy1kYWlseS1mb3VyYSIsImV4cCI6MTcwMzY0OTYwNiwidXNlcklkIjo0NTk3NzYyOTc0NzQ5NDksInVzZXJWZXJzaW9uIjoiNDU5Nzc2Mjk3NDc0OTQ5XzIiLCJ1c2VyTmFtZSI6IkJ1bGlraWtpMTgxIiwidXNlclR5cGUiOjIsImNyZWF0b3JJZCI6NDI2NTM5MH0.jhQ9kylcm3FxWf0-lBMZuLkdtIQ6XpFnAi0AFZJNwfc'; | 284 | return 'eyJhbGciOiJIUzI1NiIsImtpZCI6ImQ4WkI2QkhxSEZrdjJ2U25BNlRwZEdKRjBHcjItVzBvS2FaYzdLOUUycmcifQ.eyJpc3MiOiJwZW9wbGVzLWRhaWx5LWZvdXJhIiwic3ViIjoicGVvcGxlcy1kYWlseS1mb3VyYSIsImV4cCI6MTcwMzY0OTYwNiwidXNlcklkIjo0NTk3NzYyOTc0NzQ5NDksInVzZXJWZXJzaW9uIjoiNDU5Nzc2Mjk3NDc0OTQ5XzIiLCJ1c2VyTmFtZSI6IkJ1bGlraWtpMTgxIiwidXNlclR5cGUiOjIsImNyZWF0b3JJZCI6NDI2NTM5MH0.jhQ9kylcm3FxWf0-lBMZuLkdtIQ6XpFnAi0AFZJNwfc'; |
| 282 | } | 285 | } |
| 283 | 286 | ||
| 284 | - static getRefreshToken() { | ||
| 285 | - let refreshToken = SPHelper.default.getSync(SpConstants.USER_REFRESH_TOKEN,"") | ||
| 286 | - if(StringUtils.isNotEmpty(refreshToken)) { | ||
| 287 | - return refreshToken as string; | 287 | + static getRefreshToken() { |
| 288 | + let refreshToken = SPHelper.default.getSync(SpConstants.USER_REFRESH_TOKEN, "") | ||
| 289 | + if (StringUtils.isNotEmpty(refreshToken)) { | ||
| 290 | + return refreshToken as string; | ||
| 288 | } | 291 | } |
| 289 | return ''; | 292 | return ''; |
| 290 | } | 293 | } |
| @@ -347,18 +350,18 @@ export class HttpUrlUtils { | @@ -347,18 +350,18 @@ export class HttpUrlUtils { | ||
| 347 | 350 | ||
| 348 | public static getUserId() { | 351 | public static getUserId() { |
| 349 | // TODO 对接登录 | 352 | // TODO 对接登录 |
| 350 | - if(StringUtils.isNotEmpty(HttpUrlUtils.userId)){ | 353 | + if (StringUtils.isNotEmpty(HttpUrlUtils.userId)) { |
| 351 | return HttpUrlUtils.userId | 354 | return HttpUrlUtils.userId |
| 352 | } | 355 | } |
| 353 | - HttpUrlUtils.userId = SPHelper.default.getSync(SpConstants.USER_ID,"") as string | 356 | + HttpUrlUtils.userId = SPHelper.default.getSync(SpConstants.USER_ID, "") as string |
| 354 | return HttpUrlUtils.userId; | 357 | return HttpUrlUtils.userId; |
| 355 | } | 358 | } |
| 356 | 359 | ||
| 357 | - public static getUserType() { | ||
| 358 | - if(StringUtils.isNotEmpty(HttpUrlUtils.userType)){ | 360 | + public static getUserType() { |
| 361 | + if (StringUtils.isNotEmpty(HttpUrlUtils.userType)) { | ||
| 359 | return HttpUrlUtils.userType | 362 | return HttpUrlUtils.userType |
| 360 | } | 363 | } |
| 361 | - HttpUrlUtils.userType = SPHelper.default.getSync(SpConstants.USER_Type,"") as string | 364 | + HttpUrlUtils.userType = SPHelper.default.getSync(SpConstants.USER_Type, "") as string |
| 362 | return HttpUrlUtils.userType; | 365 | return HttpUrlUtils.userType; |
| 363 | } | 366 | } |
| 364 | 367 |
| @@ -73,6 +73,8 @@ export function registerRouter() { | @@ -73,6 +73,8 @@ export function registerRouter() { | ||
| 73 | return WDRouterPage.morningEveningPaperPage | 73 | return WDRouterPage.morningEveningPaperPage |
| 74 | } else if (action.params?.pageID == "IMAGE_TEXT_DETAIL") { | 74 | } else if (action.params?.pageID == "IMAGE_TEXT_DETAIL") { |
| 75 | return WDRouterPage.imageTextDetailPage | 75 | return WDRouterPage.imageTextDetailPage |
| 76 | + } else if (action.params?.pageID == "BroadcastPage") { | ||
| 77 | + return WDRouterPage.broadcastPage | ||
| 76 | } | 78 | } |
| 77 | return undefined | 79 | return undefined |
| 78 | }) | 80 | }) |
| @@ -83,4 +83,7 @@ export class WDRouterPage { | @@ -83,4 +83,7 @@ export class WDRouterPage { | ||
| 83 | 83 | ||
| 84 | 84 | ||
| 85 | // static loginProtocolPage = new WDRouterPage("wdLogin", "ets/pages/login/LoginProtocolWebview"); | 85 | // static loginProtocolPage = new WDRouterPage("wdLogin", "ets/pages/login/LoginProtocolWebview"); |
| 86 | + | ||
| 87 | + //播报页面 | ||
| 88 | + static broadcastPage = new WDRouterPage("phone", "ets/pages/broadcast/BroadcastPage"); | ||
| 86 | } | 89 | } |
| @@ -23,7 +23,7 @@ export { Pic } from './src/main/ets/bean/content/Pic' | @@ -23,7 +23,7 @@ export { Pic } from './src/main/ets/bean/content/Pic' | ||
| 23 | 23 | ||
| 24 | export { InteractDataDTO } from './src/main/ets/bean/content/InteractDataDTO'; | 24 | export { InteractDataDTO } from './src/main/ets/bean/content/InteractDataDTO'; |
| 25 | 25 | ||
| 26 | -export { InteractDataStatusBean, PhotoListBean } from './src/main/ets/bean/detail/MultiPictureDetailPageDTO'; | 26 | +export { InteractDataStatusBean, PhotoListBean, InputMethodProperty } from './src/main/ets/bean/detail/MultiPictureDetailPageDTO'; |
| 27 | 27 | ||
| 28 | export { InteractParam, ContentBean } from './src/main/ets/bean/content/InteractParam'; | 28 | export { InteractParam, ContentBean } from './src/main/ets/bean/content/InteractParam'; |
| 29 | 29 |
| @@ -17,4 +17,84 @@ export interface PhotoListBean { | @@ -17,4 +17,84 @@ export interface PhotoListBean { | ||
| 17 | width: number; | 17 | width: number; |
| 18 | picPath: string; | 18 | picPath: string; |
| 19 | picDesc: string; | 19 | picDesc: string; |
| 20 | +} | ||
| 21 | + | ||
| 22 | +export interface InputMethodProperty { | ||
| 23 | + /** | ||
| 24 | + * The name of input method | ||
| 25 | + * | ||
| 26 | + * @syscap SystemCapability.MiscServices.InputMethodFramework | ||
| 27 | + * @since 8 | ||
| 28 | + * @deprecated since 9 | ||
| 29 | + * @useinstead inputMethod.InputMethodProperty#name | ||
| 30 | + */ | ||
| 31 | + readonly packageName: string; | ||
| 32 | + /** | ||
| 33 | + * The id of input method | ||
| 34 | + * | ||
| 35 | + * @syscap SystemCapability.MiscServices.InputMethodFramework | ||
| 36 | + * @since 8 | ||
| 37 | + * @deprecated since 9 | ||
| 38 | + * @useinstead inputMethod.InputMethodProperty#id | ||
| 39 | + */ | ||
| 40 | + readonly methodId: string; | ||
| 41 | + /** | ||
| 42 | + * The name of input method | ||
| 43 | + * | ||
| 44 | + * @syscap SystemCapability.MiscServices.InputMethodFramework | ||
| 45 | + * @since 9 | ||
| 46 | + */ | ||
| 47 | + readonly name: string; | ||
| 48 | + /** | ||
| 49 | + * The id of input method | ||
| 50 | + * | ||
| 51 | + * @syscap SystemCapability.MiscServices.InputMethodFramework | ||
| 52 | + * @since 9 | ||
| 53 | + */ | ||
| 54 | + readonly id: string; | ||
| 55 | + /** | ||
| 56 | + * The label of input method | ||
| 57 | + * | ||
| 58 | + * @syscap SystemCapability.MiscServices.InputMethodFramework | ||
| 59 | + * @since 9 | ||
| 60 | + */ | ||
| 61 | + readonly label?: string; | ||
| 62 | + /** | ||
| 63 | + * The label id of input method | ||
| 64 | + * | ||
| 65 | + * @type { ?number } | ||
| 66 | + * @syscap SystemCapability.MiscServices.InputMethodFramework | ||
| 67 | + * @since 10 | ||
| 68 | + */ | ||
| 69 | + readonly labelId?: number; | ||
| 70 | + /** | ||
| 71 | + * The icon of input method | ||
| 72 | + * | ||
| 73 | + * @syscap SystemCapability.MiscServices.InputMethodFramework | ||
| 74 | + * @since 9 | ||
| 75 | + */ | ||
| 76 | + readonly icon?: string; | ||
| 77 | + /** | ||
| 78 | + * The icon id of input method | ||
| 79 | + * | ||
| 80 | + * @type { ?number } | ||
| 81 | + * @syscap SystemCapability.MiscServices.InputMethodFramework | ||
| 82 | + * @since 9 | ||
| 83 | + */ | ||
| 84 | + readonly iconId?: number; | ||
| 85 | + /** | ||
| 86 | + * The extra info of input method | ||
| 87 | + * | ||
| 88 | + * @type { object } | ||
| 89 | + * @syscap SystemCapability.MiscServices.InputMethodFramework | ||
| 90 | + * @since 9 | ||
| 91 | + */ | ||
| 92 | + /** | ||
| 93 | + * The extra info of input method | ||
| 94 | + * | ||
| 95 | + * @type { ?object } | ||
| 96 | + * @syscap SystemCapability.MiscServices.InputMethodFramework | ||
| 97 | + * @since 10 | ||
| 98 | + */ | ||
| 99 | + extra?: object; | ||
| 20 | } | 100 | } |
| 1 | import { Group } from './Group'; | 1 | import { Group } from './Group'; |
| 2 | import { TopicInfo } from './TopicInfo'; | 2 | import { TopicInfo } from './TopicInfo'; |
| 3 | - | 3 | +import { ChannelInfo } from './ChannelInfo' |
| 4 | export interface PageInfoBean { | 4 | export interface PageInfoBean { |
| 5 | backIconUrl: string; | 5 | backIconUrl: string; |
| 6 | backgroundColor: string; | 6 | backgroundColor: string; |
| @@ -8,7 +8,7 @@ export interface PageInfoBean { | @@ -8,7 +8,7 @@ export interface PageInfoBean { | ||
| 8 | baselineColor: string; | 8 | baselineColor: string; |
| 9 | baselineCopywriting: string; | 9 | baselineCopywriting: string; |
| 10 | baselineShow: number; | 10 | baselineShow: number; |
| 11 | - // channelInfo?: any; | 11 | + channelInfo?: ChannelInfo; |
| 12 | // cornersAdv?: any; | 12 | // cornersAdv?: any; |
| 13 | // cornersAdv2: any[]; | 13 | // cornersAdv2: any[]; |
| 14 | description: string; | 14 | description: string; |
| @@ -55,3 +55,6 @@ export { ZhGridLayoutComponent } from "./src/main/ets/components/view/ZhGridLayo | @@ -55,3 +55,6 @@ export { ZhGridLayoutComponent } from "./src/main/ets/components/view/ZhGridLayo | ||
| 55 | export { MultiPictureDetailPageComponent } from "./src/main/ets/components/MultiPictureDetailPageComponent" | 55 | export { MultiPictureDetailPageComponent } from "./src/main/ets/components/MultiPictureDetailPageComponent" |
| 56 | 56 | ||
| 57 | export { AudioDetailComponent } from "./src/main/ets/components/AudioDetailComponent" | 57 | export { AudioDetailComponent } from "./src/main/ets/components/AudioDetailComponent" |
| 58 | + | ||
| 59 | +export { BroadcastPageComponent } from "./src/main/ets/components/broadcast/BroadcastPageComponent" | ||
| 60 | + |
sight_harmony/features/wdComponent/src/main/ets/components/broadcast/BroadcastPageComponent.ets
0 → 100644
| 1 | +import router from '@ohos.router'; | ||
| 2 | +import { Params } from 'wdBean' | ||
| 3 | +import { RecommendHeader } from './RecommendHeader'; | ||
| 4 | +import { RecommendTitle } from './RecommendTitle'; | ||
| 5 | +import { RecommendLists } from './RecommendLists' | ||
| 6 | +import { SelectedColumns } from './SelectedColumns' | ||
| 7 | +import { CompList, PageInfoBean, CompInfoBean } from 'wdBean'; | ||
| 8 | +import { DateTimeUtils, Logger } from 'wdKit/Index'; | ||
| 9 | +import { PaperReaderSimpleDialog } from '../../dialog/PaperReaderDialog'; | ||
| 10 | +import { BroadcastViewModel } from '../../viewmodel/BroadcastViewModel'; | ||
| 11 | +import { DateFormatUtil, PlayerConstants, WDPlayerController } from 'wdPlayer'; | ||
| 12 | +import { AudioDataList } from 'wdBean/src/main/ets/bean/morningevening/AudioDataList'; | ||
| 13 | +import { CommonConstants } from 'wdConstant/Index'; | ||
| 14 | + | ||
| 15 | +const TAG = 'BroadcastPageComponent'; | ||
| 16 | + | ||
| 17 | +@Entry | ||
| 18 | +@Component | ||
| 19 | +export struct BroadcastPageComponent { | ||
| 20 | + @State params:Params = router.getParams() as Params; | ||
| 21 | + | ||
| 22 | + @State pageInfoBean: PageInfoBean = {} as PageInfoBean // 播报页面信息 | ||
| 23 | + @State compInfoBean: CompInfoBean = {} as CompInfoBean // 组件信息 | ||
| 24 | + @State recommendCompInfoBean: CompInfoBean = {} as CompInfoBean // 推荐播报组件信息 | ||
| 25 | + @State columnsCompInfoBean: CompInfoBean = {} as CompInfoBean // 精选栏目组件信息 | ||
| 26 | + | ||
| 27 | + @State compListItem: CompList = {} as CompList | ||
| 28 | + @State audioPlayUrl: string = "" | ||
| 29 | + @Provide title: string = '' | ||
| 30 | + @Provide subTitle: string = '' | ||
| 31 | + @Provide isAudioPlaying: boolean = false | ||
| 32 | + @Provide status: number = PlayerConstants.STATUS_START; | ||
| 33 | + @Provide currentTime: string = "00:00"; | ||
| 34 | + @Provide totalTime: string = "00:00"; | ||
| 35 | + @Provide progressVal: number = 0; | ||
| 36 | + private audioDataList: AudioDataList[] = [] | ||
| 37 | + private playerController: WDPlayerController = new WDPlayerController(); | ||
| 38 | + simpleAudioDialog: CustomDialogController = new CustomDialogController({ | ||
| 39 | + builder: PaperReaderSimpleDialog({ | ||
| 40 | + cancel: this.onCancel, | ||
| 41 | + confirm: this.onConfirm, | ||
| 42 | + playerController: this.playerController | ||
| 43 | + }), | ||
| 44 | + autoCancel: false, | ||
| 45 | + customStyle: true, | ||
| 46 | + alignment: DialogAlignment.CenterStart, | ||
| 47 | + offset: { dx: 12, dy: -150 }, | ||
| 48 | + }) | ||
| 49 | + | ||
| 50 | + onCancel() { | ||
| 51 | + Logger.info(TAG, "cj2024 onCancel = ") | ||
| 52 | + } | ||
| 53 | + | ||
| 54 | + /** | ||
| 55 | + * 回调无用 | ||
| 56 | + **/ | ||
| 57 | + onConfirm() { | ||
| 58 | + Logger.info(TAG, "cj2024 onConfirm = ") | ||
| 59 | + } | ||
| 60 | + | ||
| 61 | + // 续播判断 | ||
| 62 | + changeContinue() { | ||
| 63 | + Logger.info(TAG, "cj2024 changeContinue = 1") | ||
| 64 | + this.playerController.continue = () => { | ||
| 65 | + Logger.info(TAG, "cj2024 changeContinue = 2") | ||
| 66 | + this.playerController?.stop(); | ||
| 67 | + } | ||
| 68 | + return; | ||
| 69 | + } | ||
| 70 | + | ||
| 71 | + async aboutToAppear() { | ||
| 72 | + Logger.debug(TAG, `about1ToAppear`, router.getParams().toString()) | ||
| 73 | + const currentTime = new Date().getTime() | ||
| 74 | + try { | ||
| 75 | + // 获取页面信息 | ||
| 76 | + Logger.warn('获取页面信息') | ||
| 77 | + let pageInfoBean = await BroadcastViewModel.getBroadcastViewPageInfo('21003') | ||
| 78 | + Logger.warn('pageInfoBean-') | ||
| 79 | + Logger.warn(pageInfoBean.groups[0].blockDesc) | ||
| 80 | + | ||
| 81 | + this.pageInfoBean = pageInfoBean; | ||
| 82 | + //TODO 根据页面中组件信息。现在默认认为后端只返回2个。第一个是播报,第二个是精选栏目 | ||
| 83 | + const pageId = pageInfoBean.id, | ||
| 84 | + groupId_0 = pageInfoBean.groups[0]?.id, | ||
| 85 | + refreshTime = currentTime + "", | ||
| 86 | + topicId = pageInfoBean?.topicInfo?.topicId || '', | ||
| 87 | + channelId = pageInfoBean?.channelInfo?.channelId || '' | ||
| 88 | + if(pageInfoBean.groups[0]) { | ||
| 89 | + this.recommendCompInfoBean = await BroadcastViewModel.getBroadcastCompInfo(pageId, groupId_0, refreshTime, topicId, channelId) | ||
| 90 | + } | ||
| 91 | + if(pageInfoBean.groups[1]) { | ||
| 92 | + const groupId_1 = pageInfoBean.groups[1]?.id | ||
| 93 | + this.columnsCompInfoBean = await BroadcastViewModel.getBroadcastCompInfo(pageId, groupId_1, refreshTime, topicId, channelId) | ||
| 94 | + } | ||
| 95 | + } catch (exception) { | ||
| 96 | + | ||
| 97 | + } | ||
| 98 | + } | ||
| 99 | + onPageShow() { | ||
| 100 | + Logger.debug(TAG, `onPageShow--`, JSON.stringify(router.getParams())) | ||
| 101 | + } | ||
| 102 | + onPageHide() { | ||
| 103 | + this.status = PlayerConstants.STATUS_PAUSE; | ||
| 104 | + this.playerController?.pause(); | ||
| 105 | + } | ||
| 106 | + | ||
| 107 | + build() { | ||
| 108 | + Column() { | ||
| 109 | + // 顶部标题 | ||
| 110 | + RecommendHeader() | ||
| 111 | + List() { | ||
| 112 | + ListItem(){ | ||
| 113 | + RecommendTitle() | ||
| 114 | + } | ||
| 115 | + if(this.pageInfoBean.groups && this.pageInfoBean.groups[0] && this.recommendCompInfoBean.compList) { | ||
| 116 | + ListItem(){ | ||
| 117 | + RecommendLists({ | ||
| 118 | + recommendCompInfoBean: this.recommendCompInfoBean | ||
| 119 | + }) | ||
| 120 | + } | ||
| 121 | + } | ||
| 122 | + if(this.pageInfoBean.groups && this.pageInfoBean.groups[1] && this.columnsCompInfoBean.compList) { | ||
| 123 | + ListItem() { | ||
| 124 | + SelectedColumns({ | ||
| 125 | + columnsCompTitle: this.pageInfoBean.groups[1].blockDesc, | ||
| 126 | + columnsCompInfoBean: this.columnsCompInfoBean | ||
| 127 | + }) | ||
| 128 | + .margin({ top: 12 }) | ||
| 129 | + } | ||
| 130 | + } | ||
| 131 | + } | ||
| 132 | + .layoutWeight(1) | ||
| 133 | + // @ts-ignore | ||
| 134 | + .onScrollFrameBegin((offset, state) => { | ||
| 135 | + console.log('ccc',String(offset), state) | ||
| 136 | + }) | ||
| 137 | + .onReachStart(() => { | ||
| 138 | + console.log('onReachStart----->',) | ||
| 139 | + }) | ||
| 140 | + } | ||
| 141 | + .width(CommonConstants.FULL_WIDTH) | ||
| 142 | + .backgroundImage($r('app.media.broadcast_bg')) | ||
| 143 | + .backgroundImageSize({width: '100%', height: '100%'}) | ||
| 144 | + } | ||
| 145 | +} |
| 1 | +import router from '@ohos.router'; | ||
| 2 | +import { CommonConstants } from 'wdConstant/Index'; | ||
| 3 | + | ||
| 4 | +/** | ||
| 5 | + * 今日推荐顶部标题--fixed标题 | ||
| 6 | + */ | ||
| 7 | +@Entry | ||
| 8 | +@Component | ||
| 9 | +export struct RecommendHeader { | ||
| 10 | + build() { | ||
| 11 | + Stack() { | ||
| 12 | + Image($r('app.media.icon_arrow_down_black')) | ||
| 13 | + .height($r('app.float.top_arrow_size')) | ||
| 14 | + .width($r('app.float.top_arrow_size')) | ||
| 15 | + .onClick((event: ClickEvent) => { | ||
| 16 | + router.back() | ||
| 17 | + }) | ||
| 18 | + .zIndex(1) | ||
| 19 | + Text('今日推荐') | ||
| 20 | + .margin({ left: 5 }) | ||
| 21 | + .fontSize($r('app.float.selected_text_size')) | ||
| 22 | + .fontColor($r('app.color.color_222222')) | ||
| 23 | + .width(CommonConstants.FULL_WIDTH) | ||
| 24 | + .height(CommonConstants.FULL_HEIGHT) | ||
| 25 | + .textAlign(TextAlign.Center) | ||
| 26 | + } | ||
| 27 | + .height($r('app.float.top_bar_height')) | ||
| 28 | + .padding({left: 16, right: 16}) | ||
| 29 | + .alignContent(Alignment.Start) | ||
| 30 | + } | ||
| 31 | +} |
| 1 | +import { CompInfoBean, CompDTO } from 'wdBean' | ||
| 2 | +import { CommonConstants } from 'wdConstant'; | ||
| 3 | +import { ProcessUtils } from '../../utils/ProcessUtils'; | ||
| 4 | + | ||
| 5 | +/** | ||
| 6 | + * 播报--今日推荐列表 | ||
| 7 | + */ | ||
| 8 | +@Entry | ||
| 9 | +@Component | ||
| 10 | +export struct RecommendLists { | ||
| 11 | + @Prop recommendCompInfoBean: CompInfoBean = {} as CompInfoBean // 推荐-组件信息 | ||
| 12 | + | ||
| 13 | + build() { | ||
| 14 | + Column(){ | ||
| 15 | + ForEach(this.recommendCompInfoBean.compList.slice(0,3), (item: CompDTO) => { | ||
| 16 | + this.recommendTop3Item(item) | ||
| 17 | + }) | ||
| 18 | + // 查看更多 | ||
| 19 | + if(this.recommendCompInfoBean.compList.length > 3) { | ||
| 20 | + Row() { | ||
| 21 | + Text("查看全部") | ||
| 22 | + .fontSize($r("app.float.font_size_12")) | ||
| 23 | + .fontColor($r("app.color.color_222222")) | ||
| 24 | + .margin({ right: 1 }) | ||
| 25 | + Image($r("app.media.more")) | ||
| 26 | + .width(14) | ||
| 27 | + .height(14) | ||
| 28 | + } | ||
| 29 | + .width(CommonConstants.FULL_WIDTH) | ||
| 30 | + .height(40) | ||
| 31 | + .borderRadius(3) | ||
| 32 | + .justifyContent(FlexAlign.Center) | ||
| 33 | + .margin({top: 5}) | ||
| 34 | + .onClick(() => { | ||
| 35 | + // console.log(1) | ||
| 36 | + }) | ||
| 37 | + } | ||
| 38 | + } | ||
| 39 | + .margin({left: 16, right: 16}) | ||
| 40 | + .padding({left: 16, right: 16}) | ||
| 41 | + .backgroundColor($r('app.color.color_fff')) | ||
| 42 | + .borderRadius(5) | ||
| 43 | + } | ||
| 44 | + | ||
| 45 | + @Builder | ||
| 46 | + recommendTop3Item(item: CompDTO) { | ||
| 47 | + Row(){ | ||
| 48 | + Image($r('app.media.broadcast_pause')) | ||
| 49 | + .width(24) | ||
| 50 | + .height(24) | ||
| 51 | + .margin({right:12}) | ||
| 52 | + Text(item.operDataList[0].newsTitle) | ||
| 53 | + .fontSize($r('app.float.font_size_16')) | ||
| 54 | + .fontColor($r('app.color.color_212228')) | ||
| 55 | + .maxLines(1) | ||
| 56 | + .textOverflow({overflow: TextOverflow.Ellipsis}) | ||
| 57 | + .layoutWeight(1) | ||
| 58 | + } | ||
| 59 | + .width(CommonConstants.FULL_WIDTH) | ||
| 60 | + .padding({top: 12, bottom: 12}) | ||
| 61 | + .onClick(() => { | ||
| 62 | + ProcessUtils.processPage(item.operDataList[0]) | ||
| 63 | + }) | ||
| 64 | + } | ||
| 65 | + | ||
| 66 | + @Builder | ||
| 67 | + recommendListItem() { | ||
| 68 | + | ||
| 69 | + } | ||
| 70 | +} |
| 1 | +import { CommonConstants } from 'wdConstant/Index' | ||
| 2 | +import { DateTimeUtils } from 'wdKit'; | ||
| 3 | +/** | ||
| 4 | + * 播报标题描述 | ||
| 5 | + */ | ||
| 6 | +@Entry | ||
| 7 | +@Component | ||
| 8 | +export struct RecommendTitle { | ||
| 9 | + build() { | ||
| 10 | + Row(){ | ||
| 11 | + // 左边 | ||
| 12 | + Column(){ | ||
| 13 | + Text('每日最动听的声音') | ||
| 14 | + .fontSize($r('app.float.font_size_14')) | ||
| 15 | + .fontColor($r('app.color.color_222222')) | ||
| 16 | + .alignSelf(ItemAlign.Start) | ||
| 17 | + Image($r('app.media.broadcast_line')) | ||
| 18 | + .width(147) | ||
| 19 | + .margin({ | ||
| 20 | + top: 8, bottom: 8 | ||
| 21 | + }) | ||
| 22 | + Row(){ | ||
| 23 | + Column(){ | ||
| 24 | + Text('今推') | ||
| 25 | + .fontSize($r('app.float.font_size_24')) | ||
| 26 | + .fontColor($r('app.color.color_222222')) | ||
| 27 | + .fontWeight(600) | ||
| 28 | + Text('日荐') | ||
| 29 | + .fontSize($r('app.float.font_size_24')) | ||
| 30 | + .fontColor($r('app.color.color_222222')) | ||
| 31 | + .fontWeight(600) | ||
| 32 | + } | ||
| 33 | + .margin({right: 8}) | ||
| 34 | + .alignSelf(ItemAlign.Start) | ||
| 35 | + Column() { | ||
| 36 | + Text(DateTimeUtils.getLunar()) | ||
| 37 | + .fontSize($r('app.float.font_size_14')) | ||
| 38 | + .fontColor($r('app.color.color_222222')) | ||
| 39 | + .alignSelf(ItemAlign.Start) | ||
| 40 | + Text(DateTimeUtils.formatDate(new Date().getTime(), 'MM/dd')) | ||
| 41 | + .fontSize($r('app.float.font_size_24')) | ||
| 42 | + .fontColor($r('app.color.color_222222')) | ||
| 43 | + } | ||
| 44 | + } | ||
| 45 | + .alignSelf(ItemAlign.Start) | ||
| 46 | + } | ||
| 47 | + Blank() | ||
| 48 | + Image($r('app.media.broadcast_pause')) | ||
| 49 | + .width(90) | ||
| 50 | + .height(90) | ||
| 51 | + .margin({ | ||
| 52 | + right: 9 | ||
| 53 | + }) | ||
| 54 | + } | ||
| 55 | + .width(CommonConstants.FULL_WIDTH) | ||
| 56 | + .padding({left: 16, right: 16}) | ||
| 57 | + .margin({bottom: 12}) | ||
| 58 | + } | ||
| 59 | +} |
| 1 | +import { CompInfoBean, CompDTO } from 'wdBean' | ||
| 2 | +import { DateTimeUtils } from 'wdKit/Index' | ||
| 3 | +import { CommonConstants } from 'wdConstant'; | ||
| 4 | +import { ProcessUtils } from '../../utils/ProcessUtils'; | ||
| 5 | +/** | ||
| 6 | + * 精选栏目 | ||
| 7 | + */ | ||
| 8 | +@Entry | ||
| 9 | +@Component | ||
| 10 | +export struct SelectedColumns { | ||
| 11 | + @Prop columnsCompInfoBean: CompInfoBean = {} as CompInfoBean // 精选栏目组件信息 | ||
| 12 | + @Prop columnsCompTitle: string = '' | ||
| 13 | + build() { | ||
| 14 | + Column(){ | ||
| 15 | + Text(this.columnsCompTitle) | ||
| 16 | + .fontSize($r('app.float.selected_text_size')) | ||
| 17 | + .fontColor($r('app.color.color_222222')) | ||
| 18 | + .fontWeight(500) | ||
| 19 | + .width(CommonConstants.FULL_WIDTH) | ||
| 20 | + ForEach(this.columnsCompInfoBean.compList, (item: CompDTO) => { | ||
| 21 | + this.SelectedColumnsItem(item) | ||
| 22 | + }) | ||
| 23 | + | ||
| 24 | + } | ||
| 25 | + .padding({left: 16,top: 12, right: 16}) | ||
| 26 | + .backgroundColor($r('app.color.white')) | ||
| 27 | + } | ||
| 28 | + | ||
| 29 | + @Builder | ||
| 30 | + SelectedColumnsItem(item: CompDTO) { | ||
| 31 | + Row() { | ||
| 32 | + Image(item.operDataList[0].coverUrl) | ||
| 33 | + .height(53) | ||
| 34 | + .width(80) | ||
| 35 | + .objectFit(ImageFit.Cover) | ||
| 36 | + .margin({right: 12}) | ||
| 37 | + Column({space: 4}){ | ||
| 38 | + Text(item.operDataList[0].newsTitle) | ||
| 39 | + .fontSize($r('app.float.font_size_16')) | ||
| 40 | + .fontColor($r('app.color.color_222222')) | ||
| 41 | + .width(CommonConstants.FULL_WIDTH) | ||
| 42 | + .maxLines(1) | ||
| 43 | + .textOverflow({overflow: TextOverflow.Ellipsis}) | ||
| 44 | + Text(item.operDataList[0].newsSummary) | ||
| 45 | + .fontSize($r('app.float.font_size_12')) | ||
| 46 | + .fontColor($r('app.color.color_999999')) | ||
| 47 | + .width(CommonConstants.FULL_WIDTH) | ||
| 48 | + .maxLines(1) | ||
| 49 | + .textOverflow({overflow: TextOverflow.Ellipsis}) | ||
| 50 | + Row(){ | ||
| 51 | + Image($r('app.media.broadcast_clock')) | ||
| 52 | + .width(12) | ||
| 53 | + .height(12) | ||
| 54 | + .margin({right: 4}) | ||
| 55 | + Text(DateTimeUtils.getCommentTime(Number.parseFloat(item.operDataList[0].publishTime))) | ||
| 56 | + .fontSize($r('app.float.font_size_12')) | ||
| 57 | + .fontColor($r('app.color.color_999999')) | ||
| 58 | + .margin({ right :24 }) | ||
| 59 | + Image($r('app.media.broadcast_listen')) | ||
| 60 | + .width(12) | ||
| 61 | + .height(12) | ||
| 62 | + .margin({right: 4}) | ||
| 63 | + Text('0') | ||
| 64 | + .fontSize($r('app.float.font_size_12')) | ||
| 65 | + .fontColor($r('app.color.color_999999')) | ||
| 66 | + .margin({ right :24}) | ||
| 67 | + } | ||
| 68 | + .width(CommonConstants.FULL_WIDTH) | ||
| 69 | + } | ||
| 70 | + .layoutWeight(1) | ||
| 71 | + } | ||
| 72 | + .onClick((event: ClickEvent) => { | ||
| 73 | + // TODO 跳转到音频专题页 | ||
| 74 | + }) | ||
| 75 | + .width(CommonConstants.FULL_WIDTH) | ||
| 76 | + .height(73) | ||
| 77 | + } | ||
| 78 | +} |
| 1 | import { TopNavDTO } from 'wdBean'; | 1 | import { TopNavDTO } from 'wdBean'; |
| 2 | 2 | ||
| 3 | - | ||
| 4 | const INDEX_SETTING_TITLE: string = '首页设置' | 3 | const INDEX_SETTING_TITLE: string = '首页设置' |
| 5 | const INDEX_SETTING_SUBTITLE: string = '将指定频道设置为首页' | 4 | const INDEX_SETTING_SUBTITLE: string = '将指定频道设置为首页' |
| 6 | const MY_CHANNEL: string = '我的频道' | 5 | const MY_CHANNEL: string = '我的频道' |
| @@ -11,7 +10,7 @@ const LOCAL_CHANNEL: string = '地方频道' | @@ -11,7 +10,7 @@ const LOCAL_CHANNEL: string = '地方频道' | ||
| 11 | 10 | ||
| 12 | @CustomDialog | 11 | @CustomDialog |
| 13 | struct ChannelDialog { | 12 | struct ChannelDialog { |
| 14 | - @State indexSettingTabIndex: number = 1 | 13 | + @State indexSettingTabIndex: number = 0 |
| 15 | @State isEditIng: boolean = false | 14 | @State isEditIng: boolean = false |
| 16 | @Link currentTopNavSelectedIndex: number | 15 | @Link currentTopNavSelectedIndex: number |
| 17 | @Link myChannelList: TopNavDTO[] | 16 | @Link myChannelList: TopNavDTO[] |
| @@ -19,6 +18,9 @@ struct ChannelDialog { | @@ -19,6 +18,9 @@ struct ChannelDialog { | ||
| 19 | @Link localChannelList: TopNavDTO[] | 18 | @Link localChannelList: TopNavDTO[] |
| 20 | @Link indexSettingArray: string[] | 19 | @Link indexSettingArray: string[] |
| 21 | controller?: CustomDialogController | 20 | controller?: CustomDialogController |
| 21 | + confirm: (index: number) => void = () => { | ||
| 22 | + } | ||
| 23 | + changeChannelIndex : (index1:number, index2:number) => void = ()=>{} | ||
| 22 | myChannelItemEditHandle = (index: number): void => { | 24 | myChannelItemEditHandle = (index: number): void => { |
| 23 | let item = this.myChannelList.splice(index, 1)[0] | 25 | let item = this.myChannelList.splice(index, 1)[0] |
| 24 | if (item.moreChannel === '1') { | 26 | if (item.moreChannel === '1') { |
| @@ -29,6 +31,34 @@ struct ChannelDialog { | @@ -29,6 +31,34 @@ struct ChannelDialog { | ||
| 29 | } | 31 | } |
| 30 | } | 32 | } |
| 31 | 33 | ||
| 34 | + @Builder | ||
| 35 | + pixelMapBuilder(item: TopNavDTO, index: number) { //拖拽过程样式 | ||
| 36 | + Row() { | ||
| 37 | + Row() { | ||
| 38 | + Text(item.name) | ||
| 39 | + .fontSize(14) | ||
| 40 | + .fontColor(this.currentTopNavSelectedIndex === index ? '#ED2800' : (item.homeChannel === '1' || item.movePermitted === 0 ? '#999999' : '#222222')) | ||
| 41 | + | ||
| 42 | + if (this.isEditIng && item.myChannel !== '1') { | ||
| 43 | + Image($r('app.media.icon_audio_close')) | ||
| 44 | + .width(12) | ||
| 45 | + .margin({ left: 1 }) | ||
| 46 | + } | ||
| 47 | + } | ||
| 48 | + .width('100%') | ||
| 49 | + .height('100%') | ||
| 50 | + .justifyContent(FlexAlign.Center) | ||
| 51 | + .backgroundColor(item.homeChannel === '1' || item.movePermitted === 0 ? '#F5F5F5' : '#ffffff') | ||
| 52 | + } | ||
| 53 | + .width('23%') | ||
| 54 | + .height(40) | ||
| 55 | + .border({ | ||
| 56 | + width: item.homeChannel === '1' ? 0 : 1, | ||
| 57 | + color: '#EDEDED', | ||
| 58 | + radius: 3 | ||
| 59 | + }) | ||
| 60 | + } | ||
| 61 | + | ||
| 32 | build() { | 62 | build() { |
| 33 | Column() { | 63 | Column() { |
| 34 | 64 | ||
| @@ -43,7 +73,7 @@ struct ChannelDialog { | @@ -43,7 +73,7 @@ struct ChannelDialog { | ||
| 43 | }) | 73 | }) |
| 44 | } | 74 | } |
| 45 | .width('100%') | 75 | .width('100%') |
| 46 | - .margin({ top: 30, bottom: 10 }) | 76 | + .padding({ top: 30, bottom: 10 }) |
| 47 | 77 | ||
| 48 | List() { | 78 | List() { |
| 49 | 79 | ||
| @@ -66,16 +96,30 @@ struct ChannelDialog { | @@ -66,16 +96,30 @@ struct ChannelDialog { | ||
| 66 | ListItem() { | 96 | ListItem() { |
| 67 | Flex({ justifyContent: FlexAlign.SpaceBetween }) { | 97 | Flex({ justifyContent: FlexAlign.SpaceBetween }) { |
| 68 | ForEach(this.indexSettingArray, (text: string, index: number) => { | 98 | ForEach(this.indexSettingArray, (text: string, index: number) => { |
| 69 | - Button(text, { type: ButtonType.Normal, stateEffect: false }) | ||
| 70 | - .width('48%') | ||
| 71 | - .borderRadius(2) | ||
| 72 | - .fontColor(index === this.indexSettingTabIndex ? '#ffffff' : '#ED2800') | ||
| 73 | - .fontSize(16) | ||
| 74 | - .fontWeight(400) | ||
| 75 | - .backgroundColor(index === this.indexSettingTabIndex ? '#ED2800' : '#FDE9E5') | ||
| 76 | - .onClick(() => { | ||
| 77 | - this.indexSettingTabIndex = index | ||
| 78 | - }) | 99 | + Stack() { |
| 100 | + Image(this.indexSettingTabIndex === index ? $r('app.media.index_setting_button_active') : $r('app.media.index_setting_button')) | ||
| 101 | + .objectFit(ImageFit.Auto) | ||
| 102 | + .rotate({ | ||
| 103 | + angle: index === 1 ? 180 : 0 | ||
| 104 | + }) | ||
| 105 | + Row() { | ||
| 106 | + if (index === 0) { | ||
| 107 | + Image(this.indexSettingTabIndex === index ? $r('app.media.recommend_icon') : $r('app.media.recommend_icon_active')) | ||
| 108 | + .width(20) | ||
| 109 | + } | ||
| 110 | + Text(text) | ||
| 111 | + .textAlign(TextAlign.Center) | ||
| 112 | + .fontSize(16) | ||
| 113 | + .fontColor(index === this.indexSettingTabIndex ? '#ffffff' : '#ED2800') | ||
| 114 | + } | ||
| 115 | + .width('100%') | ||
| 116 | + .justifyContent(FlexAlign.Center) | ||
| 117 | + } | ||
| 118 | + .alignContent(Alignment.Start) | ||
| 119 | + .height(36) | ||
| 120 | + .onClick(() => { | ||
| 121 | + this.indexSettingTabIndex = index | ||
| 122 | + }) | ||
| 79 | }) | 123 | }) |
| 80 | } | 124 | } |
| 81 | .height(36) | 125 | .height(36) |
| @@ -99,14 +143,15 @@ struct ChannelDialog { | @@ -99,14 +143,15 @@ struct ChannelDialog { | ||
| 99 | .margin({ bottom: 12 }) | 143 | .margin({ bottom: 12 }) |
| 100 | } | 144 | } |
| 101 | 145 | ||
| 146 | + // 我的频道列表 | ||
| 102 | ListItem() { | 147 | ListItem() { |
| 103 | - GridRow({ columns: 4, gutter: 10 }) { | 148 | + Grid() { |
| 104 | ForEach(this.myChannelList, (item: TopNavDTO, index: number) => { | 149 | ForEach(this.myChannelList, (item: TopNavDTO, index: number) => { |
| 105 | - GridCol() { | 150 | + GridItem() { |
| 106 | Row() { | 151 | Row() { |
| 107 | Text(item.name) | 152 | Text(item.name) |
| 108 | .fontSize(14) | 153 | .fontSize(14) |
| 109 | - .fontColor(this.currentTopNavSelectedIndex === index ? '#ED2800' : (item.homeChannel === '1' ? '#999999' : '#222222')) | 154 | + .fontColor(this.currentTopNavSelectedIndex === index ? '#ED2800' : (item.homeChannel === '1' || item.movePermitted === 0 ? '#999999' : '#222222')) |
| 110 | 155 | ||
| 111 | if (this.isEditIng && item.myChannel !== '1') { | 156 | if (this.isEditIng && item.myChannel !== '1') { |
| 112 | Image($r('app.media.icon_audio_close')) | 157 | Image($r('app.media.icon_audio_close')) |
| @@ -117,19 +162,20 @@ struct ChannelDialog { | @@ -117,19 +162,20 @@ struct ChannelDialog { | ||
| 117 | .width('100%') | 162 | .width('100%') |
| 118 | .height('100%') | 163 | .height('100%') |
| 119 | .justifyContent(FlexAlign.Center) | 164 | .justifyContent(FlexAlign.Center) |
| 120 | - .backgroundColor(item.homeChannel === '1' ? '#F5F5F5' : '') | 165 | + .backgroundColor(item.homeChannel === '1' || item.movePermitted === 0 ? '#F5F5F5' : '') |
| 121 | .onClick(() => { | 166 | .onClick(() => { |
| 122 | if (this.isEditIng) { | 167 | if (this.isEditIng) { |
| 123 | if (item.myChannel !== '1') { | 168 | if (item.myChannel !== '1') { |
| 124 | this.myChannelItemEditHandle(index) | 169 | this.myChannelItemEditHandle(index) |
| 125 | } | 170 | } |
| 126 | } else { | 171 | } else { |
| 172 | + this.confirm(index) | ||
| 127 | this.currentTopNavSelectedIndex = index | 173 | this.currentTopNavSelectedIndex = index |
| 128 | this.controller?.close() | 174 | this.controller?.close() |
| 129 | } | 175 | } |
| 130 | }) | 176 | }) |
| 131 | } | 177 | } |
| 132 | - .width(80) | 178 | + .width('23%') |
| 133 | .height(40) | 179 | .height(40) |
| 134 | .border({ | 180 | .border({ |
| 135 | width: item.homeChannel === '1' ? 0 : 1, | 181 | width: item.homeChannel === '1' ? 0 : 1, |
| @@ -140,8 +186,28 @@ struct ChannelDialog { | @@ -140,8 +186,28 @@ struct ChannelDialog { | ||
| 140 | } | 186 | } |
| 141 | .width('100%') | 187 | .width('100%') |
| 142 | .margin({ bottom: 24 }) | 188 | .margin({ bottom: 24 }) |
| 189 | + .columnsTemplate('1fr 1fr 1fr 1fr') | ||
| 190 | + .columnsGap(8) | ||
| 191 | + .rowsGap(8) | ||
| 192 | + .height(Math.ceil(this.myChannelList.length / 4 ) * 48) | ||
| 193 | + .editMode(this.isEditIng) | ||
| 194 | + .supportAnimation(true) //设置Grid是否开启拖拽补位动画 | ||
| 195 | + .onItemDragStart((event: ItemDragInfo, itemIndex: number) => { | ||
| 196 | + if(this.myChannelList[itemIndex].headlinesOn===1 || this.myChannelList[itemIndex].movePermitted===0){ | ||
| 197 | + return | ||
| 198 | + }else{ | ||
| 199 | + return this.pixelMapBuilder(this.myChannelList[itemIndex], itemIndex) //设置拖拽过程中显示的元素。 | ||
| 200 | + } | ||
| 201 | + }) | ||
| 202 | + .onItemDrop((event: ItemDragInfo, itemIndex: number, insertIndex: number, isSuccess: boolean) => { //绑定此事件的组件可作为拖拽释放目标,当在本组件范围内停止拖拽行为时,触发回调。 | ||
| 203 | + if (!isSuccess || insertIndex >= this.myChannelList.length || this.myChannelList[insertIndex].headlinesOn===1 || this.myChannelList[insertIndex].movePermitted===0) { | ||
| 204 | + return | ||
| 205 | + } | ||
| 206 | + this.changeChannelIndex(itemIndex,insertIndex) | ||
| 207 | + }) | ||
| 143 | } | 208 | } |
| 144 | 209 | ||
| 210 | + //更多频道列表 | ||
| 145 | ListItem() { | 211 | ListItem() { |
| 146 | Column() { | 212 | Column() { |
| 147 | if (this.moreChannelList.length > 0) { | 213 | if (this.moreChannelList.length > 0) { |
| @@ -185,6 +251,7 @@ struct ChannelDialog { | @@ -185,6 +251,7 @@ struct ChannelDialog { | ||
| 185 | .width('100%') | 251 | .width('100%') |
| 186 | } | 252 | } |
| 187 | 253 | ||
| 254 | + //本地频道列表 | ||
| 188 | ListItem() { | 255 | ListItem() { |
| 189 | Column() { | 256 | Column() { |
| 190 | if (this.localChannelList.length > 0) { | 257 | if (this.localChannelList.length > 0) { |
| @@ -230,34 +297,1608 @@ struct ChannelDialog { | @@ -230,34 +297,1608 @@ struct ChannelDialog { | ||
| 230 | }.width('100%').height('100%') | 297 | }.width('100%').height('100%') |
| 231 | 298 | ||
| 232 | } | 299 | } |
| 233 | - .padding(16) | 300 | + .padding(15) |
| 234 | .backgroundColor('#ffffff') | 301 | .backgroundColor('#ffffff') |
| 235 | } | 302 | } |
| 236 | } | 303 | } |
| 237 | 304 | ||
| 305 | +// @Entry | ||
| 238 | @Component | 306 | @Component |
| 239 | struct ChannelSubscriptionLayout { | 307 | struct ChannelSubscriptionLayout { |
| 308 | + changeTab: (index: number) => void = () => { | ||
| 309 | + } | ||
| 240 | @State indexSettingArray: string [] = ['推荐', '热点'] | 310 | @State indexSettingArray: string [] = ['推荐', '热点'] |
| 241 | //当前选中的频道 | 311 | //当前选中的频道 |
| 242 | @Link currentTopNavSelectedIndex: number; | 312 | @Link currentTopNavSelectedIndex: number; |
| 243 | @Link myChannelList: TopNavDTO [] | 313 | @Link myChannelList: TopNavDTO [] |
| 244 | @Link moreChannelList: TopNavDTO [] | 314 | @Link moreChannelList: TopNavDTO [] |
| 245 | @Link localChannelList: TopNavDTO [] | 315 | @Link localChannelList: TopNavDTO [] |
| 246 | - | 316 | + onAccept = (index: number) => { |
| 317 | + console.log(`onAccept${index}`) | ||
| 318 | + this.changeTab(index) | ||
| 319 | + } | ||
| 320 | + // @State currentTopNavSelectedIndex: number = 0 | ||
| 321 | + // @State topNavList: TopNavDTO [] = [ | ||
| 322 | + // { | ||
| 323 | + // channelId: 2001, | ||
| 324 | + // channelStrategy: 1, | ||
| 325 | + // channelStyle: 2, | ||
| 326 | + // channelType: 1, | ||
| 327 | + // defaultPermitted: 1, | ||
| 328 | + // delPermitted: 0, | ||
| 329 | + // fontCColor: "#FFFFFF", | ||
| 330 | + // fontColor: "#F9AB99", | ||
| 331 | + // headlinesOn: 0, | ||
| 332 | + // homeChannel: "0", | ||
| 333 | + // iconCUrl: "", | ||
| 334 | + // iconCUrlSize: "", | ||
| 335 | + // iconUrl: "", | ||
| 336 | + // iconUrlSize: "", | ||
| 337 | + // localChannel: "0", | ||
| 338 | + // moreChannel: "0", | ||
| 339 | + // movePermitted: 0, | ||
| 340 | + // myChannel: "0", | ||
| 341 | + // name: "推荐", | ||
| 342 | + // num: 1, | ||
| 343 | + // pageId: 20011, | ||
| 344 | + // pageType: "", | ||
| 345 | + // underlineCColor: "" | ||
| 346 | + // }, | ||
| 347 | + // { | ||
| 348 | + // channelId: 2002, | ||
| 349 | + // channelStrategy: 2, | ||
| 350 | + // channelStyle: 2, | ||
| 351 | + // channelType: 1, | ||
| 352 | + // defaultPermitted: 1, | ||
| 353 | + // delPermitted: 0, | ||
| 354 | + // fontCColor: "#FFFFFF", | ||
| 355 | + // fontColor: "#F9AB99", | ||
| 356 | + // headlinesOn: 0, | ||
| 357 | + // homeChannel: "0", | ||
| 358 | + // iconCUrl: "", | ||
| 359 | + // iconCUrlSize: "", | ||
| 360 | + // iconUrl: "", | ||
| 361 | + // iconUrlSize: "", | ||
| 362 | + // localChannel: "0", | ||
| 363 | + // moreChannel: "0", | ||
| 364 | + // movePermitted: 0, | ||
| 365 | + // myChannel: "0", | ||
| 366 | + // name: "热点", | ||
| 367 | + // num: 2, | ||
| 368 | + // pageId: 20012, | ||
| 369 | + // pageType: "", | ||
| 370 | + // underlineCColor: "" | ||
| 371 | + // }, | ||
| 372 | + // { | ||
| 373 | + // channelId: 2003, | ||
| 374 | + // channelStrategy: 2, | ||
| 375 | + // channelStyle: 2, | ||
| 376 | + // channelType: 1, | ||
| 377 | + // defaultPermitted: 0, | ||
| 378 | + // delPermitted: 0, | ||
| 379 | + // fontCColor: "#FFFFFF", | ||
| 380 | + // fontColor: "#F9AB99", | ||
| 381 | + // headlinesOn: 0, | ||
| 382 | + // homeChannel: "0", | ||
| 383 | + // iconCUrl: "", | ||
| 384 | + // iconCUrlSize: "", | ||
| 385 | + // iconUrl: "", | ||
| 386 | + // iconUrlSize: "", | ||
| 387 | + // localChannel: "0", | ||
| 388 | + // moreChannel: "0", | ||
| 389 | + // movePermitted: 1, | ||
| 390 | + // myChannel: "0", | ||
| 391 | + // name: "锐评", | ||
| 392 | + // num: 3, | ||
| 393 | + // pageId: 20013, | ||
| 394 | + // pageType: "", | ||
| 395 | + // underlineCColor: "" | ||
| 396 | + // }, | ||
| 397 | + // { | ||
| 398 | + // channelId: 2066, | ||
| 399 | + // channelStrategy: 2, | ||
| 400 | + // channelStyle: 3, | ||
| 401 | + // channelType: 1, | ||
| 402 | + // defaultPermitted: 0, | ||
| 403 | + // delPermitted: 1, | ||
| 404 | + // fontCColor: "#FFFFFF", | ||
| 405 | + // fontColor: "#F9AB99", | ||
| 406 | + // headlinesOn: 0, | ||
| 407 | + // homeChannel: "0", | ||
| 408 | + // iconCUrl: "", | ||
| 409 | + // iconCUrlSize: "", | ||
| 410 | + // iconUrl: "", | ||
| 411 | + // iconUrlSize: "", | ||
| 412 | + // localChannel: "0", | ||
| 413 | + // moreChannel: "0", | ||
| 414 | + // movePermitted: 1, | ||
| 415 | + // myChannel: "0", | ||
| 416 | + // name: "播报", | ||
| 417 | + // num: 4, | ||
| 418 | + // pageId: 21003, | ||
| 419 | + // pageType: "", | ||
| 420 | + // underlineCColor: "" | ||
| 421 | + // }, | ||
| 422 | + // { | ||
| 423 | + // channelId: 2006, | ||
| 424 | + // channelStrategy: 2, | ||
| 425 | + // channelStyle: 3, | ||
| 426 | + // channelType: 1, | ||
| 427 | + // defaultPermitted: 0, | ||
| 428 | + // delPermitted: 0, | ||
| 429 | + // fontCColor: "#FFFFFF", | ||
| 430 | + // fontColor: "#F9AB99", | ||
| 431 | + // headlinesOn: 0, | ||
| 432 | + // homeChannel: "0", | ||
| 433 | + // iconCUrl: "", | ||
| 434 | + // iconCUrlSize: "", | ||
| 435 | + // iconUrl: "", | ||
| 436 | + // iconUrlSize: "", | ||
| 437 | + // localChannel: "0", | ||
| 438 | + // moreChannel: "0", | ||
| 439 | + // movePermitted: 1, | ||
| 440 | + // myChannel: "0", | ||
| 441 | + // name: "版面", | ||
| 442 | + // num: 5, | ||
| 443 | + // pageId: 20016, | ||
| 444 | + // pageType: "", | ||
| 445 | + // underlineCColor: "" | ||
| 446 | + // }, | ||
| 447 | + // { | ||
| 448 | + // channelId: 2011, | ||
| 449 | + // channelStrategy: 2, | ||
| 450 | + // channelStyle: 2, | ||
| 451 | + // channelType: 1, | ||
| 452 | + // defaultPermitted: 0, | ||
| 453 | + // delPermitted: 1, | ||
| 454 | + // fontCColor: "#FFFFFF", | ||
| 455 | + // fontColor: "#F9AB99", | ||
| 456 | + // headlinesOn: 0, | ||
| 457 | + // homeChannel: "0", | ||
| 458 | + // iconCUrl: "", | ||
| 459 | + // iconCUrlSize: "", | ||
| 460 | + // iconUrl: "", | ||
| 461 | + // iconUrlSize: "", | ||
| 462 | + // localChannel: "0", | ||
| 463 | + // moreChannel: "0", | ||
| 464 | + // movePermitted: 1, | ||
| 465 | + // myChannel: "0", | ||
| 466 | + // name: "体育", | ||
| 467 | + // num: 6, | ||
| 468 | + // pageId: 20021, | ||
| 469 | + // pageType: "", | ||
| 470 | + // underlineCColor: "" | ||
| 471 | + // }, | ||
| 472 | + // { | ||
| 473 | + // channelId: 2020, | ||
| 474 | + // channelStrategy: 1, | ||
| 475 | + // channelStyle: 2, | ||
| 476 | + // channelType: 1, | ||
| 477 | + // defaultPermitted: 0, | ||
| 478 | + // delPermitted: 1, | ||
| 479 | + // fontCColor: "#FFFFFF", | ||
| 480 | + // fontColor: "#F9AB99", | ||
| 481 | + // headlinesOn: 0, | ||
| 482 | + // homeChannel: "0", | ||
| 483 | + // iconCUrl: "", | ||
| 484 | + // iconCUrlSize: "", | ||
| 485 | + // iconUrl: "", | ||
| 486 | + // iconUrlSize: "", | ||
| 487 | + // localChannel: "0", | ||
| 488 | + // moreChannel: "0", | ||
| 489 | + // movePermitted: 1, | ||
| 490 | + // myChannel: "0", | ||
| 491 | + // name: "国际", | ||
| 492 | + // num: 7, | ||
| 493 | + // pageId: 20030, | ||
| 494 | + // pageType: "", | ||
| 495 | + // underlineCColor: "" | ||
| 496 | + // }, | ||
| 497 | + // { | ||
| 498 | + // channelId: 2063, | ||
| 499 | + // channelStrategy: 2, | ||
| 500 | + // channelStyle: 2, | ||
| 501 | + // channelType: 1, | ||
| 502 | + // defaultPermitted: 0, | ||
| 503 | + // delPermitted: 0, | ||
| 504 | + // fontCColor: "#FFFFFF", | ||
| 505 | + // fontColor: "#F9AB99", | ||
| 506 | + // headlinesOn: 0, | ||
| 507 | + // homeChannel: "0", | ||
| 508 | + // iconCUrl: "", | ||
| 509 | + // iconCUrlSize: "", | ||
| 510 | + // iconUrl: "", | ||
| 511 | + // iconUrlSize: "", | ||
| 512 | + // localChannel: "0", | ||
| 513 | + // moreChannel: "0", | ||
| 514 | + // movePermitted: 0, | ||
| 515 | + // myChannel: "0", | ||
| 516 | + // name: "两会", | ||
| 517 | + // num: 8, | ||
| 518 | + // pageId: 21000, | ||
| 519 | + // pageType: "", | ||
| 520 | + // underlineCColor: "" | ||
| 521 | + // }, | ||
| 522 | + // { | ||
| 523 | + // channelId: 2072, | ||
| 524 | + // channelStrategy: 2, | ||
| 525 | + // channelStyle: 2, | ||
| 526 | + // channelType: 1, | ||
| 527 | + // defaultPermitted: 0, | ||
| 528 | + // delPermitted: 0, | ||
| 529 | + // fontCColor: "#FFFFFF", | ||
| 530 | + // fontColor: "#F9AB99", | ||
| 531 | + // headlinesOn: 0, | ||
| 532 | + // homeChannel: "0", | ||
| 533 | + // iconCUrl: "", | ||
| 534 | + // iconCUrlSize: "", | ||
| 535 | + // iconUrl: "", | ||
| 536 | + // iconUrlSize: "", | ||
| 537 | + // localChannel: "0", | ||
| 538 | + // moreChannel: "0", | ||
| 539 | + // movePermitted: 0, | ||
| 540 | + // myChannel: "0", | ||
| 541 | + // name: "亚运", | ||
| 542 | + // num: 9, | ||
| 543 | + // pageId: 21009, | ||
| 544 | + // pageType: "", | ||
| 545 | + // underlineCColor: "" | ||
| 546 | + // }, | ||
| 547 | + // { | ||
| 548 | + // channelId: 2015, | ||
| 549 | + // channelStrategy: 1, | ||
| 550 | + // channelStyle: 2, | ||
| 551 | + // channelType: 1, | ||
| 552 | + // defaultPermitted: 0, | ||
| 553 | + // delPermitted: 1, | ||
| 554 | + // fontCColor: "#FFFFFF", | ||
| 555 | + // fontColor: "#F9AB99", | ||
| 556 | + // headlinesOn: 0, | ||
| 557 | + // homeChannel: "0", | ||
| 558 | + // iconCUrl: "", | ||
| 559 | + // iconCUrlSize: "", | ||
| 560 | + // iconUrl: "", | ||
| 561 | + // iconUrlSize: "", | ||
| 562 | + // localChannel: "0", | ||
| 563 | + // moreChannel: "0", | ||
| 564 | + // movePermitted: 1, | ||
| 565 | + // myChannel: "0", | ||
| 566 | + // name: "科技", | ||
| 567 | + // num: 10, | ||
| 568 | + // pageId: 20025, | ||
| 569 | + // pageType: "", | ||
| 570 | + // underlineCColor: "" | ||
| 571 | + // }, | ||
| 572 | + // { | ||
| 573 | + // channelId: 2004, | ||
| 574 | + // channelStrategy: 2, | ||
| 575 | + // channelStyle: 2, | ||
| 576 | + // channelType: 1, | ||
| 577 | + // defaultPermitted: 0, | ||
| 578 | + // delPermitted: 0, | ||
| 579 | + // fontCColor: "#FFFFFF", | ||
| 580 | + // fontColor: "#F9AB99", | ||
| 581 | + // headlinesOn: 0, | ||
| 582 | + // homeChannel: "0", | ||
| 583 | + // iconCUrl: "", | ||
| 584 | + // iconCUrlSize: "", | ||
| 585 | + // iconUrl: "", | ||
| 586 | + // iconUrlSize: "", | ||
| 587 | + // localChannel: "0", | ||
| 588 | + // moreChannel: "0", | ||
| 589 | + // movePermitted: 1, | ||
| 590 | + // myChannel: "0", | ||
| 591 | + // name: "云课堂", | ||
| 592 | + // num: 11, | ||
| 593 | + // pageId: 20014, | ||
| 594 | + // pageType: "", | ||
| 595 | + // underlineCColor: "" | ||
| 596 | + // }, | ||
| 597 | + // { | ||
| 598 | + // channelId: 2005, | ||
| 599 | + // channelStrategy: 2, | ||
| 600 | + // channelStyle: 2, | ||
| 601 | + // channelType: 1, | ||
| 602 | + // defaultPermitted: 0, | ||
| 603 | + // delPermitted: 0, | ||
| 604 | + // fontCColor: "#FFFFFF", | ||
| 605 | + // fontColor: "#F9AB99", | ||
| 606 | + // headlinesOn: 0, | ||
| 607 | + // homeChannel: "0", | ||
| 608 | + // iconCUrl: "", | ||
| 609 | + // iconCUrlSize: "", | ||
| 610 | + // iconUrl: "", | ||
| 611 | + // iconUrlSize: "", | ||
| 612 | + // localChannel: "0", | ||
| 613 | + // moreChannel: "0", | ||
| 614 | + // movePermitted: 1, | ||
| 615 | + // myChannel: "0", | ||
| 616 | + // name: "文件", | ||
| 617 | + // num: 12, | ||
| 618 | + // pageId: 20015, | ||
| 619 | + // pageType: "", | ||
| 620 | + // underlineCColor: "" | ||
| 621 | + // }, | ||
| 622 | + // { | ||
| 623 | + // channelId: 2007, | ||
| 624 | + // channelStrategy: 1, | ||
| 625 | + // channelStyle: 2, | ||
| 626 | + // channelType: 1, | ||
| 627 | + // defaultPermitted: 0, | ||
| 628 | + // delPermitted: 0, | ||
| 629 | + // fontCColor: "#FFFFFF", | ||
| 630 | + // fontColor: "#F9AB99", | ||
| 631 | + // headlinesOn: 0, | ||
| 632 | + // homeChannel: "0", | ||
| 633 | + // iconCUrl: "", | ||
| 634 | + // iconCUrlSize: "", | ||
| 635 | + // iconUrl: "", | ||
| 636 | + // iconUrlSize: "", | ||
| 637 | + // localChannel: "0", | ||
| 638 | + // moreChannel: "0", | ||
| 639 | + // movePermitted: 1, | ||
| 640 | + // myChannel: "0", | ||
| 641 | + // name: "镜头", | ||
| 642 | + // num: 13, | ||
| 643 | + // pageId: 20017, | ||
| 644 | + // pageType: "", | ||
| 645 | + // underlineCColor: "" | ||
| 646 | + // }, | ||
| 647 | + // { | ||
| 648 | + // channelId: 2008, | ||
| 649 | + // channelStrategy: 2, | ||
| 650 | + // channelStyle: 2, | ||
| 651 | + // channelType: 1, | ||
| 652 | + // defaultPermitted: 0, | ||
| 653 | + // delPermitted: 0, | ||
| 654 | + // fontCColor: "#FFFFFF", | ||
| 655 | + // fontColor: "#F9AB99", | ||
| 656 | + // headlinesOn: 0, | ||
| 657 | + // homeChannel: "0", | ||
| 658 | + // iconCUrl: "", | ||
| 659 | + // iconCUrlSize: "", | ||
| 660 | + // iconUrl: "", | ||
| 661 | + // iconUrlSize: "", | ||
| 662 | + // localChannel: "0", | ||
| 663 | + // moreChannel: "0", | ||
| 664 | + // movePermitted: 1, | ||
| 665 | + // myChannel: "0", | ||
| 666 | + // name: "公益", | ||
| 667 | + // num: 14, | ||
| 668 | + // pageId: 20018, | ||
| 669 | + // pageType: "", | ||
| 670 | + // underlineCColor: "" | ||
| 671 | + // }, | ||
| 672 | + // { | ||
| 673 | + // channelId: 2009, | ||
| 674 | + // channelStrategy: 1, | ||
| 675 | + // channelStyle: 2, | ||
| 676 | + // channelType: 1, | ||
| 677 | + // defaultPermitted: 0, | ||
| 678 | + // delPermitted: 1, | ||
| 679 | + // fontCColor: "#FFFFFF", | ||
| 680 | + // fontColor: "#F9AB99", | ||
| 681 | + // headlinesOn: 0, | ||
| 682 | + // homeChannel: "0", | ||
| 683 | + // iconCUrl: "", | ||
| 684 | + // iconCUrlSize: "", | ||
| 685 | + // iconUrl: "", | ||
| 686 | + // iconUrlSize: "", | ||
| 687 | + // localChannel: "0", | ||
| 688 | + // moreChannel: "0", | ||
| 689 | + // movePermitted: 1, | ||
| 690 | + // myChannel: "0", | ||
| 691 | + // name: "社会", | ||
| 692 | + // num: 15, | ||
| 693 | + // pageId: 20019, | ||
| 694 | + // pageType: "", | ||
| 695 | + // underlineCColor: "" | ||
| 696 | + // }, | ||
| 697 | + // { | ||
| 698 | + // channelId: 2010, | ||
| 699 | + // channelStrategy: 1, | ||
| 700 | + // channelStyle: 2, | ||
| 701 | + // channelType: 1, | ||
| 702 | + // defaultPermitted: 0, | ||
| 703 | + // delPermitted: 1, | ||
| 704 | + // fontCColor: "#FFFFFF", | ||
| 705 | + // fontColor: "#F9AB99", | ||
| 706 | + // headlinesOn: 0, | ||
| 707 | + // homeChannel: "0", | ||
| 708 | + // iconCUrl: "", | ||
| 709 | + // iconCUrlSize: "", | ||
| 710 | + // iconUrl: "", | ||
| 711 | + // iconUrlSize: "", | ||
| 712 | + // localChannel: "0", | ||
| 713 | + // moreChannel: "0", | ||
| 714 | + // movePermitted: 1, | ||
| 715 | + // myChannel: "0", | ||
| 716 | + // name: "财经", | ||
| 717 | + // num: 16, | ||
| 718 | + // pageId: 20020, | ||
| 719 | + // pageType: "", | ||
| 720 | + // underlineCColor: "" | ||
| 721 | + // }, | ||
| 722 | + // { | ||
| 723 | + // channelId: 2012, | ||
| 724 | + // channelStrategy: 1, | ||
| 725 | + // channelStyle: 2, | ||
| 726 | + // channelType: 1, | ||
| 727 | + // defaultPermitted: 0, | ||
| 728 | + // delPermitted: 1, | ||
| 729 | + // fontCColor: "#FFFFFF", | ||
| 730 | + // fontColor: "#F9AB99", | ||
| 731 | + // headlinesOn: 0, | ||
| 732 | + // homeChannel: "0", | ||
| 733 | + // iconCUrl: "", | ||
| 734 | + // iconCUrlSize: "", | ||
| 735 | + // iconUrl: "", | ||
| 736 | + // iconUrlSize: "", | ||
| 737 | + // localChannel: "0", | ||
| 738 | + // moreChannel: "0", | ||
| 739 | + // movePermitted: 1, | ||
| 740 | + // myChannel: "0", | ||
| 741 | + // name: "文化", | ||
| 742 | + // num: 17, | ||
| 743 | + // pageId: 20022, | ||
| 744 | + // pageType: "", | ||
| 745 | + // underlineCColor: "" | ||
| 746 | + // }, | ||
| 747 | + // { | ||
| 748 | + // channelId: 2013, | ||
| 749 | + // channelStrategy: 1, | ||
| 750 | + // channelStyle: 2, | ||
| 751 | + // channelType: 1, | ||
| 752 | + // defaultPermitted: 0, | ||
| 753 | + // delPermitted: 1, | ||
| 754 | + // fontCColor: "#FFFFFF", | ||
| 755 | + // fontColor: "#F9AB99", | ||
| 756 | + // headlinesOn: 0, | ||
| 757 | + // homeChannel: "0", | ||
| 758 | + // iconCUrl: "", | ||
| 759 | + // iconCUrlSize: "", | ||
| 760 | + // iconUrl: "", | ||
| 761 | + // iconUrlSize: "", | ||
| 762 | + // localChannel: "0", | ||
| 763 | + // moreChannel: "0", | ||
| 764 | + // movePermitted: 1, | ||
| 765 | + // myChannel: "0", | ||
| 766 | + // name: "教育", | ||
| 767 | + // num: 18, | ||
| 768 | + // pageId: 20023, | ||
| 769 | + // pageType: "", | ||
| 770 | + // underlineCColor: "" | ||
| 771 | + // }, | ||
| 772 | + // { | ||
| 773 | + // channelId: 2014, | ||
| 774 | + // channelStrategy: 1, | ||
| 775 | + // channelStyle: 2, | ||
| 776 | + // channelType: 1, | ||
| 777 | + // defaultPermitted: 0, | ||
| 778 | + // delPermitted: 1, | ||
| 779 | + // fontCColor: "#FFFFFF", | ||
| 780 | + // fontColor: "#F9AB99", | ||
| 781 | + // headlinesOn: 0, | ||
| 782 | + // homeChannel: "0", | ||
| 783 | + // iconCUrl: "", | ||
| 784 | + // iconCUrlSize: "", | ||
| 785 | + // iconUrl: "", | ||
| 786 | + // iconUrlSize: "", | ||
| 787 | + // localChannel: "0", | ||
| 788 | + // moreChannel: "0", | ||
| 789 | + // movePermitted: 1, | ||
| 790 | + // myChannel: "0", | ||
| 791 | + // name: "军事", | ||
| 792 | + // num: 19, | ||
| 793 | + // pageId: 20024, | ||
| 794 | + // pageType: "", | ||
| 795 | + // underlineCColor: "" | ||
| 796 | + // }, | ||
| 797 | + // { | ||
| 798 | + // channelId: 2017, | ||
| 799 | + // channelStrategy: 2, | ||
| 800 | + // channelStyle: 2, | ||
| 801 | + // channelType: 1, | ||
| 802 | + // defaultPermitted: 0, | ||
| 803 | + // delPermitted: 1, | ||
| 804 | + // fontCColor: "#FFFFFF", | ||
| 805 | + // fontColor: "#F9AB99", | ||
| 806 | + // headlinesOn: 0, | ||
| 807 | + // homeChannel: "0", | ||
| 808 | + // iconCUrl: "", | ||
| 809 | + // iconCUrlSize: "", | ||
| 810 | + // iconUrl: "", | ||
| 811 | + // iconUrlSize: "", | ||
| 812 | + // localChannel: "0", | ||
| 813 | + // moreChannel: "0", | ||
| 814 | + // movePermitted: 1, | ||
| 815 | + // myChannel: "0", | ||
| 816 | + // name: "健康", | ||
| 817 | + // num: 20, | ||
| 818 | + // pageId: 20027, | ||
| 819 | + // pageType: "", | ||
| 820 | + // underlineCColor: "" | ||
| 821 | + // }, | ||
| 822 | + // { | ||
| 823 | + // channelId: 2019, | ||
| 824 | + // channelStrategy: 1, | ||
| 825 | + // channelStyle: 2, | ||
| 826 | + // channelType: 1, | ||
| 827 | + // defaultPermitted: 0, | ||
| 828 | + // delPermitted: 1, | ||
| 829 | + // fontCColor: "#FFFFFF", | ||
| 830 | + // fontColor: "#F9AB99", | ||
| 831 | + // headlinesOn: 0, | ||
| 832 | + // homeChannel: "0", | ||
| 833 | + // iconCUrl: "", | ||
| 834 | + // iconCUrlSize: "", | ||
| 835 | + // iconUrl: "", | ||
| 836 | + // iconUrlSize: "", | ||
| 837 | + // localChannel: "0", | ||
| 838 | + // moreChannel: "0", | ||
| 839 | + // movePermitted: 1, | ||
| 840 | + // myChannel: "0", | ||
| 841 | + // name: "房产", | ||
| 842 | + // num: 21, | ||
| 843 | + // pageId: 20029, | ||
| 844 | + // pageType: "", | ||
| 845 | + // underlineCColor: "" | ||
| 846 | + // }, | ||
| 847 | + // { | ||
| 848 | + // channelId: 2018, | ||
| 849 | + // channelStrategy: 1, | ||
| 850 | + // channelStyle: 2, | ||
| 851 | + // channelType: 1, | ||
| 852 | + // defaultPermitted: 0, | ||
| 853 | + // delPermitted: 1, | ||
| 854 | + // fontCColor: "#FFFFFF", | ||
| 855 | + // fontColor: "#F9AB99", | ||
| 856 | + // headlinesOn: 0, | ||
| 857 | + // homeChannel: "0", | ||
| 858 | + // iconCUrl: "", | ||
| 859 | + // iconCUrlSize: "", | ||
| 860 | + // iconUrl: "", | ||
| 861 | + // iconUrlSize: "", | ||
| 862 | + // localChannel: "0", | ||
| 863 | + // moreChannel: "0", | ||
| 864 | + // movePermitted: 1, | ||
| 865 | + // myChannel: "0", | ||
| 866 | + // name: "汽车", | ||
| 867 | + // num: 22, | ||
| 868 | + // pageId: 20028, | ||
| 869 | + // pageType: "", | ||
| 870 | + // underlineCColor: "" | ||
| 871 | + // }, | ||
| 872 | + // { | ||
| 873 | + // channelId: 2065, | ||
| 874 | + // channelStrategy: 2, | ||
| 875 | + // channelStyle: 2, | ||
| 876 | + // channelType: 1, | ||
| 877 | + // defaultPermitted: 0, | ||
| 878 | + // delPermitted: 0, | ||
| 879 | + // fontCColor: "#FFFFFF", | ||
| 880 | + // fontColor: "#F9AB99", | ||
| 881 | + // headlinesOn: 0, | ||
| 882 | + // homeChannel: "0", | ||
| 883 | + // iconCUrl: "", | ||
| 884 | + // iconCUrlSize: "", | ||
| 885 | + // iconUrl: "", | ||
| 886 | + // iconUrlSize: "", | ||
| 887 | + // localChannel: "0", | ||
| 888 | + // moreChannel: "0", | ||
| 889 | + // movePermitted: 1, | ||
| 890 | + // myChannel: "0", | ||
| 891 | + // name: "三农", | ||
| 892 | + // num: 24, | ||
| 893 | + // pageId: 21002, | ||
| 894 | + // pageType: "", | ||
| 895 | + // underlineCColor: "" | ||
| 896 | + // }, | ||
| 897 | + // { | ||
| 898 | + // channelId: 2024, | ||
| 899 | + // channelStrategy: 1, | ||
| 900 | + // channelStyle: 2, | ||
| 901 | + // channelType: 1, | ||
| 902 | + // defaultPermitted: 0, | ||
| 903 | + // delPermitted: 1, | ||
| 904 | + // fontCColor: "#FFFFFF", | ||
| 905 | + // fontColor: "#F9AB99", | ||
| 906 | + // headlinesOn: 0, | ||
| 907 | + // homeChannel: "0", | ||
| 908 | + // iconCUrl: "", | ||
| 909 | + // iconCUrlSize: "", | ||
| 910 | + // iconUrl: "", | ||
| 911 | + // iconUrlSize: "", | ||
| 912 | + // localChannel: "0", | ||
| 913 | + // moreChannel: "0", | ||
| 914 | + // movePermitted: 1, | ||
| 915 | + // myChannel: "0", | ||
| 916 | + // name: "家居", | ||
| 917 | + // num: 25, | ||
| 918 | + // pageId: 20034, | ||
| 919 | + // pageType: "", | ||
| 920 | + // underlineCColor: "" | ||
| 921 | + // }, | ||
| 922 | + // { | ||
| 923 | + // channelId: 2021, | ||
| 924 | + // channelStrategy: 1, | ||
| 925 | + // channelStyle: 2, | ||
| 926 | + // channelType: 1, | ||
| 927 | + // defaultPermitted: 0, | ||
| 928 | + // delPermitted: 1, | ||
| 929 | + // fontCColor: "#FFFFFF", | ||
| 930 | + // fontColor: "#F9AB99", | ||
| 931 | + // headlinesOn: 0, | ||
| 932 | + // homeChannel: "0", | ||
| 933 | + // iconCUrl: "", | ||
| 934 | + // iconCUrlSize: "", | ||
| 935 | + // iconUrl: "", | ||
| 936 | + // iconUrlSize: "", | ||
| 937 | + // localChannel: "0", | ||
| 938 | + // moreChannel: "0", | ||
| 939 | + // movePermitted: 1, | ||
| 940 | + // myChannel: "0", | ||
| 941 | + // name: "法治", | ||
| 942 | + // num: 27, | ||
| 943 | + // pageId: 20031, | ||
| 944 | + // pageType: "", | ||
| 945 | + // underlineCColor: "" | ||
| 946 | + // }, | ||
| 947 | + // { | ||
| 948 | + // channelId: 2022, | ||
| 949 | + // channelStrategy: 1, | ||
| 950 | + // channelStyle: 2, | ||
| 951 | + // channelType: 1, | ||
| 952 | + // defaultPermitted: 0, | ||
| 953 | + // delPermitted: 1, | ||
| 954 | + // fontCColor: "#FFFFFF", | ||
| 955 | + // fontColor: "#F9AB99", | ||
| 956 | + // headlinesOn: 0, | ||
| 957 | + // homeChannel: "0", | ||
| 958 | + // iconCUrl: "", | ||
| 959 | + // iconCUrlSize: "", | ||
| 960 | + // iconUrl: "", | ||
| 961 | + // iconUrlSize: "", | ||
| 962 | + // localChannel: "0", | ||
| 963 | + // moreChannel: "0", | ||
| 964 | + // movePermitted: 1, | ||
| 965 | + // myChannel: "0", | ||
| 966 | + // name: "美食", | ||
| 967 | + // num: 28, | ||
| 968 | + // pageId: 20032, | ||
| 969 | + // pageType: "", | ||
| 970 | + // underlineCColor: "" | ||
| 971 | + // }, | ||
| 972 | + // { | ||
| 973 | + // channelId: 2025, | ||
| 974 | + // channelStrategy: 1, | ||
| 975 | + // channelStyle: 2, | ||
| 976 | + // channelType: 1, | ||
| 977 | + // defaultPermitted: 0, | ||
| 978 | + // delPermitted: 1, | ||
| 979 | + // fontCColor: "#FFFFFF", | ||
| 980 | + // fontColor: "#F9AB99", | ||
| 981 | + // headlinesOn: 0, | ||
| 982 | + // homeChannel: "0", | ||
| 983 | + // iconCUrl: "", | ||
| 984 | + // iconCUrlSize: "", | ||
| 985 | + // iconUrl: "", | ||
| 986 | + // iconUrlSize: "", | ||
| 987 | + // localChannel: "0", | ||
| 988 | + // moreChannel: "0", | ||
| 989 | + // movePermitted: 1, | ||
| 990 | + // myChannel: "0", | ||
| 991 | + // name: "育儿", | ||
| 992 | + // num: 29, | ||
| 993 | + // pageId: 20035, | ||
| 994 | + // pageType: "", | ||
| 995 | + // underlineCColor: "" | ||
| 996 | + // }, | ||
| 997 | + // { | ||
| 998 | + // channelId: 2026, | ||
| 999 | + // channelStrategy: 1, | ||
| 1000 | + // channelStyle: 2, | ||
| 1001 | + // channelType: 1, | ||
| 1002 | + // defaultPermitted: 0, | ||
| 1003 | + // delPermitted: 1, | ||
| 1004 | + // fontCColor: "#FFFFFF", | ||
| 1005 | + // fontColor: "#F9AB99", | ||
| 1006 | + // headlinesOn: 0, | ||
| 1007 | + // homeChannel: "0", | ||
| 1008 | + // iconCUrl: "", | ||
| 1009 | + // iconCUrlSize: "", | ||
| 1010 | + // iconUrl: "", | ||
| 1011 | + // iconUrlSize: "", | ||
| 1012 | + // localChannel: "0", | ||
| 1013 | + // moreChannel: "0", | ||
| 1014 | + // movePermitted: 1, | ||
| 1015 | + // myChannel: "0", | ||
| 1016 | + // name: "生态", | ||
| 1017 | + // num: 30, | ||
| 1018 | + // pageId: 20036, | ||
| 1019 | + // pageType: "", | ||
| 1020 | + // underlineCColor: "" | ||
| 1021 | + // }, | ||
| 1022 | + // { | ||
| 1023 | + // channelId: 2023, | ||
| 1024 | + // channelStrategy: 1, | ||
| 1025 | + // channelStyle: 2, | ||
| 1026 | + // channelType: 1, | ||
| 1027 | + // defaultPermitted: 0, | ||
| 1028 | + // delPermitted: 1, | ||
| 1029 | + // fontCColor: "#FFFFFF", | ||
| 1030 | + // fontColor: "#F9AB99", | ||
| 1031 | + // headlinesOn: 0, | ||
| 1032 | + // homeChannel: "0", | ||
| 1033 | + // iconCUrl: "", | ||
| 1034 | + // iconCUrlSize: "", | ||
| 1035 | + // iconUrl: "", | ||
| 1036 | + // iconUrlSize: "", | ||
| 1037 | + // localChannel: "0", | ||
| 1038 | + // moreChannel: "0", | ||
| 1039 | + // movePermitted: 1, | ||
| 1040 | + // myChannel: "0", | ||
| 1041 | + // name: "时尚", | ||
| 1042 | + // num: 31, | ||
| 1043 | + // pageId: 20033, | ||
| 1044 | + // pageType: "", | ||
| 1045 | + // underlineCColor: "" | ||
| 1046 | + // }, | ||
| 1047 | + // { | ||
| 1048 | + // channelId: 2027, | ||
| 1049 | + // channelStrategy: 1, | ||
| 1050 | + // channelStyle: 2, | ||
| 1051 | + // channelType: 2, | ||
| 1052 | + // defaultPermitted: 0, | ||
| 1053 | + // delPermitted: 1, | ||
| 1054 | + // fontCColor: "#FFFFFF", | ||
| 1055 | + // fontColor: "#F9AB99", | ||
| 1056 | + // headlinesOn: 0, | ||
| 1057 | + // homeChannel: "0", | ||
| 1058 | + // iconCUrl: "", | ||
| 1059 | + // iconCUrlSize: "", | ||
| 1060 | + // iconUrl: "", | ||
| 1061 | + // iconUrlSize: "", | ||
| 1062 | + // localChannel: "0", | ||
| 1063 | + // moreChannel: "0", | ||
| 1064 | + // movePermitted: 1, | ||
| 1065 | + // myChannel: "0", | ||
| 1066 | + // name: "北京", | ||
| 1067 | + // num: 32, | ||
| 1068 | + // pageId: 20037, | ||
| 1069 | + // pageType: "", | ||
| 1070 | + // underlineCColor: "" | ||
| 1071 | + // }, | ||
| 1072 | + // { | ||
| 1073 | + // channelId: 2029, | ||
| 1074 | + // channelStrategy: 1, | ||
| 1075 | + // channelStyle: 2, | ||
| 1076 | + // channelType: 2, | ||
| 1077 | + // defaultPermitted: 0, | ||
| 1078 | + // delPermitted: 1, | ||
| 1079 | + // fontCColor: "#FFFFFF", | ||
| 1080 | + // fontColor: "#F9AB99", | ||
| 1081 | + // headlinesOn: 0, | ||
| 1082 | + // homeChannel: "0", | ||
| 1083 | + // iconCUrl: "", | ||
| 1084 | + // iconCUrlSize: "", | ||
| 1085 | + // iconUrl: "", | ||
| 1086 | + // iconUrlSize: "", | ||
| 1087 | + // localChannel: "0", | ||
| 1088 | + // moreChannel: "0", | ||
| 1089 | + // movePermitted: 1, | ||
| 1090 | + // myChannel: "0", | ||
| 1091 | + // name: "天津", | ||
| 1092 | + // num: 33, | ||
| 1093 | + // pageId: 20039, | ||
| 1094 | + // pageType: "", | ||
| 1095 | + // underlineCColor: "" | ||
| 1096 | + // }, | ||
| 1097 | + // { | ||
| 1098 | + // channelId: 2030, | ||
| 1099 | + // channelStrategy: 1, | ||
| 1100 | + // channelStyle: 2, | ||
| 1101 | + // channelType: 2, | ||
| 1102 | + // defaultPermitted: 0, | ||
| 1103 | + // delPermitted: 1, | ||
| 1104 | + // fontCColor: "#FFFFFF", | ||
| 1105 | + // fontColor: "#F9AB99", | ||
| 1106 | + // headlinesOn: 0, | ||
| 1107 | + // homeChannel: "0", | ||
| 1108 | + // iconCUrl: "", | ||
| 1109 | + // iconCUrlSize: "", | ||
| 1110 | + // iconUrl: "", | ||
| 1111 | + // iconUrlSize: "", | ||
| 1112 | + // localChannel: "0", | ||
| 1113 | + // moreChannel: "0", | ||
| 1114 | + // movePermitted: 1, | ||
| 1115 | + // myChannel: "0", | ||
| 1116 | + // name: "河北", | ||
| 1117 | + // num: 34, | ||
| 1118 | + // pageId: 20040, | ||
| 1119 | + // pageType: "", | ||
| 1120 | + // underlineCColor: "" | ||
| 1121 | + // }, | ||
| 1122 | + // { | ||
| 1123 | + // channelId: 2042, | ||
| 1124 | + // channelStrategy: 1, | ||
| 1125 | + // channelStyle: 2, | ||
| 1126 | + // channelType: 2, | ||
| 1127 | + // defaultPermitted: 0, | ||
| 1128 | + // delPermitted: 1, | ||
| 1129 | + // fontCColor: "#FFFFFF", | ||
| 1130 | + // fontColor: "#F9AB99", | ||
| 1131 | + // headlinesOn: 0, | ||
| 1132 | + // homeChannel: "0", | ||
| 1133 | + // iconCUrl: "", | ||
| 1134 | + // iconCUrlSize: "", | ||
| 1135 | + // iconUrl: "", | ||
| 1136 | + // iconUrlSize: "", | ||
| 1137 | + // localChannel: "0", | ||
| 1138 | + // moreChannel: "0", | ||
| 1139 | + // movePermitted: 1, | ||
| 1140 | + // myChannel: "0", | ||
| 1141 | + // name: "河南", | ||
| 1142 | + // num: 35, | ||
| 1143 | + // pageId: 20052, | ||
| 1144 | + // pageType: "", | ||
| 1145 | + // underlineCColor: "" | ||
| 1146 | + // }, | ||
| 1147 | + // { | ||
| 1148 | + // channelId: 2041, | ||
| 1149 | + // channelStrategy: 1, | ||
| 1150 | + // channelStyle: 2, | ||
| 1151 | + // channelType: 2, | ||
| 1152 | + // defaultPermitted: 0, | ||
| 1153 | + // delPermitted: 1, | ||
| 1154 | + // fontCColor: "#FFFFFF", | ||
| 1155 | + // fontColor: "#F9AB99", | ||
| 1156 | + // headlinesOn: 0, | ||
| 1157 | + // homeChannel: "0", | ||
| 1158 | + // iconCUrl: "", | ||
| 1159 | + // iconCUrlSize: "", | ||
| 1160 | + // iconUrl: "", | ||
| 1161 | + // iconUrlSize: "", | ||
| 1162 | + // localChannel: "0", | ||
| 1163 | + // moreChannel: "0", | ||
| 1164 | + // movePermitted: 1, | ||
| 1165 | + // myChannel: "0", | ||
| 1166 | + // name: "山东", | ||
| 1167 | + // num: 36, | ||
| 1168 | + // pageId: 20051, | ||
| 1169 | + // pageType: "", | ||
| 1170 | + // underlineCColor: "" | ||
| 1171 | + // }, | ||
| 1172 | + // { | ||
| 1173 | + // channelId: 2031, | ||
| 1174 | + // channelStrategy: 2, | ||
| 1175 | + // channelStyle: 2, | ||
| 1176 | + // channelType: 2, | ||
| 1177 | + // defaultPermitted: 0, | ||
| 1178 | + // delPermitted: 1, | ||
| 1179 | + // fontCColor: "#FFFFFF", | ||
| 1180 | + // fontColor: "#F9AB99", | ||
| 1181 | + // headlinesOn: 0, | ||
| 1182 | + // homeChannel: "0", | ||
| 1183 | + // iconCUrl: "", | ||
| 1184 | + // iconCUrlSize: "", | ||
| 1185 | + // iconUrl: "", | ||
| 1186 | + // iconUrlSize: "", | ||
| 1187 | + // localChannel: "0", | ||
| 1188 | + // moreChannel: "0", | ||
| 1189 | + // movePermitted: 1, | ||
| 1190 | + // myChannel: "0", | ||
| 1191 | + // name: "山西", | ||
| 1192 | + // num: 37, | ||
| 1193 | + // pageId: 20041, | ||
| 1194 | + // pageType: "", | ||
| 1195 | + // underlineCColor: "" | ||
| 1196 | + // }, | ||
| 1197 | + // { | ||
| 1198 | + // channelId: 2032, | ||
| 1199 | + // channelStrategy: 1, | ||
| 1200 | + // channelStyle: 2, | ||
| 1201 | + // channelType: 2, | ||
| 1202 | + // defaultPermitted: 0, | ||
| 1203 | + // delPermitted: 1, | ||
| 1204 | + // fontCColor: "#FFFFFF", | ||
| 1205 | + // fontColor: "#F9AB99", | ||
| 1206 | + // headlinesOn: 0, | ||
| 1207 | + // homeChannel: "0", | ||
| 1208 | + // iconCUrl: "", | ||
| 1209 | + // iconCUrlSize: "", | ||
| 1210 | + // iconUrl: "", | ||
| 1211 | + // iconUrlSize: "", | ||
| 1212 | + // localChannel: "0", | ||
| 1213 | + // moreChannel: "0", | ||
| 1214 | + // movePermitted: 1, | ||
| 1215 | + // myChannel: "0", | ||
| 1216 | + // name: "内蒙古", | ||
| 1217 | + // num: 38, | ||
| 1218 | + // pageId: 20042, | ||
| 1219 | + // pageType: "", | ||
| 1220 | + // underlineCColor: "" | ||
| 1221 | + // }, | ||
| 1222 | + // { | ||
| 1223 | + // channelId: 2033, | ||
| 1224 | + // channelStrategy: 1, | ||
| 1225 | + // channelStyle: 2, | ||
| 1226 | + // channelType: 2, | ||
| 1227 | + // defaultPermitted: 0, | ||
| 1228 | + // delPermitted: 1, | ||
| 1229 | + // fontCColor: "#FFFFFF", | ||
| 1230 | + // fontColor: "#F9AB99", | ||
| 1231 | + // headlinesOn: 0, | ||
| 1232 | + // homeChannel: "0", | ||
| 1233 | + // iconCUrl: "", | ||
| 1234 | + // iconCUrlSize: "", | ||
| 1235 | + // iconUrl: "", | ||
| 1236 | + // iconUrlSize: "", | ||
| 1237 | + // localChannel: "0", | ||
| 1238 | + // moreChannel: "0", | ||
| 1239 | + // movePermitted: 1, | ||
| 1240 | + // myChannel: "0", | ||
| 1241 | + // name: "辽宁", | ||
| 1242 | + // num: 39, | ||
| 1243 | + // pageId: 20043, | ||
| 1244 | + // pageType: "", | ||
| 1245 | + // underlineCColor: "" | ||
| 1246 | + // }, | ||
| 1247 | + // { | ||
| 1248 | + // channelId: 2034, | ||
| 1249 | + // channelStrategy: 1, | ||
| 1250 | + // channelStyle: 2, | ||
| 1251 | + // channelType: 2, | ||
| 1252 | + // defaultPermitted: 0, | ||
| 1253 | + // delPermitted: 1, | ||
| 1254 | + // fontCColor: "#FFFFFF", | ||
| 1255 | + // fontColor: "#F9AB99", | ||
| 1256 | + // headlinesOn: 0, | ||
| 1257 | + // homeChannel: "0", | ||
| 1258 | + // iconCUrl: "", | ||
| 1259 | + // iconCUrlSize: "", | ||
| 1260 | + // iconUrl: "", | ||
| 1261 | + // iconUrlSize: "", | ||
| 1262 | + // localChannel: "0", | ||
| 1263 | + // moreChannel: "0", | ||
| 1264 | + // movePermitted: 1, | ||
| 1265 | + // myChannel: "0", | ||
| 1266 | + // name: "吉林", | ||
| 1267 | + // num: 40, | ||
| 1268 | + // pageId: 20044, | ||
| 1269 | + // pageType: "", | ||
| 1270 | + // underlineCColor: "" | ||
| 1271 | + // }, | ||
| 1272 | + // { | ||
| 1273 | + // channelId: 2035, | ||
| 1274 | + // channelStrategy: 1, | ||
| 1275 | + // channelStyle: 2, | ||
| 1276 | + // channelType: 2, | ||
| 1277 | + // defaultPermitted: 0, | ||
| 1278 | + // delPermitted: 1, | ||
| 1279 | + // fontCColor: "#FFFFFF", | ||
| 1280 | + // fontColor: "#F9AB99", | ||
| 1281 | + // headlinesOn: 0, | ||
| 1282 | + // homeChannel: "0", | ||
| 1283 | + // iconCUrl: "", | ||
| 1284 | + // iconCUrlSize: "", | ||
| 1285 | + // iconUrl: "", | ||
| 1286 | + // iconUrlSize: "", | ||
| 1287 | + // localChannel: "0", | ||
| 1288 | + // moreChannel: "0", | ||
| 1289 | + // movePermitted: 1, | ||
| 1290 | + // myChannel: "0", | ||
| 1291 | + // name: "黑龙江", | ||
| 1292 | + // num: 41, | ||
| 1293 | + // pageId: 20045, | ||
| 1294 | + // pageType: "", | ||
| 1295 | + // underlineCColor: "" | ||
| 1296 | + // }, | ||
| 1297 | + // { | ||
| 1298 | + // channelId: 2028, | ||
| 1299 | + // channelStrategy: 1, | ||
| 1300 | + // channelStyle: 2, | ||
| 1301 | + // channelType: 2, | ||
| 1302 | + // defaultPermitted: 0, | ||
| 1303 | + // delPermitted: 1, | ||
| 1304 | + // fontCColor: "#FFFFFF", | ||
| 1305 | + // fontColor: "#F9AB99", | ||
| 1306 | + // headlinesOn: 0, | ||
| 1307 | + // homeChannel: "0", | ||
| 1308 | + // iconCUrl: "", | ||
| 1309 | + // iconCUrlSize: "", | ||
| 1310 | + // iconUrl: "", | ||
| 1311 | + // iconUrlSize: "", | ||
| 1312 | + // localChannel: "0", | ||
| 1313 | + // moreChannel: "0", | ||
| 1314 | + // movePermitted: 1, | ||
| 1315 | + // myChannel: "0", | ||
| 1316 | + // name: "上海", | ||
| 1317 | + // num: 42, | ||
| 1318 | + // pageId: 20038, | ||
| 1319 | + // pageType: "", | ||
| 1320 | + // underlineCColor: "" | ||
| 1321 | + // }, | ||
| 1322 | + // { | ||
| 1323 | + // channelId: 2036, | ||
| 1324 | + // channelStrategy: 1, | ||
| 1325 | + // channelStyle: 2, | ||
| 1326 | + // channelType: 2, | ||
| 1327 | + // defaultPermitted: 0, | ||
| 1328 | + // delPermitted: 1, | ||
| 1329 | + // fontCColor: "#FFFFFF", | ||
| 1330 | + // fontColor: "#F9AB99", | ||
| 1331 | + // headlinesOn: 0, | ||
| 1332 | + // homeChannel: "0", | ||
| 1333 | + // iconCUrl: "", | ||
| 1334 | + // iconCUrlSize: "", | ||
| 1335 | + // iconUrl: "", | ||
| 1336 | + // iconUrlSize: "", | ||
| 1337 | + // localChannel: "0", | ||
| 1338 | + // moreChannel: "0", | ||
| 1339 | + // movePermitted: 1, | ||
| 1340 | + // myChannel: "0", | ||
| 1341 | + // name: "江苏", | ||
| 1342 | + // num: 43, | ||
| 1343 | + // pageId: 20046, | ||
| 1344 | + // pageType: "", | ||
| 1345 | + // underlineCColor: "" | ||
| 1346 | + // }, | ||
| 1347 | + // { | ||
| 1348 | + // channelId: 2037, | ||
| 1349 | + // channelStrategy: 1, | ||
| 1350 | + // channelStyle: 2, | ||
| 1351 | + // channelType: 2, | ||
| 1352 | + // defaultPermitted: 0, | ||
| 1353 | + // delPermitted: 1, | ||
| 1354 | + // fontCColor: "#FFFFFF", | ||
| 1355 | + // fontColor: "#F9AB99", | ||
| 1356 | + // headlinesOn: 0, | ||
| 1357 | + // homeChannel: "0", | ||
| 1358 | + // iconCUrl: "", | ||
| 1359 | + // iconCUrlSize: "", | ||
| 1360 | + // iconUrl: "", | ||
| 1361 | + // iconUrlSize: "", | ||
| 1362 | + // localChannel: "0", | ||
| 1363 | + // moreChannel: "0", | ||
| 1364 | + // movePermitted: 1, | ||
| 1365 | + // myChannel: "0", | ||
| 1366 | + // name: "浙江", | ||
| 1367 | + // num: 44, | ||
| 1368 | + // pageId: 20047, | ||
| 1369 | + // pageType: "", | ||
| 1370 | + // underlineCColor: "" | ||
| 1371 | + // }, | ||
| 1372 | + // { | ||
| 1373 | + // channelId: 2038, | ||
| 1374 | + // channelStrategy: 1, | ||
| 1375 | + // channelStyle: 2, | ||
| 1376 | + // channelType: 2, | ||
| 1377 | + // defaultPermitted: 0, | ||
| 1378 | + // delPermitted: 1, | ||
| 1379 | + // fontCColor: "#FFFFFF", | ||
| 1380 | + // fontColor: "#F9AB99", | ||
| 1381 | + // headlinesOn: 0, | ||
| 1382 | + // homeChannel: "0", | ||
| 1383 | + // iconCUrl: "", | ||
| 1384 | + // iconCUrlSize: "", | ||
| 1385 | + // iconUrl: "", | ||
| 1386 | + // iconUrlSize: "", | ||
| 1387 | + // localChannel: "0", | ||
| 1388 | + // moreChannel: "0", | ||
| 1389 | + // movePermitted: 1, | ||
| 1390 | + // myChannel: "0", | ||
| 1391 | + // name: "安徽", | ||
| 1392 | + // num: 45, | ||
| 1393 | + // pageId: 20048, | ||
| 1394 | + // pageType: "", | ||
| 1395 | + // underlineCColor: "" | ||
| 1396 | + // }, | ||
| 1397 | + // { | ||
| 1398 | + // channelId: 2039, | ||
| 1399 | + // channelStrategy: 1, | ||
| 1400 | + // channelStyle: 2, | ||
| 1401 | + // channelType: 2, | ||
| 1402 | + // defaultPermitted: 0, | ||
| 1403 | + // delPermitted: 1, | ||
| 1404 | + // fontCColor: "#FFFFFF", | ||
| 1405 | + // fontColor: "#F9AB99", | ||
| 1406 | + // headlinesOn: 0, | ||
| 1407 | + // homeChannel: "0", | ||
| 1408 | + // iconCUrl: "", | ||
| 1409 | + // iconCUrlSize: "", | ||
| 1410 | + // iconUrl: "", | ||
| 1411 | + // iconUrlSize: "", | ||
| 1412 | + // localChannel: "0", | ||
| 1413 | + // moreChannel: "0", | ||
| 1414 | + // movePermitted: 1, | ||
| 1415 | + // myChannel: "0", | ||
| 1416 | + // name: "福建", | ||
| 1417 | + // num: 46, | ||
| 1418 | + // pageId: 20049, | ||
| 1419 | + // pageType: "", | ||
| 1420 | + // underlineCColor: "" | ||
| 1421 | + // }, | ||
| 1422 | + // { | ||
| 1423 | + // channelId: 2040, | ||
| 1424 | + // channelStrategy: 1, | ||
| 1425 | + // channelStyle: 2, | ||
| 1426 | + // channelType: 2, | ||
| 1427 | + // defaultPermitted: 0, | ||
| 1428 | + // delPermitted: 1, | ||
| 1429 | + // fontCColor: "#FFFFFF", | ||
| 1430 | + // fontColor: "#F9AB99", | ||
| 1431 | + // headlinesOn: 0, | ||
| 1432 | + // homeChannel: "0", | ||
| 1433 | + // iconCUrl: "", | ||
| 1434 | + // iconCUrlSize: "", | ||
| 1435 | + // iconUrl: "", | ||
| 1436 | + // iconUrlSize: "", | ||
| 1437 | + // localChannel: "0", | ||
| 1438 | + // moreChannel: "0", | ||
| 1439 | + // movePermitted: 1, | ||
| 1440 | + // myChannel: "0", | ||
| 1441 | + // name: "江西", | ||
| 1442 | + // num: 47, | ||
| 1443 | + // pageId: 20050, | ||
| 1444 | + // pageType: "", | ||
| 1445 | + // underlineCColor: "" | ||
| 1446 | + // }, | ||
| 1447 | + // { | ||
| 1448 | + // channelId: 2045, | ||
| 1449 | + // channelStrategy: 2, | ||
| 1450 | + // channelStyle: 2, | ||
| 1451 | + // channelType: 2, | ||
| 1452 | + // defaultPermitted: 0, | ||
| 1453 | + // delPermitted: 1, | ||
| 1454 | + // fontCColor: "#FFFFFF", | ||
| 1455 | + // fontColor: "#F9AB99", | ||
| 1456 | + // headlinesOn: 0, | ||
| 1457 | + // homeChannel: "0", | ||
| 1458 | + // iconCUrl: "", | ||
| 1459 | + // iconCUrlSize: "", | ||
| 1460 | + // iconUrl: "", | ||
| 1461 | + // iconUrlSize: "", | ||
| 1462 | + // localChannel: "0", | ||
| 1463 | + // moreChannel: "0", | ||
| 1464 | + // movePermitted: 1, | ||
| 1465 | + // myChannel: "0", | ||
| 1466 | + // name: "广东", | ||
| 1467 | + // num: 48, | ||
| 1468 | + // pageId: 20055, | ||
| 1469 | + // pageType: "", | ||
| 1470 | + // underlineCColor: "" | ||
| 1471 | + // }, | ||
| 1472 | + // { | ||
| 1473 | + // channelId: 2046, | ||
| 1474 | + // channelStrategy: 1, | ||
| 1475 | + // channelStyle: 2, | ||
| 1476 | + // channelType: 2, | ||
| 1477 | + // defaultPermitted: 0, | ||
| 1478 | + // delPermitted: 1, | ||
| 1479 | + // fontCColor: "#FFFFFF", | ||
| 1480 | + // fontColor: "#F9AB99", | ||
| 1481 | + // headlinesOn: 0, | ||
| 1482 | + // homeChannel: "0", | ||
| 1483 | + // iconCUrl: "", | ||
| 1484 | + // iconCUrlSize: "", | ||
| 1485 | + // iconUrl: "", | ||
| 1486 | + // iconUrlSize: "", | ||
| 1487 | + // localChannel: "0", | ||
| 1488 | + // moreChannel: "0", | ||
| 1489 | + // movePermitted: 1, | ||
| 1490 | + // myChannel: "0", | ||
| 1491 | + // name: "广西", | ||
| 1492 | + // num: 49, | ||
| 1493 | + // pageId: 20056, | ||
| 1494 | + // pageType: "", | ||
| 1495 | + // underlineCColor: "" | ||
| 1496 | + // }, | ||
| 1497 | + // { | ||
| 1498 | + // channelId: 2048, | ||
| 1499 | + // channelStrategy: 1, | ||
| 1500 | + // channelStyle: 2, | ||
| 1501 | + // channelType: 2, | ||
| 1502 | + // defaultPermitted: 0, | ||
| 1503 | + // delPermitted: 1, | ||
| 1504 | + // fontCColor: "#FFFFFF", | ||
| 1505 | + // fontColor: "#F9AB99", | ||
| 1506 | + // headlinesOn: 0, | ||
| 1507 | + // homeChannel: "0", | ||
| 1508 | + // iconCUrl: "", | ||
| 1509 | + // iconCUrlSize: "", | ||
| 1510 | + // iconUrl: "", | ||
| 1511 | + // iconUrlSize: "", | ||
| 1512 | + // localChannel: "0", | ||
| 1513 | + // moreChannel: "0", | ||
| 1514 | + // movePermitted: 1, | ||
| 1515 | + // myChannel: "0", | ||
| 1516 | + // name: "重庆", | ||
| 1517 | + // num: 50, | ||
| 1518 | + // pageId: 20058, | ||
| 1519 | + // pageType: "", | ||
| 1520 | + // underlineCColor: "" | ||
| 1521 | + // }, | ||
| 1522 | + // { | ||
| 1523 | + // channelId: 2049, | ||
| 1524 | + // channelStrategy: 1, | ||
| 1525 | + // channelStyle: 2, | ||
| 1526 | + // channelType: 2, | ||
| 1527 | + // defaultPermitted: 0, | ||
| 1528 | + // delPermitted: 1, | ||
| 1529 | + // fontCColor: "#FFFFFF", | ||
| 1530 | + // fontColor: "#F9AB99", | ||
| 1531 | + // headlinesOn: 0, | ||
| 1532 | + // homeChannel: "0", | ||
| 1533 | + // iconCUrl: "", | ||
| 1534 | + // iconCUrlSize: "", | ||
| 1535 | + // iconUrl: "", | ||
| 1536 | + // iconUrlSize: "", | ||
| 1537 | + // localChannel: "0", | ||
| 1538 | + // moreChannel: "0", | ||
| 1539 | + // movePermitted: 1, | ||
| 1540 | + // myChannel: "0", | ||
| 1541 | + // name: "四川", | ||
| 1542 | + // num: 51, | ||
| 1543 | + // pageId: 20059, | ||
| 1544 | + // pageType: "", | ||
| 1545 | + // underlineCColor: "" | ||
| 1546 | + // }, | ||
| 1547 | + // { | ||
| 1548 | + // channelId: 2051, | ||
| 1549 | + // channelStrategy: 1, | ||
| 1550 | + // channelStyle: 2, | ||
| 1551 | + // channelType: 2, | ||
| 1552 | + // defaultPermitted: 0, | ||
| 1553 | + // delPermitted: 1, | ||
| 1554 | + // fontCColor: "#FFFFFF", | ||
| 1555 | + // fontColor: "#F9AB99", | ||
| 1556 | + // headlinesOn: 0, | ||
| 1557 | + // homeChannel: "0", | ||
| 1558 | + // iconCUrl: "", | ||
| 1559 | + // iconCUrlSize: "", | ||
| 1560 | + // iconUrl: "", | ||
| 1561 | + // iconUrlSize: "", | ||
| 1562 | + // localChannel: "0", | ||
| 1563 | + // moreChannel: "0", | ||
| 1564 | + // movePermitted: 1, | ||
| 1565 | + // myChannel: "0", | ||
| 1566 | + // name: "云南", | ||
| 1567 | + // num: 52, | ||
| 1568 | + // pageId: 20061, | ||
| 1569 | + // pageType: "", | ||
| 1570 | + // underlineCColor: "" | ||
| 1571 | + // }, | ||
| 1572 | + // { | ||
| 1573 | + // channelId: 2050, | ||
| 1574 | + // channelStrategy: 1, | ||
| 1575 | + // channelStyle: 2, | ||
| 1576 | + // channelType: 2, | ||
| 1577 | + // defaultPermitted: 0, | ||
| 1578 | + // delPermitted: 1, | ||
| 1579 | + // fontCColor: "#FFFFFF", | ||
| 1580 | + // fontColor: "#F9AB99", | ||
| 1581 | + // headlinesOn: 0, | ||
| 1582 | + // homeChannel: "0", | ||
| 1583 | + // iconCUrl: "", | ||
| 1584 | + // iconCUrlSize: "", | ||
| 1585 | + // iconUrl: "", | ||
| 1586 | + // iconUrlSize: "", | ||
| 1587 | + // localChannel: "0", | ||
| 1588 | + // moreChannel: "0", | ||
| 1589 | + // movePermitted: 1, | ||
| 1590 | + // myChannel: "0", | ||
| 1591 | + // name: "贵州", | ||
| 1592 | + // num: 53, | ||
| 1593 | + // pageId: 20060, | ||
| 1594 | + // pageType: "", | ||
| 1595 | + // underlineCColor: "" | ||
| 1596 | + // }, | ||
| 1597 | + // { | ||
| 1598 | + // channelId: 2044, | ||
| 1599 | + // channelStrategy: 1, | ||
| 1600 | + // channelStyle: 2, | ||
| 1601 | + // channelType: 2, | ||
| 1602 | + // defaultPermitted: 0, | ||
| 1603 | + // delPermitted: 1, | ||
| 1604 | + // fontCColor: "#FFFFFF", | ||
| 1605 | + // fontColor: "#F9AB99", | ||
| 1606 | + // headlinesOn: 0, | ||
| 1607 | + // homeChannel: "0", | ||
| 1608 | + // iconCUrl: "", | ||
| 1609 | + // iconCUrlSize: "", | ||
| 1610 | + // iconUrl: "", | ||
| 1611 | + // iconUrlSize: "", | ||
| 1612 | + // localChannel: "0", | ||
| 1613 | + // moreChannel: "0", | ||
| 1614 | + // movePermitted: 1, | ||
| 1615 | + // myChannel: "0", | ||
| 1616 | + // name: "湖南", | ||
| 1617 | + // num: 54, | ||
| 1618 | + // pageId: 20054, | ||
| 1619 | + // pageType: "", | ||
| 1620 | + // underlineCColor: "" | ||
| 1621 | + // }, | ||
| 1622 | + // { | ||
| 1623 | + // channelId: 2043, | ||
| 1624 | + // channelStrategy: 1, | ||
| 1625 | + // channelStyle: 2, | ||
| 1626 | + // channelType: 2, | ||
| 1627 | + // defaultPermitted: 0, | ||
| 1628 | + // delPermitted: 1, | ||
| 1629 | + // fontCColor: "#FFFFFF", | ||
| 1630 | + // fontColor: "#F9AB99", | ||
| 1631 | + // headlinesOn: 0, | ||
| 1632 | + // homeChannel: "0", | ||
| 1633 | + // iconCUrl: "", | ||
| 1634 | + // iconCUrlSize: "", | ||
| 1635 | + // iconUrl: "", | ||
| 1636 | + // iconUrlSize: "", | ||
| 1637 | + // localChannel: "0", | ||
| 1638 | + // moreChannel: "0", | ||
| 1639 | + // movePermitted: 1, | ||
| 1640 | + // myChannel: "0", | ||
| 1641 | + // name: "湖北", | ||
| 1642 | + // num: 55, | ||
| 1643 | + // pageId: 20053, | ||
| 1644 | + // pageType: "", | ||
| 1645 | + // underlineCColor: "" | ||
| 1646 | + // }, | ||
| 1647 | + // { | ||
| 1648 | + // channelId: 2052, | ||
| 1649 | + // channelStrategy: 2, | ||
| 1650 | + // channelStyle: 2, | ||
| 1651 | + // channelType: 2, | ||
| 1652 | + // defaultPermitted: 0, | ||
| 1653 | + // delPermitted: 1, | ||
| 1654 | + // fontCColor: "#FFFFFF", | ||
| 1655 | + // fontColor: "#F9AB99", | ||
| 1656 | + // headlinesOn: 0, | ||
| 1657 | + // homeChannel: "0", | ||
| 1658 | + // iconCUrl: "", | ||
| 1659 | + // iconCUrlSize: "", | ||
| 1660 | + // iconUrl: "", | ||
| 1661 | + // iconUrlSize: "", | ||
| 1662 | + // localChannel: "0", | ||
| 1663 | + // moreChannel: "0", | ||
| 1664 | + // movePermitted: 1, | ||
| 1665 | + // myChannel: "0", | ||
| 1666 | + // name: "西藏", | ||
| 1667 | + // num: 56, | ||
| 1668 | + // pageId: 20062, | ||
| 1669 | + // pageType: "", | ||
| 1670 | + // underlineCColor: "" | ||
| 1671 | + // }, | ||
| 1672 | + // { | ||
| 1673 | + // channelId: 2057, | ||
| 1674 | + // channelStrategy: 2, | ||
| 1675 | + // channelStyle: 2, | ||
| 1676 | + // channelType: 2, | ||
| 1677 | + // defaultPermitted: 0, | ||
| 1678 | + // delPermitted: 1, | ||
| 1679 | + // fontCColor: "#FFFFFF", | ||
| 1680 | + // fontColor: "#F9AB99", | ||
| 1681 | + // headlinesOn: 0, | ||
| 1682 | + // homeChannel: "0", | ||
| 1683 | + // iconCUrl: "", | ||
| 1684 | + // iconCUrlSize: "", | ||
| 1685 | + // iconUrl: "", | ||
| 1686 | + // iconUrlSize: "", | ||
| 1687 | + // localChannel: "0", | ||
| 1688 | + // moreChannel: "0", | ||
| 1689 | + // movePermitted: 1, | ||
| 1690 | + // myChannel: "0", | ||
| 1691 | + // name: "新疆", | ||
| 1692 | + // num: 57, | ||
| 1693 | + // pageId: 20067, | ||
| 1694 | + // pageType: "", | ||
| 1695 | + // underlineCColor: "" | ||
| 1696 | + // }, | ||
| 1697 | + // { | ||
| 1698 | + // channelId: 2053, | ||
| 1699 | + // channelStrategy: 1, | ||
| 1700 | + // channelStyle: 2, | ||
| 1701 | + // channelType: 2, | ||
| 1702 | + // defaultPermitted: 0, | ||
| 1703 | + // delPermitted: 1, | ||
| 1704 | + // fontCColor: "#FFFFFF", | ||
| 1705 | + // fontColor: "#F9AB99", | ||
| 1706 | + // headlinesOn: 0, | ||
| 1707 | + // homeChannel: "0", | ||
| 1708 | + // iconCUrl: "", | ||
| 1709 | + // iconCUrlSize: "", | ||
| 1710 | + // iconUrl: "", | ||
| 1711 | + // iconUrlSize: "", | ||
| 1712 | + // localChannel: "0", | ||
| 1713 | + // moreChannel: "0", | ||
| 1714 | + // movePermitted: 1, | ||
| 1715 | + // myChannel: "0", | ||
| 1716 | + // name: "陕西", | ||
| 1717 | + // num: 58, | ||
| 1718 | + // pageId: 20063, | ||
| 1719 | + // pageType: "", | ||
| 1720 | + // underlineCColor: "" | ||
| 1721 | + // }, | ||
| 1722 | + // { | ||
| 1723 | + // channelId: 2054, | ||
| 1724 | + // channelStrategy: 1, | ||
| 1725 | + // channelStyle: 2, | ||
| 1726 | + // channelType: 2, | ||
| 1727 | + // defaultPermitted: 0, | ||
| 1728 | + // delPermitted: 1, | ||
| 1729 | + // fontCColor: "#FFFFFF", | ||
| 1730 | + // fontColor: "#F9AB99", | ||
| 1731 | + // headlinesOn: 0, | ||
| 1732 | + // homeChannel: "0", | ||
| 1733 | + // iconCUrl: "", | ||
| 1734 | + // iconCUrlSize: "", | ||
| 1735 | + // iconUrl: "", | ||
| 1736 | + // iconUrlSize: "", | ||
| 1737 | + // localChannel: "0", | ||
| 1738 | + // moreChannel: "0", | ||
| 1739 | + // movePermitted: 1, | ||
| 1740 | + // myChannel: "0", | ||
| 1741 | + // name: "甘肃", | ||
| 1742 | + // num: 59, | ||
| 1743 | + // pageId: 20064, | ||
| 1744 | + // pageType: "", | ||
| 1745 | + // underlineCColor: "" | ||
| 1746 | + // }, | ||
| 1747 | + // { | ||
| 1748 | + // channelId: 2055, | ||
| 1749 | + // channelStrategy: 1, | ||
| 1750 | + // channelStyle: 2, | ||
| 1751 | + // channelType: 2, | ||
| 1752 | + // defaultPermitted: 0, | ||
| 1753 | + // delPermitted: 1, | ||
| 1754 | + // fontCColor: "#FFFFFF", | ||
| 1755 | + // fontColor: "#F9AB99", | ||
| 1756 | + // headlinesOn: 0, | ||
| 1757 | + // homeChannel: "0", | ||
| 1758 | + // iconCUrl: "", | ||
| 1759 | + // iconCUrlSize: "", | ||
| 1760 | + // iconUrl: "", | ||
| 1761 | + // iconUrlSize: "", | ||
| 1762 | + // localChannel: "0", | ||
| 1763 | + // moreChannel: "0", | ||
| 1764 | + // movePermitted: 1, | ||
| 1765 | + // myChannel: "0", | ||
| 1766 | + // name: "青海", | ||
| 1767 | + // num: 60, | ||
| 1768 | + // pageId: 20065, | ||
| 1769 | + // pageType: "", | ||
| 1770 | + // underlineCColor: "" | ||
| 1771 | + // }, | ||
| 1772 | + // { | ||
| 1773 | + // channelId: 2056, | ||
| 1774 | + // channelStrategy: 2, | ||
| 1775 | + // channelStyle: 2, | ||
| 1776 | + // channelType: 2, | ||
| 1777 | + // defaultPermitted: 0, | ||
| 1778 | + // delPermitted: 1, | ||
| 1779 | + // fontCColor: "#FFFFFF", | ||
| 1780 | + // fontColor: "#F9AB99", | ||
| 1781 | + // headlinesOn: 0, | ||
| 1782 | + // homeChannel: "0", | ||
| 1783 | + // iconCUrl: "", | ||
| 1784 | + // iconCUrlSize: "", | ||
| 1785 | + // iconUrl: "", | ||
| 1786 | + // iconUrlSize: "", | ||
| 1787 | + // localChannel: "0", | ||
| 1788 | + // moreChannel: "0", | ||
| 1789 | + // movePermitted: 1, | ||
| 1790 | + // myChannel: "0", | ||
| 1791 | + // name: "宁夏", | ||
| 1792 | + // num: 61, | ||
| 1793 | + // pageId: 20066, | ||
| 1794 | + // pageType: "", | ||
| 1795 | + // underlineCColor: "" | ||
| 1796 | + // }, | ||
| 1797 | + // { | ||
| 1798 | + // channelId: 2047, | ||
| 1799 | + // channelStrategy: 1, | ||
| 1800 | + // channelStyle: 2, | ||
| 1801 | + // channelType: 2, | ||
| 1802 | + // defaultPermitted: 0, | ||
| 1803 | + // delPermitted: 1, | ||
| 1804 | + // fontCColor: "#FFFFFF", | ||
| 1805 | + // fontColor: "#F9AB99", | ||
| 1806 | + // headlinesOn: 0, | ||
| 1807 | + // homeChannel: "0", | ||
| 1808 | + // iconCUrl: "", | ||
| 1809 | + // iconCUrlSize: "", | ||
| 1810 | + // iconUrl: "", | ||
| 1811 | + // iconUrlSize: "", | ||
| 1812 | + // localChannel: "0", | ||
| 1813 | + // moreChannel: "0", | ||
| 1814 | + // movePermitted: 1, | ||
| 1815 | + // myChannel: "0", | ||
| 1816 | + // name: "海南", | ||
| 1817 | + // num: 62, | ||
| 1818 | + // pageId: 20057, | ||
| 1819 | + // pageType: "", | ||
| 1820 | + // underlineCColor: "" | ||
| 1821 | + // } | ||
| 1822 | + // ] | ||
| 1823 | + // @State myChannelList: TopNavDTO [] = [] | ||
| 1824 | + // @State moreChannelList: TopNavDTO [] = [] | ||
| 1825 | + // @State localChannelList: TopNavDTO [] = [] | ||
| 247 | dialogController: CustomDialogController | null = new CustomDialogController({ | 1826 | dialogController: CustomDialogController | null = new CustomDialogController({ |
| 248 | builder: ChannelDialog({ | 1827 | builder: ChannelDialog({ |
| 249 | currentTopNavSelectedIndex: $currentTopNavSelectedIndex, | 1828 | currentTopNavSelectedIndex: $currentTopNavSelectedIndex, |
| 250 | indexSettingArray: $indexSettingArray, | 1829 | indexSettingArray: $indexSettingArray, |
| 251 | myChannelList: $myChannelList, | 1830 | myChannelList: $myChannelList, |
| 252 | moreChannelList: $moreChannelList, | 1831 | moreChannelList: $moreChannelList, |
| 253 | - localChannelList: $localChannelList | 1832 | + localChannelList: $localChannelList, |
| 1833 | + confirm: this.onAccept, | ||
| 1834 | + changeChannelIndex: this.changeChannelIndex | ||
| 254 | }), | 1835 | }), |
| 255 | alignment: DialogAlignment.TopEnd, | 1836 | alignment: DialogAlignment.TopEnd, |
| 256 | customStyle: true, | 1837 | customStyle: true, |
| 257 | }) | 1838 | }) |
| 258 | 1839 | ||
| 259 | - aboutToAppear() { | 1840 | + changeChannelIndex(index1:number, index2:number) { //交换数组中的位置 |
| 1841 | + const temp = this.myChannelList[index1]; | ||
| 1842 | + if (index1 > index2) { | ||
| 1843 | + this.myChannelList.splice(index2, 0, temp); | ||
| 1844 | + this.myChannelList.splice(index1 + 1, 1); | ||
| 1845 | + } else { | ||
| 1846 | + this.myChannelList.splice(index2 + 1, 0, temp); | ||
| 1847 | + this.myChannelList.splice(index1, 1); | ||
| 1848 | + } | ||
| 1849 | + } | ||
| 1850 | + // topNavListHandle() { | ||
| 1851 | + // let defaultMyChannelList: TopNavDTO[] = [] | ||
| 1852 | + // let handledTopNavList = [...this.topNavList] | ||
| 1853 | + // handledTopNavList.sort((a, b) => { | ||
| 1854 | + // return a.num - b.num; | ||
| 1855 | + // }); | ||
| 1856 | + // handledTopNavList.forEach(item => { | ||
| 1857 | + // if (item.defaultPermitted === 1 || item.movePermitted === 0 || item.delPermitted === 0 || item.headlinesOn === 1) { | ||
| 1858 | + // defaultMyChannelList.push(item); | ||
| 1859 | + // } | ||
| 1860 | + // }) | ||
| 1861 | + // defaultMyChannelList.forEach(item => { | ||
| 1862 | + // item.myChannel = '1' | ||
| 1863 | + // if (item.defaultPermitted === 1) { | ||
| 1864 | + // item.homeChannel = '1' | ||
| 1865 | + // } | ||
| 1866 | + // let index = handledTopNavList.findIndex(_item => _item.channelId === item.channelId) | ||
| 1867 | + // if (index !== -1) { | ||
| 1868 | + // handledTopNavList.splice(index, 1) | ||
| 1869 | + // } | ||
| 1870 | + // }) | ||
| 1871 | + // | ||
| 1872 | + // handledTopNavList.unshift(...defaultMyChannelList) | ||
| 1873 | + // handledTopNavList.forEach((item, index) => { | ||
| 1874 | + // if (item.channelType === 2) { | ||
| 1875 | + // item.localChannel = '1' | ||
| 1876 | + // } | ||
| 1877 | + // if (index >= 11) { | ||
| 1878 | + // if (item.channelType === 1) { | ||
| 1879 | + // item.moreChannel = '1' | ||
| 1880 | + // } | ||
| 1881 | + // } else { | ||
| 1882 | + // if (item.channelType === 1 && item.myChannel !== '1') { | ||
| 1883 | + // item.moreChannel = '1' | ||
| 1884 | + // } | ||
| 1885 | + // } | ||
| 1886 | + // | ||
| 1887 | + // if (item.myChannel === '1') { | ||
| 1888 | + // this.myChannelList.push(item) | ||
| 1889 | + // } | ||
| 1890 | + // if (item.moreChannel === '1') { | ||
| 1891 | + // this.moreChannelList.push(item) | ||
| 1892 | + // } | ||
| 1893 | + // if (item.localChannel === '1') { | ||
| 1894 | + // this.localChannelList.push(item) | ||
| 1895 | + // } | ||
| 1896 | + // }) | ||
| 1897 | + // } | ||
| 260 | 1898 | ||
| 1899 | + | ||
| 1900 | + aboutToAppear() { | ||
| 1901 | + // this.topNavListHandle() | ||
| 261 | } | 1902 | } |
| 262 | 1903 | ||
| 263 | aboutToDisappear() { | 1904 | aboutToDisappear() { |
| @@ -270,8 +1911,9 @@ struct ChannelSubscriptionLayout { | @@ -270,8 +1911,9 @@ struct ChannelSubscriptionLayout { | ||
| 270 | .width(18) | 1911 | .width(18) |
| 271 | } | 1912 | } |
| 272 | .width(36) | 1913 | .width(36) |
| 273 | - .height(30) | 1914 | + .height(36) |
| 274 | .justifyContent(FlexAlign.Center) | 1915 | .justifyContent(FlexAlign.Center) |
| 1916 | + .padding({ bottom: 6 }) | ||
| 275 | .backgroundColor('#ffffff') | 1917 | .backgroundColor('#ffffff') |
| 276 | .onClick(() => { | 1918 | .onClick(() => { |
| 277 | if (this.dialogController != null) { | 1919 | if (this.dialogController != null) { |
| @@ -11,6 +11,7 @@ const TAG = 'TopNavigationComponent'; | @@ -11,6 +11,7 @@ const TAG = 'TopNavigationComponent'; | ||
| 11 | */ | 11 | */ |
| 12 | @Component | 12 | @Component |
| 13 | export struct TopNavigationComponent { | 13 | export struct TopNavigationComponent { |
| 14 | + private tabsController: TabsController = new TabsController() | ||
| 14 | @Prop _currentNavIndex?: number; | 15 | @Prop _currentNavIndex?: number; |
| 15 | // 顶导当前选中/焦点下标 | 16 | // 顶导当前选中/焦点下标 |
| 16 | @State currentTopNavSelectedIndex: number = 0; | 17 | @State currentTopNavSelectedIndex: number = 0; |
| @@ -27,6 +28,7 @@ export struct TopNavigationComponent { | @@ -27,6 +28,7 @@ export struct TopNavigationComponent { | ||
| 27 | @State localChannelList: TopNavDTO[] = [] | 28 | @State localChannelList: TopNavDTO[] = [] |
| 28 | readonly MAX_LINE: number = 1; | 29 | readonly MAX_LINE: number = 1; |
| 29 | 30 | ||
| 31 | + //处理接口顶导数据 | ||
| 30 | topNavListHandle() { | 32 | topNavListHandle() { |
| 31 | let defaultMyChannelList: TopNavDTO[] = [] | 33 | let defaultMyChannelList: TopNavDTO[] = [] |
| 32 | let handledTopNavList = [...this.topNavList] | 34 | let handledTopNavList = [...this.topNavList] |
| @@ -76,8 +78,12 @@ export struct TopNavigationComponent { | @@ -76,8 +78,12 @@ export struct TopNavigationComponent { | ||
| 76 | }) | 78 | }) |
| 77 | } | 79 | } |
| 78 | 80 | ||
| 81 | + isBroadcast (item: TopNavDTO) { | ||
| 82 | + return item.name === '播报' | ||
| 83 | + } | ||
| 79 | build() { | 84 | build() { |
| 80 | Column() { | 85 | Column() { |
| 86 | + // 顶部搜索、日报logo、早晚报 | ||
| 81 | RelativeContainer() { | 87 | RelativeContainer() { |
| 82 | Stack({ alignContent: Alignment.Center }) { | 88 | Stack({ alignContent: Alignment.Center }) { |
| 83 | 89 | ||
| @@ -97,7 +103,6 @@ export struct TopNavigationComponent { | @@ -97,7 +103,6 @@ export struct TopNavigationComponent { | ||
| 97 | } | 103 | } |
| 98 | .alignItems(VerticalAlign.Center) | 104 | .alignItems(VerticalAlign.Center) |
| 99 | .justifyContent(FlexAlign.Center) | 105 | .justifyContent(FlexAlign.Center) |
| 100 | - | ||
| 101 | } | 106 | } |
| 102 | .height(30) | 107 | .height(30) |
| 103 | .width(123) | 108 | .width(123) |
| @@ -163,18 +168,20 @@ export struct TopNavigationComponent { | @@ -163,18 +168,20 @@ export struct TopNavigationComponent { | ||
| 163 | .width('100%') | 168 | .width('100%') |
| 164 | .height(40) | 169 | .height(40) |
| 165 | .visibility(this._currentNavIndex == 0 ? Visibility.Visible : Visibility.None) | 170 | .visibility(this._currentNavIndex == 0 ? Visibility.Visible : Visibility.None) |
| 166 | - | 171 | + // 频道分类list |
| 167 | Stack({ alignContent: Alignment.TopEnd }) { | 172 | Stack({ alignContent: Alignment.TopEnd }) { |
| 168 | 173 | ||
| 169 | - Tabs() { | 174 | + Tabs({ controller: this.tabsController }) { |
| 170 | ForEach(this.myChannelList, (navItem: TopNavDTO, index: number) => { | 175 | ForEach(this.myChannelList, (navItem: TopNavDTO, index: number) => { |
| 171 | TabContent() { | 176 | TabContent() { |
| 172 | - PageComponent({ | ||
| 173 | - currentTopNavSelectedIndex: $currentTopNavSelectedIndex, | ||
| 174 | - navIndex: index, | ||
| 175 | - pageId: navItem.pageId + '', | ||
| 176 | - channelId: navItem.channelId + '' | ||
| 177 | - }) | 177 | + if(!this.isBroadcast(navItem)) { |
| 178 | + PageComponent({ | ||
| 179 | + currentTopNavSelectedIndex: $currentTopNavSelectedIndex, | ||
| 180 | + navIndex: index, | ||
| 181 | + pageId: navItem.pageId + '', | ||
| 182 | + channelId: navItem.channelId + '' | ||
| 183 | + }) | ||
| 184 | + } | ||
| 178 | } | 185 | } |
| 179 | .tabBar(this.tabBarBuilder(navItem, index)) | 186 | .tabBar(this.tabBarBuilder(navItem, index)) |
| 180 | }, (navItem: TopNavDTO) => JSON.stringify(navItem)); | 187 | }, (navItem: TopNavDTO) => JSON.stringify(navItem)); |
| @@ -184,15 +191,32 @@ export struct TopNavigationComponent { | @@ -184,15 +191,32 @@ export struct TopNavigationComponent { | ||
| 184 | .vertical(false) | 191 | .vertical(false) |
| 185 | .onChange((index: number) => { | 192 | .onChange((index: number) => { |
| 186 | Logger.info(TAG, `onChange index : ${index}`); | 193 | Logger.info(TAG, `onChange index : ${index}`); |
| 187 | - this.currentTopNavSelectedIndex = index; | 194 | + if(!this.isBroadcast(this.myChannelList[index])) { |
| 195 | + this.currentTopNavSelectedIndex = index; | ||
| 196 | + } else { | ||
| 197 | + // 跳转到播报页面 | ||
| 198 | + let taskAction: Action = { | ||
| 199 | + type: 'JUMP_INNER_NEW_PAGE', | ||
| 200 | + params: { | ||
| 201 | + pageID: 'BroadcastPage', | ||
| 202 | + id: this.myChannelList[index].pageId | ||
| 203 | + } as Params, | ||
| 204 | + }; | ||
| 205 | + WDRouterRule.jumpWithAction(taskAction) | ||
| 206 | + this.tabsController.changeIndex(this.currentTopNavSelectedIndex) | ||
| 207 | + } | ||
| 188 | }) | 208 | }) |
| 189 | - | 209 | + // 分类列表最右侧频道设置 |
| 190 | ChannelSubscriptionLayout({ | 210 | ChannelSubscriptionLayout({ |
| 211 | + changeTab: (index) => { | ||
| 212 | + this.tabsController.changeIndex(index) | ||
| 213 | + }, | ||
| 191 | myChannelList: $myChannelList, | 214 | myChannelList: $myChannelList, |
| 192 | moreChannelList: $moreChannelList, | 215 | moreChannelList: $moreChannelList, |
| 193 | localChannelList: $localChannelList, | 216 | localChannelList: $localChannelList, |
| 194 | currentTopNavSelectedIndex: $currentTopNavSelectedIndex | 217 | currentTopNavSelectedIndex: $currentTopNavSelectedIndex |
| 195 | }) | 218 | }) |
| 219 | + // ChannelSubscriptionLayout() | ||
| 196 | } | 220 | } |
| 197 | 221 | ||
| 198 | } | 222 | } |
| @@ -227,6 +251,7 @@ export struct TopNavigationComponent { | @@ -227,6 +251,7 @@ export struct TopNavigationComponent { | ||
| 227 | bottom: $r('app.float.top_tab_item_padding_bottom') | 251 | bottom: $r('app.float.top_tab_item_padding_bottom') |
| 228 | }) | 252 | }) |
| 229 | .id(`col_tabBar${index}`) | 253 | .id(`col_tabBar${index}`) |
| 254 | + .margin({ right: this.myChannelList.length === index + 1 ? 36 : 0 }) | ||
| 230 | } | 255 | } |
| 231 | 256 | ||
| 232 | aboutToAppear() { | 257 | aboutToAppear() { |
| 1 | import { ToastUtils, Logger } from 'wdKit'; | 1 | import { ToastUtils, Logger } from 'wdKit'; |
| 2 | +import { InputMethodProperty } from 'wdBean'; | ||
| 3 | +import router from '@ohos.router'; | ||
| 4 | +import inputMethod from '@ohos.inputMethod'; | ||
| 2 | 5 | ||
| 3 | export interface OperationItem { | 6 | export interface OperationItem { |
| 4 | icon: Resource; | 7 | icon: Resource; |
| @@ -25,7 +28,6 @@ export struct OperRowListView { | @@ -25,7 +28,6 @@ export struct OperRowListView { | ||
| 25 | { | 28 | { |
| 26 | icon: $r('app.media.ic_collect_uncheck'), | 29 | icon: $r('app.media.ic_collect_uncheck'), |
| 27 | text: "收藏", | 30 | text: "收藏", |
| 28 | - num: 662, | ||
| 29 | }, | 31 | }, |
| 30 | { | 32 | { |
| 31 | icon: $r('app.media.ic_share'), | 33 | icon: $r('app.media.ic_share'), |
| @@ -54,8 +56,8 @@ export struct OperRowListView { | @@ -54,8 +56,8 @@ export struct OperRowListView { | ||
| 54 | }) | 56 | }) |
| 55 | .alignItems(HorizontalAlign.Center) | 57 | .alignItems(HorizontalAlign.Center) |
| 56 | .hoverEffect(HoverEffect.Scale) | 58 | .hoverEffect(HoverEffect.Scale) |
| 57 | - .onClick((event: ClickEvent) => { | ||
| 58 | - ToastUtils.showToast('体验版,本功能暂未开发', 1000); | 59 | + .onClick(() => { |
| 60 | + router.back(); | ||
| 59 | }) | 61 | }) |
| 60 | TextInput({placeholder:'说两句...'}) | 62 | TextInput({placeholder:'说两句...'}) |
| 61 | .placeholderColor('#999999') | 63 | .placeholderColor('#999999') |
| @@ -71,6 +73,9 @@ export struct OperRowListView { | @@ -71,6 +73,9 @@ export struct OperRowListView { | ||
| 71 | .width('61.5%') | 73 | .width('61.5%') |
| 72 | .height(30) | 74 | .height(30) |
| 73 | .borderRadius(0) | 75 | .borderRadius(0) |
| 76 | + .onClick(() => { | ||
| 77 | + this.buildInputMethod() | ||
| 78 | + }) | ||
| 74 | } | 79 | } |
| 75 | .width('45.5%') | 80 | .width('45.5%') |
| 76 | .alignItems(VerticalAlign.Center) | 81 | .alignItems(VerticalAlign.Center) |
| @@ -78,7 +83,7 @@ export struct OperRowListView { | @@ -78,7 +83,7 @@ export struct OperRowListView { | ||
| 78 | Flex({ justifyContent: FlexAlign.SpaceAround, alignItems:ItemAlign.Center }) { | 83 | Flex({ justifyContent: FlexAlign.SpaceAround, alignItems:ItemAlign.Center }) { |
| 79 | ForEach(this.operationList, (item: OperationItem, index: number) => { | 84 | ForEach(this.operationList, (item: OperationItem, index: number) => { |
| 80 | this.buildOperationItem(item, index) | 85 | this.buildOperationItem(item, index) |
| 81 | - }, (item: OperationItem, index: number) => JSON.stringify(item)) | 86 | + }, (item: OperationItem) => JSON.stringify(item)) |
| 82 | } | 87 | } |
| 83 | .width('54.5%') | 88 | .width('54.5%') |
| 84 | } | 89 | } |
| @@ -95,18 +100,84 @@ export struct OperRowListView { | @@ -95,18 +100,84 @@ export struct OperRowListView { | ||
| 95 | @Builder | 100 | @Builder |
| 96 | buildOperationItem(item: OperationItem, index: number) { | 101 | buildOperationItem(item: OperationItem, index: number) { |
| 97 | Column() { | 102 | Column() { |
| 98 | - Image(item.icon) | ||
| 99 | - .width(24) | ||
| 100 | - .height(24) | ||
| 101 | - .aspectRatio(1) | ||
| 102 | - .interpolation(ImageInterpolation.High) | 103 | + RelativeContainer() { |
| 104 | + Row() { | ||
| 105 | + Image(item.icon) | ||
| 106 | + .width(24) | ||
| 107 | + .height(24) | ||
| 108 | + .aspectRatio(1) | ||
| 109 | + .interpolation(ImageInterpolation.High) | ||
| 110 | + } | ||
| 111 | + .alignRules({ | ||
| 112 | + center: { anchor: '__container__', align: VerticalAlign.Center }, | ||
| 113 | + middle: { anchor: '__container__', align: HorizontalAlign.Center } | ||
| 114 | + }) | ||
| 115 | + .id(`e_row1_${index}`) | ||
| 116 | + if(item.num) { | ||
| 117 | + Row() { | ||
| 118 | + Image($r('app.media.corner_mark')) | ||
| 119 | + .width(25) | ||
| 120 | + .height(12) | ||
| 121 | + .interpolation(ImageInterpolation.High) | ||
| 122 | + } | ||
| 123 | + .alignRules({ | ||
| 124 | + top: { anchor: `e_row1_${index}`, align: VerticalAlign.Top }, | ||
| 125 | + left: { anchor: `e_row1_${index}`, align: HorizontalAlign.Center } | ||
| 126 | + }) | ||
| 127 | + .id(`e_row2_${index}`) | ||
| 128 | + | ||
| 129 | + Row() { | ||
| 130 | + Text('99+') | ||
| 131 | + .fontSize(8) | ||
| 132 | + .textAlign(TextAlign.Center) | ||
| 133 | + .fontColor(Color.White) | ||
| 134 | + .lineHeight(12) | ||
| 135 | + } | ||
| 136 | + .alignRules({ | ||
| 137 | + top: { anchor: `e_row2_${index}`, align: VerticalAlign.Top }, | ||
| 138 | + middle: { anchor: `e_row2_${index}`, align: HorizontalAlign.Center } | ||
| 139 | + }) | ||
| 140 | + .id(`e_row3_${index}`) | ||
| 141 | + } | ||
| 142 | + } | ||
| 143 | + .id(`e_icon_${index}`) | ||
| 103 | } | 144 | } |
| 104 | .margin(5) | 145 | .margin(5) |
| 105 | .alignItems(HorizontalAlign.Center) | 146 | .alignItems(HorizontalAlign.Center) |
| 106 | .hoverEffect(HoverEffect.Scale) | 147 | .hoverEffect(HoverEffect.Scale) |
| 107 | - .onClick((event: ClickEvent) => { | 148 | + .onClick(() => { |
| 108 | Logger.info(TAG, `buildOperationItem onClick event index: ${index}`); | 149 | Logger.info(TAG, `buildOperationItem onClick event index: ${index}`); |
| 109 | ToastUtils.showToast('体验版,本功能暂未开发', 1000); | 150 | ToastUtils.showToast('体验版,本功能暂未开发', 1000); |
| 110 | }) | 151 | }) |
| 111 | } | 152 | } |
| 153 | + | ||
| 154 | + /** | ||
| 155 | + * 输入法 | ||
| 156 | + */ | ||
| 157 | + | ||
| 158 | + private buildInputMethod() { | ||
| 159 | + let im = inputMethod.getCurrentInputMethod(); | ||
| 160 | + let prop: InputMethodProperty = { | ||
| 161 | + packageName: im.packageName, | ||
| 162 | + methodId: im.methodId, | ||
| 163 | + name: im.name, | ||
| 164 | + id: im.id, | ||
| 165 | + extra: {} | ||
| 166 | + } | ||
| 167 | + try{ | ||
| 168 | + inputMethod.switchInputMethod(prop, (err, result) => { | ||
| 169 | + if (err !== undefined) { | ||
| 170 | + console.error('Failed to switchInputMethod: ' + JSON.stringify(err)); | ||
| 171 | + return; | ||
| 172 | + } | ||
| 173 | + if (result) { | ||
| 174 | + console.info('Succeeded in switching inputmethod.'); | ||
| 175 | + } else { | ||
| 176 | + console.error('Failed to switchInputMethod.'); | ||
| 177 | + } | ||
| 178 | + }); | ||
| 179 | + } catch(err) { | ||
| 180 | + console.error('Failed to switchInputMethod: ' + JSON.stringify(err)); | ||
| 181 | + } | ||
| 182 | + } | ||
| 112 | } | 183 | } |
| @@ -213,4 +213,29 @@ export class PageRepository { | @@ -213,4 +213,29 @@ export class PageRepository { | ||
| 213 | let headers: HashMap<string, string> = HttpUrlUtils.getCommonHeaders(); | 213 | let headers: HashMap<string, string> = HttpUrlUtils.getCommonHeaders(); |
| 214 | return WDHttp.get<ResponseDTO<CompInfoBean>>(url, headers) | 214 | return WDHttp.get<ResponseDTO<CompInfoBean>>(url, headers) |
| 215 | }; | 215 | }; |
| 216 | -} | ||
| 216 | + | ||
| 217 | + /** | ||
| 218 | + * 获取播报pageInfo | ||
| 219 | + * */ | ||
| 220 | + static fetchBroadcastPageInfo(pageId: string) { | ||
| 221 | + let url = PageRepository.getMorningEveningPageInfoUrl(pageId) | ||
| 222 | + let headers: HashMap<string, string> = HttpUrlUtils.getCommonHeaders(); | ||
| 223 | + return WDHttp.get<ResponseDTO<PageInfoBean>>(url, headers) | ||
| 224 | + }; | ||
| 225 | + | ||
| 226 | + /** | ||
| 227 | + * 获取播报compInfo | ||
| 228 | + * https://pdapis.pdnews.cn/api/rmrb-bff-display-zh/display/zh/c/compInfo | ||
| 229 | + * @param params | ||
| 230 | + * @returns | ||
| 231 | + * */ | ||
| 232 | + static fetchBroadcastCompInfo(pageId: number, groupId: number, refreshTime: string, topicId: | ||
| 233 | + string, channelId: string) { | ||
| 234 | + HttpUrlUtils.hostUrl = HttpUrlUtils.HOST_DEV | ||
| 235 | + let url = HttpUrlUtils.getHost() + HttpUrlUtils.MORNING_EVENING_COMP_INFO_PATH; | ||
| 236 | + url = `${url}?topicId=${topicId}&channelStrategy=2&groupId=${groupId}&refreshTime=${refreshTime}&pageSize=50&recommend=0&pageId=${pageId}&loadStrategy=first_load&pageNum=1&channelId=${channelId}` | ||
| 237 | + Logger.info(TAG, "getMorningEveningCompInfoUrl url = " + url) | ||
| 238 | + let headers: HashMap<string, string> = HttpUrlUtils.getCommonHeaders(); | ||
| 239 | + return WDHttp.get<ResponseDTO<CompInfoBean>>(url, headers) | ||
| 240 | + }; | ||
| 241 | +} |
| 1 | +import { CompInfoBean, PageInfoBean } from 'wdBean/Index'; | ||
| 2 | +import { Logger } from 'wdKit/Index'; | ||
| 3 | +import { ResponseDTO } from 'wdNetwork/Index'; | ||
| 4 | +import { PageRepository } from '../repository/PageRepository'; | ||
| 5 | + | ||
| 6 | +const TAG = 'BroadcastViewModel' | ||
| 7 | + | ||
| 8 | +export class BroadcastViewModel { | ||
| 9 | + static async getBroadcastViewPageInfo(pageId: string): Promise<PageInfoBean> { | ||
| 10 | + return new Promise<PageInfoBean>((success, error) => { | ||
| 11 | + Logger.info(TAG, `getBroadcastViewPageInfo pageInfo start`); | ||
| 12 | + PageRepository.fetchMorningEveningPageInfo(pageId).then((resDTO: ResponseDTO<PageInfoBean>) => { | ||
| 13 | + if (!resDTO || !resDTO.data) { | ||
| 14 | + Logger.error(TAG, 'getBroadcastViewPageInfo then navResDTO is empty'); | ||
| 15 | + error('resDTO is empty'); | ||
| 16 | + return | ||
| 17 | + } | ||
| 18 | + if (resDTO.code != 0) { | ||
| 19 | + Logger.error(TAG, `getBroadcastViewPageInfo then code:${resDTO.code}, message:${resDTO.message}`); | ||
| 20 | + error('resDTO Response Code is failure'); | ||
| 21 | + return | ||
| 22 | + } | ||
| 23 | + // let navResStr = JSON.stringify(navResDTO); | ||
| 24 | + Logger.info(TAG, "getBroadcastViewPageInfo then,navResDTO.timestamp:" + resDTO.timestamp); | ||
| 25 | + success(resDTO.data); | ||
| 26 | + }).catch((err: Error) => { | ||
| 27 | + Logger.error(TAG, `getBroadcastViewPageInfo catch, error.name : ${err.name}, error.message:${err.message}`); | ||
| 28 | + error(err); | ||
| 29 | + }) | ||
| 30 | + }) | ||
| 31 | + } | ||
| 32 | + | ||
| 33 | + // 获取播报组件信息:https://pdapis.pdnews.cn/api/rmrb-bff-display-zh/display/zh/c/compInfo?topicId=& | ||
| 34 | + // channelStrategy=2&groupId=30113&refreshTime=1712023953772&pageSize=50&recommend=0&pageId=21003&loadStrategy=first_load&pageNum=1&channelId=2066 | ||
| 35 | + static async getBroadcastCompInfo(pageId: number, groupId: number, refreshTime: string, topicId: string, channelId: string): Promise<CompInfoBean> { | ||
| 36 | + return new Promise<CompInfoBean>((success, error) => { | ||
| 37 | + Logger.info(TAG, `getMorningEveningCompInfo pageInfo start`); | ||
| 38 | + PageRepository.fetchBroadcastCompInfo(pageId, groupId, refreshTime, topicId, channelId) | ||
| 39 | + .then((resDTO: ResponseDTO<CompInfoBean>) => { | ||
| 40 | + if (!resDTO || !resDTO.data) { | ||
| 41 | + Logger.error(TAG, 'getMorningEveningCompInfo then navResDTO is empty'); | ||
| 42 | + error('resDTO is empty'); | ||
| 43 | + return | ||
| 44 | + } | ||
| 45 | + if (resDTO.code != 0) { | ||
| 46 | + Logger.error(TAG, `getMorningEveningCompInfo then code:${resDTO.code}, message:${resDTO.message}`); | ||
| 47 | + error('resDTO Response Code is failure'); | ||
| 48 | + return | ||
| 49 | + } | ||
| 50 | + // let navResStr = JSON.stringify(navResDTO); | ||
| 51 | + Logger.info(TAG, "getMorningEveningCompInfo then,navResDTO.timestamp:" + resDTO.timestamp); | ||
| 52 | + success(resDTO.data); | ||
| 53 | + }) | ||
| 54 | + .catch((err: Error) => { | ||
| 55 | + Logger.error(TAG, `getMorningEveningCompInfo catch, error.name : ${err.name}, error.message:${err.message}`); | ||
| 56 | + error(err); | ||
| 57 | + }) | ||
| 58 | + }) | ||
| 59 | + } | ||
| 60 | +} |
96.1 KB
1.74 KB
132 Bytes
1.39 KB
19.1 KB
19 KB
495 Bytes
sight_harmony/features/wdComponent/src/main/resources/base/media/icon_arrow_down_black.png
0 → 100644
334 Bytes
sight_harmony/features/wdComponent/src/main/resources/base/media/index_setting_button.png
0 → 100644
1.41 KB
sight_harmony/features/wdComponent/src/main/resources/base/media/index_setting_button_active.png
0 → 100644
1.57 KB
304 Bytes
sight_harmony/features/wdComponent/src/main/resources/base/media/recommend_icon_active.png
0 → 100644
340 Bytes
| @@ -116,6 +116,16 @@ export interface postInteractBrowsOperateParams { | @@ -116,6 +116,16 @@ export interface postInteractBrowsOperateParams { | ||
| 116 | contentList: postInteractBrowsOperateParamsContent[] | 116 | contentList: postInteractBrowsOperateParamsContent[] |
| 117 | } | 117 | } |
| 118 | 118 | ||
| 119 | +export interface postInteractAccentionOperateParams { | ||
| 120 | + attentionUserType: string; | ||
| 121 | + attentionUserId: string; | ||
| 122 | + attentionCreatorId: string; | ||
| 123 | + | ||
| 124 | + // userType: number; | ||
| 125 | + // userId: string; | ||
| 126 | + status: number; | ||
| 127 | +} | ||
| 128 | + | ||
| 119 | export class ContentDetailRequest { | 129 | export class ContentDetailRequest { |
| 120 | static getContentDetailDataMock(context: Context): Promise<ResponseDTO<ContentDetailDTO[]>> { | 130 | static getContentDetailDataMock(context: Context): Promise<ResponseDTO<ContentDetailDTO[]>> { |
| 121 | Logger.info(TAG, `getContentDetailDataMock start`); | 131 | Logger.info(TAG, `getContentDetailDataMock start`); |
| @@ -191,7 +201,7 @@ export class ContentDetailRequest { | @@ -191,7 +201,7 @@ export class ContentDetailRequest { | ||
| 191 | } | 201 | } |
| 192 | 202 | ||
| 193 | /** | 203 | /** |
| 194 | - *用户点赞、取消点赞 | 204 | + * 用户点赞、取消点赞 |
| 195 | * @param params | 205 | * @param params |
| 196 | * @returns | 206 | * @returns |
| 197 | */ | 207 | */ |
| @@ -202,7 +212,7 @@ export class ContentDetailRequest { | @@ -202,7 +212,7 @@ export class ContentDetailRequest { | ||
| 202 | } | 212 | } |
| 203 | 213 | ||
| 204 | /** | 214 | /** |
| 205 | - *用户收藏、取消收藏 | 215 | + * 用户收藏、取消收藏 |
| 206 | * @param params | 216 | * @param params |
| 207 | * @returns | 217 | * @returns |
| 208 | */ | 218 | */ |
| @@ -240,4 +250,13 @@ export class ContentDetailRequest { | @@ -240,4 +250,13 @@ export class ContentDetailRequest { | ||
| 240 | let headers: HashMap<string, string> = HttpUrlUtils.getCommonHeaders(); | 250 | let headers: HashMap<string, string> = HttpUrlUtils.getCommonHeaders(); |
| 241 | return WDHttp.post0(url, params, headers) | 251 | return WDHttp.post0(url, params, headers) |
| 242 | } | 252 | } |
| 253 | + | ||
| 254 | + /** | ||
| 255 | + * 关注号主 | ||
| 256 | + */ | ||
| 257 | + static postInteractAccentionOperate(params: postInteractAccentionOperateParams): Promise<ResponseDTO> { | ||
| 258 | + let url = HttpUrlUtils.getHost() + HttpUrlUtils.INTERACT_ACCENTION_OPERATION | ||
| 259 | + let headers: HashMap<string, string> = HttpUrlUtils.getCommonHeaders(); | ||
| 260 | + return WDHttp.post0(url, params, headers) | ||
| 261 | + } | ||
| 243 | } | 262 | } |
| @@ -37,16 +37,19 @@ export struct DetailPlayShortVideoPage { | @@ -37,16 +37,19 @@ export struct DetailPlayShortVideoPage { | ||
| 37 | if (this.currentIndex != this.index) { | 37 | if (this.currentIndex != this.index) { |
| 38 | this.playerController.pause() | 38 | this.playerController.pause() |
| 39 | 39 | ||
| 40 | - // if (this.index < this.currentIndex - 5 && this.playerController.getPlayer()) { | ||
| 41 | - // this.playerController.release() | ||
| 42 | - // } | 40 | + if (this.index < this.currentIndex - 5 && this.playerController.getPlayer()) { |
| 41 | + this.playerController.release() | ||
| 42 | + } | ||
| 43 | 43 | ||
| 44 | } else { | 44 | } else { |
| 45 | this.queryNewsInfoOfUser() | 45 | this.queryNewsInfoOfUser() |
| 46 | console.log('currentIndex==== ', this.currentIndex) | 46 | console.log('currentIndex==== ', this.currentIndex) |
| 47 | if (!this.playerController.getPlayer()) { | 47 | if (!this.playerController.getPlayer()) { |
| 48 | + console.error('state91111111===', this.contentDetailData?.videoInfo[0]?.videoUrl || '') | ||
| 48 | this.playerController.firstPlay(this.contentDetailData?.videoInfo[0]?.videoUrl || ''); | 49 | this.playerController.firstPlay(this.contentDetailData?.videoInfo[0]?.videoUrl || ''); |
| 50 | + console.error('state91111111===', this.playerController?.getPlayer()?.state) | ||
| 49 | } else { | 51 | } else { |
| 52 | + console.error('state9===', this.playerController?.getPlayer()?.state) | ||
| 50 | this.playerController.play() | 53 | this.playerController.play() |
| 51 | } | 54 | } |
| 52 | 55 | ||
| @@ -103,7 +106,7 @@ export struct DetailPlayShortVideoPage { | @@ -103,7 +106,7 @@ export struct DetailPlayShortVideoPage { | ||
| 103 | } | 106 | } |
| 104 | 107 | ||
| 105 | aboutToAppear() { | 108 | aboutToAppear() { |
| 106 | - console.log('开始设置setContentDetailData', JSON.stringify(this.contentDetailData)) | 109 | + // console.log('开始设置setContentDetailData', JSON.stringify(this.contentDetailData)) |
| 107 | this.videoLandScape = this.contentDetailData?.videoInfo[0]?.videoLandScape | 110 | this.videoLandScape = this.contentDetailData?.videoInfo[0]?.videoLandScape |
| 108 | this.queryNewsInfoOfUser() | 111 | this.queryNewsInfoOfUser() |
| 109 | this.playerController.onCanplay = () => { | 112 | this.playerController.onCanplay = () => { |
| @@ -136,7 +139,8 @@ export struct DetailPlayShortVideoPage { | @@ -136,7 +139,8 @@ export struct DetailPlayShortVideoPage { | ||
| 136 | } | 139 | } |
| 137 | 140 | ||
| 138 | aboutToDisappear(): void { | 141 | aboutToDisappear(): void { |
| 139 | - this.playerController?.pause(); | 142 | + console.log('aboutToDisappear', this.index) |
| 143 | + this.playerController?.release(); | ||
| 140 | // this.playerController.onCanplay = ()={} | 144 | // this.playerController.onCanplay = ()={} |
| 141 | } | 145 | } |
| 142 | 146 | ||
| @@ -153,7 +157,7 @@ export struct DetailPlayShortVideoPage { | @@ -153,7 +157,7 @@ export struct DetailPlayShortVideoPage { | ||
| 153 | WDPlayerRenderView({ | 157 | WDPlayerRenderView({ |
| 154 | playerController: this.playerController, | 158 | playerController: this.playerController, |
| 155 | onLoad: async () => { | 159 | onLoad: async () => { |
| 156 | - console.log('onload==',) | 160 | + // console.log('onload==', this.index) |
| 157 | // if (this.index === 0) { | 161 | // if (this.index === 0) { |
| 158 | this.playerController.firstPlay(this.contentDetailData?.videoInfo[0]?.videoUrl); | 162 | this.playerController.firstPlay(this.contentDetailData?.videoInfo[0]?.videoUrl); |
| 159 | // } | 163 | // } |
| @@ -91,11 +91,8 @@ export struct DetailVideoListPage { | @@ -91,11 +91,8 @@ export struct DetailVideoListPage { | ||
| 91 | if (res.data) { | 91 | if (res.data) { |
| 92 | this.data = this.data.concat(res.data) | 92 | this.data = this.data.concat(res.data) |
| 93 | } | 93 | } |
| 94 | - | ||
| 95 | - | ||
| 96 | - console.log('queryVideoList===', JSON.stringify(this.data)) | 94 | + // console.log('queryVideoList===', JSON.stringify(this.data)) |
| 97 | }) | 95 | }) |
| 98 | - | ||
| 99 | } | 96 | } |
| 100 | 97 | ||
| 101 | build() { | 98 | build() { |
| 1 | -@Entry | 1 | +@Preview |
| 2 | @Component | 2 | @Component |
| 3 | export struct Test { | 3 | export struct Test { |
| 4 | - @Prop currentItem: string = ''; | ||
| 5 | - @Prop @Watch('currentIndexChange') currentIndex: number = 0; | ||
| 6 | - @Prop index: number = 0; | ||
| 7 | - | ||
| 8 | - currentIndexChange() { | ||
| 9 | - console.log('currentIndexChange====', this.currentIndex); | ||
| 10 | - } | ||
| 11 | - | ||
| 12 | build() { | 4 | build() { |
| 13 | Row() { | 5 | Row() { |
| 14 | - Column() { | ||
| 15 | - Text('currentItem: ' + this.currentItem).fontSize(30) | ||
| 16 | - Text('currentIndex: ' + this.currentIndex).fontSize(30) | ||
| 17 | - Text('index: ' + this.index).fontSize(30) | ||
| 18 | - } | 6 | + |
| 7 | + RelativeContainer() { | ||
| 8 | + Image($r('app.media.ic_like_uncheck')) | ||
| 9 | + .width('100%') | ||
| 10 | + .borderRadius(24) | ||
| 11 | + .aspectRatio(1) | ||
| 12 | + .border({ width: 1, color: Color.White, style: BorderStyle.Solid }) | ||
| 13 | + .alignRules({ | ||
| 14 | + top: { anchor: "__container__", align: VerticalAlign.Top }, | ||
| 15 | + left: { anchor: "__container__", align: HorizontalAlign.Start } | ||
| 16 | + }) | ||
| 17 | + .id("row1") | ||
| 18 | + | ||
| 19 | + Image($r('app.media.ic_add')) | ||
| 20 | + .width(24) | ||
| 21 | + .borderRadius(12) | ||
| 22 | + .alignRules({ | ||
| 23 | + left: { anchor: "__container__", align: HorizontalAlign.Center }, | ||
| 24 | + bottom: { anchor: "__container__", align: VerticalAlign.Bottom }, | ||
| 25 | + }) | ||
| 26 | + .margin({ left: -12 }) | ||
| 27 | + .id("row2") | ||
| 28 | + }.height('auto') | ||
| 29 | + | ||
| 19 | } | 30 | } |
| 31 | + .height(58) | ||
| 32 | + .width(48) | ||
| 33 | + .backgroundColor(Color.Black) | ||
| 34 | + | ||
| 20 | } | 35 | } |
| 21 | } | 36 | } |
| @@ -5,7 +5,8 @@ import { | @@ -5,7 +5,8 @@ import { | ||
| 5 | ContentDetailRequest, | 5 | ContentDetailRequest, |
| 6 | contentListParams, | 6 | contentListParams, |
| 7 | postExecuteCollectRecordParams, | 7 | postExecuteCollectRecordParams, |
| 8 | - postExecuteLikeParams | 8 | + postExecuteLikeParams, |
| 9 | + postInteractAccentionOperateParams | ||
| 9 | } from 'wdDetailPlayApi/src/main/ets/request/ContentDetailRequest'; | 10 | } from 'wdDetailPlayApi/src/main/ets/request/ContentDetailRequest'; |
| 10 | import { ToastUtils } from 'wdKit'; | 11 | import { ToastUtils } from 'wdKit'; |
| 11 | import { HttpUrlUtils } from 'wdNetwork/Index'; | 12 | import { HttpUrlUtils } from 'wdNetwork/Index'; |
| @@ -30,6 +31,7 @@ export struct OperationListView { | @@ -30,6 +31,7 @@ export struct OperationListView { | ||
| 30 | @Consume interactData: InteractDataDTO | 31 | @Consume interactData: InteractDataDTO |
| 31 | @Consume contentDetailData: ContentDetailDTO | 32 | @Consume contentDetailData: ContentDetailDTO |
| 32 | @Consume newsStatusOfUser: batchLikeAndCollectResult | 33 | @Consume newsStatusOfUser: batchLikeAndCollectResult |
| 34 | + @Consume followStatus: string | ||
| 33 | @State operationList: OperationItem[] = [ | 35 | @State operationList: OperationItem[] = [ |
| 34 | { | 36 | { |
| 35 | icon: $r('app.media.ic_like_uncheck'), | 37 | icon: $r('app.media.ic_like_uncheck'), |
| @@ -128,30 +130,73 @@ export struct OperationListView { | @@ -128,30 +130,73 @@ export struct OperationListView { | ||
| 128 | }) | 130 | }) |
| 129 | } | 131 | } |
| 130 | 132 | ||
| 131 | - build() { | 133 | + getImgUrl() { |
| 134 | + return this.contentDetailData?.rmhInfo?.rmhHeadUrl || this.contentDetailData?.userInfo?.userHeadUrl | ||
| 135 | + } | ||
| 132 | 136 | ||
| 133 | - Column() { | ||
| 134 | - this.buildUserComp() | ||
| 135 | - ForEach(this.operationList, (item: OperationItem, index: number) => { | ||
| 136 | - this.buildOperationItem(item, index) | ||
| 137 | - }, (item: OperationItem, index: number) => JSON.stringify(item)) | 137 | + /** |
| 138 | + * 关注号主 | ||
| 139 | + */ | ||
| 140 | + handleAccention() { | ||
| 141 | + // 未登录,跳转登录 | ||
| 142 | + if (!HttpUrlUtils.getUserId()) { | ||
| 143 | + WDRouterRule.jumpWithPage(WDRouterPage.loginPage) | ||
| 144 | + return | ||
| 138 | } | 145 | } |
| 139 | - .width(48) | ||
| 140 | - } | ||
| 141 | 146 | ||
| 142 | - getImgUrl() { | ||
| 143 | - return this.contentDetailData?.rmhInfo?.rmhHeadUrl || this.contentDetailData?.userInfo?.userHeadUrl | 147 | + const params2: postInteractAccentionOperateParams = { |
| 148 | + attentionUserType: this.contentDetailData?.rmhInfo?.userType || '', //被关注用户类型(1 普通用户 2 视频号 3 矩阵号) | ||
| 149 | + attentionUserId: this.contentDetailData?.rmhInfo?.userId || '', // 被关注用户号主id | ||
| 150 | + attentionCreatorId: this.contentDetailData?.rmhInfo?.rmhId || '', // 被关注用户号主id | ||
| 151 | + // userType: 1, | ||
| 152 | + // userId: '1', | ||
| 153 | + status: 1, | ||
| 154 | + } | ||
| 155 | + ContentDetailRequest.postInteractAccentionOperate(params2).then(res => { | ||
| 156 | + console.log('关注号主==', JSON.stringify(res.data)) | ||
| 157 | + if (this.followStatus == '1') { | ||
| 158 | + this.followStatus = '0' | ||
| 159 | + } else { | ||
| 160 | + this.followStatus = '1' | ||
| 161 | + } | ||
| 162 | + }) | ||
| 144 | } | 163 | } |
| 145 | 164 | ||
| 146 | @Builder | 165 | @Builder |
| 147 | buildUserComp() { | 166 | buildUserComp() { |
| 148 | Column() { | 167 | Column() { |
| 149 | if (this.getImgUrl()) { | 168 | if (this.getImgUrl()) { |
| 150 | - Image(this.getImgUrl()) | ||
| 151 | - .width('100%') | ||
| 152 | - .borderRadius(24) | ||
| 153 | - .aspectRatio(1) | ||
| 154 | - .border({ width: 1, color: Color.White, style: BorderStyle.Solid }) | 169 | + RelativeContainer() { |
| 170 | + Image(this.getImgUrl()) | ||
| 171 | + .width('100%') | ||
| 172 | + .borderRadius(24) | ||
| 173 | + .aspectRatio(1) | ||
| 174 | + .border({ width: 1, color: Color.White, style: BorderStyle.Solid }) | ||
| 175 | + .alignRules({ | ||
| 176 | + top: { anchor: "__container__", align: VerticalAlign.Top }, | ||
| 177 | + left: { anchor: "__container__", align: HorizontalAlign.Start } | ||
| 178 | + }) | ||
| 179 | + .id("row1") | ||
| 180 | + .onClick(() => { | ||
| 181 | + // 号主页 | ||
| 182 | + }) | ||
| 183 | + if (this.followStatus == '0') { | ||
| 184 | + Image($r('app.media.ic_add')) | ||
| 185 | + .width(24) | ||
| 186 | + .borderRadius(12) | ||
| 187 | + .alignRules({ | ||
| 188 | + left: { anchor: "__container__", align: HorizontalAlign.Center }, | ||
| 189 | + bottom: { anchor: "__container__", align: VerticalAlign.Bottom }, | ||
| 190 | + }) | ||
| 191 | + .margin({ left: -12 }) | ||
| 192 | + .id("row2") | ||
| 193 | + .onClick(() => { | ||
| 194 | + // 关注 | ||
| 195 | + this.handleAccention() | ||
| 196 | + }) | ||
| 197 | + } | ||
| 198 | + | ||
| 199 | + }.height(60) | ||
| 155 | } | 200 | } |
| 156 | }.margin({ bottom: 30 }) | 201 | }.margin({ bottom: 30 }) |
| 157 | } | 202 | } |
| @@ -160,7 +205,7 @@ export struct OperationListView { | @@ -160,7 +205,7 @@ export struct OperationListView { | ||
| 160 | buildOperationItem(item: OperationItem, index: number) { | 205 | buildOperationItem(item: OperationItem, index: number) { |
| 161 | Column() { | 206 | Column() { |
| 162 | if (item.text === '赞') { | 207 | if (item.text === '赞') { |
| 163 | - Image(this.newsStatusOfUser?.likeStatus == '0' ? item.icon : item.icon_check) | 208 | + Image(this.newsStatusOfUser?.likeStatus == '1' ? item.icon_check : item.icon) |
| 164 | .width(32) | 209 | .width(32) |
| 165 | .aspectRatio(1) | 210 | .aspectRatio(1) |
| 166 | .onClick(() => { | 211 | .onClick(() => { |
| @@ -175,7 +220,7 @@ export struct OperationListView { | @@ -175,7 +220,7 @@ export struct OperationListView { | ||
| 175 | .maxLines(1) | 220 | .maxLines(1) |
| 176 | .textOverflow({ overflow: TextOverflow.Ellipsis }) | 221 | .textOverflow({ overflow: TextOverflow.Ellipsis }) |
| 177 | } else if (item.text === '收藏') { | 222 | } else if (item.text === '收藏') { |
| 178 | - Image(this.newsStatusOfUser?.collectStatus == 0 ? item.icon : item.icon_check) | 223 | + Image(this.newsStatusOfUser?.collectStatus == 1 ? item.icon_check : item.icon) |
| 179 | .width(32) | 224 | .width(32) |
| 180 | .aspectRatio(1) | 225 | .aspectRatio(1) |
| 181 | .onClick(() => { | 226 | .onClick(() => { |
| @@ -193,6 +238,9 @@ export struct OperationListView { | @@ -193,6 +238,9 @@ export struct OperationListView { | ||
| 193 | Image(item.icon) | 238 | Image(item.icon) |
| 194 | .width(32) | 239 | .width(32) |
| 195 | .aspectRatio(1) | 240 | .aspectRatio(1) |
| 241 | + .onClick((event: ClickEvent) => { | ||
| 242 | + ToastUtils.showToast('评论为公共方法,待开发', 1000); | ||
| 243 | + }) | ||
| 196 | Text(this.interactData?.commentNum ? (this.interactData.commentNum + '') : item.text) | 244 | Text(this.interactData?.commentNum ? (this.interactData.commentNum + '') : item.text) |
| 197 | .width('100%')// .margin({ top: 4, left: 6, right: 6 })// .backgroundColor(Color.Brown) | 245 | .width('100%')// .margin({ top: 4, left: 6, right: 6 })// .backgroundColor(Color.Brown) |
| 198 | .fontWeight(500) | 246 | .fontWeight(500) |
| @@ -205,6 +253,9 @@ export struct OperationListView { | @@ -205,6 +253,9 @@ export struct OperationListView { | ||
| 205 | Image(item.icon) | 253 | Image(item.icon) |
| 206 | .width(32) | 254 | .width(32) |
| 207 | .aspectRatio(1) | 255 | .aspectRatio(1) |
| 256 | + .onClick((event: ClickEvent) => { | ||
| 257 | + ToastUtils.showToast('分享为公共方法,待开发', 1000); | ||
| 258 | + }) | ||
| 208 | Text(item.text) | 259 | Text(item.text) |
| 209 | .width('100%')// .margin({ top: 4, left: 6, right: 6 })// .backgroundColor(Color.Brown) | 260 | .width('100%')// .margin({ top: 4, left: 6, right: 6 })// .backgroundColor(Color.Brown) |
| 210 | .fontWeight(500) | 261 | .fontWeight(500) |
| @@ -216,15 +267,20 @@ export struct OperationListView { | @@ -216,15 +267,20 @@ export struct OperationListView { | ||
| 216 | } | 267 | } |
| 217 | 268 | ||
| 218 | } | 269 | } |
| 219 | - .width(32) | 270 | + // .width(48) |
| 220 | .margin({ bottom: 20 }) | 271 | .margin({ bottom: 20 }) |
| 221 | - // .backgroundColor(Color.Black) | ||
| 222 | .alignItems(HorizontalAlign.Center) | 272 | .alignItems(HorizontalAlign.Center) |
| 223 | .hoverEffect(HoverEffect.Scale) | 273 | .hoverEffect(HoverEffect.Scale) |
| 224 | 274 | ||
| 225 | - // .onClick((event: ClickEvent) => { | ||
| 226 | - // console.info(TAG, `buildOperationItem onClick event index: ${index}`); | ||
| 227 | - // // ToastUtils.showToast('体验版,本功能暂未开发', 1000); | ||
| 228 | - // }) | 275 | + } |
| 276 | + | ||
| 277 | + build() { | ||
| 278 | + Column() { | ||
| 279 | + this.buildUserComp() | ||
| 280 | + ForEach(this.operationList, (item: OperationItem, index: number) => { | ||
| 281 | + this.buildOperationItem(item, index) | ||
| 282 | + }, (item: OperationItem, index: number) => JSON.stringify(item)) | ||
| 283 | + } | ||
| 284 | + .width(48) | ||
| 229 | } | 285 | } |
| 230 | } | 286 | } |
| @@ -2,6 +2,7 @@ import media from '@ohos.multimedia.media'; | @@ -2,6 +2,7 @@ import media from '@ohos.multimedia.media'; | ||
| 2 | import prompt from '@ohos.promptAction'; | 2 | import prompt from '@ohos.promptAction'; |
| 3 | import { Logger } from '../utils/Logger'; | 3 | import { Logger } from '../utils/Logger'; |
| 4 | import { PlayerConstants, AVPlayerStatus, Events } from '../constants/PlayerConstants'; | 4 | import { PlayerConstants, AVPlayerStatus, Events } from '../constants/PlayerConstants'; |
| 5 | +import { BusinessError } from '@ohos.base'; | ||
| 5 | 6 | ||
| 6 | @Observed | 7 | @Observed |
| 7 | export class WDPlayerController { | 8 | export class WDPlayerController { |
| @@ -44,7 +45,10 @@ export class WDPlayerController { | @@ -44,7 +45,10 @@ export class WDPlayerController { | ||
| 44 | Logger.error('[PlayVideoModel] createAvPlayer fail!'); | 45 | Logger.error('[PlayVideoModel] createAvPlayer fail!'); |
| 45 | reject(); | 46 | reject(); |
| 46 | } | 47 | } |
| 48 | + }).catch((error: BusinessError) => { | ||
| 49 | + console.error(`AVPlayer catchCallback, error message:${error.message}`); | ||
| 47 | }); | 50 | }); |
| 51 | + ; | ||
| 48 | }); | 52 | }); |
| 49 | } | 53 | } |
| 50 | 54 |
| 1 | +import { BroadcastPageComponent } from 'wdComponent'; | ||
| 2 | +import { Logger } from 'wdKit'; | ||
| 3 | + | ||
| 4 | +const TAG = 'BroadcastPageComponent'; | ||
| 5 | + | ||
| 6 | +@Entry | ||
| 7 | +@Component | ||
| 8 | +struct BroadcastPage { | ||
| 9 | + build() { | ||
| 10 | + Column() { | ||
| 11 | + BroadcastPageComponent() | ||
| 12 | + } | ||
| 13 | + } | ||
| 14 | + | ||
| 15 | + pageTransition() { | ||
| 16 | + // 定义页面进入时的效果,从底侧滑入 | ||
| 17 | + PageTransitionEnter({ type: RouteType.None, duration: 300 }) | ||
| 18 | + .slide(SlideEffect.Bottom) | ||
| 19 | + // 定义页面退出时的效果,向底侧滑出 | ||
| 20 | + PageTransitionExit({ type: RouteType.None, duration: 300 }) | ||
| 21 | + .slide(SlideEffect.Bottom) | ||
| 22 | + } | ||
| 23 | + | ||
| 24 | + aboutToAppear() { | ||
| 25 | + Logger.info(TAG, 'aboutToAppear'); | ||
| 26 | + } | ||
| 27 | + | ||
| 28 | + aboutToDisappear() { | ||
| 29 | + Logger.info(TAG, 'aboutToDisappear'); | ||
| 30 | + } | ||
| 31 | + | ||
| 32 | + onPageShow() { | ||
| 33 | + Logger.info(TAG, 'onPageShow'); | ||
| 34 | + } | ||
| 35 | + | ||
| 36 | + onPageHide() { | ||
| 37 | + Logger.info(TAG, 'onPageHide'); | ||
| 38 | + } | ||
| 39 | + | ||
| 40 | + onBackPress() { | ||
| 41 | + Logger.info(TAG, 'onBackPress'); | ||
| 42 | + } | ||
| 43 | +} |
| @@ -9,6 +9,7 @@ | @@ -9,6 +9,7 @@ | ||
| 9 | "pages/detail/MultiPictureDetailPage", | 9 | "pages/detail/MultiPictureDetailPage", |
| 10 | "pages/launchPage/PrivacyPage", | 10 | "pages/launchPage/PrivacyPage", |
| 11 | "pages/launchPage/LaunchPage", | 11 | "pages/launchPage/LaunchPage", |
| 12 | - "pages/launchPage/LaunchAdvertisingPage" | 12 | + "pages/launchPage/LaunchAdvertisingPage", |
| 13 | + "pages/broadcast/BroadcastPage" | ||
| 13 | ] | 14 | ] |
| 14 | } | 15 | } |
-
Please register or login to post a comment