5.8
This commit is contained in:
@ -561,11 +561,34 @@
|
||||
.rank-list {
|
||||
padding: 4px 12px;
|
||||
position: relative;
|
||||
height: 158px;
|
||||
height: 156px;
|
||||
overflow-y: auto;
|
||||
|
||||
// &::-webkit-scrollbar {
|
||||
// display: none;
|
||||
// }
|
||||
/*设置宽度,轨道颜色*/
|
||||
&::-webkit-scrollbar {
|
||||
display: none;
|
||||
width: 6px;
|
||||
height: 6px;
|
||||
// padding-right: 3px;
|
||||
}
|
||||
|
||||
/*滚动条*/
|
||||
&::-webkit-scrollbar-thumb {
|
||||
background: #cacfe6;
|
||||
border-radius: 10px;
|
||||
}
|
||||
|
||||
/*增加悬停样式*/
|
||||
&::-webkit-scrollbar-thumb:hover {
|
||||
background: #dcdfeb;
|
||||
}
|
||||
|
||||
/*滚动轨道样式*/
|
||||
&::-webkit-scrollbar-track-piece {
|
||||
background: #eeeeee;
|
||||
border-radius: 3px;
|
||||
}
|
||||
|
||||
&>p {
|
||||
@ -575,59 +598,81 @@
|
||||
color: #9f9f9f;
|
||||
font-family: "黑体";
|
||||
font-size: 14px;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
position: relative;
|
||||
|
||||
&>span:first-child {
|
||||
padding-left: 19px;
|
||||
padding-right: 23px;
|
||||
&>span {
|
||||
display: block;
|
||||
text-align: center;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
&>span:not(.people-rank):first-child {
|
||||
padding-left: 19px;
|
||||
padding-right: 40px;
|
||||
.list-star {
|
||||
position: absolute;
|
||||
left: 14px;
|
||||
}
|
||||
|
||||
&>span:last-child {
|
||||
padding-left: 23px;
|
||||
.list-block {
|
||||
width: 40px;
|
||||
}
|
||||
|
||||
&>span:not(.people-rank):last-child {
|
||||
padding-left: 40px;
|
||||
.list-person-block {
|
||||
width: 30px;
|
||||
}
|
||||
|
||||
.star0,
|
||||
.star1,
|
||||
.star2 {
|
||||
.list-province {
|
||||
width: 60px;
|
||||
}
|
||||
|
||||
.list-score {
|
||||
width: 50px;
|
||||
}
|
||||
|
||||
.list-person-score {
|
||||
width: 16px;
|
||||
}
|
||||
|
||||
.list-name {
|
||||
width: 60px;
|
||||
}
|
||||
|
||||
.star1 {
|
||||
background-image: url("~@/assets/highQuality/star1.png");
|
||||
background-size: 100% 100%;
|
||||
background-repeat: no-repeat;
|
||||
height: 21px;
|
||||
width: 20px;
|
||||
position: absolute;
|
||||
left: 8px;
|
||||
top: 3px;
|
||||
text-align: center;
|
||||
line-height: 24px;
|
||||
color: #FFFFFF;
|
||||
font-weight: bold;
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
.star2 {
|
||||
.star1;
|
||||
background-image: url("~@/assets/highQuality/star2.png");
|
||||
background-size: 100% 100%;
|
||||
background-repeat: no-repeat;
|
||||
}
|
||||
|
||||
.star3 {
|
||||
.star1;
|
||||
background-image: url("~@/assets/highQuality/star3.png");
|
||||
background-size: 100% 100%;
|
||||
background-repeat: no-repeat;
|
||||
}
|
||||
}
|
||||
|
||||
&>p:last-child {
|
||||
border-bottom: 0;
|
||||
}
|
||||
|
||||
.rank-list-star1 {
|
||||
position: absolute;
|
||||
top: 7px;
|
||||
left: 24px;
|
||||
z-index: 0;
|
||||
height: 20px;
|
||||
}
|
||||
|
||||
.rank-list-star2 {
|
||||
.rank-list-star1;
|
||||
top: 37px;
|
||||
}
|
||||
|
||||
.rank-list-star3 {
|
||||
.rank-list-star1;
|
||||
top: 67px;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -8,9 +8,6 @@ import material from '@/assets/highQuality/material.jpg'
|
||||
import bottom_button from '@/assets/highQuality/bottom_button.png'
|
||||
import partymember from '@/assets/highQuality/partymember.png'
|
||||
import partybranch from '@/assets/highQuality/partybranch.png'
|
||||
import star1 from '@/assets/highQuality/star1.png'
|
||||
import star2 from '@/assets/highQuality/star2.png'
|
||||
import star3 from '@/assets/highQuality/star3.png'
|
||||
import card_img_2 from '@/assets/highQuality/card_img_2.png'
|
||||
import card_img_3 from '@/assets/highQuality/card_img_3.png'
|
||||
import card_img_4 from '@/assets/highQuality/card_img_4.png'
|
||||
@ -22,8 +19,8 @@ import card_img_9 from '@/assets/highQuality/card_img_9.png'
|
||||
import topic_header_img from '@/assets/topic/topic_header_img.png'
|
||||
import topic_banner_default from '@/assets/topic/topic_banner_default.jpg'
|
||||
import topic_activity_default from '@/assets/topic/topic_activity_default.jpg'
|
||||
import { downloadVideo, getClassroomList, getHomeBanner, getHomeContact, getHomeGraceful, getHomeProject, getHomeRight, submitAdvice } from './service';
|
||||
import { chunk, formatTime, getImageUrl, isEmpty, isNotEmpty, managerAuthority } from '../utils';
|
||||
import { downloadVideo, getClassroomList, getHomeBanner, getHomeContact, getHomeGraceful, getHomeProject, getHomeRight, getPersonScoreSort, getProvinceScoreSort, submitAdvice } from './service';
|
||||
import { chunk, formatTime, getImageUrl, isEmpty, managerAuthority } from '../utils';
|
||||
import ExtendUpload from '@/utils/ExtendUpload';
|
||||
import { getSessionUserData } from '@/utils/session';
|
||||
import ReactPlayer from "react-player/file";
|
||||
@ -304,6 +301,10 @@ const Home: React.FC<{}> = () => {
|
||||
const [contactData, setContactData] = useState<any[]>([]);
|
||||
//right total data
|
||||
const [totalContactData, setTotalContactData] = useState<any[]>([]);
|
||||
//person score
|
||||
const [personScoreList, setPersonScoreList] = useState<any[]>([]);
|
||||
//province score
|
||||
const [provinceScoreList, setProvinceScoreList] = useState<any[]>([]);
|
||||
//bottom advice modalvisible
|
||||
const [adviceVisible, setAdviceVisible] = useState<boolean>(false);
|
||||
//bottom advice modal data
|
||||
@ -400,6 +401,23 @@ const Home: React.FC<{}> = () => {
|
||||
}
|
||||
})
|
||||
}
|
||||
//get learn score
|
||||
const getLearnPersonScore = () => {
|
||||
getPersonScoreSort().then(res => {//个人榜
|
||||
if (res?.code == 200) {
|
||||
if (res?.data.length > 0) {
|
||||
setPersonScoreList(res?.data);
|
||||
}
|
||||
}
|
||||
})
|
||||
getProvinceScoreSort().then(res => {//子分公司榜
|
||||
if (res?.code == 200) {
|
||||
if (res?.data.length > 0) {
|
||||
setProvinceScoreList(res?.data);
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
//to detail
|
||||
const detailClick = (data: any) => {
|
||||
@ -435,6 +453,7 @@ const Home: React.FC<{}> = () => {
|
||||
getProjectList();
|
||||
getRightList();
|
||||
getContactList('');
|
||||
getLearnPersonScore();
|
||||
}, [])
|
||||
|
||||
return (
|
||||
@ -599,14 +618,12 @@ const Home: React.FC<{}> = () => {
|
||||
<span>分子公司榜</span>
|
||||
</div>
|
||||
<div className='rank-list'>
|
||||
<img src={star1} className='rank-list-star1' />
|
||||
<img src={star2} className='rank-list-star2' />
|
||||
<img src={star3} className='rank-list-star3' />
|
||||
{new Array(10).fill(0).map((item, index) => (
|
||||
<p>
|
||||
<span className={`star${index}`}>{index + 1}</span>
|
||||
<span>山东</span>
|
||||
<span>99</span>
|
||||
{provinceScoreList.length > 0 && provinceScoreList.map((item, index) => (
|
||||
<p key={item.id}>
|
||||
<span className={`list-star star${item.scoreSort}`}>{item.scoreSort}</span>
|
||||
<span className="list-block"></span>
|
||||
<span className="list-province" title={item.province}>{item.province}</span>
|
||||
<span className="list-score">{item.score}</span>
|
||||
</p>
|
||||
))}
|
||||
</div>
|
||||
@ -616,14 +633,13 @@ const Home: React.FC<{}> = () => {
|
||||
<span>个人榜</span>
|
||||
</div>
|
||||
<div className='rank-list'>
|
||||
<img src={star1} className='rank-list-star1' />
|
||||
<img src={star2} className='rank-list-star2' />
|
||||
<img src={star3} className='rank-list-star3' />
|
||||
{new Array(10).fill(0).map((item, index) => (
|
||||
<p>
|
||||
<span className={`people-rank star${index}`}>{index + 1}</span>
|
||||
<span>山东</span>
|
||||
<span className='people-rank'>张三 99</span>
|
||||
{personScoreList.length > 0 && personScoreList.map((item, index) => (
|
||||
<p key={item.id}>
|
||||
<span className={`list-star star${item.scoreSort}`}>{item.scoreSort}</span>
|
||||
<span className="list-person-block"></span>
|
||||
<span className="list-province" title={item.province}>{item.province}</span>
|
||||
<span className="list-name" title={item.name}>{item.name}</span>
|
||||
<span className="list-person-score">{item.score}</span>
|
||||
</p>
|
||||
))}
|
||||
</div>
|
||||
|
@ -126,4 +126,13 @@ export async function saveComment(data: any) {
|
||||
method: 'POST',
|
||||
data: { ...data },
|
||||
});
|
||||
}
|
||||
//获取个人排行榜
|
||||
export async function getPersonScoreSort() {
|
||||
return request('/api/biz-service-ebtp-extend/v1/highqualityclient/getPersonScoreSort', { method: "POST" });
|
||||
}
|
||||
|
||||
//获取省分排行榜
|
||||
export async function getProvinceScoreSort() {
|
||||
return request('/api/biz-service-ebtp-extend/v1/highqualityclient/getProvinceScoreSort', { method: "POST" });
|
||||
}
|
Reference in New Issue
Block a user