wangliang_wd

Merge branch 'main' of http://192.168.1.42/developOne/harmonyPool into main

* 'main' of http://192.168.1.42/developOne/harmonyPool:
  音乐详情-播放/暂停音乐
  播报日期展示更新
  频道订阅拖拽
  添加跳转到播报页面的逻辑
  频道中”播报“添加跳转到播报页面的逻辑
  频道订阅弹窗 tab切换联动
  播报页面开发
  播放器创建与销毁
  多图(图集)详情页评论、点赞增加角标,返回上一页,输入法开发部分
  音乐详情-联调接口引入数据,创建音频播放实例
  视频详情页修改
  图卡集样式优化
  早晚报 UI微调;早晚报走测试环境
  更改
  tab数据处理
  多图(图集)详情页评论点赞组件样式修改
  视频详情页修改
  多图(图集)详情页评论点赞组件开发
Showing 55 changed files with 3500 additions and 585 deletions

Too many changes to show.

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

  1 +<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" fill="none" version="1.1" width="24" height="24" viewBox="0 0 24 24"><g style="opacity:0.20000000298023224;"><g><path d="M6.29805,13.2927L19.701900000000002,20.8323C19.8353,20.9073,20,20.811,20,20.658L20,3.34197C20,3.189004,19.8353,3.0926614,19.701900000000002,3.167654L6.29805,10.70735C6.1647300000000005,10.78234,6,10.686,6,10.53303L6,3.2C6,3.0895431,5.9104600000000005,3,5.8,3L4.2,3C4.0895431,3,4,3.0895431,4,3.2L4,20.6764C4,20.8251,4.156463,20.9218,4.289443,20.8553L5.8894400000000005,20.0553C5.9572,20.0214,6,19.9521,6,19.8764L6,13.467C6,13.314,6.1647300000000005,13.2177,6.29805,13.2927" fill-rule="evenodd" fill="#4D5258" fill-opacity="1"/></g></g></svg>
  1 +<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1712047709053" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="11870" width="28" height="28" xmlns:xlink="http://www.w3.org/1999/xlink"><path d="M878.885769 568.138291c0 201.397023-163.248995 364.646017-364.646017 364.646017S149.485359 769.535314 149.485359 568.138291c0-192.076766 148.582234-349.076131 336.901997-363.309391 0-0.4335-0.252875-0.903126-0.252875-1.408876V147.353983h-112.168207c-15.497636 0-28.033021-12.535384-28.033021-28.105271 0-15.497636 12.535384-28.033021 28.033021-28.03302h280.51083c15.461511 0 28.105271 12.535384 28.105271 28.03302 0 15.569886-12.643759 28.105271-28.105271 28.105271h-112.168207V203.383899c0 0.541875-0.252875 0.975376-0.252875 1.408876 188.247513 14.269385 336.829747 171.26875 336.829747 363.345516zM514.239752 259.52219c-170.437875 0-308.616101 138.142101-308.616101 308.616101s138.142101 308.616101 308.616101 308.616101c170.365625 0 308.507726-138.142101 308.507726-308.616101s-138.142101-308.616101-308.507726-308.616101z m0 392.787413c-46.529034 0-84.171312-37.714528-84.171312-84.171312 0-36.558527 23.481267-67.445424 56.029916-79.005433V343.693502c0-15.497636 12.535384-28.033021 28.105271-28.033021 15.497636 0 28.033021 12.535384 28.03302 28.033021v145.439356c32.657024 11.560008 56.138291 42.446906 56.138291 79.005433 0 46.456784-37.714528 84.171312-84.135186 84.171312z" fill="#4D5258" p-id="11871"></path></svg>
  1 +<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" fill="none" version="1.1" width="24" height="24" viewBox="0 0 24 24"><defs><clipPath id="master_svg0_13448_089636"><rect x="0" y="0" width="24" height="24" rx="0"/></clipPath></defs><g style="opacity:0.20000000298023224;" clip-path="url(#master_svg0_13448_089636)"><g><path d="M10.67639,4L3.2,4C3.0895431,4,3,4.0895431,3,4.2L3,20.8C3,20.9105,3.0895431,21,3.2,21L20.8,21C20.9105,21,21,20.9105,21,20.8L21,5.12361C21,5.04785,20.9572,4.9786,20.8894,4.944721L19.2894,4.144721C19.1565,4.0782313,19,4.17493,19,4.323607L19,19L5,19L5,6L9.87639,6C9.95215,6,10.0214,5.9572,10.05528,5.8894400000000005L10.85528,4.289443C10.92177,4.156463,10.82507,4,10.67639,4" fill-rule="evenodd" fill="#4D5258" fill-opacity="1"/></g><g><path d="M11.5,3.0706476L11.5,6.52935C11.5,6.56044,11.5339189,6.57965,11.5605798,6.56365L14.44283,4.8343C14.46873,4.81876,14.46873,4.78124,14.44283,4.7657L11.5605798,3.0363479C11.5339189,3.0203513,11.5,3.0395558,11.5,3.0706476" fill-rule="evenodd" fill="#4D5258" fill-opacity="1"/></g><g><path d="M15,3.0706476L15,6.52935C15,6.56044,15.0339189,6.57965,15.0605798,6.56365L17.94283,4.8343C17.96873,4.81876,17.96873,4.78124,17.94283,4.7657L15.0605798,3.0363479C15.0339189,3.0203513,15,3.0395558,15,3.0706476" fill-rule="evenodd" fill="#4D5258" fill-opacity="1"/></g><g><path d="M8.916,11.64L8.916,16L9.964,16L9.964,10.48L8.916,10.48L7.9879999999999995,11.176L7.9879999999999995,12.312000000000001L8.916,11.64ZM10.788,14.864L10.788,16L11.9,16L11.9,14.864L10.788,14.864ZM13.008,15.612C13.27725,15.9294,13.692,16.0881,14.251999999999999,16.088C14.812000000000001,16.088,15.22663,15.928,15.496,15.608C15.76525,15.2881,15.9,14.81338,15.9,14.184L15.9,12.232C15.9,11.623999999999999,15.76525,11.16537,15.496,10.856C15.22663,10.54675,14.812000000000001,10.392,14.251999999999999,10.392C13.71325,10.392,13.304,10.548,13.024000000000001,10.86C12.744,11.172,12.604,11.62937,12.604,12.232L12.604,14.184C12.604,14.81875,12.73863,15.2948,13.008,15.612ZM14.728,14.932C14.64525,15.0947,14.48663,15.176,14.251999999999999,15.176C14.02262,15.176,13.866620000000001,15.0947,13.783999999999999,14.932C13.70125,14.76937,13.66,14.49075,13.66,14.096L13.66,12.384C13.66,11.989370000000001,13.7,11.712,13.780000000000001,11.552C13.86,11.392,14.01725,11.312000000000001,14.251999999999999,11.312000000000001C14.48663,11.312000000000001,14.64525,11.392,14.728,11.552C14.81063,11.712,14.852,11.989370000000001,14.852,12.384L14.852,14.096C14.852,14.49075,14.81063,14.76937,14.728,14.932Z" fill="#4D5258" fill-opacity="1"/></g></g></svg>
  1 +<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" fill="none" version="1.1" width="24" height="24" viewBox="0 0 24 24"><g style="opacity:0.20000000298023224;"><g><path d="M17.701900000000002,13.2927L4.298053,20.8323C4.164731,20.9073,4,20.811,4,20.658L4,3.34197C4,3.189004,4.164731,3.0926614,4.298052,3.167654L17.701900000000002,10.70735C17.8353,10.78234,18,10.686,18,10.53303L18,3.2C18,3.0895431,18.0895,3,18.2,3L19.8,3C19.9105,3,20,3.0895431,20,3.2L20,20.6764C20,20.8251,19.8435,20.9218,19.7106,20.8553L18.110599999999998,20.0553C18.0428,20.0214,18,19.9521,18,19.8764L18,13.467C18,13.314,17.8353,13.2177,17.701900000000002,13.2927" fill-rule="evenodd" fill="#4D5258" fill-opacity="1"/></g></g></svg>
  1 +<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" fill="none" version="1.1" width="28" height="28" viewBox="0 0 28 28"><g style="opacity:0.20000000298023224;"><g><path d="M3.5,4.31780565625L3.5,6.18447265625Q3.5,6.2308826562499995,3.5177614,6.27376265625Q3.5355229,6.31664265625,3.5683417,6.34946265625Q3.601161,6.38228265625,3.644041,6.40004265625Q3.68692,6.41780265625,3.733333,6.41780265625L24.2667,6.41780265625Q24.3131,6.41780265625,24.356,6.40004265625Q24.3988,6.38228265625,24.4317,6.34946265625Q24.4645,6.31664265625,24.4822,6.27376265625Q24.5,6.2308826562499995,24.5,6.18447265625L24.5,4.31780565625Q24.5,4.27139265625,24.4822,4.22851365625Q24.4645,4.18563365625,24.4317,4.15281435625Q24.3988,4.11999555625,24.356,4.10223405625Q24.3131,4.08447265625,24.2667,4.08447265625L3.733333,4.08447265625Q3.68692,4.08447265625,3.644041,4.10223405625Q3.601161,4.11999555625,3.5683417,4.15281435625Q3.5355229,4.18563365625,3.5177614,4.22851365625Q3.5,4.27139265625,3.5,4.31780565625ZM10.20878,13.80699265625L3.862763,9.57631265625C3.707701,9.47294265625,3.5,9.58410265625,3.5,9.77046265625L3.5,18.23177265625C3.5,18.41817265625,3.707701,18.52937265625,3.862763,18.42597265625L10.20878,14.19527265625C10.34732,14.10297265625,10.34732,13.89935265625,10.20878,13.80699265625ZM24.2667,12.83349265625L13.5609,12.83349265625C13.47249,12.83349265625,13.3917,12.88343265625,13.35217,12.96248265625L12.41884,14.82917265625C12.34127,14.98427265625,12.45409,15.16687265625,12.62754,15.16687265625L24.2667,15.16687265625C24.3955,15.16687265625,24.5,15.06237265625,24.5,14.93347265625L24.5,13.06683265625C24.5,12.93796265625,24.3955,12.83349265625,24.2667,12.83349265625ZM3.5,21.81777265625L3.5,23.68447265625Q3.5,23.73087265625,3.5177614,23.77377265625Q3.5355229,23.81667265625,3.5683417,23.84947265625Q3.601161,23.88227265625,3.644041,23.90007265625Q3.68692,23.91777265625,3.733333,23.91777265625L24.2667,23.91777265625Q24.3131,23.91777265625,24.356,23.90007265625Q24.3988,23.88227265625,24.4317,23.84947265625Q24.4645,23.81667265625,24.4822,23.77377265625Q24.5,23.73087265625,24.5,23.68447265625L24.5,21.81777265625Q24.5,21.77137265625,24.4822,21.72847265625Q24.4645,21.68567265625,24.4317,21.65277265625Q24.3988,21.61997265625,24.356,21.60227265625Q24.3131,21.58447265625,24.2667,21.58447265625L3.733333,21.58447265625Q3.68692,21.58447265625,3.644041,21.60227265625Q3.601161,21.61997265625,3.5683417,21.65277265625Q3.5355229,21.68567265625,3.5177614,21.72847265625Q3.5,21.77137265625,3.5,21.81777265625Z" fill-rule="evenodd" fill="#4D5258" fill-opacity="1"/></g></g></svg>
  1 +<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" fill="none" version="1.1" width="24" height="24" viewBox="0 0 24 24"><g style="opacity:0.20000000298023224;"><g><path d="M16.61255231628418,0.6909312143875121L15.48135231628418,1.8221886143875121C15.40315231628418,1.9003386143875123,15.40325231628418,2.0270586143875122,15.48145231628418,2.105148614387512L16.87945231628418,3.5008286143875122L2.19995231628418,3.5008286143875122C2.0894953162841796,3.5008286143875122,1.9999523162841797,3.5903786143875123,1.9999523162841797,3.7008286143875124L1.9999523162841797,14.377268614387512C1.9999523162841797,14.452968614387512,2.0427528162841795,14.522268614387512,2.1105093162841797,14.556068614387513L3.7105123162841798,15.356068614387512C3.8434923162841796,15.422568614387512,3.9999523162841797,15.325868614387511,3.9999523162841797,15.177268614387513L3.9999523162841797,5.500828614387512L18.99995231628418,5.500828614387512L18.99995231628418,5.499258614387513L21.22095231628418,5.499258614387513C21.39905231628418,5.499258614387513,21.48835231628418,5.283828614387512,21.36235231628418,5.157838614387512L16.895452316284178,0.6909312143875121C16.81735231628418,0.6128262143875122,16.69065231628418,0.6128263143875122,16.61255231628418,0.6909312143875121ZM19.99995231628418,8.823458614387512L19.99995231628418,18.499868614387513L5.11660231628418,18.499868614387513L5.115252316284179,18.498468614387512L2.7755723162841797,18.498468614387512C2.5973913162841797,18.498468614387512,2.50815731628418,18.71396861438751,2.6341503162841797,18.839968614387512L7.101052316284179,23.30686861438751C7.17916231628418,23.384968614387514,7.30579231628418,23.384968614387514,7.383902316284179,23.30686861438751L8.51515231628418,22.17556861438751C8.59330231628418,22.097468614387513,8.593252316284179,21.970668614387513,8.51503231628418,21.89256861438751L7.11995231628418,20.499868614387513L21.79995231628418,20.499868614387513C21.91045231628418,20.499868614387513,21.99995231628418,20.410268614387512,21.99995231628418,20.299868614387513L21.99995231628418,9.623458614387513C21.99995231628418,9.547708614387512,21.95715231628418,9.478458614387511,21.889352316284178,9.444578614387511L20.28935231628418,8.644578614387513C20.15645231628418,8.578088614387513,19.99995231628418,8.674788614387513,19.99995231628418,8.823458614387512Z" fill-rule="evenodd" fill="#4D5258" fill-opacity="1"/></g></g></svg>
1 -<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" fill="none" version="1.1" width="24" height="24" viewBox="0 0 24 24"><g><g><path d="M6.915255046875,4.7314907592749025L11.848588046875001,5.964826319274902C11.937618046875,5.987086319274902,12.000078046875,6.067076319274903,12.000078046875,6.158856319274903L12.000078046875,28.413216319274902C12.000078046875,28.5433163192749,11.877808046875,28.638816319274902,11.751578046875,28.6072163192749L6.818241046875,27.3739163192749C6.729207546875,27.351616319274903,6.666748046875,27.2716163192749,6.666748046875,27.179916319274902L6.666748046875,4.925519319274902C6.666748046875,4.795405019274902,6.789026046875,4.6999334192749025,6.915255046875,4.7314907592749025M20.248548046875,4.7314907592749025L25.181848046875,5.964826319274902C25.270848046875,5.987086319274902,25.333348046875,6.067076319274903,25.333348046875,6.158856319274903L25.333348046875,28.413216319274902C25.333348046875,28.5433163192749,25.211048046875,28.638816319274902,25.084848046875,28.6072163192749L20.151448046875,27.3739163192749C20.062448046874998,27.351616319274903,20.000048046875,27.2716163192749,20.000048046875,27.179916319274902L20.000048046875,4.925519319274902C20.000048046875,4.795405019274902,20.122248046875,4.6999334192749025,20.248548046875,4.7314907592749025" fill-rule="evenodd" fill="#FFFFFF" fill-opacity="1"/></g></g></svg>  
  1 +<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1712048425819" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="13530" width="32" height="32" xmlns:xlink="http://www.w3.org/1999/xlink"><path d="M893.035 463.821679C839.00765 429.699141 210.584253 28.759328 179.305261 8.854514 139.495634-16.737389 99.686007 17.385148 99.686007 57.194775v909.934329c0 45.496716 42.653172 68.245075 76.775709 48.340262 45.496716-28.435448 676.763657-429.375262 716.573284-454.967165 34.122537-22.748358 34.122537-76.775709 0-96.680522z" fill="#FFFFFF" p-id="13531"></path></svg>
  1 +<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" fill="none" version="1.1" width="32" height="32" viewBox="0 0 32 32"><g><g><path d="M6.915255046875,4.7314907592749025L11.848588046875001,5.964826319274902C11.937618046875,5.987086319274902,12.000078046875,6.067076319274903,12.000078046875,6.158856319274903L12.000078046875,28.413216319274902C12.000078046875,28.5433163192749,11.877808046875,28.638816319274902,11.751578046875,28.6072163192749L6.818241046875,27.3739163192749C6.729207546875,27.351616319274903,6.666748046875,27.2716163192749,6.666748046875,27.179916319274902L6.666748046875,4.925519319274902C6.666748046875,4.795405019274902,6.789026046875,4.6999334192749025,6.915255046875,4.7314907592749025M20.248548046875,4.7314907592749025L25.181848046875,5.964826319274902C25.270848046875,5.987086319274902,25.333348046875,6.067076319274903,25.333348046875,6.158856319274903L25.333348046875,28.413216319274902C25.333348046875,28.5433163192749,25.211048046875,28.638816319274902,25.084848046875,28.6072163192749L20.151448046875,27.3739163192749C20.062448046874998,27.351616319274903,20.000048046875,27.2716163192749,20.000048046875,27.179916319274902L20.000048046875,4.925519319274902C20.000048046875,4.795405019274902,20.122248046875,4.6999334192749025,20.248548046875,4.7314907592749025" fill-rule="evenodd" fill="#FFFFFF" fill-opacity="1"/></g></g></svg>
  1 +<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" fill="none" version="1.1" width="28.000001907348633" height="28.000001907348633" viewBox="0 0 28.000001907348633 28.000001907348633"><g style="opacity:0.20000000298023224;"><g></g><g><path d="M3.5,25.08349609375L3.5,2.91682909375Q3.5,2.85937609375,3.5112086,2.80302709375Q3.5224172,2.74667709375,3.5444036,2.6935970937500002Q3.56639,2.6405170937499998,3.5983094,2.59274709375Q3.630229,2.54497609375,3.670854,2.50435009375Q3.71148,2.46372509375,3.759251,2.43180549375Q3.8070209999999998,2.39988609375,3.8601010000000002,2.37789969375Q3.913181,2.35591329375,3.969531,2.34470469375Q4.02588,2.33349609375,4.083333,2.33349609375L23.9167,2.33349609375Q23.9741,2.33349609375,24.0305,2.34470469375Q24.0868,2.35591329375,24.1399,2.37789969375Q24.193,2.39988609375,24.2407,2.43180549375Q24.2885,2.46372509375,24.3291,2.50435009375Q24.3698,2.54497609375,24.4017,2.59274709375Q24.4336,2.6405170937499998,24.4556,2.6935970937500002Q24.4776,2.74667709375,24.4888,2.80302709375Q24.5,2.85937609375,24.5,2.91682909375L24.5,15.16649609375L22.1666,15.16649609375L22.1666,4.66650609375L5.83325,4.66650609375L5.83325,23.33319609375L14,23.33319609375L14,25.66679609375L4.083333,25.66679609375Q4.02588,25.66679609375,3.969531,25.65559609375Q3.913181,25.64439609375,3.8601010000000002,25.62239609375Q3.8070209999999998,25.60039609375,3.759251,25.56849609375Q3.71148,25.53659609375,3.670854,25.49599609375Q3.630229,25.45539609375,3.5983094,25.40759609375Q3.56639,25.35979609375,3.5444036,25.30669609375Q3.5224172,25.25369609375,3.5112086,25.19729609375Q3.5,25.14099609375,3.5,25.08349609375Z" fill-rule="evenodd" fill="#4D5258" fill-opacity="1"/></g><g><path d="M9.333251953125,11.43447265625C9.333251953125,11.56334265625,9.437718953125,11.66780265625,9.566584953125,11.66780265625L17.355711953125002,11.66780265625C17.444091953125,11.66780265625,17.524881953125,11.61787265625,17.564411953125,11.53882265625L18.497741953125,9.67215565625C18.575311953125002,9.51701265625,18.462501953125,9.33447265625,18.289041953125,9.33447265625L9.566584953125,9.33447265625C9.437718953125,9.33447265625,9.333251953125,9.43893965625,9.333251953125,9.56780565625L9.333251953125,11.43447265625Z" fill="#4D5258" fill-opacity="1"/></g><g><path d="M9.333251953125,16.68203125C9.333251953125,16.81090125,9.437718953125,16.91536125,9.566584953125,16.91536125L14.439041953124999,16.91536125C14.527421953125,16.91536125,14.608221953125,16.86543125,14.647741953125,16.786381249999998L15.581081953125,14.91971425C15.658651953125,14.76457125,15.545831953124999,14.58203125,15.372381953125,14.58203125L9.566584953125,14.58203125C9.437718953125,14.58203125,9.333251953125,14.68649825,9.333251953125,14.81536425L9.333251953125,16.68203125Z" fill="#4D5258" fill-opacity="1"/></g><g><path d="M17.588956390625,19.15734328125L20.566870390625,19.16774328125L20.548890390625,24.31857328125L19.458060390625,24.314763281250002L19.471360390625,20.50559328125C19.471810390625,20.37673328125,19.367710390625,20.27190328125,19.238840390625,20.27145328125L18.346340390625,20.26833328125C18.217470390625,20.26788328125,18.112640390625,20.37198328125,18.112190390625,20.50085328125L18.098890390625,24.31002328125L17.054726390625,24.30637328125C16.925861390625,24.30592328125,16.821030110625,24.410023281249998,16.820580290625,24.53889328125L16.817464871625,25.43139328125C16.817015045625,25.560263281250002,16.921116390625,25.66509328125,17.049982390625,25.66554328125L24.933730390625,25.693063281249998C25.062600390625,25.69351328125,25.167430390625,25.58941328125,25.167880390625,25.46054328125L25.171000390625,24.56804328125C25.171450390624997,24.43917328125,25.067340390625,24.33434328125,24.938480390625,24.33389328125L21.934310390625,24.323413281249998L21.941450390625,22.27882328125L24.105620390625,22.28638328125C24.234480390625002,22.28683328125,24.339310390625002,22.18272328125,24.339760390625,22.05386328125L24.342820390625,21.17886328125C24.343270390625,21.04999328125,24.239170390625,20.94516328125,24.110300390625,20.94471328125L21.946130390625,20.93716328125L21.952290390625002,19.17257328125L24.588960390625,19.18178328125C24.717820390625,19.18223328125,24.822660390625,19.07812328125,24.823100390625,18.94926328125L24.826220390625,18.05675828125C24.826670390625,17.92789328125,24.722570390625002,17.82306218125,24.593700390625,17.82261228125L17.593700390625,17.79817776225C17.464835390625,17.79772793625,17.360004390625,17.90182928125,17.359554390625,18.03069528125L17.356439390625,18.92320328125C17.355989390625,19.05206328125,17.460090390625,19.15689328125,17.588956390625,19.15734328125Z" fill-rule="evenodd" fill="#4D5258" fill-opacity="1"/></g></g></svg>
@@ -5,13 +5,13 @@ @@ -5,13 +5,13 @@
5 "name": "default", 5 "name": "default",
6 "type": "HarmonyOS", 6 "type": "HarmonyOS",
7 "material": { 7 "material": {
8 - "certpath": "/Users/jrl/.ohos/config/auto_debug_sight_harmony_com.wondertek.sight_2850086000431478878.cer",  
9 - "storePassword": "0000001B1B59DAB22B389A8BCD25A2C43C89DE581FD6AC3EEE1D3FC227D46727A7763AAE553A50B5E81310", 8 + "certpath": "C:\\Users\\pc\\.ohos\\config\\default_sight_harmony_l75MehGV9G3TUayEtL68-EIWqyYDqfVXfu9D-DPJ7I0=.cer",
  9 + "storePassword": "0000001AB256FAF47AA4D68E4841C95D357490DE9FBB26A3A9161AD3069E31B3623E25CB49409CCA9CF7",
10 "keyAlias": "debugKey", 10 "keyAlias": "debugKey",
11 - "keyPassword": "0000001B2B0EDD642E43906A1B9A6B72A79F40316E908829B79DD96467FE5C3A8D1DF9E40957DA733DF77F",  
12 - "profile": "/Users/jrl/.ohos/config/auto_debug_sight_harmony_com.wondertek.sight_2850086000431478878.p7b", 11 + "keyPassword": "0000001AFB06818C2BC8DC275326668AAC62B91EBF7D3F84E8BE0F156D02623AA0F4F8C6B73F362CB371",
  12 + "profile": "C:\\Users\\pc\\.ohos\\config\\default_sight_harmony_l75MehGV9G3TUayEtL68-EIWqyYDqfVXfu9D-DPJ7I0=.p7b",
13 "signAlg": "SHA256withECDSA", 13 "signAlg": "SHA256withECDSA",
14 - "storeFile": "/Users/jrl/.ohos/config/auto_debug_sight_harmony_com.wondertek.sight_2850086000431478878.p12" 14 + "storeFile": "C:\\Users\\pc\\.ohos\\config\\default_sight_harmony_l75MehGV9G3TUayEtL68-EIWqyYDqfVXfu9D-DPJ7I0=.p12"
15 } 15 }
16 } 16 }
17 ], 17 ],
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 +}
@@ -41,13 +41,33 @@ export class HttpUrlUtils { @@ -41,13 +41,33 @@ export class HttpUrlUtils {
41 /** 41 /**
42 * 批查接口,查询互动相关数据,如收藏数、评论数等 42 * 批查接口,查询互动相关数据,如收藏数、评论数等
43 */ 43 */
44 - static readonly INTERACT_DATA_PATH: string = "/api/rmrb-contact/contact/zh/c/v2/content/interactData"; 44 + static readonly INTERACT_DATA_PATH: string = "/api/rmrb-contact/contact/zh/c/content/interactData";
45 // 多图(图集)详情页 45 // 多图(图集)详情页
46 /** 46 /**
47 * 批量查询内容当前用户点赞、收藏状态 47 * 批量查询内容当前用户点赞、收藏状态
48 */ 48 */
49 static readonly INTERACT_DATA_STATUS: string = "/api/rmrb-interact/interact/zh/c/batchLikeAndCollect/status"; 49 static readonly INTERACT_DATA_STATUS: string = "/api/rmrb-interact/interact/zh/c/batchLikeAndCollect/status";
50 /** 50 /**
  51 + * 点赞、取消点赞
  52 + */
  53 + static readonly INTERACT_EXECUTELIKE: string = "/api/rmrb-interact/interact/zh/c/like/executeLike";
  54 + /**
  55 + * 收藏、取消收藏
  56 + */
  57 + static readonly INTERACT_EXECUTECOLLECTRECORD: string = "/api/rmrb-interact/interact/zh/c/collect/executeCollcetRecord";
  58 + /**
  59 + * 关注号主
  60 + */
  61 + static readonly INTERACT_ACCENTION_OPERATION: string = "/api/rmrb-interact/interact/zh/c/attention/operation";
  62 + /**
  63 + * 用户等级/积分-APP根据业务场景动态增减成长值(APP)
  64 + */
  65 + static readonly USERPOINT_OPERATE: string = "/api/rmrb-user-point/auth/pointLevel/zh/operate";
  66 + /**
  67 + * 评论发布
  68 + */
  69 + static readonly COMMENT_PUBLISH: string = "/api/rmrb-comment/comment/zh/c/publish";
  70 + /**
51 * 沉浸式視頻批量查詢20條數據 71 * 沉浸式視頻批量查詢20條數據
52 */ 72 */
53 static readonly RECOMMEND_VIDEOLIST: string = "/api/rmrb-bff-display-zh/recommend/zh/c/videoList"; 73 static readonly RECOMMEND_VIDEOLIST: string = "/api/rmrb-bff-display-zh/recommend/zh/c/videoList";
@@ -128,12 +148,10 @@ export class HttpUrlUtils { @@ -128,12 +148,10 @@ export class HttpUrlUtils {
128 * 个人中心 我的关注列表 148 * 个人中心 我的关注列表
129 */ 149 */
130 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";
131 -  
132 /** 151 /**
133 * 预约操作 152 * 预约操作
134 */ 153 */
135 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";
136 -  
137 /** 155 /**
138 * 点赞操作 156 * 点赞操作
139 */ 157 */
@@ -153,7 +171,12 @@ export class HttpUrlUtils { @@ -153,7 +171,12 @@ export class HttpUrlUtils {
153 * */ 171 * */
154 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";
155 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";
156 - private static hostUrl: string = HttpUrlUtils.HOST_PRODUCT; 174 + private static _hostUrl: string = HttpUrlUtils.HOST_UAT;
  175 +
  176 + public static set hostUrl(value: string) {
  177 + HttpUrlUtils._hostUrl = value;
  178 + }
  179 +
157 private static userId = '' 180 private static userId = ''
158 private static userType = '' 181 private static userType = ''
159 private static token = '' 182 private static token = ''
@@ -169,8 +192,8 @@ export class HttpUrlUtils { @@ -169,8 +192,8 @@ export class HttpUrlUtils {
169 headers.set('timestamp', HttpUrlUtils.getTimestamp()) 192 headers.set('timestamp', HttpUrlUtils.getTimestamp())
170 headers.set('RMRB-X-TOKEN', HttpUrlUtils.getXToken()) 193 headers.set('RMRB-X-TOKEN', HttpUrlUtils.getXToken())
171 headers.set('device_id', HttpUrlUtils.getDeviceId()) 194 headers.set('device_id', HttpUrlUtils.getDeviceId())
172 - if(HttpUrlUtils.getXToken()!=''){  
173 - headers.set('cookie', 'RMRB-X-TOKEN='+HttpUrlUtils.getXToken()) 195 + if (HttpUrlUtils.getXToken() != '') {
  196 + headers.set('cookie', 'RMRB-X-TOKEN=' + HttpUrlUtils.getXToken())
174 } 197 }
175 headers.set('build_version', HttpUrlUtils.getVersion()) 198 headers.set('build_version', HttpUrlUtils.getVersion())
176 headers.set('adcode', HttpUrlUtils.getAdCode()) 199 headers.set('adcode', HttpUrlUtils.getAdCode())
@@ -199,7 +222,7 @@ export class HttpUrlUtils { @@ -199,7 +222,7 @@ export class HttpUrlUtils {
199 } 222 }
200 223
201 static addSpecialHeaders(headers: HashMap<string, string>) { 224 static addSpecialHeaders(headers: HashMap<string, string>) {
202 - switch (HttpUrlUtils.hostUrl) { 225 + switch (HttpUrlUtils._hostUrl) {
203 case HttpUrlUtils.HOST_UAT: 226 case HttpUrlUtils.HOST_UAT:
204 // TODO 待优化到常量类里 227 // TODO 待优化到常量类里
205 headers.set('X-Ca-Stage', 'PRE'); 228 headers.set('X-Ca-Stage', 'PRE');
@@ -227,7 +250,7 @@ export class HttpUrlUtils { @@ -227,7 +250,7 @@ export class HttpUrlUtils {
227 } 250 }
228 251
229 static getHost() { 252 static getHost() {
230 - return HttpUrlUtils.hostUrl; 253 + return HttpUrlUtils._hostUrl;
231 } 254 }
232 255
233 private static getCity() { 256 private static getCity() {
@@ -251,20 +274,20 @@ export class HttpUrlUtils { @@ -251,20 +274,20 @@ export class HttpUrlUtils {
251 } 274 }
252 275
253 private static getXToken() { 276 private static getXToken() {
254 - if(StringUtils.isNotEmpty(HttpUrlUtils.token)){ 277 + if (StringUtils.isNotEmpty(HttpUrlUtils.token)) {
255 return HttpUrlUtils.token 278 return HttpUrlUtils.token
256 } 279 }
257 - HttpUrlUtils.token = SPHelper.default.getSync(SpConstants.USER_JWT_TOKEN,"") as string  
258 - if(StringUtils.isNotEmpty(HttpUrlUtils.token)) {  
259 - 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
260 } 283 }
261 return 'eyJhbGciOiJIUzI1NiIsImtpZCI6ImQ4WkI2QkhxSEZrdjJ2U25BNlRwZEdKRjBHcjItVzBvS2FaYzdLOUUycmcifQ.eyJpc3MiOiJwZW9wbGVzLWRhaWx5LWZvdXJhIiwic3ViIjoicGVvcGxlcy1kYWlseS1mb3VyYSIsImV4cCI6MTcwMzY0OTYwNiwidXNlcklkIjo0NTk3NzYyOTc0NzQ5NDksInVzZXJWZXJzaW9uIjoiNDU5Nzc2Mjk3NDc0OTQ5XzIiLCJ1c2VyTmFtZSI6IkJ1bGlraWtpMTgxIiwidXNlclR5cGUiOjIsImNyZWF0b3JJZCI6NDI2NTM5MH0.jhQ9kylcm3FxWf0-lBMZuLkdtIQ6XpFnAi0AFZJNwfc'; 284 return 'eyJhbGciOiJIUzI1NiIsImtpZCI6ImQ4WkI2QkhxSEZrdjJ2U25BNlRwZEdKRjBHcjItVzBvS2FaYzdLOUUycmcifQ.eyJpc3MiOiJwZW9wbGVzLWRhaWx5LWZvdXJhIiwic3ViIjoicGVvcGxlcy1kYWlseS1mb3VyYSIsImV4cCI6MTcwMzY0OTYwNiwidXNlcklkIjo0NTk3NzYyOTc0NzQ5NDksInVzZXJWZXJzaW9uIjoiNDU5Nzc2Mjk3NDc0OTQ5XzIiLCJ1c2VyTmFtZSI6IkJ1bGlraWtpMTgxIiwidXNlclR5cGUiOjIsImNyZWF0b3JJZCI6NDI2NTM5MH0.jhQ9kylcm3FxWf0-lBMZuLkdtIQ6XpFnAi0AFZJNwfc';
262 } 285 }
263 286
264 - static getRefreshToken() {  
265 - let refreshToken = SPHelper.default.getSync(SpConstants.USER_REFRESH_TOKEN,"")  
266 - if(StringUtils.isNotEmpty(refreshToken)) {  
267 - 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;
268 } 291 }
269 return ''; 292 return '';
270 } 293 }
@@ -327,55 +350,55 @@ export class HttpUrlUtils { @@ -327,55 +350,55 @@ export class HttpUrlUtils {
327 350
328 public static getUserId() { 351 public static getUserId() {
329 // TODO 对接登录 352 // TODO 对接登录
330 - if(StringUtils.isNotEmpty(HttpUrlUtils.userId)){ 353 + if (StringUtils.isNotEmpty(HttpUrlUtils.userId)) {
331 return HttpUrlUtils.userId 354 return HttpUrlUtils.userId
332 } 355 }
333 - HttpUrlUtils.userId = SPHelper.default.getSync(SpConstants.USER_ID,"") as string 356 + HttpUrlUtils.userId = SPHelper.default.getSync(SpConstants.USER_ID, "") as string
334 return HttpUrlUtils.userId; 357 return HttpUrlUtils.userId;
335 } 358 }
336 359
337 - public static getUserType() {  
338 - if(StringUtils.isNotEmpty(HttpUrlUtils.userType)){ 360 + public static getUserType() {
  361 + if (StringUtils.isNotEmpty(HttpUrlUtils.userType)) {
339 return HttpUrlUtils.userType 362 return HttpUrlUtils.userType
340 } 363 }
341 - HttpUrlUtils.userType = SPHelper.default.getSync(SpConstants.USER_Type,"") as string 364 + HttpUrlUtils.userType = SPHelper.default.getSync(SpConstants.USER_Type, "") as string
342 return HttpUrlUtils.userType; 365 return HttpUrlUtils.userType;
343 } 366 }
344 367
345 static getVerifyCodeUrl() { 368 static getVerifyCodeUrl() {
346 - let url = HttpUrlUtils.hostUrl + "/api/rmrb-user-center/auth/zh/c/sendVerifyCode"; 369 + let url = HttpUrlUtils._hostUrl + "/api/rmrb-user-center/auth/zh/c/sendVerifyCode";
347 return url; 370 return url;
348 } 371 }
349 372
350 static getVerifyCodeByTokenUrl() { 373 static getVerifyCodeByTokenUrl() {
351 - let url = HttpUrlUtils.hostUrl + "/api/rmrb-user-center/auth/zh/c/sendVerifyCodeByToken"; 374 + let url = HttpUrlUtils._hostUrl + "/api/rmrb-user-center/auth/zh/c/sendVerifyCodeByToken";
352 return url; 375 return url;
353 } 376 }
354 377
355 378
356 static getForgetPasswordUrl() { 379 static getForgetPasswordUrl() {
357 - let url = HttpUrlUtils.hostUrl + "/api/rmrb-user-center/user/zh/c/forgotPassword"; 380 + let url = HttpUrlUtils._hostUrl + "/api/rmrb-user-center/user/zh/c/forgotPassword";
358 return url; 381 return url;
359 } 382 }
360 383
361 static getLogoutUrl() { 384 static getLogoutUrl() {
362 - let url = HttpUrlUtils.hostUrl + "/api/rmrb-user-center/user/zh/c/logout"; 385 + let url = HttpUrlUtils._hostUrl + "/api/rmrb-user-center/user/zh/c/logout";
363 return url; 386 return url;
364 } 387 }
365 388
366 389
367 static getResetPassworddUrl() { 390 static getResetPassworddUrl() {
368 - let url = HttpUrlUtils.hostUrl + "/api/rmrb-user-center/user/zh/c/resetPassword"; 391 + let url = HttpUrlUtils._hostUrl + "/api/rmrb-user-center/user/zh/c/resetPassword";
369 return url; 392 return url;
370 } 393 }
371 394
372 static queryUserDetail() { 395 static queryUserDetail() {
373 - let url = HttpUrlUtils.hostUrl + "/api/rmrb-user-center/user/zh/c/queryUserDetail"; 396 + let url = HttpUrlUtils._hostUrl + "/api/rmrb-user-center/user/zh/c/queryUserDetail";
374 return url; 397 return url;
375 } 398 }
376 399
377 static editUserDetail() { 400 static editUserDetail() {
378 - let url = HttpUrlUtils.hostUrl + "/api/rmrb-user-center/user/zh/c/editUserDetail"; 401 + let url = HttpUrlUtils._hostUrl + "/api/rmrb-user-center/user/zh/c/editUserDetail";
379 return url; 402 return url;
380 } 403 }
381 404
@@ -385,17 +408,17 @@ export class HttpUrlUtils { @@ -385,17 +408,17 @@ export class HttpUrlUtils {
385 } 408 }
386 409
387 static getCheckVerifyCodeUrl() { 410 static getCheckVerifyCodeUrl() {
388 - let url = HttpUrlUtils.hostUrl + "/api/rmrb-user-center/auth/zh/c/checkVerifyCode"; 411 + let url = HttpUrlUtils._hostUrl + "/api/rmrb-user-center/auth/zh/c/checkVerifyCode";
389 return url; 412 return url;
390 } 413 }
391 414
392 static getCheckVerifyByTokenCodeUrl() { 415 static getCheckVerifyByTokenCodeUrl() {
393 - let url = HttpUrlUtils.hostUrl + "/api/rmrb-user-center/auth/zh/c/checkVerifyCodeByToken"; 416 + let url = HttpUrlUtils._hostUrl + "/api/rmrb-user-center/auth/zh/c/checkVerifyCodeByToken";
394 return url; 417 return url;
395 } 418 }
396 419
397 static getAppointmentListDataUrl() { 420 static getAppointmentListDataUrl() {
398 - let url = HttpUrlUtils.hostUrl + HttpUrlUtils.APPOINTMENT_LIST_DATA_PATH 421 + let url = HttpUrlUtils._hostUrl + HttpUrlUtils.APPOINTMENT_LIST_DATA_PATH
399 return url 422 return url
400 } 423 }
401 424
@@ -405,77 +428,77 @@ export class HttpUrlUtils { @@ -405,77 +428,77 @@ export class HttpUrlUtils {
405 } 428 }
406 429
407 static getFollowListDetailDataUrl() { 430 static getFollowListDetailDataUrl() {
408 - let url = HttpUrlUtils.hostUrl + HttpUrlUtils.FOLLOW_LIST_DETAIL_DATA_PATH 431 + let url = HttpUrlUtils._hostUrl + HttpUrlUtils.FOLLOW_LIST_DETAIL_DATA_PATH
409 return url 432 return url
410 } 433 }
411 434
412 static getFollowListDataUrl() { 435 static getFollowListDataUrl() {
413 - let url = HttpUrlUtils.hostUrl + HttpUrlUtils.FOLLOW_LIST_DATA_PATH 436 + let url = HttpUrlUtils._hostUrl + HttpUrlUtils.FOLLOW_LIST_DATA_PATH
414 return url 437 return url
415 } 438 }
416 439
417 static getMineFollowListDataUrl() { 440 static getMineFollowListDataUrl() {
418 - let url = HttpUrlUtils.hostUrl + HttpUrlUtils.MINE_FOLLOW_LIST_DATA_PATH 441 + let url = HttpUrlUtils._hostUrl + HttpUrlUtils.MINE_FOLLOW_LIST_DATA_PATH
419 return url 442 return url
420 } 443 }
421 444
422 static getFollowListStatusDataUrl() { 445 static getFollowListStatusDataUrl() {
423 - let url = HttpUrlUtils.hostUrl + HttpUrlUtils.FOLLOW_LIST_STATUS_DATA_PATH 446 + let url = HttpUrlUtils._hostUrl + HttpUrlUtils.FOLLOW_LIST_STATUS_DATA_PATH
424 return url 447 return url
425 } 448 }
426 449
427 static getCommentListStatusDataUrl() { 450 static getCommentListStatusDataUrl() {
428 - let url = HttpUrlUtils.hostUrl + HttpUrlUtils.COMMENT_LIST_STATUS_DATA_PATH 451 + let url = HttpUrlUtils._hostUrl + HttpUrlUtils.COMMENT_LIST_STATUS_DATA_PATH
429 return url 452 return url
430 } 453 }
431 454
432 static getMineCommentListDataUrl() { 455 static getMineCommentListDataUrl() {
433 - let url = HttpUrlUtils.hostUrl + HttpUrlUtils.MINE_COMMENT_LIST_DATA_PATH 456 + let url = HttpUrlUtils._hostUrl + HttpUrlUtils.MINE_COMMENT_LIST_DATA_PATH
434 return url 457 return url
435 } 458 }
436 459
437 static getMineUserLevelDataUrl() { 460 static getMineUserLevelDataUrl() {
438 - let url = HttpUrlUtils.hostUrl + HttpUrlUtils.MINE_USER_LEVEL_DATA_PATH 461 + let url = HttpUrlUtils._hostUrl + HttpUrlUtils.MINE_USER_LEVEL_DATA_PATH
439 return url 462 return url
440 } 463 }
441 464
442 static getOtherUserLevelDataUrl() { 465 static getOtherUserLevelDataUrl() {
443 - let url = HttpUrlUtils.hostUrl + HttpUrlUtils.OTHER_USER_LEVEL_DATA_PATH 466 + let url = HttpUrlUtils._hostUrl + HttpUrlUtils.OTHER_USER_LEVEL_DATA_PATH
444 return url 467 return url
445 } 468 }
446 469
447 static getMineUserDetailDataUrl() { 470 static getMineUserDetailDataUrl() {
448 - let url = HttpUrlUtils.hostUrl + HttpUrlUtils.MINE_USER_DETAIL_DATA_PATH 471 + let url = HttpUrlUtils._hostUrl + HttpUrlUtils.MINE_USER_DETAIL_DATA_PATH
449 return url 472 return url
450 } 473 }
451 474
452 static getOtherUserDetailDataUrl() { 475 static getOtherUserDetailDataUrl() {
453 - let url = HttpUrlUtils.hostUrl + HttpUrlUtils.OTHER_USER_DETAIL_DATA_PATH 476 + let url = HttpUrlUtils._hostUrl + HttpUrlUtils.OTHER_USER_DETAIL_DATA_PATH
454 return url 477 return url
455 } 478 }
456 479
457 static getOtherCommentListDataUrl() { 480 static getOtherCommentListDataUrl() {
458 - let url = HttpUrlUtils.hostUrl + HttpUrlUtils.OTHER_COMMENT_LIST_DATA_PATH 481 + let url = HttpUrlUtils._hostUrl + HttpUrlUtils.OTHER_COMMENT_LIST_DATA_PATH
459 return url 482 return url
460 } 483 }
461 484
462 static getOtherUserFollowListDataUrl() { 485 static getOtherUserFollowListDataUrl() {
463 - let url = HttpUrlUtils.hostUrl + HttpUrlUtils.OTHER_USER_FOLLOW_LIST_DATA_PATH 486 + let url = HttpUrlUtils._hostUrl + HttpUrlUtils.OTHER_USER_FOLLOW_LIST_DATA_PATH
464 return url 487 return url
465 } 488 }
466 489
467 static getAppointmentOperationUrl() { 490 static getAppointmentOperationUrl() {
468 - let url = HttpUrlUtils.hostUrl + HttpUrlUtils.APPOINTMENT_OPERATION_STATUS_PATH 491 + let url = HttpUrlUtils._hostUrl + HttpUrlUtils.APPOINTMENT_OPERATION_STATUS_PATH
469 return url 492 return url
470 } 493 }
471 494
472 static getCommentLikeOperationUrl() { 495 static getCommentLikeOperationUrl() {
473 - let url = HttpUrlUtils.hostUrl + HttpUrlUtils.COMMENT_LIKE_OPERATION_PATH 496 + let url = HttpUrlUtils._hostUrl + HttpUrlUtils.COMMENT_LIKE_OPERATION_PATH
474 return url 497 return url
475 } 498 }
476 499
477 static getFollowOperationUrl() { 500 static getFollowOperationUrl() {
478 - let url = HttpUrlUtils.hostUrl + HttpUrlUtils.FOLLOW_OPERATION_PATH 501 + let url = HttpUrlUtils._hostUrl + HttpUrlUtils.FOLLOW_OPERATION_PATH
479 return url 502 return url
480 } 503 }
481 504
@@ -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
  1 +/**
  2 + * 点赞、已读、分享数量
  3 + */
  4 +export interface InteractDataDTO {
  5 + collectNum: number;
  6 + commentNum: number;
  7 + contentType: number;
  8 + likeNum: number;
  9 + readNum: number;
  10 + shareNum: number;
  11 + contentId: string;
  12 +}
@@ -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 +
  2 +export interface ChannelInfo {
  3 + channelId: string;
  4 + channelLevel: string;
  5 + channelName: string;
  6 + channelSkin: string;
  7 + channelStrategy: string;
  8 + channelStyle: string;
  9 + pageId: string;
  10 + pageTopType: string;
  11 + pcStyle: string;
  12 + webBackgroundImgUrl: string;
  13 +}
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;
@@ -53,3 +53,8 @@ export { HeadPictureCardComponent } from "./src/main/ets/components/view/HeadPic @@ -53,3 +53,8 @@ export { HeadPictureCardComponent } from "./src/main/ets/components/view/HeadPic
53 export { ZhGridLayoutComponent } from "./src/main/ets/components/view/ZhGridLayoutComponent" 53 export { ZhGridLayoutComponent } from "./src/main/ets/components/view/ZhGridLayoutComponent"
54 54
55 export { MultiPictureDetailPageComponent } from "./src/main/ets/components/MultiPictureDetailPageComponent" 55 export { MultiPictureDetailPageComponent } from "./src/main/ets/components/MultiPictureDetailPageComponent"
  56 +
  57 +export { AudioDetailComponent } from "./src/main/ets/components/AudioDetailComponent"
  58 +
  59 +export { BroadcastPageComponent } from "./src/main/ets/components/broadcast/BroadcastPageComponent"
  60 +
  1 +import { Logger } from 'wdKit';
  2 +import { MultiPictureDetailViewModel } from '../viewmodel/MultiPictureDetailViewModel';
  3 +import { ContentDetailDTO } from 'wdBean';
  4 +import media from '@ohos.multimedia.media';
  5 +import { OperRowListView } from './view/OperRowListView';
  6 +import { WDPlayerController } from 'wdPlayer/Index';
  7 +
  8 +const TAG = 'AudioDetailComponent'
  9 +interface Arr{
  10 + image:string,
  11 + title:string
  12 +}
  13 +
  14 +@Component
  15 +export struct AudioDetailComponent {
  16 + private relId: string = ''
  17 + private contentId: string = ''
  18 + private relType: string = ''
  19 + private avPlayer?: media.AVPlayer;
  20 + @State playerController: WDPlayerController = new WDPlayerController();
  21 +
  22 + private arr:Arr[]=[
  23 + {image:'clock',title:'定时'},
  24 + {image:'theOriginal',title:'原文'},
  25 + {image:'list',title:'列表'},
  26 + ]
  27 +
  28 + @State contentDetailData: ContentDetailDTO[] = [] as ContentDetailDTO[]//详情
  29 + @State coverImage:string = '' //封面图
  30 + @State newsTitle:string = '' //标题
  31 + @State audioUrl:string = '' //音频路径
  32 + @State duration:number = 0 //时长
  33 + @State outSetValueOne:number = 40 //播放进度
  34 +
  35 + @State isPlay: boolean = false
  36 + async aboutToAppear() {
  37 + await this.getContentDetailData()
  38 + this.playerController.firstPlay(this.audioUrl);
  39 + this.playerController.onCanplay = () => {
  40 + this.playerController.play()
  41 + this.isPlay = true
  42 + }
  43 + this.playerController.onTimeUpdate = (nowSeconds, totalSeconds) =>{
  44 + console.log('现在时间',nowSeconds)
  45 + console.log('总时间',totalSeconds)
  46 + this.outSetValueOne = nowSeconds
  47 + this.duration = totalSeconds
  48 + }
  49 + }
  50 + build() {
  51 + Row() {
  52 + Column() {
  53 + // 封面
  54 + Row() {
  55 + Image(this.coverImage)
  56 + .width(240)
  57 + .height(160)
  58 + .borderRadius('0')
  59 + }
  60 + .justifyContent(FlexAlign.Center)
  61 + .width('100%')
  62 + .margin({ top: 64 })
  63 + // 标题
  64 + Row() {
  65 + Text(this.newsTitle)
  66 + .fontSize(20)
  67 + .fontWeight(FontWeight.Bold)
  68 + .fontColor('#ffffff')
  69 + .textAlign(TextAlign.Center)
  70 + .lineHeight(28)
  71 + .fontFamily('PingFang SC, PingFang SC')
  72 + }
  73 + .padding({ left: 34, right: 34 })
  74 + .margin({ top: 32 })
  75 + // 操作矩阵
  76 + Row() {
  77 + ForEach(this.arr,(item:Arr)=>{
  78 + Column() {
  79 + Image(item.image=='clock'?$r('app.media.clock_close'):item.image=='theOriginal'?$r('app.media.theOriginal_close'):item.image=='list'?$r('app.media.list_close'):'')
  80 + .width(28)
  81 + .height(28)
  82 + Text(item.title)
  83 + .fontColor('#4D5258')
  84 + .fontSize(12)
  85 + .lineHeight(16)
  86 + .margin(2)
  87 + }
  88 + })
  89 +
  90 + }
  91 + .width('100%')
  92 + .padding({ left: 49, right: 49 })
  93 + .justifyContent(FlexAlign.SpaceBetween)
  94 + .margin({ top: 60 })
  95 +
  96 + Column(){
  97 + // 进度条
  98 + Row(){
  99 + Slider({
  100 + value: this.outSetValueOne,
  101 + step: 1
  102 + })
  103 + .showTips(true)
  104 + .trackColor('rgba(0,0,0,0.5)')
  105 + .selectedColor('#ED2800')
  106 + .onChange((value: number, mode: SliderChangeMode) => {
  107 + console.log('滑块长度',value)
  108 + this.playerController?.setSeekTime(value, mode);
  109 + })
  110 + }
  111 + .width('100%')
  112 + .padding({left:24,right:24})
  113 + .margin({top:110})
  114 + // 播放按钮
  115 + Row(){
  116 + Column(){
  117 + Image($r('app.media.loop_close'))
  118 + .width(24)
  119 + .height(24)
  120 + Text('循环')
  121 + .fontColor('#4D5258')
  122 + .fontSize(12)
  123 + .lineHeight(16)
  124 + .margin(2)
  125 + }
  126 +
  127 + Image($r('app.media.Backward_close'))
  128 + .width(24)
  129 + .height(24)
  130 + Stack({ alignContent: Alignment.Center }){
  131 + Image(this.isPlay?$r('app.media.suspend'):$r('app.media.playicon'))
  132 + .width(32)
  133 + .height(32)
  134 + }
  135 + .padding(28)
  136 + .backgroundColor('#4D5258')
  137 + .borderRadius(50)
  138 + .onClick(()=>{
  139 + if(this.isPlay){
  140 + this.playerController.pause()
  141 + }else{
  142 + this.playerController.play()
  143 + }
  144 + this.isPlay = !this.isPlay
  145 + })
  146 + Image($r('app.media.fastForward_close'))
  147 + .width(24)
  148 + .height(24)
  149 + Column(){
  150 + Image($r('app.media.doubleSpeed_close'))
  151 + .width(24)
  152 + .height(24)
  153 + Text('倍速')
  154 + .fontColor('#4D5258')
  155 + .fontSize(12)
  156 + .lineHeight(16)
  157 + .margin(2)
  158 + }
  159 + }
  160 + .width('100%')
  161 + .justifyContent(FlexAlign.SpaceBetween)
  162 + .margin({top:56})
  163 + .padding({left:32,right:32})
  164 + }
  165 + .layoutWeight(1)
  166 + OperRowListView()
  167 + }
  168 + }
  169 +
  170 + }
  171 + private async getContentDetailData() {
  172 + try {
  173 + let data = await MultiPictureDetailViewModel.getDetailData(this.relId, this.contentId, this.relType)
  174 + this.contentDetailData = data;
  175 + console.log('音乐详情',JSON.stringify(this.contentDetailData))
  176 + this.newsTitle = this.contentDetailData[0].newsTitle
  177 + console.log('标题',JSON.stringify(this.newsTitle))
  178 + this.coverImage = this.contentDetailData[0].fullColumnImgUrls[0].url
  179 + console.log('封面图',JSON.stringify(this.coverImage))
  180 + this.duration = this.contentDetailData[0].audioList[0].duration
  181 + console.log('音频时长',JSON.stringify(this.duration))
  182 + this.audioUrl = this.contentDetailData[0].audioList[0].audioUrl
  183 + console.log('音频时长',JSON.stringify(this.audioUrl))
  184 + } catch (exception) {
  185 + console.log('请求失败',JSON.stringify(exception))
  186 + }
  187 + }
  188 +}
@@ -229,6 +229,7 @@ export struct MorningEveningPaperComponent { @@ -229,6 +229,7 @@ export struct MorningEveningPaperComponent {
229 // console.info(TAG, `onClick listen_right_bg`); 229 // console.info(TAG, `onClick listen_right_bg`);
230 }) 230 })
231 } 231 }
  232 + .margin({ left: 12, right: 12 })
232 // .width('100%') 233 // .width('100%')
233 .height(56) 234 .height(56)
234 .alignItems(VerticalAlign.Center) 235 .alignItems(VerticalAlign.Center)
@@ -33,17 +33,20 @@ export struct topicInfoView { @@ -33,17 +33,20 @@ export struct topicInfoView {
33 33
34 Row() { 34 Row() {
35 Text("查看详情") 35 Text("查看详情")
36 - .fontSize(16) 36 + .fontSize(14)
37 .fontColor($r('app.color.white')) 37 .fontColor($r('app.color.white'))
38 .maxLines(1) 38 .maxLines(1)
39 - .backgroundColor($r('app.color.color_99636363'))  
40 .borderRadius(2) 39 .borderRadius(2)
  40 + .padding({ left: 6, top: 4, bottom: 4 })
41 41
42 - Image($r('app.media.more'))  
43 - .height($r('app.float.top_arrow_size'))  
44 - .width(20) 42 + Image($r('app.media.more'))// .height($r('app.float.top_arrow_size'))
  43 + .width(12)
  44 + .height(12)
  45 + .margin({ left: 4, right: 7 })
45 } 46 }
46 - .margin({ top: 10, left: 16, right: 16 }) 47 + .backgroundColor($r('app.color.color_99636363'))
  48 + .margin({ top: 8, left: 16, right: 16, bottom: 16 })
  49 + .borderRadius(2)
47 // .backgroundColor(Color.Red) 50 // .backgroundColor(Color.Red)
48 .alignRules({ 51 .alignRules({
49 left: { anchor: "__container__", align: HorizontalAlign.Start }, 52 left: { anchor: "__container__", align: HorizontalAlign.Start },
@@ -61,6 +64,7 @@ export struct topicInfoView { @@ -61,6 +64,7 @@ export struct topicInfoView {
61 left: { anchor: "__container__", align: HorizontalAlign.Start }, 64 left: { anchor: "__container__", align: HorizontalAlign.Start },
62 bottom: { anchor: "row_detail", align: VerticalAlign.Top } 65 bottom: { anchor: "row_detail", align: VerticalAlign.Top }
63 }) 66 })
  67 + .margin({ left: 16, right: 16 })
64 .id('txt_summary') 68 .id('txt_summary')
65 69
66 Text(this.frontLinkObject?.title ?? "") 70 Text(this.frontLinkObject?.title ?? "")
@@ -71,6 +75,7 @@ export struct topicInfoView { @@ -71,6 +75,7 @@ export struct topicInfoView {
71 left: { anchor: "__container__", align: HorizontalAlign.Start }, 75 left: { anchor: "__container__", align: HorizontalAlign.Start },
72 bottom: { anchor: "txt_summary", align: VerticalAlign.Top } 76 bottom: { anchor: "txt_summary", align: VerticalAlign.Top }
73 }) 77 })
  78 + .margin({ left: 16, right: 16, bottom: 8 })
74 .id('txt_title') 79 .id('txt_title')
75 } 80 }
76 .width("100%") 81 .width("100%")
@@ -23,6 +23,7 @@ export struct MultiPictureDetailItemComponent { @@ -23,6 +23,7 @@ export struct MultiPictureDetailItemComponent {
23 .width('100%') 23 .width('100%')
24 .aspectRatio(this.MultiPictureDetailItem.width / this.MultiPictureDetailItem.height) 24 .aspectRatio(this.MultiPictureDetailItem.width / this.MultiPictureDetailItem.height)
25 .objectFit(ImageFit.Fill) 25 .objectFit(ImageFit.Fill)
  26 + .interpolation(ImageInterpolation.High)
26 } 27 }
27 .height('100%') 28 .height('100%')
28 .width('100%') 29 .width('100%')
@@ -79,8 +79,7 @@ export struct MultiPictureDetailPageComponent { @@ -79,8 +79,7 @@ export struct MultiPictureDetailPageComponent {
79 bottom: { anchor: "__container__", align: VerticalAlign.Bottom }, 79 bottom: { anchor: "__container__", align: VerticalAlign.Bottom },
80 middle: { anchor: "__container__", align: HorizontalAlign.Center } 80 middle: { anchor: "__container__", align: HorizontalAlign.Center }
81 }) 81 })
82 - .width('100%')  
83 - .height(56) 82 + .width('100%').height(56).margin(16)
84 .border({ width: {top: 0.5}, color: '#FFFFFF' }) 83 .border({ width: {top: 0.5}, color: '#FFFFFF' })
85 .id('e_oper_row') 84 .id('e_oper_row')
86 } 85 }
  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,17 +10,19 @@ const LOCAL_CHANNEL: string = '地方频道' @@ -11,17 +10,19 @@ 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  
17 - @Link myChannelList: Array<TopNavDTO>  
18 - @Link moreChannelList: Array<TopNavDTO>  
19 - @Link localChannelList: Array<TopNavDTO>  
20 - @Link indexSettingArray: Array<string>  
21 - @Link topNavList: Array<TopNavDTO> 15 + @Link currentTopNavSelectedIndex: number
  16 + @Link myChannelList: TopNavDTO[]
  17 + @Link moreChannelList: TopNavDTO[]
  18 + @Link localChannelList: TopNavDTO[]
  19 + @Link indexSettingArray: string[]
  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 - console.info(`itemitemitem${JSON.stringify(item)}`)  
25 if (item.moreChannel === '1') { 26 if (item.moreChannel === '1') {
26 this.moreChannelList.unshift(item) 27 this.moreChannelList.unshift(item)
27 } 28 }
@@ -29,7 +30,34 @@ struct ChannelDialog { @@ -29,7 +30,34 @@ struct ChannelDialog {
29 this.localChannelList.unshift(item) 30 this.localChannelList.unshift(item)
30 } 31 }
31 } 32 }
32 - controller?: CustomDialogController 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 + }
33 61
34 build() { 62 build() {
35 Column() { 63 Column() {
@@ -45,7 +73,7 @@ struct ChannelDialog { @@ -45,7 +73,7 @@ struct ChannelDialog {
45 }) 73 })
46 } 74 }
47 .width('100%') 75 .width('100%')
48 - .margin({ top: 30, bottom: 10 }) 76 + .padding({ top: 30, bottom: 10 })
49 77
50 List() { 78 List() {
51 79
@@ -68,16 +96,30 @@ struct ChannelDialog { @@ -68,16 +96,30 @@ struct ChannelDialog {
68 ListItem() { 96 ListItem() {
69 Flex({ justifyContent: FlexAlign.SpaceBetween }) { 97 Flex({ justifyContent: FlexAlign.SpaceBetween }) {
70 ForEach(this.indexSettingArray, (text: string, index: number) => { 98 ForEach(this.indexSettingArray, (text: string, index: number) => {
71 - Button(text, { type: ButtonType.Normal, stateEffect: false })  
72 - .width('48%')  
73 - .borderRadius(2)  
74 - .fontColor(index === this.indexSettingTabIndex ? '#ffffff' : '#ED2800')  
75 - .fontSize(16)  
76 - .fontWeight(400)  
77 - .backgroundColor(index === this.indexSettingTabIndex ? '#ED2800' : '#FDE9E5')  
78 - .onClick(() => {  
79 - this.indexSettingTabIndex = index  
80 - }) 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 + })
81 }) 123 })
82 } 124 }
83 .height(36) 125 .height(36)
@@ -101,14 +143,15 @@ struct ChannelDialog { @@ -101,14 +143,15 @@ struct ChannelDialog {
101 .margin({ bottom: 12 }) 143 .margin({ bottom: 12 })
102 } 144 }
103 145
  146 + // 我的频道列表
104 ListItem() { 147 ListItem() {
105 - GridRow({ columns: 4, gutter: 10 }) { 148 + Grid() {
106 ForEach(this.myChannelList, (item: TopNavDTO, index: number) => { 149 ForEach(this.myChannelList, (item: TopNavDTO, index: number) => {
107 - GridCol() { 150 + GridItem() {
108 Row() { 151 Row() {
109 Text(item.name) 152 Text(item.name)
110 .fontSize(14) 153 .fontSize(14)
111 - .fontColor( this.currentTopNavSelectedIndex === index ? '#ED2800' : (item.homeChannel === '1' ? '#999999' : '#222222')) 154 + .fontColor(this.currentTopNavSelectedIndex === index ? '#ED2800' : (item.homeChannel === '1' || item.movePermitted === 0 ? '#999999' : '#222222'))
112 155
113 if (this.isEditIng && item.myChannel !== '1') { 156 if (this.isEditIng && item.myChannel !== '1') {
114 Image($r('app.media.icon_audio_close')) 157 Image($r('app.media.icon_audio_close'))
@@ -119,18 +162,20 @@ struct ChannelDialog { @@ -119,18 +162,20 @@ struct ChannelDialog {
119 .width('100%') 162 .width('100%')
120 .height('100%') 163 .height('100%')
121 .justifyContent(FlexAlign.Center) 164 .justifyContent(FlexAlign.Center)
122 - .backgroundColor(item.homeChannel === '1' ? '#F5F5F5' : '') 165 + .backgroundColor(item.homeChannel === '1' || item.movePermitted === 0 ? '#F5F5F5' : '')
123 .onClick(() => { 166 .onClick(() => {
124 if (this.isEditIng) { 167 if (this.isEditIng) {
125 - if(item.myChannel !== '1'){ 168 + if (item.myChannel !== '1') {
126 this.myChannelItemEditHandle(index) 169 this.myChannelItemEditHandle(index)
127 } 170 }
128 - }else{ 171 + } else {
  172 + this.confirm(index)
  173 + this.currentTopNavSelectedIndex = index
129 this.controller?.close() 174 this.controller?.close()
130 } 175 }
131 }) 176 })
132 } 177 }
133 - .width(80) 178 + .width('23%')
134 .height(40) 179 .height(40)
135 .border({ 180 .border({
136 width: item.homeChannel === '1' ? 0 : 1, 181 width: item.homeChannel === '1' ? 0 : 1,
@@ -141,8 +186,28 @@ struct ChannelDialog { @@ -141,8 +186,28 @@ struct ChannelDialog {
141 } 186 }
142 .width('100%') 187 .width('100%')
143 .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 + })
144 } 208 }
145 209
  210 + //更多频道列表
146 ListItem() { 211 ListItem() {
147 Column() { 212 Column() {
148 if (this.moreChannelList.length > 0) { 213 if (this.moreChannelList.length > 0) {
@@ -186,6 +251,7 @@ struct ChannelDialog { @@ -186,6 +251,7 @@ struct ChannelDialog {
186 .width('100%') 251 .width('100%')
187 } 252 }
188 253
  254 + //本地频道列表
189 ListItem() { 255 ListItem() {
190 Column() { 256 Column() {
191 if (this.localChannelList.length > 0) { 257 if (this.localChannelList.length > 0) {
@@ -231,309 +297,1612 @@ struct ChannelDialog { @@ -231,309 +297,1612 @@ struct ChannelDialog {
231 }.width('100%').height('100%') 297 }.width('100%').height('100%')
232 298
233 } 299 }
234 - .padding(16) 300 + .padding(15)
235 .backgroundColor('#ffffff') 301 .backgroundColor('#ffffff')
236 } 302 }
237 -  
238 - onTopNavigationDataUpdated() {  
239 - }  
240 } 303 }
241 304
242 -@Entry 305 +// @Entry
243 @Component 306 @Component
244 struct ChannelSubscriptionLayout { 307 struct ChannelSubscriptionLayout {
  308 + changeTab: (index: number) => void = () => {
  309 + }
  310 + @State indexSettingArray: string [] = ['推荐', '热点']
245 //当前选中的频道 311 //当前选中的频道
246 - @Prop currentTopNavSelectedIndex?: number;  
247 -  
248 - @State indexSettingArray: Array<string> = ['推荐', '热点']  
249 - @State myChannelList: Array<TopNavDTO> = [  
250 - // {  
251 - // channelId: 0,  
252 - // channelStyle: 1,  
253 - // channelType: 1,  
254 - // defaultPermitted: 1,  
255 - // delPermitted: 1,  
256 - // fontCColor: '#000000',  
257 - // fontColor: '#000000',  
258 - // headlinesOn: 0,  
259 - // homeChannel: '1',  
260 - // iconCUrl: '',  
261 - // iconCUrlSize: '',  
262 - // iconUrl: '',  
263 - // iconUrlSize: '',  
264 - // localChannel: '',  
265 - // moreChannel: '',  
266 - // movePermitted: 0,  
267 - // myChannel: '1',  
268 - // name: '推荐',  
269 - // num: 0,  
270 - // pageId: 21212,  
271 - // pageType: '',  
272 - // underlineCColor: ''  
273 - // },  
274 - // {  
275 - // channelId: 1,  
276 - // channelStyle: 1,  
277 - // channelType: 1,  
278 - // defaultPermitted: 1,  
279 - // delPermitted: 1,  
280 - // fontCColor: '#000000',  
281 - // fontColor: '#000000',  
282 - // headlinesOn: 0,  
283 - // homeChannel: '1',  
284 - // iconCUrl: '',  
285 - // iconCUrlSize: '',  
286 - // iconUrl: '',  
287 - // iconUrlSize: '',  
288 - // localChannel: '',  
289 - // moreChannel: '',  
290 - // movePermitted: 0,  
291 - // myChannel: '1',  
292 - // name: '热点',  
293 - // num: 0,  
294 - // pageId: 21212,  
295 - // pageType: '',  
296 - // underlineCColor: ''  
297 - // },  
298 - // {  
299 - // channelId: 2,  
300 - // channelStyle: 1,  
301 - // channelType: 1,  
302 - // defaultPermitted: 1,  
303 - // delPermitted: 1,  
304 - // fontCColor: '#000000',  
305 - // fontColor: '#000000',  
306 - // headlinesOn: 0,  
307 - // homeChannel: '',  
308 - // iconCUrl: '',  
309 - // iconCUrlSize: '',  
310 - // iconUrl: '',  
311 - // iconUrlSize: '',  
312 - // localChannel: '',  
313 - // moreChannel: '',  
314 - // movePermitted: 0,  
315 - // myChannel: '1',  
316 - // name: '视频',  
317 - // num: 0,  
318 - // pageId: 21212,  
319 - // pageType: '',  
320 - // underlineCColor: ''  
321 - // },  
322 - // {  
323 - // channelId: 3,  
324 - // channelStyle: 1,  
325 - // channelType: 1,  
326 - // defaultPermitted: 1,  
327 - // delPermitted: 1,  
328 - // fontCColor: '#000000',  
329 - // fontColor: '#000000',  
330 - // headlinesOn: 0,  
331 - // homeChannel: '',  
332 - // iconCUrl: '',  
333 - // iconCUrlSize: '',  
334 - // iconUrl: '',  
335 - // iconUrlSize: '',  
336 - // localChannel: '',  
337 - // moreChannel: '',  
338 - // movePermitted: 0,  
339 - // myChannel: '1',  
340 - // name: '云课堂',  
341 - // num: 0,  
342 - // pageId: 21212,  
343 - // pageType: '',  
344 - // underlineCColor: ''  
345 - // },  
346 - ]  
347 - @State moreChannelList: Array<TopNavDTO> = [  
348 - // {  
349 - // channelId: 4,  
350 - // channelStyle: 1,  
351 - // channelType: 1,  
352 - // defaultPermitted: 1,  
353 - // delPermitted: 1,  
354 - // fontCColor: '#000000',  
355 - // fontColor: '#000000',  
356 - // headlinesOn: 0,  
357 - // homeChannel: '',  
358 - // iconCUrl: '',  
359 - // iconCUrlSize: '',  
360 - // iconUrl: '',  
361 - // iconUrlSize: '',  
362 - // localChannel: '',  
363 - // moreChannel: '1',  
364 - // movePermitted: 0,  
365 - // myChannel: '',  
366 - // name: '房产',  
367 - // num: 0,  
368 - // pageId: 21212,  
369 - // pageType: '',  
370 - // underlineCColor: ''  
371 - // },  
372 - // {  
373 - // channelId: 5,  
374 - // channelStyle: 1,  
375 - // channelType: 1,  
376 - // defaultPermitted: 1,  
377 - // delPermitted: 1,  
378 - // fontCColor: '#000000',  
379 - // fontColor: '#000000',  
380 - // headlinesOn: 0,  
381 - // homeChannel: '',  
382 - // iconCUrl: '',  
383 - // iconCUrlSize: '',  
384 - // iconUrl: '',  
385 - // iconUrlSize: '',  
386 - // localChannel: '',  
387 - // moreChannel: '1',  
388 - // movePermitted: 0,  
389 - // myChannel: '',  
390 - // name: '生态',  
391 - // num: 0,  
392 - // pageId: 21212,  
393 - // pageType: '',  
394 - // underlineCColor: ''  
395 - // },  
396 - // {  
397 - // channelId: 6,  
398 - // channelStyle: 1,  
399 - // channelType: 1,  
400 - // defaultPermitted: 1,  
401 - // delPermitted: 1,  
402 - // fontCColor: '#000000',  
403 - // fontColor: '#000000',  
404 - // headlinesOn: 0,  
405 - // homeChannel: '',  
406 - // iconCUrl: '',  
407 - // iconCUrlSize: '',  
408 - // iconUrl: '',  
409 - // iconUrlSize: '',  
410 - // localChannel: '',  
411 - // moreChannel: '1',  
412 - // movePermitted: 0,  
413 - // myChannel: '',  
414 - // name: '健康',  
415 - // num: 0,  
416 - // pageId: 21212,  
417 - // pageType: '',  
418 - // underlineCColor: ''  
419 - // }  
420 - ]  
421 - @State localChannelList: Array<TopNavDTO> = [  
422 - // {  
423 - // channelId: 7,  
424 - // channelStyle: 1,  
425 - // channelType: 1,  
426 - // defaultPermitted: 1,  
427 - // delPermitted: 1,  
428 - // fontCColor: '#000000',  
429 - // fontColor: '#000000',  
430 - // headlinesOn: 0,  
431 - // homeChannel: '',  
432 - // iconCUrl: '',  
433 - // iconCUrlSize: '',  
434 - // iconUrl: '',  
435 - // iconUrlSize: '',  
436 - // localChannel: '1',  
437 - // moreChannel: '',  
438 - // movePermitted: 0,  
439 - // myChannel: '',  
440 - // name: '北京',  
441 - // num: 0,  
442 - // pageId: 21212,  
443 - // pageType: '',  
444 - // underlineCColor: ''  
445 - // },  
446 - // {  
447 - // channelId: 8,  
448 - // channelStyle: 1,  
449 - // channelType: 1,  
450 - // defaultPermitted: 1,  
451 - // delPermitted: 1,  
452 - // fontCColor: '#000000',  
453 - // fontColor: '#000000',  
454 - // headlinesOn: 0,  
455 - // homeChannel: '',  
456 - // iconCUrl: '',  
457 - // iconCUrlSize: '',  
458 - // iconUrl: '',  
459 - // iconUrlSize: '',  
460 - // localChannel: '1',  
461 - // moreChannel: '',  
462 - // movePermitted: 0,  
463 - // myChannel: '',  
464 - // name: '上海',  
465 - // num: 0,  
466 - // pageId: 21212,  
467 - // pageType: '',  
468 - // underlineCColor: ''  
469 - // },  
470 - // {  
471 - // channelId: 9,  
472 - // channelStyle: 1,  
473 - // channelType: 1,  
474 - // defaultPermitted: 1,  
475 - // delPermitted: 1,  
476 - // fontCColor: '#000000',  
477 - // fontColor: '#000000',  
478 - // headlinesOn: 0,  
479 - // homeChannel: '',  
480 - // iconCUrl: '',  
481 - // iconCUrlSize: '',  
482 - // iconUrl: '',  
483 - // iconUrlSize: '',  
484 - // localChannel: '1',  
485 - // moreChannel: '',  
486 - // movePermitted: 0,  
487 - // myChannel: '',  
488 - // name: '江苏',  
489 - // num: 0,  
490 - // pageId: 21212,  
491 - // pageType: '',  
492 - // underlineCColor: ''  
493 - // }  
494 - ]  
495 - // 顶导数据  
496 - @State topNavList: TopNavDTO[] = [] 312 + @Link currentTopNavSelectedIndex: number;
  313 + @Link myChannelList: TopNavDTO []
  314 + @Link moreChannelList: TopNavDTO []
  315 + @Link localChannelList: TopNavDTO []
  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 [] = []
497 dialogController: CustomDialogController | null = new CustomDialogController({ 1826 dialogController: CustomDialogController | null = new CustomDialogController({
498 builder: ChannelDialog({ 1827 builder: ChannelDialog({
499 - currentTopNavSelectedIndex:this.currentTopNavSelectedIndex,  
500 - indexSettingArray: this.indexSettingArray,  
501 - topNavList: this.topNavList,  
502 - myChannelList: this.myChannelList,  
503 - moreChannelList: this.moreChannelList,  
504 - localChannelList: this.localChannelList, 1828 + currentTopNavSelectedIndex: $currentTopNavSelectedIndex,
  1829 + indexSettingArray: $indexSettingArray,
  1830 + myChannelList: $myChannelList,
  1831 + moreChannelList: $moreChannelList,
  1832 + localChannelList: $localChannelList,
  1833 + confirm: this.onAccept,
  1834 + changeChannelIndex: this.changeChannelIndex
505 }), 1835 }),
506 - cancel: this.exitApp,  
507 alignment: DialogAlignment.TopEnd, 1836 alignment: DialogAlignment.TopEnd,
508 customStyle: true, 1837 customStyle: true,
509 }) 1838 })
510 - aboutToAppear() {  
511 - this.topNavList.forEach((item,index)=>{  
512 - if(item.myChannel === '1'){  
513 - this.myChannelList.push(item)  
514 - }  
515 - if(item.moreChannel === '1'){  
516 - this.moreChannelList.push(item)  
517 - }  
518 - if(item.localChannel === '1'){  
519 - this.localChannelList.push(item)  
520 - }  
521 - })  
522 - }  
523 - aboutToDisappear() {  
524 - this.dialogController = null // 将dialogController置空  
525 - }  
526 1839
527 - onCancel() {  
528 - console.info('Callback when the first button is clicked') 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 + }
529 } 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 + // }
  1898 +
530 1899
531 - onAccept() {  
532 - console.info('Callback when the second button is clicked') 1900 + aboutToAppear() {
  1901 + // this.topNavListHandle()
533 } 1902 }
534 1903
535 - exitApp() {  
536 - console.info('Click the callback in the blank area') 1904 + aboutToDisappear() {
  1905 + this.dialogController = null // 将dialogController置空
537 } 1906 }
538 1907
539 build() { 1908 build() {
@@ -542,8 +1911,9 @@ struct ChannelSubscriptionLayout { @@ -542,8 +1911,9 @@ struct ChannelSubscriptionLayout {
542 .width(18) 1911 .width(18)
543 } 1912 }
544 .width(36) 1913 .width(36)
545 - .height(30) 1914 + .height(36)
546 .justifyContent(FlexAlign.Center) 1915 .justifyContent(FlexAlign.Center)
  1916 + .padding({ bottom: 6 })
547 .backgroundColor('#ffffff') 1917 .backgroundColor('#ffffff')
548 .onClick(() => { 1918 .onClick(() => {
549 if (this.dialogController != null) { 1919 if (this.dialogController != null) {
@@ -101,6 +101,7 @@ export struct PageComponent { @@ -101,6 +101,7 @@ export struct PageComponent {
101 } 101 }
102 102
103 onChange() { 103 onChange() {
  104 + Logger.info(TAG, `onChangezz id: ${this.pageId} , ${this.channelId} , ${this.navIndex} , navIndex: ${this.currentTopNavSelectedIndex}`);
104 if (this.navIndex === this.currentTopNavSelectedIndex) { 105 if (this.navIndex === this.currentTopNavSelectedIndex) {
105 this.getData(); 106 this.getData();
106 } 107 }
@@ -11,56 +11,79 @@ const TAG = 'TopNavigationComponent'; @@ -11,56 +11,79 @@ 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;
17 // 顶导数据 18 // 顶导数据
18 @State @Watch('onTopNavigationDataUpdated') topNavList: TopNavDTO[] = [] 19 @State @Watch('onTopNavigationDataUpdated') topNavList: TopNavDTO[] = []
19 @State compList: LazyDataSource<CompDTO> = new LazyDataSource(); 20 @State compList: LazyDataSource<CompDTO> = new LazyDataSource();
20 - @State handledTopNavList: TopNavDTO[] = [] 21 + //我的频道id缓存列表
  22 + @State channelIds: number[] = []
  23 + // 我的频道列表
  24 + @State myChannelList: TopNavDTO[] = []
  25 + // 更多频道列表
  26 + @State moreChannelList: TopNavDTO[] = []
  27 + // 地方频道列表
  28 + @State localChannelList: TopNavDTO[] = []
21 readonly MAX_LINE: number = 1; 29 readonly MAX_LINE: number = 1;
22 30
  31 + //处理接口顶导数据
23 topNavListHandle() { 32 topNavListHandle() {
24 let defaultMyChannelList: TopNavDTO[] = [] 33 let defaultMyChannelList: TopNavDTO[] = []
25 - this.handledTopNavList = [...this.topNavList]  
26 - this.handledTopNavList.sort((a, b) => { 34 + let handledTopNavList = [...this.topNavList]
  35 + handledTopNavList.sort((a, b) => {
27 return a.num - b.num; 36 return a.num - b.num;
28 }); 37 });
29 - Logger.info(TAG, `aboutToAppear this.handledTopNavListsort : ${JSON.stringify(this.handledTopNavList)}`);  
30 - for (let i = 0; i < this.handledTopNavList.length; i++) {  
31 - if (this.handledTopNavList[i].defaultPermitted === 0 || this.handledTopNavList[i].movePermitted === 0 || this.handledTopNavList[i].delPermitted === 0 || this.handledTopNavList[i].headlinesOn === 1) {  
32 - defaultMyChannelList.push(this.handledTopNavList.splice(i, 1)[0]); 38 + handledTopNavList.forEach(item => {
  39 + if (item.defaultPermitted === 1 || item.movePermitted === 0 || item.delPermitted === 0 || item.headlinesOn === 1) {
  40 + defaultMyChannelList.push(item);
33 } 41 }
34 - } 42 + })
  43 + defaultMyChannelList.forEach(item => {
  44 + item.myChannel = '1'
  45 + if (item.defaultPermitted === 1) {
  46 + item.homeChannel = '1'
  47 + }
  48 + let index = handledTopNavList.findIndex(_item => _item.channelId === item.channelId)
  49 + if (index !== -1) {
  50 + handledTopNavList.splice(index, 1)
  51 + }
  52 + })
35 53
36 - Logger.info(TAG, `aboutToAppear defaultMyChannelListsort : ${JSON.stringify(defaultMyChannelList)}`); 54 + handledTopNavList.unshift(...defaultMyChannelList)
  55 + handledTopNavList.forEach((item, index) => {
  56 + if (item.channelType === 2) {
  57 + item.localChannel = '1'
  58 + }
  59 + if (index >= 11) {
  60 + if (item.channelType === 1) {
  61 + item.moreChannel = '1'
  62 + }
  63 + } else {
  64 + if (item.channelType === 1 && item.myChannel !== '1') {
  65 + item.moreChannel = '1'
  66 + }
  67 + }
37 68
38 - for (const element of defaultMyChannelList) {  
39 - element.myChannel = '1'  
40 - if (element.defaultPermitted === 1) {  
41 - element.homeChannel = '1' 69 + if (item.myChannel === '1') {
  70 + this.myChannelList.push(item)
42 } 71 }
43 - }  
44 - this.handledTopNavList.unshift(...defaultMyChannelList)  
45 - for (let i = 0; i < this.handledTopNavList.length; i++) {  
46 - if(this.handledTopNavList[i].channelType === 2){  
47 - this.handledTopNavList[i].localChannel = '1' 72 + if (item.moreChannel === '1') {
  73 + this.moreChannelList.push(item)
48 } 74 }
49 - if(i>=11){  
50 - if(this.handledTopNavList[i].channelType === 1){  
51 - this.handledTopNavList[i].moreChannel = '1'  
52 - }  
53 - }else{  
54 - if(this.handledTopNavList[i].channelType === 1 && this.handledTopNavList[i].myChannel !== '1'){  
55 - this.handledTopNavList[i].moreChannel = '1'  
56 - } 75 + if (item.localChannel === '1') {
  76 + this.localChannelList.push(item)
57 } 77 }
58 - }  
59 - console.info(`handledTopNavList:${JSON.stringify(this.handledTopNavList)}`) 78 + })
60 } 79 }
61 80
  81 + isBroadcast (item: TopNavDTO) {
  82 + return item.name === '播报'
  83 + }
62 build() { 84 build() {
63 Column() { 85 Column() {
  86 + // 顶部搜索、日报logo、早晚报
64 RelativeContainer() { 87 RelativeContainer() {
65 Stack({ alignContent: Alignment.Center }) { 88 Stack({ alignContent: Alignment.Center }) {
66 89
@@ -80,7 +103,6 @@ export struct TopNavigationComponent { @@ -80,7 +103,6 @@ export struct TopNavigationComponent {
80 } 103 }
81 .alignItems(VerticalAlign.Center) 104 .alignItems(VerticalAlign.Center)
82 .justifyContent(FlexAlign.Center) 105 .justifyContent(FlexAlign.Center)
83 -  
84 } 106 }
85 .height(30) 107 .height(30)
86 .width(123) 108 .width(123)
@@ -146,18 +168,20 @@ export struct TopNavigationComponent { @@ -146,18 +168,20 @@ export struct TopNavigationComponent {
146 .width('100%') 168 .width('100%')
147 .height(40) 169 .height(40)
148 .visibility(this._currentNavIndex == 0 ? Visibility.Visible : Visibility.None) 170 .visibility(this._currentNavIndex == 0 ? Visibility.Visible : Visibility.None)
149 - 171 + // 频道分类list
150 Stack({ alignContent: Alignment.TopEnd }) { 172 Stack({ alignContent: Alignment.TopEnd }) {
151 173
152 - Tabs() {  
153 - ForEach(this.handledTopNavList, (navItem: TopNavDTO, index: number) => { 174 + Tabs({ controller: this.tabsController }) {
  175 + ForEach(this.myChannelList, (navItem: TopNavDTO, index: number) => {
154 TabContent() { 176 TabContent() {
155 - PageComponent({  
156 - currentTopNavSelectedIndex: $currentTopNavSelectedIndex,  
157 - navIndex: index,  
158 - pageId: navItem.pageId + '',  
159 - channelId: navItem.channelId + ''  
160 - }) 177 + if(!this.isBroadcast(navItem)) {
  178 + PageComponent({
  179 + currentTopNavSelectedIndex: $currentTopNavSelectedIndex,
  180 + navIndex: index,
  181 + pageId: navItem.pageId + '',
  182 + channelId: navItem.channelId + ''
  183 + })
  184 + }
161 } 185 }
162 .tabBar(this.tabBarBuilder(navItem, index)) 186 .tabBar(this.tabBarBuilder(navItem, index))
163 }, (navItem: TopNavDTO) => JSON.stringify(navItem)); 187 }, (navItem: TopNavDTO) => JSON.stringify(navItem));
@@ -167,13 +191,32 @@ export struct TopNavigationComponent { @@ -167,13 +191,32 @@ export struct TopNavigationComponent {
167 .vertical(false) 191 .vertical(false)
168 .onChange((index: number) => { 192 .onChange((index: number) => {
169 Logger.info(TAG, `onChange index : ${index}`); 193 Logger.info(TAG, `onChange index : ${index}`);
170 - 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 + }
171 }) 208 })
172 - 209 + // 分类列表最右侧频道设置
173 ChannelSubscriptionLayout({ 210 ChannelSubscriptionLayout({
174 - topNavList: this.handledTopNavList,  
175 - currentTopNavSelectedIndex: this.currentTopNavSelectedIndex 211 + changeTab: (index) => {
  212 + this.tabsController.changeIndex(index)
  213 + },
  214 + myChannelList: $myChannelList,
  215 + moreChannelList: $moreChannelList,
  216 + localChannelList: $localChannelList,
  217 + currentTopNavSelectedIndex: $currentTopNavSelectedIndex
176 }) 218 })
  219 + // ChannelSubscriptionLayout()
177 } 220 }
178 221
179 } 222 }
@@ -208,7 +251,7 @@ export struct TopNavigationComponent { @@ -208,7 +251,7 @@ export struct TopNavigationComponent {
208 bottom: $r('app.float.top_tab_item_padding_bottom') 251 bottom: $r('app.float.top_tab_item_padding_bottom')
209 }) 252 })
210 .id(`col_tabBar${index}`) 253 .id(`col_tabBar${index}`)
211 - 254 + .margin({ right: this.myChannelList.length === index + 1 ? 36 : 0 })
212 } 255 }
213 256
214 aboutToAppear() { 257 aboutToAppear() {
1 import { Action, CompDTO, Params } from 'wdBean'; 1 import { Action, CompDTO, Params } from 'wdBean';
2 import { ExtraDTO } from 'wdBean/src/main/ets/bean/component/extra/ExtraDTO'; 2 import { ExtraDTO } from 'wdBean/src/main/ets/bean/component/extra/ExtraDTO';
  3 +import { CommonConstants } from 'wdConstant/Index';
3 import { DateTimeUtils, Logger } from 'wdKit'; 4 import { DateTimeUtils, Logger } from 'wdKit';
4 import { WDRouterRule } from 'wdRouter'; 5 import { WDRouterRule } from 'wdRouter';
5 6
@@ -23,15 +24,12 @@ export struct AlbumCardComponent { @@ -23,15 +24,12 @@ export struct AlbumCardComponent {
23 .fontColor(0x222222) 24 .fontColor(0x222222)
24 .lineHeight(25) 25 .lineHeight(25)
25 .maxLines(3) 26 .maxLines(3)
26 - .margin({ top: 6,  
27 - left: 16,  
28 - right: 16 })  
29 - .width(343) 27 + .width(CommonConstants.FULL_WIDTH)
30 28
31 RelativeContainer() { 29 RelativeContainer() {
32 Image(this.compDTO.operDataList[0].fullColumnImgUrls[0].url) 30 Image(this.compDTO.operDataList[0].fullColumnImgUrls[0].url)
33 - .width(229)  
34 - .height(154) 31 + .width('66.6%')
  32 + .aspectRatio(16/9)
35 .alignRules({ 33 .alignRules({
36 top: { anchor: "__container__", align: VerticalAlign.Top }, 34 top: { anchor: "__container__", align: VerticalAlign.Top },
37 left: { anchor: "__container__", align: HorizontalAlign.Start } 35 left: { anchor: "__container__", align: HorizontalAlign.Start }
@@ -39,8 +37,8 @@ export struct AlbumCardComponent { @@ -39,8 +37,8 @@ export struct AlbumCardComponent {
39 .id('mainImage') 37 .id('mainImage')
40 38
41 Image(this.compDTO.operDataList[0].fullColumnImgUrls[1].url) 39 Image(this.compDTO.operDataList[0].fullColumnImgUrls[1].url)
42 - .width(112)  
43 - .height(76) 40 + .width('33%')
  41 + .aspectRatio(16/9)
44 .alignRules({ 42 .alignRules({
45 top: { anchor: "__container__", align: VerticalAlign.Top }, 43 top: { anchor: "__container__", align: VerticalAlign.Top },
46 right: { anchor: "__container__", align: HorizontalAlign.End } 44 right: { anchor: "__container__", align: HorizontalAlign.End }
@@ -48,14 +46,14 @@ export struct AlbumCardComponent { @@ -48,14 +46,14 @@ export struct AlbumCardComponent {
48 .id('subTopImage') 46 .id('subTopImage')
49 47
50 Image(this.compDTO.operDataList[0].fullColumnImgUrls[2].url) 48 Image(this.compDTO.operDataList[0].fullColumnImgUrls[2].url)
51 - .width(112)  
52 - .height(76) 49 + .width('33%')
  50 + .aspectRatio(16/9)
53 .alignRules({ 51 .alignRules({
54 right: { anchor: "__container__", align: HorizontalAlign.End }, 52 right: { anchor: "__container__", align: HorizontalAlign.End },
55 bottom: { anchor: "__container__", align: VerticalAlign.Bottom } 53 bottom: { anchor: "__container__", align: VerticalAlign.Bottom }
56 }) 54 })
57 .id('subBottomImage') 55 .id('subBottomImage')
58 - 56 + // 下面是渲染右下角图标
59 Shape() { 57 Shape() {
60 Rect().width(33).height(18) 58 Rect().width(33).height(18)
61 } 59 }
@@ -97,8 +95,8 @@ export struct AlbumCardComponent { @@ -97,8 +95,8 @@ export struct AlbumCardComponent {
97 .width(17) 95 .width(17)
98 .height(17) 96 .height(17)
99 } 97 }
100 - .width(343)  
101 - .height(154) 98 + .width(CommonConstants.FULL_WIDTH)
  99 + .aspectRatio(24/9)
102 .onClick((event: ClickEvent) => { 100 .onClick((event: ClickEvent) => {
103 let taskAction: Action = { 101 let taskAction: Action = {
104 type: 'JUMP_DETAIL_PAGE', 102 type: 'JUMP_DETAIL_PAGE',
@@ -134,13 +132,17 @@ export struct AlbumCardComponent { @@ -134,13 +132,17 @@ export struct AlbumCardComponent {
134 .margin({ 132 .margin({
135 left: 6 133 left: 6
136 }) 134 })
137 - }.margin({ left: 24 })  
138 - .width(375) 135 + }
  136 + .width(CommonConstants.FULL_WIDTH)
139 .height(16) 137 .height(16)
140 .id('label') 138 .id('label')
141 } 139 }
142 - .width(375)  
143 -  
144 - // .backgroundColor(0x000000) 140 + .width(CommonConstants.FULL_WIDTH)
  141 + .padding({
  142 + top: 14,
  143 + left: 16,
  144 + right: 16,
  145 + bottom: 14
  146 + })
145 } 147 }
146 } 148 }
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;
@@ -8,10 +11,16 @@ export interface OperationItem { @@ -8,10 +11,16 @@ export interface OperationItem {
8 11
9 const TAG = 'OperRowListView'; 12 const TAG = 'OperRowListView';
10 13
  14 +@Preview
11 @Component 15 @Component
12 export struct OperRowListView { 16 export struct OperRowListView {
13 @State operationList: OperationItem[] = [ 17 @State operationList: OperationItem[] = [
14 { 18 {
  19 + icon: $r('app.media.ic_comment'),
  20 + text: "评论",
  21 + num: 500,
  22 + },
  23 + {
15 icon: $r('app.media.ic_like_uncheck'), 24 icon: $r('app.media.ic_like_uncheck'),
16 text: "点赞", 25 text: "点赞",
17 num: 6622 26 num: 6622
@@ -19,12 +28,6 @@ export struct OperRowListView { @@ -19,12 +28,6 @@ export struct OperRowListView {
19 { 28 {
20 icon: $r('app.media.ic_collect_uncheck'), 29 icon: $r('app.media.ic_collect_uncheck'),
21 text: "收藏", 30 text: "收藏",
22 - num: 662,  
23 - },  
24 - {  
25 - icon: $r('app.media.ic_comment'),  
26 - text: "评论",  
27 - num: 500,  
28 }, 31 },
29 { 32 {
30 icon: $r('app.media.ic_share'), 33 icon: $r('app.media.ic_share'),
@@ -36,16 +39,57 @@ export struct OperRowListView { @@ -36,16 +39,57 @@ export struct OperRowListView {
36 } 39 }
37 40
38 build() { 41 build() {
39 -  
40 - Row() {  
41 - ForEach(this.operationList, (item: OperationItem, index: number) => {  
42 - this.buildOperationItem(item, index)  
43 - }, (item: OperationItem, index: number) => JSON.stringify(item)) 42 + Flex({ justifyContent: FlexAlign.SpaceBetween, alignItems:ItemAlign.Center }){
  43 + Row() {
  44 + Column() {
  45 + Image($r('app.media.icon_arrow_left_white'))
  46 + .width(24)
  47 + .height(24)
  48 + .aspectRatio(1)
  49 + .interpolation(ImageInterpolation.High)
  50 + }
  51 + .margin({
  52 + top: 0,
  53 + left: 8,
  54 + right: 8,
  55 + bottom: 0
  56 + })
  57 + .alignItems(HorizontalAlign.Center)
  58 + .hoverEffect(HoverEffect.Scale)
  59 + .onClick(() => {
  60 + router.back();
  61 + })
  62 + TextInput({placeholder:'说两句...'})
  63 + .placeholderColor('#999999')
  64 + .placeholderFont(
  65 + {
  66 + size: 12,
  67 + weight: 400,
  68 + family: 'PingFang SC-Regular'
  69 + }
  70 + )
  71 + .caretColor('#1A1A1A')
  72 + .backgroundColor('#1A1A1A')
  73 + .width('61.5%')
  74 + .height(30)
  75 + .borderRadius(0)
  76 + .onClick(() => {
  77 + this.buildInputMethod()
  78 + })
  79 + }
  80 + .width('45.5%')
  81 + .alignItems(VerticalAlign.Center)
  82 + .justifyContent(FlexAlign.Start)
  83 + Flex({ justifyContent: FlexAlign.SpaceAround, alignItems:ItemAlign.Center }) {
  84 + ForEach(this.operationList, (item: OperationItem, index: number) => {
  85 + this.buildOperationItem(item, index)
  86 + }, (item: OperationItem) => JSON.stringify(item))
  87 + }
  88 + .width('54.5%')
44 } 89 }
45 .width('100%') 90 .width('100%')
46 - .height('100%')  
47 - .alignItems(VerticalAlign.Center)  
48 - .justifyContent(FlexAlign.Center) 91 + .height(56)
  92 + .backgroundColor(Color.Black)
49 } 93 }
50 94
51 /** 95 /**
@@ -56,17 +100,84 @@ export struct OperRowListView { @@ -56,17 +100,84 @@ export struct OperRowListView {
56 @Builder 100 @Builder
57 buildOperationItem(item: OperationItem, index: number) { 101 buildOperationItem(item: OperationItem, index: number) {
58 Column() { 102 Column() {
59 - Image(item.icon)  
60 - .width(24)  
61 - .height(24)  
62 - .aspectRatio(1) 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}`)
63 } 144 }
64 .margin(5) 145 .margin(5)
65 .alignItems(HorizontalAlign.Center) 146 .alignItems(HorizontalAlign.Center)
66 .hoverEffect(HoverEffect.Scale) 147 .hoverEffect(HoverEffect.Scale)
67 - .onClick((event: ClickEvent) => { 148 + .onClick(() => {
68 Logger.info(TAG, `buildOperationItem onClick event index: ${index}`); 149 Logger.info(TAG, `buildOperationItem onClick event index: ${index}`);
69 ToastUtils.showToast('体验版,本功能暂未开发', 1000); 150 ToastUtils.showToast('体验版,本功能暂未开发', 1000);
70 }) 151 })
71 } 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 + }
72 } 183 }
@@ -102,6 +102,7 @@ export class PageRepository { @@ -102,6 +102,7 @@ export class PageRepository {
102 * 早晚报pageInfo请求 TODO 现网无数据写死测试环境 102 * 早晚报pageInfo请求 TODO 现网无数据写死测试环境
103 * */ 103 * */
104 static getMorningEveningPageInfoUrl(pageId: string) { 104 static getMorningEveningPageInfoUrl(pageId: string) {
  105 + HttpUrlUtils.hostUrl = HttpUrlUtils.HOST_DEV
105 let url = HttpUrlUtils.getHost() + HttpUrlUtils.MORNING_EVENING_PAGE_INFO_PATH; 106 let url = HttpUrlUtils.getHost() + HttpUrlUtils.MORNING_EVENING_PAGE_INFO_PATH;
106 url = url + "?pageId=" + pageId; 107 url = url + "?pageId=" + pageId;
107 Logger.info(TAG, "getMorningEveningPageInfoUrl url = " + url) 108 Logger.info(TAG, "getMorningEveningPageInfoUrl url = " + url)
@@ -122,6 +123,7 @@ export class PageRepository { @@ -122,6 +123,7 @@ export class PageRepository {
122 * topicId:专题id 123 * topicId:专题id
123 * */ 124 * */
124 static getMorningEveningCompInfoUrl(pageId: number, groupId: number, refreshTime: string, topicId: string, pageNum: number, pageSize: number) { 125 static getMorningEveningCompInfoUrl(pageId: number, groupId: number, refreshTime: string, topicId: string, pageNum: number, pageSize: number) {
  126 + HttpUrlUtils.hostUrl = HttpUrlUtils.HOST_DEV
125 let url = HttpUrlUtils.getHost() + HttpUrlUtils.MORNING_EVENING_COMP_INFO_PATH; 127 let url = HttpUrlUtils.getHost() + HttpUrlUtils.MORNING_EVENING_COMP_INFO_PATH;
126 url = url + "?loadStrategy=first_load&pageNum=" + pageNum + "&refreshTime=" + refreshTime + "&pageId=" 128 url = url + "?loadStrategy=first_load&pageNum=" + pageNum + "&refreshTime=" + refreshTime + "&pageId="
127 + pageId + "&channelStrategy=2&groupId=" + groupId + "&topicId=" + topicId + "&pageSize=" + pageSize; 129 + pageId + "&channelStrategy=2&groupId=" + groupId + "&topicId=" + topicId + "&pageSize=" + pageSize;
@@ -211,4 +213,29 @@ export class PageRepository { @@ -211,4 +213,29 @@ export class PageRepository {
211 let headers: HashMap<string, string> = HttpUrlUtils.getCommonHeaders(); 213 let headers: HashMap<string, string> = HttpUrlUtils.getCommonHeaders();
212 return WDHttp.get<ResponseDTO<CompInfoBean>>(url, headers) 214 return WDHttp.get<ResponseDTO<CompInfoBean>>(url, headers)
213 }; 215 };
214 -}  
  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 +}
1 import { Logger, ResourcesUtils } from 'wdKit'; 1 import { Logger, ResourcesUtils } from 'wdKit';
2 import { HttpUrlUtils, ResponseDTO, WDHttp } from 'wdNetwork'; 2 import { HttpUrlUtils, ResponseDTO, WDHttp } from 'wdNetwork';
3 -import { ContentDetailDTO } from 'wdBean'; 3 +import { ContentDetailDTO, InteractDataDTO } from 'wdBean';
4 import HashMap from '@ohos.util.HashMap'; 4 import HashMap from '@ohos.util.HashMap';
5 5
6 const TAG = 'ContentDetailRequest'; 6 const TAG = 'ContentDetailRequest';
@@ -13,11 +13,118 @@ export interface ContentDetailRequestParams { @@ -13,11 +13,118 @@ export interface ContentDetailRequestParams {
13 relType: string 13 relType: string
14 } 14 }
15 15
16 -export interface recommentVideoListParame { 16 +export interface recommentVideoListParams {
17 pageSize: number; 17 pageSize: number;
18 refreshCnt: number; 18 refreshCnt: number;
19 } 19 }
20 - 20 +
  21 +interface contentListItem {
  22 + contentId: string;
  23 + contentType: number;
  24 +}
  25 +
  26 +export interface contentListParams {
  27 + contentList: contentListItem[];
  28 +}
  29 +
  30 +export interface IStatusContentList {
  31 + contentId: string;
  32 +
  33 + // relType: string;
  34 + contentType: string;
  35 + // contentRelId: string;
  36 +}
  37 +
  38 +export interface batchLikeAndCollectParams {
  39 + // userType: number;
  40 + // userId: string;
  41 + contentList: IStatusContentList[]
  42 +}
  43 +
  44 +export interface batchLikeAndCollectResult {
  45 + collectStatus: number;
  46 + contentType: string;
  47 + likeStatus: string;
  48 + relType: string;
  49 + contentId: string;
  50 + contentRelId: string;
  51 +}
  52 +
  53 +export interface postBatchAttentionStatusParamsItem {
  54 + creatorId: string;
  55 +}
  56 +
  57 +export interface postBatchAttentionStatusParams {
  58 + creatorIds: postBatchAttentionStatusParamsItem[]
  59 +}
  60 +
  61 +export interface postBatchAttentionStatusResult {
  62 + creatorId: string;
  63 + status: string;
  64 + userId: string;
  65 +}
  66 +
  67 +
  68 +export interface postExecuteLikeParams {
  69 + status: string;
  70 + contentId: string;
  71 + contentType: string;
  72 + relType?: string;
  73 + userName?: string;
  74 + title?: string;
  75 + contentRelId?: string;
  76 + userHeaderUrl?: string;
  77 + channelId?: string;
  78 +}
  79 +
  80 +export interface postExecuteCollectRecordParamsItem {
  81 + contentId: string;
  82 + contentType: string;
  83 + relType?: string;
  84 + contentRelId?: string;
  85 +}
  86 +
  87 +export interface postExecuteCollectRecordParams {
  88 + status: string;
  89 + contentList: postExecuteCollectRecordParamsItem[]
  90 +}
  91 +
  92 +export interface postPointLevelOperateParams {
  93 + operateType: number;
  94 +}
  95 +
  96 +export interface postCommentPublishParams {
  97 + targetId: string;
  98 + keyArticle: string;
  99 + commentPics: string;
  100 + targetTitle: string;
  101 + commentType: string;
  102 + targetType: string;
  103 + commentContent: string;
  104 + parentId: string;
  105 + rootCommentId: string;
  106 +}
  107 +
  108 +export interface postInteractBrowsOperateParamsContent {
  109 + browseTime: string;
  110 + contentId: string;
  111 + contentType: number;
  112 +}
  113 +
  114 +export interface postInteractBrowsOperateParams {
  115 + delStatus: number;
  116 + contentList: postInteractBrowsOperateParamsContent[]
  117 +}
  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 +}
21 128
22 export class ContentDetailRequest { 129 export class ContentDetailRequest {
23 static getContentDetailDataMock(context: Context): Promise<ResponseDTO<ContentDetailDTO[]>> { 130 static getContentDetailDataMock(context: Context): Promise<ResponseDTO<ContentDetailDTO[]>> {
@@ -55,30 +162,30 @@ export class ContentDetailRequest { @@ -55,30 +162,30 @@ export class ContentDetailRequest {
55 * 162 *
56 * @returns 163 * @returns
57 */ 164 */
58 - static getContentInteract() { 165 + static getContentInteract(params: contentListParams): Promise<ResponseDTO<InteractDataDTO[]>> {
59 let url = HttpUrlUtils.getHost() + HttpUrlUtils.INTERACT_DATA_PATH 166 let url = HttpUrlUtils.getHost() + HttpUrlUtils.INTERACT_DATA_PATH
60 let headers: HashMap<string, string> = HttpUrlUtils.getCommonHeaders(); 167 let headers: HashMap<string, string> = HttpUrlUtils.getCommonHeaders();
61 - return WDHttp.get(url, headers) 168 + return WDHttp.post0(url, params, headers)
62 } 169 }
63 170
64 /** 171 /**
65 - * 172 + * 批量查询作品查询点赞、收藏状态
66 * @returns 173 * @returns
67 */ 174 */
68 - static postBatchLikeAndCollectStatus() { 175 + static postBatchLikeAndCollectStatus(params: batchLikeAndCollectParams): Promise<ResponseDTO<batchLikeAndCollectResult[]>> {
69 let url = HttpUrlUtils.getHost() + HttpUrlUtils.INTERACT_DATA_STATUS 176 let url = HttpUrlUtils.getHost() + HttpUrlUtils.INTERACT_DATA_STATUS
70 let headers: HashMap<string, string> = HttpUrlUtils.getCommonHeaders(); 177 let headers: HashMap<string, string> = HttpUrlUtils.getCommonHeaders();
71 - return WDHttp.post(url, headers) 178 + return WDHttp.post0(url, params, headers)
72 } 179 }
73 180
74 /** 181 /**
75 - * 182 + * 批量查号主是否为用户关注
76 * @returns 183 * @returns
77 */ 184 */
78 - static postBatchAttentionStatus() { 185 + static postBatchAttentionStatus(params: postBatchAttentionStatusParams): Promise<ResponseDTO<postBatchAttentionStatusResult[]>> {
79 let url = HttpUrlUtils.getHost() + HttpUrlUtils.FOLLOW_LIST_STATUS_DATA_PATH 186 let url = HttpUrlUtils.getHost() + HttpUrlUtils.FOLLOW_LIST_STATUS_DATA_PATH
80 let headers: HashMap<string, string> = HttpUrlUtils.getCommonHeaders(); 187 let headers: HashMap<string, string> = HttpUrlUtils.getCommonHeaders();
81 - return WDHttp.post(url, headers) 188 + return WDHttp.post0(url, params, headers)
82 } 189 }
83 190
84 191
@@ -87,9 +194,69 @@ export class ContentDetailRequest { @@ -87,9 +194,69 @@ export class ContentDetailRequest {
87 * @returns 194 * @returns
88 */ 195 */
89 196
90 - static postRecommendVideoList(params: recommentVideoListParame): Promise<ResponseDTO<ContentDetailDTO[]>> { 197 + static postRecommendVideoList(params: recommentVideoListParams): Promise<ResponseDTO<ContentDetailDTO[]>> {
91 let url = HttpUrlUtils.getHost() + HttpUrlUtils.RECOMMEND_VIDEOLIST 198 let url = HttpUrlUtils.getHost() + HttpUrlUtils.RECOMMEND_VIDEOLIST
92 let headers: HashMap<string, string> = HttpUrlUtils.getCommonHeaders(); 199 let headers: HashMap<string, string> = HttpUrlUtils.getCommonHeaders();
93 return WDHttp.post0(url, params, headers) 200 return WDHttp.post0(url, params, headers)
94 } 201 }
  202 +
  203 + /**
  204 + * 用户点赞、取消点赞
  205 + * @param params
  206 + * @returns
  207 + */
  208 + static postExecuteLike(params: postExecuteLikeParams): Promise<ResponseDTO> {
  209 + let url = HttpUrlUtils.getHost() + HttpUrlUtils.INTERACT_EXECUTELIKE
  210 + let headers: HashMap<string, string> = HttpUrlUtils.getCommonHeaders();
  211 + return WDHttp.post0(url, params, headers)
  212 + }
  213 +
  214 + /**
  215 + * 用户收藏、取消收藏
  216 + * @param params
  217 + * @returns
  218 + */
  219 + static postExecuteCollectRecord(params: postExecuteCollectRecordParams): Promise<ResponseDTO> {
  220 + let url = HttpUrlUtils.getHost() + HttpUrlUtils.INTERACT_EXECUTECOLLECTRECORD
  221 + let headers: HashMap<string, string> = HttpUrlUtils.getCommonHeaders();
  222 + return WDHttp.post0(url, params, headers)
  223 + }
  224 +
  225 + /**
  226 + *用户等级/积分-APP根据业务场景动态增减成长值(APP)
  227 + * 操作类型:1阅读 2评论 3回复(积分任务同评论) 4分享 5点赞 6关注 7打开客户端 8上传头像 9打开推送开关
  228 + */
  229 + static postPointLevelOperate(params: postPointLevelOperateParams): Promise<ResponseDTO> {
  230 + let url = HttpUrlUtils.getHost() + HttpUrlUtils.USERPOINT_OPERATE
  231 + let headers: HashMap<string, string> = HttpUrlUtils.getCommonHeaders();
  232 + return WDHttp.post0(url, params, headers)
  233 + }
  234 +
  235 + /**
  236 + * 评论发布
  237 + */
  238 + static postCommentPublish(params: postCommentPublishParams): Promise<ResponseDTO> {
  239 + let url = HttpUrlUtils.getHost() + HttpUrlUtils.COMMENT_PUBLISH
  240 + let headers: HashMap<string, string> = HttpUrlUtils.getCommonHeaders();
  241 + return WDHttp.post0(url, params, headers)
  242 + }
  243 +
  244 +
  245 + /**
  246 + * 浏览历史新增、删除接口
  247 + */
  248 + static postInteractBrowsOperate(params: postInteractBrowsOperateParams): Promise<ResponseDTO> {
  249 + let url = HttpUrlUtils.getHost() + HttpUrlUtils.INTERACT_BROWS_OPERATE
  250 + let headers: HashMap<string, string> = HttpUrlUtils.getCommonHeaders();
  251 + return WDHttp.post0(url, params, headers)
  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 + }
95 } 262 }
1 -import router from '@ohos.router';  
2 import mediaquery from '@ohos.mediaquery'; 1 import mediaquery from '@ohos.mediaquery';
3 -import window from '@ohos.window';  
4 -import { Action, ContentDetailDTO, RmhInfoDTO, UserInfoDTO } from 'wdBean';  
5 -import { Logger, SPHelper, WindowModel } from 'wdKit';  
6 -import { PlayerConstants, WDPlayerController, WDPlayerRenderView } from 'wdPlayer';  
7 -import { devicePLSensorManager } from 'wdDetailPlayApi'; 2 +import { ContentDetailDTO, InteractDataDTO } from 'wdBean';
  3 +import { WDPlayerController, WDPlayerRenderView } from 'wdPlayer';
  4 +import { ContentDetailRequest, devicePLSensorManager } from 'wdDetailPlayApi';
8 import { PlayControlViewContainer } from '../view/PlayControlViewContainer'; 5 import { PlayControlViewContainer } from '../view/PlayControlViewContainer';
9 import { PlayerDetailContainer } from '../view/PlayerDetailContainer'; 6 import { PlayerDetailContainer } from '../view/PlayerDetailContainer';
10 -import { PlayViewModel } from '../viewmodel/PlayViewModel';  
11 import { DetailContainer } from '../view/DetailContainer'; 7 import { DetailContainer } from '../view/DetailContainer';
  8 +import {
  9 + batchLikeAndCollectParams,
  10 + batchLikeAndCollectResult,
  11 + postBatchAttentionStatusParams,
  12 + postInteractBrowsOperateParams
  13 +} from 'wdDetailPlayApi/src/main/ets/request/ContentDetailRequest';
  14 +import { HttpUrlUtils } from 'wdNetwork/Index';
  15 +import { DateTimeUtils } from 'wdKit/Index';
12 16
13 const TAG = 'DetailPlayShortVideoPage'; 17 const TAG = 'DetailPlayShortVideoPage';
14 18
@@ -18,73 +22,104 @@ const TAG = 'DetailPlayShortVideoPage'; @@ -18,73 +22,104 @@ const TAG = 'DetailPlayShortVideoPage';
18 22
19 @Component 23 @Component
20 export struct DetailPlayShortVideoPage { 24 export struct DetailPlayShortVideoPage {
21 - private contentId?: string = undefined  
22 - private relId?: string = undefined  
23 - private relType?: string = undefined  
24 - private contentDetailData: ContentDetailDTO | undefined = undefined 25 + @Prop index: number = 0
25 @Prop @Watch('currentIndexChange') currentIndex: number = 0 26 @Prop @Watch('currentIndexChange') currentIndex: number = 0
26 - private index: number = 0  
27 - private playerController: WDPlayerController = new WDPlayerController();  
28 - @Watch("urlChanged") @State url?: string = undefined  
29 - @Watch('changeContinue') @Provide nextContId?: string = '';  
30 - @Watch('getPlayHistory') @Provide curContId?: string = undefined;  
31 - @Watch("playVMChanged") @Provide playVM: PlayViewModel = new PlayViewModel(); 27 + @State playerController: WDPlayerController = new WDPlayerController();
  28 + @Provide contentDetailData: ContentDetailDTO | undefined = undefined
  29 + @Provide interactData: InteractDataDTO | undefined = undefined
32 @Provide isFullScreen: boolean = false; 30 @Provide isFullScreen: boolean = false;
33 - @Provide canStart?: boolean = false;  
34 - @Provide status: number = PlayerConstants.STATUS_START;  
35 - @Provide userId: string = '';  
36 - @Provide newsSourceName?: string = ''  
37 - @Provide newsTitle?: string = ''  
38 - @Provide editorName?: string = ''  
39 - @Provide rmhInfo?: RmhInfoDTO | null = null  
40 - @Provide userInfo?: UserInfoDTO | null = null  
41 - @Provide message?: string = ''  
42 - @Provide newsSummary?: string = ''  
43 @Provide progressVal: number = 0; 31 @Provide progressVal: number = 0;
44 @Provide videoLandScape?: number = 1; // 视频朝向, 横屏视频:1;竖屏视频:2 32 @Provide videoLandScape?: number = 1; // 视频朝向, 横屏视频:1;竖屏视频:2
45 -  
46 - playVMChanged() {  
47 - this.url = this.playVM.url  
48 - this.newsSourceName = this.playVM.newsSourceName  
49 - this.newsTitle = this.playVM.newsTitle  
50 - this.editorName = this.playVM.editorName  
51 - this.newsSummary = this.playVM.newsSummary  
52 - this.videoLandScape = this.playVM.videoLandScape ?? 1  
53 - this.curContId = this.playVM.contentId  
54 - this.nextContId = this.playVM.nextContId  
55 - this.canStart = this.playVM.canStart;  
56 - this.message = this.playVM.message  
57 - this.rmhInfo = this.playVM.rmhInfo  
58 - this.userInfo = this.playVM.userInfo  
59 - } 33 + @Provide newsStatusOfUser: batchLikeAndCollectResult | undefined = undefined // 点赞、收藏状态
  34 + @Provide followStatus: string = '0' // 关注状态
60 35
61 currentIndexChange() { 36 currentIndexChange() {
62 - console.log('currentIndexChange====', this.currentIndex)  
63 if (this.currentIndex != this.index) { 37 if (this.currentIndex != this.index) {
64 this.playerController.pause() 38 this.playerController.pause()
  39 +
  40 + if (this.index < this.currentIndex - 5 && this.playerController.getPlayer()) {
  41 + this.playerController.release()
  42 + }
  43 +
65 } else { 44 } else {
66 - console.log('currentIndexChange====1', this.playerController)  
67 - this.playerController.switchPlayOrPause() 45 + this.queryNewsInfoOfUser()
  46 + console.log('currentIndex==== ', this.currentIndex)
  47 + if (!this.playerController.getPlayer()) {
  48 + console.error('state91111111===', this.contentDetailData?.videoInfo[0]?.videoUrl || '')
  49 + this.playerController.firstPlay(this.contentDetailData?.videoInfo[0]?.videoUrl || '');
  50 + console.error('state91111111===', this.playerController?.getPlayer()?.state)
  51 + } else {
  52 + console.error('state9===', this.playerController?.getPlayer()?.state)
  53 + this.playerController.play()
  54 + }
  55 +
68 } 56 }
69 } 57 }
70 58
71 - aboutToAppear() {  
72 - console.log('开始设置setContentDetailData', JSON.stringify(this.contentDetailData)) 59 + /**
  60 + * 查询用户点赞、收藏、关注等状态
  61 + */
  62 + queryNewsInfoOfUser() {
  63 + if (HttpUrlUtils.getUserId()) {
  64 + const params: batchLikeAndCollectParams = {
  65 + contentList: [
  66 + {
  67 + contentId: this.contentDetailData?.newsId + '',
  68 + contentType: this.contentDetailData?.newsType + '',
  69 + }
  70 + ]
  71 + }
  72 + // 已登录->查询用户对作品点赞、收藏状态
  73 + ContentDetailRequest.postBatchLikeAndCollectStatus(params).then(res => {
  74 + console.log('查询点赞、收藏状态==', JSON.stringify(res.data))
  75 + if (res.data) {
  76 + this.newsStatusOfUser = res.data[0]
  77 + }
  78 + })
73 79
74 - this.playVM.setContentDetailData(this.contentDetailData) 80 + const params1: postBatchAttentionStatusParams = {
  81 + creatorIds: [{ creatorId: this.contentDetailData?.rmhInfo?.rmhId ?? '' }]
  82 + }
  83 + // 已登录->批量查作品是否被号主关注
  84 + ContentDetailRequest.postBatchAttentionStatus(params1).then(res => {
  85 + console.log('批量查号主是否为用户关注==', JSON.stringify(res.data))
  86 + if (res.data) {
  87 + this.followStatus = res.data[0]?.status
  88 + }
  89 + })
75 90
76 - let action: Action = router.getParams() as Action  
77 - Logger.info(TAG, "action", JSON.stringify(action))  
78 - if (action) {  
79 - this.contentId = action.params?.contentID  
80 - if (action.params && action.params.extra) {  
81 - this.relId = action.params.extra.relId  
82 - this.relType = action.params.extra.relType 91 + // 记录浏览历史
  92 + const params2: postInteractBrowsOperateParams = {
  93 + delStatus: 0,
  94 + contentList: [{
  95 + browseTime: DateTimeUtils.getCurDate(DateTimeUtils.PATTERN_DATE_TIME_HYPHEN),
  96 + contentId: this.contentDetailData?.newsId + '',
  97 + contentType: this.contentDetailData?.newsType || 0,
  98 + }]
83 } 99 }
  100 + ContentDetailRequest.postInteractBrowsOperate(params2).then(res => {
  101 + console.log('记录浏览历史==', JSON.stringify(res.data))
  102 +
  103 + })
  104 + }
  105 +
  106 + }
  107 +
  108 + aboutToAppear() {
  109 + // console.log('开始设置setContentDetailData', JSON.stringify(this.contentDetailData))
  110 + this.videoLandScape = this.contentDetailData?.videoInfo[0]?.videoLandScape
  111 + this.queryNewsInfoOfUser()
  112 + this.playerController.onCanplay = () => {
  113 + if (this.index == 0 || this.currentIndex === this.index) {
  114 + this.playerController.play()
  115 + }
  116 + }
  117 +
  118 + this.playerController.onTimeUpdate = (position, duration) => {
  119 + this.progressVal = Math.floor(position * 100 / duration);
84 } 120 }
85 121
86 // 设置播放地址 122 // 设置播放地址
87 - // this.url = 'https://media.w3.org/2010/05/sintel/trailer.mp4'  
88 let listener = mediaquery.matchMediaSync('(orientation: landscape)'); 123 let listener = mediaquery.matchMediaSync('(orientation: landscape)');
89 listener.on("change", (mediaQueryResult) => { 124 listener.on("change", (mediaQueryResult) => {
90 if (mediaQueryResult.matches) { 125 if (mediaQueryResult.matches) {
@@ -94,29 +129,25 @@ export struct DetailPlayShortVideoPage { @@ -94,29 +129,25 @@ export struct DetailPlayShortVideoPage {
94 this.isFullScreen = false 129 this.isFullScreen = false
95 console.log("横屏 no") 130 console.log("横屏 no")
96 } 131 }
97 - WindowModel.shared.setMainWindowFullScreen(this.isFullScreen) 132 + // WindowModel.shared.setMainWindowFullScreen(this.isFullScreen)
98 }) 133 })
99 - console.error('111,', this.index, this.currentIndex)  
100 - if (this.index == 0 && this.currentIndex === this.index) {  
101 - setTimeout(() => {  
102 - this.playerController.play()  
103 - }, 2000)  
104 134
105 - }  
106 } 135 }
107 136
108 onPageShow() { 137 onPageShow() {
109 - WindowModel.shared.setPreferredOrientation(window.Orientation.AUTO_ROTATION_RESTRICTED); 138 + // WindowModel.shared.setPreferredOrientation(window.Orientation.AUTO_ROTATION_RESTRICTED);
110 } 139 }
111 140
112 aboutToDisappear(): void { 141 aboutToDisappear(): void {
113 - this.playerController?.pause(); 142 + console.log('aboutToDisappear', this.index)
  143 + this.playerController?.release();
  144 + // this.playerController.onCanplay = ()={}
114 } 145 }
115 146
116 onPageHide() { 147 onPageHide() {
117 - WindowModel.shared.setPreferredOrientation(window.Orientation.PORTRAIT); 148 + // WindowModel.shared.setPreferredOrientation(window.Orientation.PORTRAIT);
118 devicePLSensorManager.devicePLSensorOff(); 149 devicePLSensorManager.devicePLSensorOff();
119 - this.status = PlayerConstants.STATUS_PAUSE; 150 + // this.status = PlayerConstants.STATUS_PAUSE;
120 this.playerController?.pause(); 151 this.playerController?.pause();
121 } 152 }
122 153
@@ -126,10 +157,10 @@ export struct DetailPlayShortVideoPage { @@ -126,10 +157,10 @@ export struct DetailPlayShortVideoPage {
126 WDPlayerRenderView({ 157 WDPlayerRenderView({
127 playerController: this.playerController, 158 playerController: this.playerController,
128 onLoad: async () => { 159 onLoad: async () => {
129 - console.log('onload==', this.contentId, this.relId, this.relType)  
130 - // this.playVM.playWithContentId(this.contentId ?? "846899373")  
131 - this.playVM.playWithIds(this.contentId,  
132 - this.relId, this.relType) 160 + // console.log('onload==', this.index)
  161 + // if (this.index === 0) {
  162 + this.playerController.firstPlay(this.contentDetailData?.videoInfo[0]?.videoUrl);
  163 + // }
133 } 164 }
134 }) 165 })
135 .height('100%') 166 .height('100%')
@@ -176,49 +207,6 @@ export struct DetailPlayShortVideoPage { @@ -176,49 +207,6 @@ export struct DetailPlayShortVideoPage {
176 } 207 }
177 .height('100%') 208 .height('100%')
178 .width('100%') 209 .width('100%')
179 -  
180 .backgroundColor(Color.Black) 210 .backgroundColor(Color.Black)
181 } 211 }
182 -  
183 - // 续播判断  
184 - changeContinue() {  
185 - if (this.nextContId) {  
186 - this.playerController.continue = () => {  
187 - this.playerController?.stop();  
188 - this.playVM.playWithContentId(this.nextContId ?? '');  
189 - }  
190 - return;  
191 - }  
192 - this.playerController.continue = undefined;  
193 - }  
194 -  
195 - urlChanged() {  
196 - if (this.url) {  
197 - console.log("url:" + this.url);  
198 - this.status = PlayerConstants.STATUS_START;  
199 - this.playerController.firstPlay(this.url);  
200 - }  
201 - }  
202 -  
203 - getPlayHistory() {  
204 - SPHelper.default.get('playHistory', '').then((str) => {  
205 - let result = str.toString();  
206 - let time = 0;  
207 - if (result != null && result != "") {  
208 - let playHistory: Record<string, Record<string, number>> = JSON.parse(result);  
209 - let userData: Record<string, number> = {};  
210 - if (this.userId) {  
211 - userData = playHistory[this.userId] ?? {};  
212 - }  
213 - if (this.curContId) {  
214 - time = userData?.[this.curContId] ?? 0;  
215 - }  
216 - }  
217 - this.playerController?.setStartTime(time);  
218 - }).catch((err: Error) => {  
219 - // Error: Inner error. Error code 15500000  
220 - Logger.error(TAG, 'catch err:' + JSON.stringify(err));  
221 - this.playerController?.setStartTime(0);  
222 - });  
223 - }  
224 } 212 }
  1 +// import router from '@ohos.router';
  2 +import mediaquery from '@ohos.mediaquery';
  3 +import window from '@ohos.window';
  4 +import { ContentDetailDTO, InteractDataDTO, RmhInfoDTO, UserInfoDTO } from 'wdBean';
  5 +import { Logger, SPHelper, WindowModel } from 'wdKit';
  6 +import { PlayerConstants, WDPlayerController, WDPlayerRenderView } from 'wdPlayer';
  7 +import { ContentDetailRequest, devicePLSensorManager } from 'wdDetailPlayApi';
  8 +import { PlayControlViewContainer } from '../view/PlayControlViewContainer';
  9 +import { PlayerDetailContainer } from '../view/PlayerDetailContainer';
  10 +// import { PlayViewModel } from '../viewmodel/PlayViewModel';
  11 +import { DetailContainer } from '../view/DetailContainer';
  12 +import {
  13 + batchLikeAndCollectParams,
  14 + batchLikeAndCollectResult,
  15 + postBatchAttentionStatusParams
  16 +} from 'wdDetailPlayApi/src/main/ets/request/ContentDetailRequest';
  17 +import { HttpUrlUtils } from 'wdNetwork/Index';
  18 +
  19 +const TAG = 'DetailPlayShortVideoPage';
  20 +
  21 +/**
  22 + * 详情&短视频播放页面
  23 + */
  24 +
  25 +@Component
  26 +export struct DetailPlayShortVideoPage {
  27 + // private contentId?: string = undefined
  28 + // private relId?: string = undefined
  29 + // private relType?: string = undefined
  30 + @Provide contentDetailData: ContentDetailDTO | undefined = undefined
  31 + @Provide interactData: InteractDataDTO | undefined = undefined
  32 + @Prop @Watch('currentIndexChange') currentIndex: number = 0
  33 + private index: number = 0
  34 + private playerController: WDPlayerController = new WDPlayerController();
  35 + // @Watch("urlChanged") @State url?: string = undefined
  36 + // @Watch('changeContinue') @Provide nextContId?: string = '';
  37 + // @Watch('getPlayHistory') @Provide curContId?: string = undefined;
  38 + // @Watch("playVMChanged") @Provide playVM: PlayViewModel = new PlayViewModel();
  39 + @Provide isFullScreen: boolean = false;
  40 + // @Provide canStart?: boolean = false;
  41 + // @Provide status: number = PlayerConstants.STATUS_START;
  42 + // @Provide userId: string = '';
  43 + // @Provide newsSourceName?: string = ''
  44 + // @Provide newsTitle?: string = ''
  45 + // @Provide editorName?: string = ''
  46 + // @Provide rmhInfo?: RmhInfoDTO | null = null
  47 + // @Provide userInfo?: UserInfoDTO | null = null
  48 + // @Provide message?: string = ''
  49 + // @Provide newsSummary?: string = ''
  50 + @Provide progressVal: number = 0;
  51 + @Provide videoLandScape?: number = 1; // 视频朝向, 横屏视频:1;竖屏视频:2
  52 + @Provide newsStatusOfUser: batchLikeAndCollectResult | undefined = undefined // 点赞、收藏状态
  53 + @Provide followStatus: string = '0' // 关注状态
  54 +
  55 + // playVMChanged() {
  56 + // this.url = this.playVM.url
  57 + // this.newsSourceName = this.playVM.newsSourceName
  58 + // this.newsTitle = this.playVM.newsTitle
  59 + // this.editorName = this.playVM.editorName
  60 + // this.newsSummary = this.playVM.newsSummary
  61 + // this.videoLandScape = this.playVM.videoLandScape ?? 1
  62 + // this.curContId = this.playVM.contentId
  63 + // this.nextContId = this.playVM.nextContId
  64 + // this.canStart = this.playVM.canStart;
  65 + // this.message = this.playVM.message
  66 + // this.rmhInfo = this.playVM.rmhInfo
  67 + // this.userInfo = this.playVM.userInfo
  68 + // console.error('rmhInfo', this.rmhInfo)
  69 + // console.error('userInfo', this.userInfo)
  70 + // }
  71 +
  72 + currentIndexChange() {
  73 + if (this.currentIndex != this.index) {
  74 + this.playerController.pause()
  75 +
  76 + if (this.index < this.currentIndex - 5 && this.playerController.getPlayer()) {
  77 + this.playerController.release()
  78 + }
  79 +
  80 + } else {
  81 + console.log('currentIndexChange====1', this.currentIndex)
  82 + this.playerController.play()
  83 + this.queryNewsInfoOfUser()
  84 +
  85 + }
  86 + }
  87 +
  88 + /**
  89 + * 查询用户点赞、收藏、关注等状态
  90 + */
  91 + queryNewsInfoOfUser() {
  92 + if (HttpUrlUtils.getUserId()) {
  93 + const params: batchLikeAndCollectParams = {
  94 + contentList: [
  95 + {
  96 + contentId: this.contentDetailData?.newsId + '',
  97 + contentType: this.contentDetailData?.newsType + '',
  98 + }
  99 + ]
  100 + }
  101 + // 已登录->查询用户对作品点赞、收藏状态
  102 + ContentDetailRequest.postBatchLikeAndCollectStatus(params).then(res => {
  103 + console.log('查询点赞、收藏状态==', JSON.stringify(res.data))
  104 + if (res.data) {
  105 + this.newsStatusOfUser = res.data[0]
  106 + }
  107 + })
  108 +
  109 + const params1: postBatchAttentionStatusParams = {
  110 + creatorIds: [{ creatorId: this.contentDetailData?.rmhInfo?.rmhId ?? '' }]
  111 + }
  112 + // 已登录->批量查作品是否被号主关注
  113 + ContentDetailRequest.postBatchAttentionStatus(params1).then(res => {
  114 + console.log('批量查号主是否为用户关注==', JSON.stringify(res.data))
  115 + if (res.data) {
  116 + this.followStatus = res.data[0]?.status
  117 + }
  118 + })
  119 + }
  120 + }
  121 +
  122 + aboutToAppear() {
  123 + console.log('开始设置setContentDetailData', JSON.stringify(this.contentDetailData))
  124 +
  125 + // this.playVM.setContentDetailData(this.contentDetailData)
  126 +
  127 + // this.playVMChanged()
  128 + this.queryNewsInfoOfUser()
  129 + this.playerController.onCanplay = () => {
  130 + if (this.index == 0 || this.currentIndex === this.index) {
  131 + this.videoLandScape = this.contentDetailData?.videoInfo[0]?.videoLandScape
  132 + this.playerController.firstPlay(this.contentDetailData?.videoInfo[0]?.videoUrl);
  133 + this.playerController.play()
  134 + }
  135 + }
  136 +
  137 + // 设置播放地址
  138 + // this.url = 'https://media.w3.org/2010/05/sintel/trailer.mp4'
  139 + let listener = mediaquery.matchMediaSync('(orientation: landscape)');
  140 + listener.on("change", (mediaQueryResult) => {
  141 + if (mediaQueryResult.matches) {
  142 + console.log("横屏 yes")
  143 + this.isFullScreen = true
  144 + } else {
  145 + this.isFullScreen = false
  146 + console.log("横屏 no")
  147 + }
  148 + // WindowModel.shared.setMainWindowFullScreen(this.isFullScreen)
  149 + })
  150 +
  151 + }
  152 +
  153 + onPageShow() {
  154 + // WindowModel.shared.setPreferredOrientation(window.Orientation.AUTO_ROTATION_RESTRICTED);
  155 + }
  156 +
  157 + aboutToDisappear(): void {
  158 + this.playerController?.pause();
  159 + }
  160 +
  161 + onPageHide() {
  162 + // WindowModel.shared.setPreferredOrientation(window.Orientation.PORTRAIT);
  163 + devicePLSensorManager.devicePLSensorOff();
  164 + // this.status = PlayerConstants.STATUS_PAUSE;
  165 + this.playerController?.pause();
  166 + }
  167 +
  168 + @Builder
  169 + playerViewContainerBuilder() {
  170 + // 播放窗口
  171 + WDPlayerRenderView({
  172 + playerController: this.playerController,
  173 + onLoad: async () => {
  174 + console.log('onload==', this.contentId, this.relId, this.relType)
  175 +
  176 + }
  177 + })
  178 + .height('100%')
  179 + .width('100%')
  180 + .onClick(() => {
  181 + console.error('WDPlayerRenderView=== onClick')
  182 + this.playerController?.switchPlayOrPause();
  183 + })
  184 + }
  185 +
  186 + @Builder
  187 + playControlViewContainerBuilder() {
  188 + // 播放窗口控制bar
  189 + PlayControlViewContainer({
  190 + playerController: this.playerController
  191 + })
  192 + }
  193 +
  194 + @Builder
  195 + detailContainerBuilder() {
  196 + // DetailTabBarPageComponent({ pageId: this.pageId }).backgroundColor(Color.Black)
  197 + DetailContainer({
  198 + playerController: this.playerController
  199 + })
  200 + }
  201 +
  202 + build() {
  203 + Row() {
  204 + PlayerDetailContainer({
  205 + playerView: () => {
  206 + this.playerViewContainerBuilder()
  207 + }, playControlView: () => {
  208 + // this.playControlViewContainerBuilder()
  209 + }, detailView: () => {
  210 + this.detailContainerBuilder()
  211 + }
  212 + })
  213 + .height('100%')
  214 + .width('100%')
  215 + .onClick(() => {
  216 + console.error('PlayerDetailContainer=== onClick')
  217 + this.playerController?.switchPlayOrPause();
  218 + })
  219 + }
  220 + .height('100%')
  221 + .width('100%')
  222 +
  223 + .backgroundColor(Color.Black)
  224 + }
  225 +
  226 + // 续播判断
  227 + // changeContinue() {
  228 + // if (this.nextContId) {
  229 + // this.playerController.continue = () => {
  230 + // this.playerController?.stop();
  231 + // // this.playVM.playWithContentId(this.nextContId ?? '');
  232 + // }
  233 + // return;
  234 + // }
  235 + // this.playerController.continue = undefined;
  236 + // }
  237 +
  238 + // urlChanged() {
  239 + // console.error('urlChanged===')
  240 + // if (this.url) {
  241 + // this.status = PlayerConstants.STATUS_START;
  242 + // this.playerController.firstPlay(this.url);
  243 + // }
  244 + // }
  245 +
  246 + // getPlayHistory() {
  247 + // SPHelper.default.get('playHistory', '').then((str) => {
  248 + // let result = str.toString();
  249 + // let time = 0;
  250 + // if (result != null && result != "") {
  251 + // let playHistory: Record<string, Record<string, number>> = JSON.parse(result);
  252 + // let userData: Record<string, number> = {};
  253 + // if (this.userId) {
  254 + // userData = playHistory[this.userId] ?? {};
  255 + // }
  256 + // if (this.curContId) {
  257 + // time = userData?.[this.curContId] ?? 0;
  258 + // }
  259 + // }
  260 + // this.playerController?.setStartTime(time);
  261 + // }).catch((err: Error) => {
  262 + // // Error: Inner error. Error code 15500000
  263 + // Logger.error(TAG, 'catch err:' + JSON.stringify(err));
  264 + // this.playerController?.setStartTime(0);
  265 + // });
  266 + // }
  267 +}