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-08-21 16:05:17 +0800
Browse Files
Options
Browse Files
Download
Plain Diff
Commit
8b5495e85cc9493514d4f8afb798dbb0da843fe2
8b5495e8
2 parents
bafd9254
5368b896
Merge branch 'main' of
http://192.168.1.42/developOne/harmonyPool
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
119 additions
and
93 deletions
sight_harmony/features/wdComponent/src/main/ets/components/MorningEveningPaper/MorningEveningPaperComponent.ets
sight_harmony/features/wdComponent/src/main/ets/components/peopleShipHomePage/PeopleShipHomeListComponent.ets
sight_harmony/features/wdComponent/src/main/ets/utils/ColorUtils.ets
sight_harmony/features/wdComponent/src/main/resources/rawfile/apph5/index.html
sight_harmony/features/wdComponent/src/main/ets/components/MorningEveningPaper/MorningEveningPaperComponent.ets
View file @
8b5495e
...
...
@@ -25,6 +25,8 @@ import { viewColumInsightIntentShare } from '../../utils/InsightIntentShare'
import { common } from '@kit.AbilityKit';
import { EmptyComponent,WDViewDefaultType } from '../view/EmptyComponent';
import { EmitterEventId, EmitterUtils } from 'wdKit/Index'
import { ColorUtils } from '../../utils/ColorUtils';
const TAG = 'MorningEveningPaperComponent';
...
...
@@ -217,7 +219,9 @@ export struct MorningEveningPaperComponent {
console.log(TAG, "compInfoBean compStyle = " + imageUrl)
if (this.pageInfoBean.backgroundColor.length > 0){
this.mixedBgColor = this.pageInfoBean.backgroundColor
let colorDatas = ColorUtils.hexColorValueToRGB(this.pageInfoBean.backgroundColor)
let color = ColorUtils.getMorningEveningPaperRgb({red:colorDatas[0],green:colorDatas[1],blue:colorDatas[2],alpha:1})
this.mixedBgColor = "#ff" + color.red.toString(16).padStart(2,'0') + color.green.toString(16).padStart(2,'0') + color.blue.toString(16).padStart(2,'0');
return
}
...
...
@@ -251,9 +255,9 @@ export struct MorningEveningPaperComponent {
effectKit.createColorPicker(pixelMap, (err, colorPicker) => {
let color = colorPicker.getLargestProportionColor();
console.log(TAG, "compInfoBean compStyle = " + color)
//
color = ColorUtils.getMorningEveningPaperRgb({red:color.red,green:color.green,blue:color.blue,alpha:color.alpha})
color = ColorUtils.getMorningEveningPaperRgb({red:color.red,green:color.green,blue:color.blue,alpha:color.alpha})
// 将取色器选取的color示例转换为十六进制颜色代码
this.mixedBgColor = "#" + color.alpha.toString(16) + color.red.toString(16).padStart(2,'0') + color.green.toString(16).padStart(2,'0') + color.blue.toString(16).padStart(2,'0');
this.mixedBgColor = "#
ff
" + color.alpha.toString(16) + color.red.toString(16).padStart(2,'0') + color.green.toString(16).padStart(2,'0') + color.blue.toString(16).padStart(2,'0');
console.log(TAG, "compInfoBean compStyle = " + this.mixedBgColor)
});
}
...
...
sight_harmony/features/wdComponent/src/main/ets/components/peopleShipHomePage/PeopleShipHomeListComponent.ets
View file @
8b5495e
...
...
@@ -52,13 +52,33 @@ export struct PeopleShipHomeListComponent {
Tabs({ barPosition: BarPosition.Start, controller: this.controller }) {
ForEach(this.tabArr, (item: ArticleTypeData, index: number) => {
TabContent() {
PeopleShipHomeArticleListComponent({
typeModel: item,
creatorId: this.creatorId,
currentTopSelectedIndex: this.currentIndex,
currentIndex: index
})
if (index == 0){
TabContent() {
PeopleShipHomeArticleListComponent({
typeModel: item,
creatorId: this.creatorId,
currentTopSelectedIndex: this.currentIndex,
currentIndex: index
})
}.gesture(PanGesture(new PanGestureOptions({ direction: PanDirection.Right})))
}else if(index == this.tabArr.length - 1){
TabContent() {
PeopleShipHomeArticleListComponent({
typeModel: item,
creatorId: this.creatorId,
currentTopSelectedIndex: this.currentIndex,
currentIndex: index
})
}.gesture(PanGesture(new PanGestureOptions({ direction: PanDirection.Left})))
}else{
TabContent() {
PeopleShipHomeArticleListComponent({
typeModel: item,
creatorId: this.creatorId,
currentTopSelectedIndex: this.currentIndex,
currentIndex: index
})
}
}
// .tabBar(this.Tab(index, item.name ?? ''))
})
...
...
sight_harmony/features/wdComponent/src/main/ets/utils/ColorUtils.ets
View file @
8b5495e
...
...
@@ -179,14 +179,16 @@ export class ColorUtils {
public static getMorningEveningPaperRgb(color: ColorRgb): ColorRgb {
// RGB颜色取值范围是0~255,需要转换为0~1的浮点数
const red: number = color.red;
const green: number = color.green;
const blue: number = color.blue;
const red: number = color.red / MAX_RGB_VALUE;
const green: number = color.green / MAX_RGB_VALUE;
const blue: number = color.blue / MAX_RGB_VALUE;
const max: number = Math.max(red, green, blue);
const min: number = Math.min(red, green, blue);
const delta: number = max - min;
// 色调
let hue: number = 0;
// 饱和度
...
...
sight_harmony/features/wdComponent/src/main/resources/rawfile/apph5/index.html
View file @
8b5495e
...
...
@@ -427,86 +427,86 @@
</div>
<!-- 分享 -->
<div
class=
"share"
v-if=
"shareOpen"
:style=
"{ marginTop: actieInfo.show ? '0.64rem' : undefined }"
>
<div
v-if=
"details.shareInfo.sharePosterOpen == 1"
class=
"sharePoster share-wrapper share-box"
@
click=
"openShare('8')"
:style=
"{ width: details.shareInfo.sharePosterOpen == 1 ? `calc(${100/4}%)` : undefined }"
>
<img
v-if=
"darkMode === 'light'"
class=
"image-first"
src=
"./image/share/firstStart@1x.png"
alt=
""
>
<img
v-else-if=
"darkMode === 'dark'"
class=
"image-first"
src=
"./image/dark/firstStart.png"
alt=
""
>
<img
v-if=
"darkMode === 'light'"
class=
"image-center"
src=
"./image/share/firstCenter@1x.png"
alt=
""
>
<img
v-else-if=
"darkMode === 'dark'"
class=
"image-center"
src=
"./image/dark/firstCenter.png"
alt=
""
>
<img
v-if=
"darkMode === 'light'"
class=
"image-end"
src=
"./image/share/firstEnd@1x.png"
alt=
""
>
<img
v-else-if=
"darkMode === 'dark'"
class=
"image-end"
src=
"./image/dark/firstEnd.png"
alt=
""
>
<div
class=
"share-content"
>
<img
src=
"./image/share/poster.svg"
alt=
""
>
<span>
海报
</span>
</div>
<img
v-if=
"shareNewPoster"
class=
"news"
src=
"./image/share/posterNew.svg"
alt=
""
>
</div>
<div
class=
"share-wechat share-wrapper"
:class=
"details.shareInfo.sharePosterOpen == 1 ? 'share-box-center center' : 'share-box'"
@
click=
"openShare('3')"
:style=
"{ width: details.shareInfo.sharePosterOpen == 1 ? `calc(${100/4}% + ${5.8/37.5}rem)` : `calc(${100/3}% + ${(7.5/3)/37.5}rem)` }"
>
<template
v-if=
"details.shareInfo.sharePosterOpen == 1"
>
<img
v-if=
"darkMode === 'light'"
class=
"image-first"
src=
"./image/share/secondStart@1x.png"
alt=
""
>
<img
v-else-if=
"darkMode === 'dark'"
class=
"image-first"
src=
"./image/dark/secondStart.png"
alt=
""
>
<img
v-if=
"darkMode === 'light'"
class=
"image-center"
src=
"./image/share/secondCenter@1x.png"
alt=
""
>
<img
v-else-if=
"darkMode === 'dark'"
class=
"image-center"
src=
"./image/dark/secondCenter.png"
alt=
""
>
<img
v-if=
"darkMode === 'light'"
class=
"image-end"
src=
"./image/share/secondEnd@1x.png"
alt=
""
>
<img
v-else-if=
"darkMode === 'dark'"
class=
"image-end"
src=
"./image/dark/secondEnd.png"
alt=
""
>
</template>
<template
v-else
>
<img
v-if=
"darkMode === 'light'"
class=
"image-first"
src=
"./image/share/firstStart@1x.png"
alt=
""
>
<img
v-else-if=
"darkMode === 'dark'"
class=
"image-first"
src=
"./image/dark/firstStart.png"
alt=
""
>
<img
v-if=
"darkMode === 'light'"
class=
"image-center"
src=
"./image/share/firstCenter@1x.png"
alt=
""
>
<img
v-else-if=
"darkMode === 'dark'"
class=
"image-center"
src=
"./image/dark/firstCenter.png"
alt=
""
>
<img
v-if=
"darkMode === 'light'"
class=
"image-end"
src=
"./image/share/firstEnd@1x.png"
alt=
""
>
<img
v-else-if=
"darkMode === 'dark'"
class=
"image-end"
src=
"./image/dark/firstEnd.png"
alt=
""
>
</template>
<div
class=
"share-content"
>
<img
src=
"./image/share/wechat.svg"
alt=
""
>
<span>
微信
</span>
</div>
</div>
<div
class=
"share-wechat-circle share-box-center share-wrapper"
@
click=
"openShare('4')"
:style=
"{ width: details.shareInfo.sharePosterOpen == 1 ? `calc(${100/4}% + ${5.8/37.5}rem)` : `calc(${100/3}% + ${(7.5/3)/37.5}rem)` }"
>
<img
v-if=
"darkMode === 'light'"
class=
"image-first"
src=
"./image/share/secondStart@1x.png"
alt=
""
>
<img
v-else-if=
"darkMode === 'dark'"
class=
"image-first"
src=
"./image/dark/secondStart.png"
alt=
""
>
<img
v-if=
"darkMode === 'light'"
class=
"image-center"
src=
"./image/share/secondCenter@1x.png"
alt=
""
>
<img
v-else-if=
"darkMode === 'dark'"
class=
"image-center"
src=
"./image/dark/secondCenter.png"
alt=
""
>
<img
v-if=
"darkMode === 'light'"
class=
"image-end"
src=
"./image/share/secondEnd@1x.png"
alt=
""
>
<img
v-else-if=
"darkMode === 'dark'"
class=
"image-end"
src=
"./image/dark/secondEnd.png"
alt=
""
>
<div
class=
"share-content"
>
<img
src=
"./image/share/wechatCircle.svg"
alt=
""
>
<span>
朋友圈
</span>
</div>
</div>
<div
class=
"share-weibo share-box-last share-wrapper"
@
click=
"openShare('5')"
:style=
"{ width: details.shareInfo.sharePosterOpen == 1 ? `calc(${100/4}%)` : `calc(${100/3}% + ${(7.5/3)/37.5}rem)` }"
>
<img
v-if=
"darkMode === 'light'"
class=
"image-first"
src=
"./image/share/thirdStart@1x.png"
alt=
""
>
<img
v-else-if=
"darkMode === 'dark'"
class=
"image-first"
src=
"./image/dark/thirdStart.png"
alt=
""
>
<img
v-if=
"darkMode === 'light'"
class=
"image-center"
src=
"./image/share/thirdCenter@1x.png"
alt=
""
>
<img
v-else-if=
"darkMode === 'dark'"
class=
"image-center"
src=
"./image/dark/thirdCenter.png"
alt=
""
>
<img
v-if=
"darkMode === 'light'"
class=
"image-end"
src=
"./image/share/thirdEnd@1x.png"
alt=
""
>
<img
v-else-if=
"darkMode === 'dark'"
class=
"image-end"
src=
"./image/dark/thirdEnd.png"
alt=
""
>
<div
class=
"share-content"
>
<img
src=
"./image/share/weibo.svg"
alt=
""
>
<span>
微博
</span>
</div>
</div>
</div>
<!-- <div class="share" v-if="shareOpen" :style="{ marginTop: actieInfo.show ? '0.64rem' : undefined }">-->
<!-- <div-->
<!-- v-if="details.shareInfo.sharePosterOpen == 1"-->
<!-- class="sharePoster share-wrapper share-box"-->
<!-- @click="openShare('8')"-->
<!-- :style="{ width: details.shareInfo.sharePosterOpen == 1 ? `calc(${100/4}%)` : undefined }"-->
<!-- >-->
<!-- <img v-if="darkMode === 'light'" class="image-first" src="./image/share/firstStart@1x.png" alt="">-->
<!-- <img v-else-if="darkMode === 'dark'" class="image-first" src="./image/dark/firstStart.png" alt="">-->
<!-- <img v-if="darkMode === 'light'" class="image-center" src="./image/share/firstCenter@1x.png" alt="">-->
<!-- <img v-else-if="darkMode === 'dark'" class="image-center" src="./image/dark/firstCenter.png" alt="">-->
<!-- <img v-if="darkMode === 'light'" class="image-end" src="./image/share/firstEnd@1x.png" alt="">-->
<!-- <img v-else-if="darkMode === 'dark'" class="image-end" src="./image/dark/firstEnd.png" alt="">-->
<!-- <div class="share-content">-->
<!-- <img src="./image/share/poster.svg" alt="">-->
<!-- <span>海报</span>-->
<!-- </div>-->
<!-- <img v-if="shareNewPoster" class="news" src="./image/share/posterNew.svg" alt="">-->
<!-- </div>-->
<!-- <div-->
<!-- class="share-wechat share-wrapper"-->
<!-- :class="details.shareInfo.sharePosterOpen == 1 ? 'share-box-center center' : 'share-box'"-->
<!-- @click="openShare('3')"-->
<!-- :style="{ width: details.shareInfo.sharePosterOpen == 1 ? `calc(${100/4}% + ${5.8/37.5}rem)` : `calc(${100/3}% + ${(7.5/3)/37.5}rem)` }"-->
<!-- >-->
<!-- -->
<!-- <template v-if="details.shareInfo.sharePosterOpen == 1">-->
<!-- <img v-if="darkMode === 'light'" class="image-first" src="./image/share/secondStart@1x.png" alt="">-->
<!-- <img v-else-if="darkMode === 'dark'" class="image-first" src="./image/dark/secondStart.png" alt="">-->
<!-- <img v-if="darkMode === 'light'" class="image-center" src="./image/share/secondCenter@1x.png" alt="">-->
<!-- <img v-else-if="darkMode === 'dark'" class="image-center" src="./image/dark/secondCenter.png" alt="">-->
<!-- <img v-if="darkMode === 'light'" class="image-end" src="./image/share/secondEnd@1x.png" alt="">-->
<!-- <img v-else-if="darkMode === 'dark'" class="image-end" src="./image/dark/secondEnd.png" alt="">-->
<!-- </template>-->
<!-- <template v-else>-->
<!-- <img v-if="darkMode === 'light'" class="image-first" src="./image/share/firstStart@1x.png" alt="">-->
<!-- <img v-else-if="darkMode === 'dark'" class="image-first" src="./image/dark/firstStart.png" alt="">-->
<!-- <img v-if="darkMode === 'light'" class="image-center" src="./image/share/firstCenter@1x.png" alt="">-->
<!-- <img v-else-if="darkMode === 'dark'" class="image-center" src="./image/dark/firstCenter.png" alt="">-->
<!-- <img v-if="darkMode === 'light'" class="image-end" src="./image/share/firstEnd@1x.png" alt="">-->
<!-- <img v-else-if="darkMode === 'dark'" class="image-end" src="./image/dark/firstEnd.png" alt="">-->
<!-- </template>-->
<!-- <div class="share-content">-->
<!-- <img src="./image/share/wechat.svg" alt="">-->
<!-- <span>微信</span>-->
<!-- </div>-->
<!-- </div>-->
<!-- <div-->
<!-- class="share-wechat-circle share-box-center share-wrapper"-->
<!-- @click="openShare('4')"-->
<!-- :style="{ width: details.shareInfo.sharePosterOpen == 1 ? `calc(${100/4}% + ${5.8/37.5}rem)` : `calc(${100/3}% + ${(7.5/3)/37.5}rem)` }"-->
<!-- >-->
<!-- <img v-if="darkMode === 'light'" class="image-first" src="./image/share/secondStart@1x.png" alt="">-->
<!-- <img v-else-if="darkMode === 'dark'" class="image-first" src="./image/dark/secondStart.png" alt="">-->
<!-- <img v-if="darkMode === 'light'" class="image-center" src="./image/share/secondCenter@1x.png" alt="">-->
<!-- <img v-else-if="darkMode === 'dark'" class="image-center" src="./image/dark/secondCenter.png" alt="">-->
<!-- <img v-if="darkMode === 'light'" class="image-end" src="./image/share/secondEnd@1x.png" alt="">-->
<!-- <img v-else-if="darkMode === 'dark'" class="image-end" src="./image/dark/secondEnd.png" alt="">-->
<!-- <div class="share-content">-->
<!-- <img src="./image/share/wechatCircle.svg" alt="">-->
<!-- <span>朋友圈</span>-->
<!-- </div>-->
<!-- </div>-->
<!-- <div-->
<!-- class="share-weibo share-box-last share-wrapper"-->
<!-- @click="openShare('5')"-->
<!-- :style="{ width: details.shareInfo.sharePosterOpen == 1 ? `calc(${100/4}%)` : `calc(${100/3}% + ${(7.5/3)/37.5}rem)` }"-->
<!-- >-->
<!-- <img v-if="darkMode === 'light'" class="image-first" src="./image/share/thirdStart@1x.png" alt="">-->
<!-- <img v-else-if="darkMode === 'dark'" class="image-first" src="./image/dark/thirdStart.png" alt="">-->
<!-- <img v-if="darkMode === 'light'" class="image-center" src="./image/share/thirdCenter@1x.png" alt="">-->
<!-- <img v-else-if="darkMode === 'dark'" class="image-center" src="./image/dark/thirdCenter.png" alt="">-->
<!-- <img v-if="darkMode === 'light'" class="image-end" src="./image/share/thirdEnd@1x.png" alt="">-->
<!-- <img v-else-if="darkMode === 'dark'" class="image-end" src="./image/dark/thirdEnd.png" alt="">-->
<!-- <div class="share-content">-->
<!-- <img src="./image/share/weibo.svg" alt="">-->
<!-- <span>微博</span>-->
<!-- </div>-->
<!-- </div>-->
<!-- </div>-->
<div
class=
"reload-page"
v-if=
"baseNode == 'dev'"
@
click=
"mockAppClearData"
>
模拟app复用重新加载
</div>
</div>
...
...
Please
register
or
login
to post a comment