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
王士厅
2024-06-24 18:16:13 +0800
Browse Files
Options
Browse Files
Download
Plain Diff
Commit
80a23155dfef15c34c4127f03e756dbc5265c3d1
80a23155
2 parents
5cc0986a
6a881eae
Merge branch 'main' of
http://192.168.1.42/developOne/harmonyPool
Hide whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
416 additions
and
347 deletions
sight_harmony/commons/wdKit/src/main/ets/utils/Logger.ets
sight_harmony/features/wdComponent/src/main/ets/components/cardview/Card14Component.ets
sight_harmony/features/wdComponent/src/main/ets/components/compview/ZhSingleColumn09.ets
sight_harmony/features/wdComponent/src/main/ets/components/peopleShipHomePage/PeopleShipHomeAttentionComponent.ets
sight_harmony/features/wdComponent/src/main/ets/components/peopleShipHomePage/PeopleShipHomePageTopComponent.ets
sight_harmony/features/wdComponent/src/main/ets/components/refresh/RefreshLoadLayout.ets
sight_harmony/features/wdComponent/src/main/ets/components/reusable/CustomPullToRefresh.ets
sight_harmony/features/wdComponent/src/main/ets/components/search/SearchComponent.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/components/view/HorizontalStrokeCardThreeTwoRadioForMoreComponent.ets
sight_harmony/features/wdComponent/src/main/ets/viewmodel/SearchResultCountItem.ets
sight_harmony/features/wdDetailPlayLive/src/main/ets/widgets/details/video/PlayUIComponent.ets
sight_harmony/features/wdLogin/src/main/ets/pages/guide/GuidePages.ets
sight_harmony/features/wdLogin/src/main/ets/pages/login/LoginPage.ets
sight_harmony/products/phone/src/main/ets/pages/launchPage/LaunchAdvertisingPage.ets
sight_harmony/products/phone/src/main/ets/pages/launchPage/LaunchInterestsHobbiesPage.ets
sight_harmony/products/phone/src/main/ets/pages/launchPage/LaunchPage.ets
sight_harmony/commons/wdKit/src/main/ets/utils/Logger.ets
View file @
80a2315
...
...
@@ -40,15 +40,10 @@ export class Logger {
Logger.domain = domain;
}
static debug(
prefixStr?:string,
...args: string[]) {
static debug(...args: string[]) {
if (!Logger.isDebug) {
return
}
if(prefixStr){
Logger.prefix = prefixStr
}else {
Logger.prefix = 'SightApp';
}
Logger.logContent(LogLevel.DEBUG, ...args)
}
...
...
@@ -90,55 +85,68 @@ export class Logger {
static logContent(level: LogLevel, ...args: string[]) {
let msg = Logger.getMsg(...args)
let tag = Logger.getTag(...args)
let length = msg.length
if (length < Logger.CHUNK_SIZE) {
// 不超限,保持原来的打印
Logger.print(level, ...args)
Logger.print(
tag,
level, ...args)
} else {
// 超限,分段打印
for (let i = 0; i < length; i += Logger.CHUNK_SIZE) {
let count = Math.min(length - i, Logger.CHUNK_SIZE);
Logger.printExt(level, msg.substring(i, i + count));
Logger.printExt(
tag,
level, msg.substring(i, i + count));
}
}
}
static print(level: LogLevel, ...msg: string[]) {
static print(tag: string, level: LogLevel, ...msg: string[]) {
let prefix = Logger.prefix
if (tag) {
prefix = tag
}
switch (level) {
case LogLevel.DEBUG:
hilog.debug(Logger.domain,
Logger.
prefix, Logger.format, msg);
hilog.debug(Logger.domain, prefix, Logger.format, msg);
break
case LogLevel.INFO:
hilog.info(Logger.domain,
Logger.
prefix, Logger.format, msg);
hilog.info(Logger.domain, prefix, Logger.format, msg);
break
case LogLevel.WARN:
hilog.warn(Logger.domain,
Logger.
prefix, Logger.format, msg);
hilog.warn(Logger.domain, prefix, Logger.format, msg);
break
case LogLevel.ERROR:
hilog.error(Logger.domain,
Logger.
prefix, Logger.format, msg);
hilog.error(Logger.domain, prefix, Logger.format, msg);
break
case LogLevel.FATAL:
hilog.fatal(Logger.domain,
Logger.
prefix, Logger.format, msg);
hilog.fatal(Logger.domain, prefix, Logger.format, msg);
break
}
}
static printExt(level: LogLevel, msg: string) {
static printExt(tag: string, level: LogLevel, msg: string) {
let prefix = Logger.prefix
if (tag) {
prefix = tag
}
switch (level) {
case LogLevel.DEBUG:
hilog.debug(Logger.domain,
Logger.
prefix, Logger.format_ext, msg);
hilog.debug(Logger.domain, prefix, Logger.format_ext, msg);
break
case LogLevel.INFO:
hilog.info(Logger.domain,
Logger.
prefix, Logger.format_ext, msg);
hilog.info(Logger.domain, prefix, Logger.format_ext, msg);
break
case LogLevel.WARN:
hilog.warn(Logger.domain,
Logger.
prefix, Logger.format_ext, msg);
hilog.warn(Logger.domain, prefix, Logger.format_ext, msg);
break
case LogLevel.ERROR:
hilog.error(Logger.domain,
Logger.
prefix, Logger.format_ext, msg);
hilog.error(Logger.domain, prefix, Logger.format_ext, msg);
break
case LogLevel.FATAL:
hilog.fatal(Logger.domain,
Logger.
prefix, Logger.format_ext, msg);
hilog.fatal(Logger.domain, prefix, Logger.format_ext, msg);
break
}
}
...
...
@@ -153,6 +161,20 @@ export class Logger {
})
return msg.substring(2, msg.length);
}
static getTag(...args: string[]): string {
if (args == null || args.length <= 0) {
return '';
}
if (args.length > 1) {
return args[0]
} else {
return ''
}
}
}
// export default new Logger('SightApp', 0xFF00)
\ No newline at end of file
...
...
sight_harmony/features/wdComponent/src/main/ets/components/cardview/Card14Component.ets
View file @
80a2315
...
...
@@ -55,7 +55,7 @@ export struct Card14Component {
)
}
// 左标题,右图
Flex({ direction: FlexDirection.Row, justifyContent: FlexAlign.S
paceBetween
}) {
Flex({ direction: FlexDirection.Row, justifyContent: FlexAlign.S
tart
}) {
Text() {
if (this.titleMarked) {
...
...
@@ -77,16 +77,14 @@ export struct Card14Component {
.lineHeight(25)
.fontFamily('PingFang SC-Regular')
.textAlign(TextAlign.Start)
// .flexBasis('auto')
.margin({right: 12})
.
flexBasis(214
)
.
width('64%'
)
Image(this.loadImg ? this.contentDTO.coverUrl : '')
.backgroundColor(0xf5f5f5)
.
flexBasis(117
)
.
aspectRatio(3 / 2
)
.height(78)
.borderRadius($r('app.float.image_border_radius'))
// .flexBasis(160)
.backgroundImageSize(ImageSize.Auto)
}
...
...
sight_harmony/features/wdComponent/src/main/ets/components/compview/ZhSingleColumn09.ets
View file @
80a2315
...
...
@@ -161,7 +161,7 @@ export struct ZhSingleColumn09 {
.height(90)
.columnsTemplate('1fr 1fr 1fr 1fr')
.rowsTemplate('1fr 1fr')
.margin({bottom:
10
})
.margin({bottom:
5
})
Row() {
Row() {
...
...
@@ -188,7 +188,7 @@ export struct ZhSingleColumn09 {
this.selfClosed = true;
})
}
.height(
4
0)
.height(
2
0)
.width('100%')
.borderRadius(3)
.justifyContent(FlexAlign.SpaceBetween)
...
...
sight_harmony/features/wdComponent/src/main/ets/components/peopleShipHomePage/PeopleShipHomeAttentionComponent.ets
View file @
80a2315
...
...
@@ -5,7 +5,7 @@ export struct PeopleShipHomeAttentionComponent {
@Consume isAttention: string
@Consume isLoadingAttention: boolean
build() {
Flex({ alignItems: ItemAlign.
Center, justifyContent: FlexAlign.Center
}) {
Flex({ alignItems: ItemAlign.
Start, justifyContent: FlexAlign.Start
}) {
Button({type: ButtonType.Normal, stateEffect: false } ) {
Stack() {
Row()
...
...
@@ -117,7 +117,6 @@ export struct PeopleShipHomeAttentionComponent {
ToastUtils.showToast('分享为公共方法,待开发', 1000);
})
.visibility(Visibility.Hidden)
}
}
...
...
sight_harmony/features/wdComponent/src/main/ets/components/peopleShipHomePage/PeopleShipHomePageTopComponent.ets
View file @
80a2315
...
...
@@ -253,7 +253,7 @@ export struct PeopleShipHomePageTopComponent {
// 分享-关注
PeopleShipHomeAttentionComponent()
.width(
'100%'
)
.width(
`calc(100% - ${32 + 'vp'})`
)
.margin({
top: '10vp',
bottom: '16vp'
...
...
sight_harmony/features/wdComponent/src/main/ets/components/refresh/RefreshLoadLayout.ets
View file @
80a2315
...
...
@@ -85,8 +85,8 @@ export default struct CustomLayout {
name: this.animateName,
path: "lottie/refresh_step1.json", // 路径加载动画只支持entry/src/main/ets 文件夹下的相对路径
})
this.animateItem.goToAndStop(1)
}
this.animateItem.goToAndStop(1)
let total = CustomLayout.REFRESH_HEIGHT
let progress = offset * 100 / total
this.animateItem?.goToAndStop(this.getFramesByProgress(progress), true);
...
...
@@ -103,9 +103,6 @@ export default struct CustomLayout {
path: "lottie/refresh_step2.json", // 路径加载动画只支持entry/src/main/ets 文件夹下的相对路径
})
}
// this.animateItem2.isLoaded
// TODO 是否拦截重复触发
this.animateItem2.goToAndPlay(1)
}
getFramesByProgress(progress: number): number {
...
...
sight_harmony/features/wdComponent/src/main/ets/components/reusable/CustomPullToRefresh.ets
View file @
80a2315
...
...
@@ -18,14 +18,18 @@ export struct CustomPullToRefresh {
.setAnimDuration(500);
private refreshSettings: RenderingContextSettings = new RenderingContextSettings(true)
private refreshContext: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.refreshSettings)
private refreshingSettings: RenderingContextSettings = new RenderingContextSettings(true)
private refreshingContext: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.refreshingSettings)
private loadMoreSettings: RenderingContextSettings = new RenderingContextSettings(true)
private loadMoreContext: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.loadMoreSettings)
private refreshAnimation: AnimationItem | null = null;
private refreshingAnimation: AnimationItem | null = null;
private loadMoreAnimation: AnimationItem | null = null;
private refreshAnimName: string = "refresh";
private refreshingAnimName: string = "refreshing";
private loadMoreAnimName: string = "loadMore";
private refreshAnimationDestroy = true
private refreshingAnimationDestroy = true
// refresh-1,refreshing-2,refreshed-3,idle-4
@State @Watch('stateChange') private refreshState: number = 4;
...
...
@@ -120,9 +124,23 @@ export struct CustomPullToRefresh {
})
.onDisAppear(() => {
lottie.destroy(this.refreshAnimName);
})
.visibility(this.refreshState == 1 ? Visibility.Visible : Visibility.Hidden)
Canvas(this.refreshingContext)
.width(60)
.height(60)
.backgroundColor(Color.Transparent)
.onReady(() => {
// 可在此生命回调周期中加载动画,可以保证动画尺寸正确
//抗锯齿的设置
this.refreshContext.imageSmoothingEnabled = true;
this.refreshContext.imageSmoothingQuality = 'medium'
})
.onDisAppear(() => {
lottie.destroy(this.refreshingAnimName);
})
.visibility(
(this.refreshState == 1 || this.refreshState == 2)
? Visibility.Visible : Visibility.Hidden)
.visibility(
this.refreshState == 2
? Visibility.Visible : Visibility.Hidden)
Text('已更新至最新')
.fontSize(14)
...
...
@@ -175,10 +193,7 @@ export struct CustomPullToRefresh {
}
private refreshAnim(percent: number) {
if (this.refreshAnimation == null || this.refreshAnimation.name != this.refreshAnimName ||
this.refreshAnimationDestroy) {
this.refreshAnimation?.destroy(this.refreshAnimName)
this.refreshAnimation?.destroy(this.refreshingAnimName)
if (this.refreshAnimation == null || this.refreshAnimationDestroy) {
this.refreshAnimation = lottie.loadAnimation({
container: this.refreshContext,
renderer: 'canvas', // canvas 渲染模式
...
...
@@ -212,21 +227,19 @@ export struct CustomPullToRefresh {
}
private refreshingAnim() {
// Logger.error('zzzz', 'animate2, 1')
// 先销毁之前的动画
if (this.refreshAnimation == null || this.refreshAnimation.name != this.refreshingAnimName ||
this.refreshAnimationDestroy) {
this.refreshAnimation?.destroy(this.refreshAnimName)
this.refreshAnimation?.destroy(this.refreshingAnimName)
this.refreshAnimation = lottie.loadAnimation({
container: this.refreshContext,
if (this.refreshingAnimation == null || this.refreshingAnimationDestroy) {
this.refreshingAnimation?.destroy(this.refreshingAnimName)
this.refreshingAnimation = lottie.loadAnimation({
container: this.refreshingContext,
renderer: 'canvas', // canvas 渲染模式
loop: 10,
autoplay: true,
name: this.refreshingAnimName,
path: "lottie/refresh_step2.json", // 路径加载动画只支持entry/src/main/ets 文件夹下的相对路径
})
this.addRefreshAnimListener()
this.refreshingAnimationDestroy = false
this.addRefreshingAnimListener()
}
// Logger.error('zzzz', 'animate2, 2')
}
...
...
@@ -242,6 +255,13 @@ export struct CustomPullToRefresh {
});
}
private addRefreshingAnimListener() {
this.refreshingAnimation?.addEventListener('destroy', (args: Object): void => {
// Logger.error('zzzz', "lottie destroy");
this.refreshingAnimationDestroy = true
});
}
loadMoreAnimate() {
if (this.loadMoreAnimation == null) {
this.loadMoreAnimation = lottie.loadAnimation({
...
...
sight_harmony/features/wdComponent/src/main/ets/components/search/SearchComponent.ets
View file @
80a2315
...
...
@@ -66,31 +66,31 @@ export struct SearchComponent {
this.breakpointSystem.unregister();
}
getRelatedSearchContent() {
if (StringUtils.isNotEmpty(this.searchText)) {
SearcherAboutDataModel.getRelatedSearchContentData(encodeURI(this.searchText), getContext(this)).then((value) => {
getRelatedSearchContent(searchText: string) {
if (StringUtils.isNotEmpty(searchText)) {
SearcherAboutDataModel.getRelatedSearchContentData(encodeURI(searchText), getContext(this)).then((value) => {
if (value != null && value.length > 0) {
this.relatedSearchContentsData = []
value.forEach(item => {
let tempValue: string = item
let tempArr: string[] = []
if (tempValue.indexOf(
this.
searchText) === -1) {
if (tempValue.indexOf(searchText) === -1) {
tempArr.push(item)
this.relatedSearchContentsData.push(new SearchRelatedItem(item, tempArr))
} else {
while (tempValue.indexOf(this.searchText) != -1) {
let index = tempValue.indexOf(this.searchText)
while (tempValue.indexOf(searchText) != -1) {
let index = tempValue.indexOf(searchText)
if (index === 0) {
try {
tempArr.push(this.searchText)
tempValue = tempValue.substring(this.searchText.length, tempValue.length)
tempArr.push(searchText)
tempValue = tempValue.substring(searchText.length, tempValue.length)
} catch (e) {
}
} else {
try {
tempArr.push(tempValue.substring(0, index))
tempArr.push(this.searchText)
tempValue = tempValue.substring(index + this.searchText.length, tempValue.length)
tempArr.push(searchText)
tempValue = tempValue.substring(index + searchText.length, tempValue.length)
} catch (e) {
}
}
...
...
@@ -356,7 +356,7 @@ export struct SearchComponent {
this.resetSearch()
} else {
if (this.hasInputContent) {
this.getRelatedSearchContent()
this.getRelatedSearchContent(
value
)
}
}
})
...
...
sight_harmony/features/wdComponent/src/main/ets/components/search/SearchResultComponent.ets
View file @
80a2315
...
...
@@ -142,7 +142,7 @@ export struct SearchResultComponent {
SearchResultContentComponent({ keywords: this.searchText, searchType: item ,sameSearch:this.sameSearch,isCurrentShow:this.currentIndex === index})
}.tabBar(this.TabBuilder(index, item))
.layoutWeight(1)
}, (item: string
, index: number) => index.toString()
)
}, (item: string
) => item
)
}
.vertical(false)
.barMode(BarMode.Fixed)
...
...
sight_harmony/features/wdComponent/src/main/ets/components/search/SearchResultContentComponent.ets
View file @
80a2315
...
...
@@ -10,7 +10,7 @@ import {
} from 'wdBean/Index'
import { LiveInfoDTO } from 'wdBean/src/main/ets/bean/detail/LiveInfoDTO'
import { VoiceInfoDTO } from 'wdBean/src/main/ets/bean/detail/VoiceInfoDTO'
import { LazyDataSource,
StringUtils,
UserDataLocal } from 'wdKit/Index'
import { LazyDataSource,
StringUtils,
UserDataLocal } from 'wdKit/Index'
import MinePageDatasModel from '../../model/MinePageDatasModel'
import SearcherAboutDataModel from '../../model/SearcherAboutDataModel'
import { CreatorDetailRequestItem } from '../../viewmodel/CreatorDetailRequestItem'
...
...
@@ -19,8 +19,7 @@ import { FollowListDetailItem } from '../../viewmodel/FollowListDetailItem'
import { FollowListStatusRequestItem } from '../../viewmodel/FollowListStatusRequestItem'
import { QueryListIsFollowedItem } from '../../viewmodel/QueryListIsFollowedItem'
import { SearchResultContentData } from '../../viewmodel/SearchResultContentData'
import {
SearchResultContentItem, SearchRmhDescription } from '../../viewmodel/SearchResultContentItem'
import { SearchResultContentItem, SearchRmhDescription } from '../../viewmodel/SearchResultContentItem'
import { CardParser } from '../CardParser'
import { FollowChildComponent } from '../mine/follow/FollowChildComponent'
import { ListHasNoMoreDataUI } from '../reusable/ListHasNoMoreDataUI'
...
...
@@ -38,7 +37,7 @@ export struct SearchResultContentComponent {
@State keywords: string = ""
@State searchType: string = ""
@State data: LazyDataSource<ContentDTO> = new LazyDataSource();
tempList
: ContentDTO[] = []
tempList: ContentDTO[] = []
@State data_rmh: SearchRmhDescription[] = []
@State count: number = -1;
@State isLoading: boolean = false
...
...
@@ -48,14 +47,14 @@ export struct SearchResultContentComponent {
scroller: Scroller = new Scroller()
private scroller2: Scroller = new Scroller()
@State ellipseW: number = 0
@State moreWidth:number = 20
@State moreWidth:
number = 20
@State listLeft: number = 0
@State isEnd: boolean = false
@Watch('updateData') @Prop sameSearch:number = 0
@Prop isCurrentShow:boolean = false;
@Watch('updateData') @Prop sameSearch: number = 0
@Prop isCurrentShow: boolean = false;
updateData(){
if(this.isCurrentShow){
updateData() {
if (this.isCurrentShow) {
this.data_rmh = []
this.data.clearAllData()
...
...
@@ -115,7 +114,7 @@ export struct SearchResultContentComponent {
data.headerPhotoUrl = item.headPhotoUrl.split("?")[0]
data.mainControl = item.mainControl + ""
if
(data_temp.length === 1)
{
if
(data_temp.length === 1)
{
this.bean.headPhotoUrl = item.headPhotoUrl.split("?")[0]
this.bean.cnUserName = item.userName
this.bean.creatorId = item.creatorId
...
...
@@ -133,8 +132,8 @@ export struct SearchResultContentComponent {
} else {
this.bean.cnFansNum = item.fansNum + ""
}
let regex:RegExp = new RegExp('\n','g')
this.bean.introduction = item.introduction.replace(regex,'')
let regex: RegExp = new RegExp('\n', 'g')
this.bean.introduction = item.introduction.replace(regex, '')
this.bean.mainControl = item.mainControl
this.bean.banControl = item.banControl
...
...
@@ -148,9 +147,13 @@ export struct SearchResultContentComponent {
data_temp.forEach((data) => {
this.data_rmh.push(data)
})
if(this.data_rmh.length > 0){
this.count = 1
}
//只有一条创作者,获取 创作者信息
if (this.data_rmh.length === 1) {
if
(StringUtils.isNotEmpty(UserDataLocal.getUserId()))
{
if
(StringUtils.isNotEmpty(UserDataLocal.getUserId()))
{
//查询是否被关注
let status = new FollowListStatusRequestItem()
status.creatorIds.push(new QueryListIsFollowedItem(this.data_rmh[0].creatorId))
...
...
@@ -159,7 +162,7 @@ export struct SearchResultContentComponent {
}).catch((err: Error) => {
console.log(TAG, "请求失败")
})
}
else
{
}
else
{
this.bean.status = ""
}
}
...
...
@@ -192,53 +195,55 @@ export struct SearchResultContentComponent {
})
})
SearcherAboutDataModel.getInteractListData(data, getContext(this)).then((newValue) => {
newValue.forEach((item) => {
resultData.list.forEach((data) => {
if (item.contentId == data.data.id) {
data.data.collectNum = item.collectNum + ""
data.data.commentNum = item.commentNum + ""
data.data.likeNum = item.likeNum + ""
data.data.readNum = item.readNum + ""
data.data.shareNum = item.shareNum + ""
}
if (data.contentList.length > 0) {
SearcherAboutDataModel.getInteractListData(data, getContext(this)).then((newValue) => {
newValue.forEach((item) => {
resultData.list.forEach((data) => {
if (item.contentId == data.data.id) {
data.data.collectNum = item.collectNum + ""
data.data.commentNum = item.commentNum + ""
data.data.likeNum = item.likeNum + ""
data.data.readNum = item.readNum + ""
data.data.shareNum = item.shareNum + ""
}
})
})
})
// 批量号主信息
let creatorIdList: string[] = []
resultData.list.forEach((value:SearchResultContentItem) => {
creatorIdList.push(value.data.creatorId)
})
SearcherAboutDataModel.getCreatorDetailListData({creatorIdList:creatorIdList}).then((rem) => {
// 批量号主信息
let creatorIdList: string[] = []
resultData.list.forEach((value: SearchResultContentItem) => {
const landscape = value.data.landscape
let photos: FullColumnImgUrlDTO[] = []
// if (value.data.appStyle === 4) {
creatorIdList.push(value.data.creatorId)
})
SearcherAboutDataModel.getCreatorDetailListData({ creatorIdList: creatorIdList }).then((rem) => {
resultData.list.forEach((value: SearchResultContentItem) => {
const landscape = value.data.landscape
let photos: FullColumnImgUrlDTO[] = []
// if (value.data.appStyle === 4) {
value.data.appStyleImages.split("&&").forEach((value) => {
let resizeParams = MinePageDatasModel.extractResizeParams(value)
if
(resizeParams && resizeParams.length === 2)
{
if
(resizeParams && resizeParams.length === 2)
{
photos.push(
{
fullUrl: value,
weight:resizeParams[0],
height:resizeParams[1],
weight: resizeParams[0],
height: resizeParams[1],
landscape: Number(landscape),
} as FullColumnImgUrlDTO
)
}
})
// }
let contentDTO = this.dataTransform(rem,value, photos);
if(value.data.type != "13"){
this.data.push(contentDTO)
if(value.data.sameContentList != null && value.data.sameContentList.length > 0) {
let contentDTO2 = new ContentDTO();
contentDTO2.sameContentListJson = JSON.stringify(value.data.sameContentList)
contentDTO2.sameContentListSize = value.data.sameContentList.length
this.data.push(contentDTO2)
// }
let contentDTO = this.dataTransform(rem, value, photos);
if (value.data.type != "13") {
this.data.push(contentDTO)
if (value.data.sameContentList != null && value.data.sameContentList.length > 0) {
let contentDTO2 = new ContentDTO();
contentDTO2.sameContentListJson = JSON.stringify(value.data.sameContentList)
contentDTO2.sameContentListSize = value.data.sameContentList.length
this.data.push(contentDTO2)
}
}
}
})
})
this.tempList = []
this.data.notifyDataReload()
...
...
@@ -249,14 +254,17 @@ export struct SearchResultContentComponent {
this.hasMore = false
}
this.isLoading = false
}).catch((err: Error) => {
console.log(TAG, JSON.stringify(err))
})
}).catch((err: Error) => {
console.log(TAG, JSON.stringify(err))
console.log(TAG, "请求失败")
this.isLoading = false
this.count = this.count === -1 ? 0 : this.count
})
}).catch((err: Error) => {
console.log(TAG, "请求失败")
this.isLoading = false
this.count = this.count === -1 ? 0 : this.count
})
}else {
this.hasMore = false
}
}
build() {
...
...
@@ -264,15 +272,15 @@ export struct SearchResultContentComponent {
if (this.count == 0) {
ListHasNoMoreDataUI({ style: 2 })
} else {
List({scroller:this.scroller2}) {
if (this.data_rmh != null && this.data_rmh.length > 0){
if (this.data_rmh.length === 1){
ListItem(){
List({ scroller: this.scroller2 }) {
if (this.data_rmh != null && this.data_rmh.length > 0) {
if (this.data_rmh.length === 1) {
ListItem() {
FollowChildComponent({ data: this.bean, type: 1 })
}.padding({left:"31lpx",right:"31lpx"})
}else{
ListItem(){
Column(){
}.padding({ left: "31lpx", right: "31lpx" })
} else {
ListItem() {
Column() {
this.SearchListUI()
}
}
...
...
@@ -283,21 +291,26 @@ export struct SearchResultContentComponent {
Column() {
if (this.searchType == "activity") {
ActivityItemComponent({ contentDTO: item })
}
else if(item.sameContentListSize > 0)
{
}
else if (item.sameContentListSize > 0)
{
MoreComponent({ contentDTO: item })
}else if(item.appStyle == "9"){
Column(){
Card9Component({ compDTO: new CompDTO, contentDTO:item, pageId: "", pageName: "" })
} else if (item.appStyle == "9") {
Column() {
Card9Component({
compDTO: new CompDTO,
contentDTO: item,
pageId: "",
pageName: ""
})
Divider().strokeWidth(5).color('#f5f5f5').padding({ left: 0, right: 0 })
}
} else {
if(this.data?.get(index + 1)?.sameContentListSize > 0) {
if
(this.data?.get(index + 1)?.sameContentListSize > 0) {
Divider()
.width('100%')
.color($r('app.color.color_F5F5F5'))
.strokeWidth(4)
}
CardParser({
compDTO:
new CompDTO, contentDTO: item })
CardParser({
compDTO:
new CompDTO, contentDTO: item })
}
if (index != this.data.totalCount() - 1) {
Divider().strokeWidth(1).color('#f5f5f5').padding({ left: 16, right: 16 })
...
...
@@ -312,7 +325,7 @@ export struct SearchResultContentComponent {
}, (item: ContentDTO, index: number) => index.toString())
//没有更多数据 显示提示
if (!this.hasMore &&
this.data.totalCount() > 0
) {
if (!this.hasMore &&
(this.data.totalCount() > 0|| (this.data_rmh != null && this.data_rmh.length > 0))
) {
ListItem() {
ListHasNoMoreDataUI()
}
...
...
@@ -320,6 +333,7 @@ export struct SearchResultContentComponent {
}.cachedCount(5)
.edgeEffect(EdgeEffect.None)
.scrollBar(BarState.Off)
.height('100%')
.onReachEnd(() => {
console.log(TAG, "触底了");
if (!this.isLoading) {
...
...
@@ -334,23 +348,23 @@ export struct SearchResultContentComponent {
@Builder
SearchListUI() {
List({initialIndex: 0,space:'8lpx',scroller: this.scroller}) {
ListItemGroup(){
List({ initialIndex: 0, space: '8lpx', scroller: this.scroller }) {
ListItemGroup() {
ForEach(this.data_rmh, (item: SearchRmhDescription, index: number) => {
ListItem() {
SearchCreatorComponent({
item:item
})
SearchCreatorComponent({
item: item
})
}
.width('150lpx')
.height('100%')
})
}.offset({ left: this.listLeft })
ListItem(){
if (this.data_rmh.length === 10){
ListItem() {
if (this.data_rmh.length === 10) {
this.itemEnd()
}
}.height('100%')
.margin({
left:'23lpx'
})
.margin({
left: '23lpx'
})
}
.edgeEffect(EdgeEffect.None)
.scrollBar(BarState.Off)
...
...
@@ -359,10 +373,10 @@ export struct SearchResultContentComponent {
.height('219lpx')
.onReachEnd(() => {
this.isEnd = true
console.log(TAG,'is end')
console.log(TAG,
'is end')
})
.onScrollFrameBegin((offset: number, state: ScrollState) => {
console.log(TAG,'offset', offset)
console.log(TAG,
'offset', offset)
if (!this.scroller.isAtEnd()) {
this.isEnd = false
}
...
...
@@ -374,31 +388,35 @@ export struct SearchResultContentComponent {
.parallelGesture(
PanGesture({ direction: PanDirection.Horizontal, distance: 1 })
.onActionStart((event: GestureEvent) => {
console.info(TAG,'Pan start')
console.info(TAG,
'Pan start')
})
.onActionUpdate((event: GestureEvent) => {
///小于10个不展示滑动
if (this.data_rmh.length < 10) return;
if (this.data_rmh.length < 10) {
return;
}
if (event && this.isEnd) {
// console.log('event.offsetX',event.offsetX)
this.listLeft = event.offsetX < -60 ? -60 : event.offsetX > 0 ? 0 : event.offsetX
this.ellipseW = (-this.listLeft) / 1.5
console.log(TAG,"this.ellipseW==>" + this.ellipseW)
console.log(TAG,
"this.ellipseW==>" + this.ellipseW)
}
})
.onActionEnd((event: GestureEvent) => {
if (this.data_rmh.length < 10) return;
console.info(TAG,'Pan end')
if (this.data_rmh.length < 10) {
return;
}
console.info(TAG, 'Pan end')
this.listLeft = 0
// this.moreWidth = 20
if (event.offsetX < 0 && this.ellipseW >=20) {
console.log(TAG,'跳转')
if (event.offsetX < 0 && this.ellipseW >= 20) {
console.log(TAG, '跳转')
let params: Params = {
pageID: this.keywords
}
WDRouterRule.jumpWithPage(WDRouterPage.searchCreatorPage,params)
WDRouterRule.jumpWithPage(WDRouterPage.searchCreatorPage,
params)
}
this.ellipseW = 0
})
...
...
@@ -411,18 +429,17 @@ export struct SearchResultContentComponent {
.strokeWidth('12lpx')
}
@Builder
itemEnd() {
Row() {
Ellipse()
.width(2* this.ellipseW)
.width(2
* this.ellipseW)
.height('100%')
.fill('rgb(240,235,238)')
.position({ left: -this.ellipseW, top: 0 })
Column(){
Text(this.ellipseW === 0 ? '' : this.ellipseW < 20? '查看更多' : '松手查看')
Column() {
Text(this.ellipseW === 0 ? '' : this.ellipseW < 20 ? '查看更多' : '松手查看')
.width('19lpx')
.fontSize('19lpx')
.fontWeight('400lpx')
...
...
@@ -437,153 +454,153 @@ export struct SearchResultContentComponent {
.height('100%')
}
private dataTransform(rem:CreatorDetailResponseItem[],value: SearchResultContentItem, photos: FullColumnImgUrlDTO[]): ContentDTO {
let rmhInfo = this.getRmhInfo(rem,value)
console.log('获取photos',JSON.stringify(photos))
console.log('获取value2',JSON.stringify(value))
let liveType = value.data?.liveType;
let seoTags = value.data?.seoTags
let cornerMark = value.data?.cornerMark
let contentDTO = new ContentDTO();
contentDTO.liveType = liveType?liveType: ""
contentDTO.seoTags = seoTags?seoTags: ""
contentDTO.cornerMark = cornerMark?cornerMark: ""
contentDTO.appStyle = value.data.appStyle + ""
contentDTO.cityCode = value.data.cityCode
contentDTO.coverSize = ""
contentDTO.coverType = value.data.type == "5" ? 1 : -1
contentDTO.coverUrl =
this.searchType == "activity" ? value.data.zhChannelPageImg : value.data.appStyleImages.split("&&")[0];
contentDTO.description = value.data.description
contentDTO.districtCode = value.data.districtCode
contentDTO.endTime = value.data.endTime
contentDTO.hImageUrl = ""
contentDTO.heatValue = ""
contentDTO.innerUrl = ""
contentDTO.landscape = Number.parseInt(value.data.landscape)
contentDTO.linkUrl = value.data.linkUrl
contentDTO.openLikes = Number.parseInt(value.data.openLikes)
contentDTO.openUrl = ""
contentDTO.pageId = value.data.pageId
contentDTO.programAuth = ""
contentDTO.programId = ""
contentDTO.programName = ""
contentDTO.programSource = -1
contentDTO.programType = Number.parseInt(value.data.status)
contentDTO.provinceCode = value.data.provinceCode
contentDTO.showTitleEd = value.data.showTitleEd
contentDTO.showTitleIng = value.data.showTitleIng
contentDTO.showTitleNo = value.data.showTitleNo
contentDTO.startTime = value.data.startTime
contentDTO.subType = ""
contentDTO.subtitle = ""
contentDTO.title = value.data.title
contentDTO.vImageUrl = ""
contentDTO.screenType = ""
contentDTO.source = StringUtils.isEmpty(value.data.creatorName) ? value.data.sourceName : value.data.creatorName
contentDTO.objectId = value.data.id
contentDTO.objectType = value.data.type
contentDTO.channelId = value.data.channelId
contentDTO.relId = value.data.relId
contentDTO.relType = value.data.relType
contentDTO.newsTitle = value.data.titleLiteral;
contentDTO.publishTime =
StringUtils.isNotEmpty(value.data.firstPublishTime) ? value.data.firstPublishTime : value.data.publishTime
contentDTO.visitorComment = -1
contentDTO.fullColumnImgUrls = photos
contentDTO.newsSummary = ""
contentDTO.hasMore = -1
contentDTO.slideShows = []
contentDTO.voiceInfo = {} as VoiceInfoDTO
contentDTO.tagWord = -1
contentDTO.isSelect = true
contentDTO.rmhInfo = {} as RmhInfoDTO
contentDTO.photoNum = StringUtils.isEmpty(value.data.picCount) ? 0 : Number(value.data.picCount)
contentDTO.liveInfo = {} as LiveInfoDTO;
contentDTO.videoInfo = {
videoDuration: Number.parseInt(value.data.duration)
} as VideoInfoDTO;
let interact = new InteractDataDTO()
interact.collectNum = value.data.collectNum
interact.commentNum = value.data.commentNum
interact.contentId = value.data.id
interact.contentType = Number.parseInt(value.data.type)
interact.likeNum = value.data.likeNum
interact.readNum = Number.parseInt(value.data.readNum)
interact.shareNum = Number.parseInt(value.data.shareNum)
contentDTO.interactData = interact
contentDTO.corner = ''
contentDTO.rmhPlatform = 0
contentDTO.newTags = ''
contentDTO.isSearch = true
contentDTO.publishTimestamp = ""
contentDTO.bottomNavId = '';
contentDTO.openType = '';
contentDTO.extra = '';
contentDTO.titleShow = value.data.titleShow == "1" ? 0 : 1
contentDTO.rmhInfo = rmhInfo
contentDTO.shareFlag = value.data.shareFlag
contentDTO.contentText = value.data.contentText
return contentDTO;
private dataTransform(rem: CreatorDetailResponseItem[], value: SearchResultContentItem,
photos: FullColumnImgUrlDTO[]): ContentDTO {
let rmhInfo = this.getRmhInfo(rem, value)
console.log('获取photos', JSON.stringify(photos))
console.log('获取value2', JSON.stringify(value))
let liveType = value.data?.liveType;
let seoTags = value.data?.seoTags
let cornerMark = value.data?.cornerMark
let contentDTO = new ContentDTO();
contentDTO.liveType = liveType ? liveType : ""
contentDTO.seoTags = seoTags ? seoTags : ""
contentDTO.cornerMark = cornerMark ? cornerMark : ""
contentDTO.appStyle = value.data.appStyle + ""
contentDTO.cityCode = value.data.cityCode
contentDTO.coverSize = ""
contentDTO.coverType = value.data.type == "5" ? 1 : -1
contentDTO.coverUrl =
this.searchType == "activity" ? value.data.zhChannelPageImg : value.data.appStyleImages.split("&&")[0];
contentDTO.description = value.data.description
contentDTO.districtCode = value.data.districtCode
contentDTO.endTime = value.data.endTime
contentDTO.hImageUrl = ""
contentDTO.heatValue = ""
contentDTO.innerUrl = ""
contentDTO.landscape = Number.parseInt(value.data.landscape)
contentDTO.linkUrl = value.data.linkUrl
contentDTO.openLikes = Number.parseInt(value.data.openLikes)
contentDTO.openUrl = ""
contentDTO.pageId = value.data.pageId
contentDTO.programAuth = ""
contentDTO.programId = ""
contentDTO.programName = ""
contentDTO.programSource = -1
contentDTO.programType = Number.parseInt(value.data.status)
contentDTO.provinceCode = value.data.provinceCode
contentDTO.showTitleEd = value.data.showTitleEd
contentDTO.showTitleIng = value.data.showTitleIng
contentDTO.showTitleNo = value.data.showTitleNo
contentDTO.startTime = value.data.startTime
contentDTO.subType = ""
contentDTO.subtitle = ""
contentDTO.title = value.data.title
contentDTO.vImageUrl = ""
contentDTO.screenType = ""
contentDTO.source = StringUtils.isEmpty(value.data.creatorName) ? value.data.sourceName : value.data.creatorName
contentDTO.objectId = value.data.id
contentDTO.objectType = value.data.type
contentDTO.channelId = value.data.channelId
contentDTO.relId = value.data.relId
contentDTO.relType = value.data.relType
contentDTO.newsTitle = value.data.titleLiteral;
contentDTO.publishTime =
StringUtils.isNotEmpty(value.data.firstPublishTime) ? value.data.firstPublishTime : value.data.publishTime
contentDTO.visitorComment = -1
contentDTO.fullColumnImgUrls = photos
contentDTO.newsSummary = ""
contentDTO.hasMore = -1
contentDTO.slideShows = []
contentDTO.voiceInfo = {} as VoiceInfoDTO
contentDTO.tagWord = -1
contentDTO.isSelect = true
contentDTO.rmhInfo = {} as RmhInfoDTO
contentDTO.photoNum = StringUtils.isEmpty(value.data.picCount) ? 0 : Number(value.data.picCount)
contentDTO.liveInfo = {} as LiveInfoDTO;
contentDTO.videoInfo = {
videoDuration: Number.parseInt(value.data.duration)
} as VideoInfoDTO;
let interact = new InteractDataDTO()
interact.collectNum = value.data.collectNum
interact.commentNum = value.data.commentNum
interact.contentId = value.data.id
interact.contentType = Number.parseInt(value.data.type)
interact.likeNum = value.data.likeNum
interact.readNum = Number.parseInt(value.data.readNum)
interact.shareNum = Number.parseInt(value.data.shareNum)
contentDTO.interactData = interact
contentDTO.corner = ''
contentDTO.rmhPlatform = 0
contentDTO.newTags = ''
contentDTO.isSearch = true
contentDTO.publishTimestamp = ""
contentDTO.bottomNavId = '';
contentDTO.openType = '';
contentDTO.extra = '';
contentDTO.titleShow = value.data.titleShow == "1" ? 0 : 1
contentDTO.rmhInfo = rmhInfo
contentDTO.shareFlag = value.data.shareFlag
contentDTO.contentText = value.data.contentText
return contentDTO;
}
// 搜索数据转化rmhInfo
private getRmhInfo(rem:CreatorDetailResponseItem[],value:SearchResultContentItem){
let obj = value.data
let rmhInfo:RmhInfoDTO = {
rmhHeadUrl:obj.headerPhotoUrl,
rmhName:obj.creatorName,
rmhId:obj.creatorId,
authIcon:obj.authIcon,
authTitle: obj.authTitle,
authTitle2: '',
banControl: 0,
cnIsAttention: 0,
cnAttention: 0,
cnlsComment: 0,
cnlsLike: 0,
cnMainControl: 0,
cnShareControl: 0,
cnIsComment: 0,
cnIsLike:0,
posterShareControl: 0,
rmhDesc: obj.introduction,
userId: obj.userId,
userType: obj.userType,
honoraryIcon:'',
rmhPlatform:0
}
if(rem.length>0){
rem.forEach(item=>{
if(item.creatorId === obj.creatorId){
rmhInfo = {
rmhHeadUrl:item.headPhotoUrl,
rmhName:item.userName,
rmhId:item.creatorId,
authIcon:item.authIcon,
authTitle: item.authTitle,
authTitle2: '',
banControl: 0,
cnIsAttention:item.isAttention,
cnAttention: 0,
cnlsComment: 0,
cnlsLike: 0,
cnMainControl: 0,
cnShareControl: 0,
cnIsComment: 0,
cnIsLike:0,
posterShareControl: 0,
rmhDesc: item.introduction,
userId: item.userId,
userType: item.userType,
honoraryIcon:'',
rmhPlatform:0
}
// 搜索数据转化rmhInfo
private getRmhInfo(rem: CreatorDetailResponseItem[], value: SearchResultContentItem) {
let obj = value.data
let rmhInfo: RmhInfoDTO = {
rmhHeadUrl: obj.headerPhotoUrl,
rmhName: obj.creatorName,
rmhId: obj.creatorId,
authIcon: obj.authIcon,
authTitle: obj.authTitle,
authTitle2: '',
banControl: 0,
cnIsAttention: 0,
cnAttention: 0,
cnlsComment: 0,
cnlsLike: 0,
cnMainControl: 0,
cnShareControl: 0,
cnIsComment: 0,
cnIsLike: 0,
posterShareControl: 0,
rmhDesc: obj.introduction,
userId: obj.userId,
userType: obj.userType,
honoraryIcon: '',
rmhPlatform: 0
}
if (rem.length > 0) {
rem.forEach(item => {
if (item.creatorId === obj.creatorId) {
rmhInfo = {
rmhHeadUrl: item.headPhotoUrl,
rmhName: item.userName,
rmhId: item.creatorId,
authIcon: item.authIcon,
authTitle: item.authTitle,
authTitle2: '',
banControl: 0,
cnIsAttention: item.isAttention,
cnAttention: 0,
cnlsComment: 0,
cnlsLike: 0,
cnMainControl: 0,
cnShareControl: 0,
cnIsComment: 0,
cnIsLike: 0,
posterShareControl: 0,
rmhDesc: item.introduction,
userId: item.userId,
userType: item.userType,
honoraryIcon: '',
rmhPlatform: 0
}
})
}
return rmhInfo
}
})
}
return rmhInfo
}
}
\ No newline at end of file
...
...
sight_harmony/features/wdComponent/src/main/ets/components/view/HorizontalStrokeCardThreeTwoRadioForMoreComponent.ets
View file @
80a2315
...
...
@@ -57,10 +57,10 @@ export struct HorizontalStrokeCardThreeTwoRadioForMoreComponent {
liveToMore() {
if (!!this.compDTO.dataSourceType) {
if (this.compDTO.dataSourceType === 'OBJECT_POS') {
ProcessUtils.jumpChannelTab(this.compDTO.objectId, this.compDTO.pageId as string, this.compDTO.objectTitle)
return;
}
// if (this.compDTO.dataSourceType === 'OBJECT_POS') {
// ProcessUtils.jumpChannelTab(this.compDTO.objectId, this.compDTO.pageId as string, this.compDTO.objectTitle)
// return;
// }
if (this.compDTO.linkUrl) {
let taskAction: Action = {
type: 'JUMP_H5_BY_WEB_VIEW',
...
...
sight_harmony/features/wdComponent/src/main/ets/viewmodel/SearchResultCountItem.ets
View file @
80a2315
...
...
@@ -5,11 +5,25 @@
*/
export class SearchResultCountItem{
/*
"allTotal":0,
"activityTotal":0,
"cmsTotal":0,
"trueTotal":0,
"pageSize":1,
"keyword":"wuhuhuan",
"totalCount":0,
"pageNum":1,
"videoTotal":0,
"rmhTotal":5
*/
keyword:string ='' //搜索关键字
allTotal: number = 0 //所有tab总量
cmsTotal: number = 0 //精选总量
rmhTotal: number = 0 //人民号总量
videoTotal: number = 0 //视频总量
activityTotal: number = 0 //活动数据总量
}
\ No newline at end of file
...
...
sight_harmony/features/wdDetailPlayLive/src/main/ets/widgets/details/video/PlayUIComponent.ets
View file @
80a2315
...
...
@@ -370,6 +370,7 @@ export struct PlayUIComponent {
this.playerController?.pause()
} else {
this.isPlayStatus = true
this.playerController?.firstPlay(this.liveUrl)
this.playerController?.play()
}
})
...
...
sight_harmony/features/wdLogin/src/main/ets/pages/guide/GuidePages.ets
View file @
80a2315
...
...
@@ -36,6 +36,7 @@ struct GuidePages {
ChildItem(index: number) {
RelativeContainer() {
Image(this.guideImage[index])
.objectFit(ImageFit.Contain)
.alignRules({
top: { anchor: "__container__", align: VerticalAlign.Top },
bottom: { anchor: "__container__", align: VerticalAlign.Bottom }
...
...
sight_harmony/features/wdLogin/src/main/ets/pages/login/LoginPage.ets
View file @
80a2315
...
...
@@ -122,6 +122,7 @@ struct LoginPage {
this.disableScreenCapture()
}
onPageHide(): void {
this.pageHideTime = DateTimeUtils.getTimeStamp()
let duration = 0
...
...
@@ -132,8 +133,6 @@ struct LoginPage {
}else{
TrackingPageBrowse.trackCommonPageExposureEnd(TrackConstants.PageName.Login_Page,TrackConstants.PageName.Login_Page,duration)
}
this.isPrivacyMode = false
this.disableScreenCapture()
}
build() {
...
...
@@ -262,6 +261,10 @@ struct LoginPage {
right: { anchor: "__container__", align: HorizontalAlign.End }
})
.onClick(() => {
///关闭禁止截图
this.isPrivacyMode = false
this.disableScreenCapture()
router.back()
})
.id('id_close')
...
...
sight_harmony/products/phone/src/main/ets/pages/launchPage/LaunchAdvertisingPage.ets
View file @
80a2315
...
...
@@ -91,11 +91,11 @@ struct LaunchAdvertisingPage {
Text('广告')
.fontColor(Color.White)
.textAlign(TextAlign.Center)
.fontSize('24lpx')
.width('72lpx')
.height('36lpx')
.fontSize(12)
.width(36)
.height(18)
.borderRadius(2)
.margin({top:'
15lpx',left:'19l
px'})
.margin({top:'
8px',left:'10
px'})
.backgroundColor('#80000000')
.margin({left:16})
}
...
...
@@ -104,13 +104,13 @@ struct LaunchAdvertisingPage {
Button(){
Text(this.time + 's 跳过')
.fontSize(
'27lpx'
)
.fontSize(
14
)
.fontColor(Color.White)
.margin({left:
'28lpx',right:'28lpx'
})
.margin({left:
14,right:14
})
}
.width('148lpx')
.height('56lpx')
.margin({top:'10lpx',right:'19lpx'})
.width(74)
.height(28)
.margin({top:5,right:10})
.backgroundColor('#80000000')
.onClick(() => {
this.trackingLaunchJumpOver()
...
...
@@ -125,21 +125,21 @@ struct LaunchAdvertisingPage {
Button(){
Row(){
Text(this.defaultModel.isAd == '1'?'点击跳转至详情或第三方应用':'点击跳转至详情')
.fontSize(
'31lpx'
)
.fontSize(
16
)
.fontColor(Color.White)
.margin({
left:
'55lpx'
left:
28
})
Image($r('app.media.Slice'))
.width('46lpx')
.height('46lpx')
.margin({right:'55lpx'})
.width(28)
.height(23)
.margin({right:28})
}.alignItems(VerticalAlign.Center)
}
.width('566lpx')
.height('111lpx')
.width(284)
.height(56)
.margin({
bottom:
'51lpx'
bottom:
26
})
.borderWidth(1)
.borderColor(Color.White)
...
...
@@ -151,8 +151,8 @@ struct LaunchAdvertisingPage {
if(this.defaultModel.screenType == '1') {
Column(){
Image($r('app.media.LaunchPage_logo'))
.width('278lpx')
.height('154lpx')
.width(140)
.height(77)
.margin({top:20})
}.width('100%').height('16%').backgroundColor(Color.White)
// .expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.TOP, SafeAreaEdge.BOTTOM])
...
...
sight_harmony/products/phone/src/main/ets/pages/launchPage/LaunchInterestsHobbiesPage.ets
View file @
80a2315
...
...
@@ -40,11 +40,11 @@ struct LaunchInterestsHobbiesPage {
Row(){
Blank()
Text('跳过')
.fontSize(
'27lpx'
)
.fontSize(
14
)
.fontColor('#333333')
.width('54lpx')
.height('35lpx')
.margin({top:'30lpx',right:'46lpx'})
.width(30)
.height(18)
.margin({top:15,right:23})
.onClick(()=>{
//直接跳过到首页
//跳转首页
...
...
@@ -58,20 +58,20 @@ struct LaunchInterestsHobbiesPage {
.justifyContent(FlexAlign.End)
Text('选择感兴趣的内容')
.fontSize(
'46lpx'
)
.fontSize(
23
)
.fontWeight(FontWeight.Bold)
.textAlign(TextAlign.Center)
.fontColor('#333333')
.width('100%')
.height('61lpx')
.margin({top:'54lpx'})
.height(30)
.margin({top:27})
Text('完善信息,将为您推荐个性化的内容')
.fontSize(
'27lpx'
)
.fontSize(
14
)
.textAlign(TextAlign.Center)
.fontColor('#9E9E9E')
.width('100%')
.height('35lpx')
.margin({top:'12lpx'})
.height(17)
.margin({top:6})
if(!this.isConnectNetwork){
EmptyComponent({ emptyType: 1,emptyHeight:"60%" ,retry: () => {
...
...
@@ -141,39 +141,36 @@ struct LaunchInterestsHobbiesPage {
})
}
.width('90%')
.margin({top:
'61lpx',bottom:'300lpx'
})
.margin({top:
30,bottom:150
})
.columnsTemplate('1fr 1fr 1fr')
.columnsGap('23lpx')
.rowsGap('23lpx')
.scrollBar(BarState.Off)
}
}
.width('100%')
.height('100%')
}
.width('100%')
.height(`calc(100% - ${158 + 'lpx'})`)
// .backgroundColor(Color.Red)
.height(`calc(100% - ${260 + 'px'})`)
Stack({alignContent:Alignment.Center}){
Button(this.selectCount == 0?'选好了':'选好了(' + this.selectCount + ')')
.fontSize(
'35lpx'
)
.fontSize(
18
)
.fontColor('#FFFFFF')
.backgroundColor('#ED2800')
.type(ButtonType.Normal)
.borderRadius('10lpx')
.width('662lpx')
.height('84lpx')
.margin({top:'10lpx'})
.borderRadius(5)
.width(320)
.height(44)
.margin({top:5})
Image('')
.width('662lpx')
.height('84lpx')
.margin({top:'10lpx'})
.width(320)
.height(44)
.margin({top:5})
.backgroundColor(Color.White)
.opacity(this.selectCount == 0 ? 0.6 : 0)
.borderRadius(
'10lpx'
)
.borderRadius(
5
)
.onClick(()=>{
if (this.selectCount == 0) {
this.dialogToast.open()
...
...
@@ -188,8 +185,8 @@ struct LaunchInterestsHobbiesPage {
})
}
.width('100%')
.height('108lpx')
.margin({top:0})
.height(54)
.margin({top:5})
// .backgroundColor(Color.Orange)
}
.width('100%')
...
...
sight_harmony/products/phone/src/main/ets/pages/launchPage/LaunchPage.ets
View file @
80a2315
...
...
@@ -166,10 +166,10 @@ struct LaunchPage {
Stack({alignContent:Alignment.Bottom}){
Image($r('app.media.LaunchPage_logo'))
.width('278lpx')
.height('154lpx')
.width(139)
.height(87)
.margin({
bottom:
'48lpx'
bottom:
24
})
}
...
...
Please
register
or
login
to post a comment