Toggle navigation
Toggle navigation
This project
Loading...
Sign in
developOne
/
harmonyPool
Go to a project
Toggle navigation
Projects
Groups
Snippets
Help
Toggle navigation pinning
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
douaojie
2024-05-10 16:49:46 +0800
Browse Files
Options
Browse Files
Download
Plain Diff
Commit
39d8ce5dafa7a5072330a02475eb101ec78b9f5d
39d8ce5d
2 parents
67b21ac3
5112aaad
Merge remote-tracking branch 'origin/main'
Show whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
91 additions
and
139 deletions
sight_harmony/features/wdComponent/src/main/ets/components/compview/ZhSingleRow06.ets
sight_harmony/features/wdComponent/src/main/ets/components/mine/MinePageMoreFunctionUI.ets
sight_harmony/features/wdComponent/src/main/ets/components/mine/MinePageUserSimpleInfoUI.ets
sight_harmony/features/wdComponent/src/main/ets/components/mine/appointment/AppointmentListChildComponent.ets
sight_harmony/features/wdComponent/src/main/ets/components/page/TopNavigationComponent.ets
sight_harmony/features/wdComponent/src/main/ets/components/reusable/MyCustomDialog.ets
sight_harmony/features/wdComponent/src/main/ets/components/search/SearchHistoryComponent.ets
sight_harmony/features/wdComponent/src/main/ets/components/search/SearchRelatedComponent.ets
sight_harmony/features/wdComponent/src/main/ets/components/search/SearchResultComponent.ets
sight_harmony/features/wdComponent/src/main/ets/components/search/SearchResultContentComponent.ets
sight_harmony/features/wdComponent/src/main/ets/model/MineSettingDatasModel.ets
sight_harmony/features/wdComponent/src/main/resources/base/media/mine_user_arrow.png
sight_harmony/features/wdComponent/src/main/resources/base/media/mine_user_arrow_2.png
sight_harmony/features/wdComponent/src/main/resources/base/media/mine_user_edit.png
sight_harmony/features/wdDetailPlayLive/src/main/ets/widgets/details/TabLiveComponent.ets
sight_harmony/features/wdComponent/src/main/ets/components/compview/ZhSingleRow06.ets
View file @
39d8ce5
...
...
@@ -41,6 +41,7 @@ export struct ZhSingleRow06 {
Column(){
Text(this.compDTO.operDataList[0]?.commentInfo?.commentTitle)
.fontWeight(500)
.maxLines(4)
.textOverflow({overflow: TextOverflow.Ellipsis})
.lineHeight(23)
...
...
@@ -88,7 +89,7 @@ export struct ZhSingleRow06 {
.margin({right: 3})
Text('点赞')
.fontSize(1
4
)
.fontSize(1
5
)
.fontColor(0x999999)
}
.onClick(() => {
...
...
@@ -125,6 +126,7 @@ export struct ZhSingleRow06 {
.fontSize(14)
.fontColor(0x222222)
.maxLines(1)
.fontWeight(500)
.textOverflow({overflow: TextOverflow.Ellipsis})
}
.onClick(() => {
...
...
@@ -155,106 +157,3 @@ function textOverflowStyle(maxLine: number) {
.maxLines(maxLine)
.textOverflow({ overflow: TextOverflow.Ellipsis })
}
@Component
struct CreatorItem {
@Prop item: ContentDTO
@State rmhIsAttention: number = 0
build() {
ListItem() {
Column() {
Flex({direction: FlexDirection.Row, justifyContent: FlexAlign.SpaceBetween}) {
Column() {
Row() {
Image('')
.width(20)
.height(20)
.margin({right: 4})
.border({width: 1, color: 0xcccccc, radius: 10})
Text('立志之间')
.fontColor(0x212228)
.fontSize(12)
}
}
Column() {
Row() {
Image($r('app.media.icon_like_no'))
.width(16)
.height(16)
.margin({right: 4})
Text('3835')
.fontSize(14)
.fontColor(0x999999)
}
}
}
.margin({top: 10, left: 10, right: 10, bottom: 8})
Text('就业不仅是民生问题,也是发展问题,就业不仅是民生问题,也是发展问题,就业不仅是民生问题,也是发展问题,')
.maxLines(2)
.textOverflow({overflow: TextOverflow.Ellipsis})
.margin({left: 10, right: 10, bottom: 8})
.fontSize(17)
.fontColor(0x212228)
.lineHeight(25)
Row() {
Image('')
.width(66)
.height(44)
.borderRadius({topLeft: 3, topRight: 0, bottomLeft: 3, bottomRight: 0})
Text('原文|强化就业优先政策 健全就业促进机制原文|强化就业优先政策 健全就业促进机制原文|强化就业优先政策 健全就业促进机制')
.margin({left: 8})
.width(172)
.maxLines(2)
.textOverflow({overflow: TextOverflow.Ellipsis})
}
.linearGradient({
direction: GradientDirection.Right,
colors: [[0xffffff, 0.0],[0xffffff, 0.8], [0xf9f9f9, 1.0]]
})
}
.width(276)
.height(150)
.margin({ right: 10 })
.borderWidth(1)
.borderColor($r('app.color.color_EDEDED'))
.borderRadius($r('app.float.image_border_radius'))
.backgroundColor(0xf9f9f9)
}
.onClick(() => {
console.log('跳转到rmh');
})
}
/**
* 关注号主 TODO 这里后面需要抽离
*/
handleAccention(item: ContentDTO, status: number) {
this.rmhIsAttention = this.rmhIsAttention ? 0 : 1
return
// 未登录,跳转登录
if (!HttpUtils.getUserId()) {
WDRouterRule.jumpWithPage(WDRouterPage.loginPage)
return
}
const params: postInteractAccentionOperateParams = {
attentionUserType: item.rmhInfo?.userType || '', //被关注用户类型(1 普通用户 2 视频号 3 矩阵号)
attentionUserId: item.rmhInfo?.userId || '', // 被关注用户号主id
attentionCreatorId: item.rmhInfo?.rmhId || '', // 被关注用户号主id
// userType: 1,
// userId: '1', // TODO 用户id需要从本地获取
status: status,
}
PageRepository.postInteractAccentionOperate(params).then(res => {
console.log(TAG, '关注号主==', JSON.stringify(res.data))
if (status === 1) {
this.rmhIsAttention = 0
} else {
this.rmhIsAttention = 1
}
})
}
}
...
...
sight_harmony/features/wdComponent/src/main/ets/components/mine/MinePageMoreFunctionUI.ets
View file @
39d8ce5
...
...
@@ -47,7 +47,7 @@ export default struct MinePageMoreFunctionUI {
.fontWeight(400)
Blank()
Image($r('app.media.mine_user_arrow'))
Image($r('app.media.mine_user_arrow
_2
'))
.width('27lpx')
.height('27lpx')
.objectFit(ImageFit.Auto)
...
...
sight_harmony/features/wdComponent/src/main/ets/components/mine/MinePageUserSimpleInfoUI.ets
View file @
39d8ce5
...
...
@@ -83,14 +83,15 @@ export default struct MinePageUserSimpleInfoUI {
.height('29lpx')
}.margin({top:'15lpx'})
}.alignItems(HorizontalAlign.Start)
.margin({top:'12lpx',left:'
17
lpx'})
.margin({top:'12lpx',left:'
23
lpx'})
.width('352lpx')
}else{
Row(){
Text("登录注册")
.fontColor($r('app.color.color_222222'))
.textOverflow({ overflow: TextOverflow.Ellipsis })
.fontSize('33lpx')
.fontSize('38lpx')
.lineHeight("46lpx")
.fontWeight(600)
Image($r('app.media.mine_user_edit'))
.width('11lpx')
...
...
@@ -101,7 +102,7 @@ export default struct MinePageUserSimpleInfoUI {
}.onClick(()=>{
this.jumpLogin()
})
.margin({top:'11lpx',left:'
17
lpx'})
.margin({top:'11lpx',left:'
23
lpx'})
.width('352lpx')
}
...
...
sight_harmony/features/wdComponent/src/main/ets/components/mine/appointment/AppointmentListChildComponent.ets
View file @
39d8ce5
...
...
@@ -17,9 +17,7 @@ export struct AppointmentListChildComponent{
}),
autoCancel: true,
alignment: DialogAlignment.Center,
offset: { dx: 0, dy: -20 },
gridCount: 4,
customStyle: false
customStyle: true
})
...
...
sight_harmony/features/wdComponent/src/main/ets/components/page/TopNavigationComponent.ets
View file @
39d8ce5
import { BottomNavDTO, CompDTO, TopNavDTO } from 'wdBean';
import { SpConstants } from 'wdConstant';
import { DisplayUtils, LazyDataSource, Logger, SPHelper } from 'wdKit';
import { DisplayUtils, LazyDataSource, Logger, SPHelper
, NetworkUtil, ToastUtils
} from 'wdKit';
import { ProcessUtils, WDRouterPage, WDRouterRule } from 'wdRouter';
import { PageComponent } from './PageComponent';
import { ChannelSubscriptionLayout } from './ChannelSubscriptionLayout';
...
...
@@ -209,7 +209,11 @@ export struct TopNavigationComponent {
.height(30)
.width(124)
.onClick(() => {
if (NetworkUtil.isNetConnected()) {
ProcessUtils.gotoMorningEveningPaper()
} else {
ToastUtils.showToast('网络出小差了,请检查网络后重试', 1000)
}
})
}.width('100%')
.justifyContent(FlexAlign.SpaceBetween)
...
...
sight_harmony/features/wdComponent/src/main/ets/components/reusable/MyCustomDialog.ets
View file @
39d8ce5
...
...
@@ -4,9 +4,12 @@ export struct MyCustomDialog {
@State titleShow: boolean = true
@State tipValue: string ="提示文字"
@State tipShow: boolean = true
@State cancelIsLeft :boolean = true//取消是否在左边
@State leftText: string = "取消"
@State rightText: string = "确认"
@State leftTextColor: Resource = $r('app.color.color_333333')
@State rightTextColor: Resource = $r('app.color.color_648DF2')
controller: CustomDialogController
cancel: () => void = () => {
...
...
@@ -16,21 +19,25 @@ export struct MyCustomDialog {
build() {
Column() {
Column(){
if(this.titleShow){
Text(this.title)
.fontSize("32lpx")
.margin({ top: "40lpx", bottom: "15lpx" })
.fontColor($r('app.color.color_333333'))
.fontSize('35lpx')
.fontWeight('600lpx')
.lineHeight('50lpx')
.fontWeight(600)
}
if(this.tipShow){
Text(this.tipValue)
.margin({ bottom: "3
0lpx" })
.margin({ top:this.titleShow?"10lpx":"
0lpx" })
.fontSize("27lpx")
.fontColor($r('app.color.color_B0B0B0'))
.fontWeight(400)
.lineHeight('38lpx')
.fontColor($r('app.color.color_999999'))
}
}.padding({top:"48lpx",bottom:"48lpx"})
.alignItems(HorizontalAlign.Center)
Divider()
.width("100%")
...
...
@@ -41,13 +48,21 @@ export struct MyCustomDialog {
Row(){
Text(this.leftText)
.fontSize('35lpx')
.fontWeight('400lpx')
.fontColor($r('app.color.color_333333'))
.fontWeight(400)
.fontColor(this.leftTextColor)
.onClick(() => {
if (this.controller != undefined){
if(this.cancelIsLeft){
this.controller.close()
this.cancel()
}else{
this.controller.close()
this.confirm()
}
}
}).layoutWeight(1)
.textAlign(TextAlign.Center)
Divider()
.width("1lpx")
.strokeWidth('1lpx')
...
...
@@ -58,17 +73,24 @@ export struct MyCustomDialog {
Text(this.rightText)
.fontSize('35lpx')
.textAlign(TextAlign.Center)
.fontWeight('400lpx')
.fontColor($r('app.color.color_648DF2'))
.fontWeight(400)
.fontColor(this.rightTextColor)
.onClick(() => {
if (this.controller != undefined) {
if(this.cancelIsLeft){
this.controller.close()
this.confirm()
}else{
this.controller.close()
this.cancel()
}
}
}).layoutWeight(1)
}
.alignItems(VerticalAlign.Center)
.height('96lpx')
}.borderRadius(10)
.width("518lpx")
.backgroundColor("#FFF")
}
}
\ No newline at end of file
...
...
sight_harmony/features/wdComponent/src/main/ets/components/search/SearchHistoryComponent.ets
View file @
39d8ce5
...
...
@@ -17,13 +17,12 @@ export struct SearchHistoryComponent{
this.onAccept()
},
title: "确认清空历史记录",
tipShow:false
tipShow:false,
leftTextColor:$r('app.color.color_648DF2')
}),
autoCancel: true,
alignment: DialogAlignment.Center,
offset: { dx: 0, dy: -20 },
gridCount: 4,
customStyle: false
customStyle: true
})
onAccept(){
...
...
sight_harmony/features/wdComponent/src/main/ets/components/search/SearchRelatedComponent.ets
View file @
39d8ce5
...
...
@@ -3,7 +3,7 @@ import { SearchRelatedItem } from '../../viewmodel/SearchRelatedItem'
const TAG = "SearchRelatedComponent"
/**
*
热门
搜索
*
相关
搜索
*/
@Component
export struct SearchRelatedComponent {
...
...
sight_harmony/features/wdComponent/src/main/ets/components/search/SearchResultComponent.ets
View file @
39d8ce5
...
...
@@ -40,11 +40,24 @@ export struct SearchResultComponent {
SearcherAboutDataModel.getSearchSuggestData(request, getContext(this)).then((value) => {
value.forEach((item) => {
if(item.appStyle != "13"){
this.data.push(item)
}
})
this.data.notifyDataReload()
this.suggest_count = this.data.totalCount()
this.isLoading = false
if(this.suggest_count === 0 && value.length > 0){
this.suggest_count = -1
if(!this.isLoading){
this.getSuggestData()
}
}else if(this.suggest_count <= 20 && value.length > 0){
if(!this.isLoading){
this.getSuggestData()
}
}
})
}
...
...
@@ -110,6 +123,7 @@ export struct SearchResultComponent {
TabContent() {
SearchResultContentComponent({ keywords: this.searchText, searchType: item })
}.tabBar(this.TabBuilder(index, item))
.layoutWeight(1)
}, (item: string, index: number) => index.toString())
}
.vertical(false)
...
...
@@ -124,6 +138,7 @@ export struct SearchResultComponent {
.layoutWeight(1)
}
}.width('100%')
.layoutWeight(1)
.margin({ top: '12lpx' })
}
...
...
sight_harmony/features/wdComponent/src/main/ets/components/search/SearchResultContentComponent.ets
View file @
39d8ce5
...
...
@@ -54,6 +54,7 @@ export struct SearchResultContentComponent{
if (!this.data || value.list.length == 0){
this.hasMore = false
this.isLoading = false
this.count = this.count===-1?0:this.count
}else{
if(value.list[0].dataList!=null){
let data_temp: SearchRmhDescription[] = []
...
...
@@ -205,8 +206,10 @@ export struct SearchResultContentComponent{
extra:'',
titleShow:value.data.type == "5"?1:0,
}
if(contentDTO.appStyle != "13"){
this.data.push(contentDTO)
}
})
this.data.notifyDataReload()
this.count = this.data.totalCount()
...
...
@@ -216,6 +219,19 @@ export struct SearchResultContentComponent{
this.hasMore = false
}
this.isLoading = false
if(this.count === 0 && resultData.list.length > 0){
this.count = -1
if(!this.isLoading){
//加载分页数据
this.getNewSearchResultData()
}
}else if(this.count <= 20 && resultData.list.length > 0){
if(!this.isLoading){
//加载分页数据
this.getNewSearchResultData()
}
}
}).catch((err:Error)=>{
console.log(TAG,"请求失败")
this.isLoading = false
...
...
@@ -297,13 +313,10 @@ export struct SearchResultContentComponent{
}
}
}
.onClick(()=>{
//TODO 跳转
})
}, (item: ContentDTO, index: number) => index.toString())
//没有更多数据 显示提示
if(!this.hasMore){
if(!this.hasMore
&& this.data.totalCount() > 0
){
ListItem(){
ListHasNoMoreDataUI()
}
...
...
@@ -319,11 +332,11 @@ export struct SearchResultContentComponent{
this.getNewSearchResultData()
}
})
}
}
.layoutWeight(1)
}
}
.backgroundColor($r('app.color.white'))
.
height('100%'
)
.
layoutWeight(1
)
.width('100%')
}
}
\ No newline at end of file
...
...
sight_harmony/features/wdComponent/src/main/ets/model/MineSettingDatasModel.ets
View file @
39d8ce5
...
...
@@ -47,13 +47,13 @@ class MineSettingDatasModel{
this.mainSettingData.push(new MineMainSettingFunctionItem(null, '接收推送', null, 1, pushState,"push_switch"))
this.mainSettingData.push(new MineMainSettingFunctionItem(null, '隐私设罝', null, 0, false,"private_setting"))
let wifiState=SPHelper.default.getSync(SpConstants.SETTING_WIFI_IMAGE_SWITCH,false) as boolean
this.mainSettingData.push(new MineMainSettingFunctionItem(null, '仅
WiF
i网络加载图片', null, 1, wifiState,"wifi_switch"))
this.mainSettingData.push(new MineMainSettingFunctionItem(null, '仅
wif
i网络加载图片', null, 1, wifiState,"wifi_switch"))
let videoState=SPHelper.default.getSync(SpConstants.SETTING_WIFI_VIDEO_SWITCH,false) as boolean
this.mainSettingData.push(new MineMainSettingFunctionItem(null, '
WiF
i网络情况下自动播放视频', null, 1, videoState,"video_switch"))
this.mainSettingData.push(new MineMainSettingFunctionItem(null, '
wif
i网络情况下自动播放视频', null, 1, videoState,"video_switch"))
let suspensionState=SPHelper.default.getSync(SpConstants.SETTING_SUSPENSION_SWITCH,false) as boolean
this.mainSettingData.push(new MineMainSettingFunctionItem(null, '开启播放器悬浮窗', null, 1, suspensionState,"suspensionState_switch"))
this.mainSettingData.push(new MineMainSettingFunctionItem(null, null, null, 2, null,""))
this.mainSettingData.push(new MineMainSettingFunctionItem(null, '清
除
缓存', '32MB', 0, false,"clear_cache"))
this.mainSettingData.push(new MineMainSettingFunctionItem(null, '清
理
缓存', '32MB', 0, false,"clear_cache"))
this.mainSettingData.push(new MineMainSettingFunctionItem(null, '评价我们', null, 0, false,""))
return this.mainSettingData
...
...
sight_harmony/features/wdComponent/src/main/resources/base/media/mine_user_arrow.png
View file @
39d8ce5
202 Bytes
|
W:
|
H:
278 Bytes
|
W:
|
H:
2-up
Swipe
Onion skin
sight_harmony/features/wdComponent/src/main/resources/base/media/mine_user_arrow_2.png
0 → 100644
View file @
39d8ce5
271 Bytes
sight_harmony/features/wdComponent/src/main/resources/base/media/mine_user_edit.png
View file @
39d8ce5
290 Bytes
|
W:
|
H:
276 Bytes
|
W:
|
H:
2-up
Swipe
Onion skin
sight_harmony/features/wdDetailPlayLive/src/main/ets/widgets/details/TabLiveComponent.ets
View file @
39d8ce5
...
...
@@ -90,7 +90,7 @@ export struct TabLiveComponent {
20)
.then(
(data) => {
Logger.debug(TAG, `${JSON.stringify(data)}`)
Logger.debug(TAG,
'直播间数据:' +
`${JSON.stringify(data)}`)
if (data.barrageResponses && data.barrageResponses.length > 0) {
/**
* 在直播聊天添加一条新内容逻辑:
...
...
@@ -117,6 +117,7 @@ export struct TabLiveComponent {
if (StringUtils.isEmpty(this.liveDetailsBean.oldNewsId)
&& this.liveDetailsBean
&& this.liveDetailsBean.liveInfo.liveState != 'wait') {
this.pageModel.viewType = ViewType.LOADED;
this.updateLiveListData()
} else {
this.pageModel.viewType = ViewType.EMPTY;
...
...
Please
register
or
login
to post a comment