Commit 758ee567 authored by GuanHua's avatar GuanHua

style: 修改活动店铺排名显示

parent ed56591c
<?xml version="1.0" encoding="UTF-8"?>
<svg width="28px" height="28px" viewBox="0 0 28 28" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>TOP1</title>
<defs>
<linearGradient x1="-3.87425714%" y1="-5.98975792%" x2="103.384324%" y2="108.298707%" id="linearGradient-1">
<stop stop-color="#FDD382" offset="0%"></stop>
<stop stop-color="#FDA41A" offset="100%"></stop>
</linearGradient>
</defs>
<g id="TOP1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g transform="translate(2.000000, 0.000000)">
<g id="编组" transform="translate(4.000000, 0.000000)" fill="url(#linearGradient-1)">
<g id="皇冠" transform="translate(1.000000, 1.000000)">
<path d="M11.6554562,12.7448195 C11.9859208,12.7448195 12.2549716,13.0124081 12.2549716,13.3443349 C12.2549716,13.6747995 11.987383,13.9438503 11.6554562,13.9438503 L1.97840074,13.9438503 C1.64793616,13.9438503 1.37888536,13.6747995 1.37888536,13.3443349 C1.37888536,13.0138703 1.64647393,12.7448195 1.97840074,12.7448195 L11.6554562,12.7448195 Z M6.81692848,0.0073111631 C7.82733122,0.0073111631 8.64471925,0.82616143 8.64471925,1.83510194 C8.64471925,2.60046614 8.1735145,3.25644352 7.50557359,3.52856547 L10.2751086,6.62830047 L12.597134,4.97159091 C12.7301972,4.82682988 12.9305231,4.74933155 13.1381601,4.78442513 C13.3282503,4.81659425 13.4817848,4.93503509 13.5665943,5.09149398 L13.5665943,5.09149398 C13.5680565,5.09734291 13.5709809,5.10026738 13.5724432,5.10465408 C13.6543282,5.25672627 13.6645638,5.42926972 13.6119235,5.58426638 L13.6119235,5.58426638 L12.3383189,11.4522059 C12.3207721,11.5589489 12.2754428,11.653994 12.2125668,11.7314923 C12.1028994,11.8747911 11.9303559,11.9669118 11.735879,11.9669118 L11.735879,11.9669118 L2.06467246,11.9669118 C2.0442012,11.9727607 2.02372995,11.9771474 2.00325869,11.9800719 C1.71958556,12.0283255 1.44761029,11.8660177 1.34671624,11.6072025 C1.31747159,11.5399398 1.2999248,11.4668282 1.29700033,11.3893299 L1.29700033,11.3893299 L0.0263201872,5.55794619 C-0.00146223262,5.46582553 -0.00584893048,5.36785595 0.0131600936,5.27281083 C0.0555648396,5.03008021 0.247117313,4.82975434 0.503008021,4.7873496 C0.707720588,4.75371825 0.903659759,4.82682988 1.03672293,4.96574198 L1.03672293,4.96574198 L3.38945521,6.64292279 L6.16038062,3.54128752 C5.47548773,3.27733312 4.9891377,2.61266887 4.9891377,1.83510194 C4.9891377,0.82616143 5.80652574,0.0073111631 6.81692848,0.0073111631 Z" id="形状结合"></path>
</g>
</g>
<text font-family="DIN-Medium, DIN" font-size="10" font-weight="400" line-spacing="10" fill="#FDA41A">
<tspan x="0" y="28">TOP1</tspan>
</text>
</g>
</g>
</svg>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<svg width="28px" height="28px" viewBox="0 0 28 28" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>TOP2</title>
<defs>
<linearGradient x1="-5.1734644%" y1="-10.5135212%" x2="105.360208%" y2="104.508676%" id="linearGradient-1">
<stop stop-color="#D3D1D2" offset="0%"></stop>
<stop stop-color="#A7A5A6" offset="100%"></stop>
</linearGradient>
</defs>
<g id="TOP2" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g transform="translate(2.000000, 0.000000)">
<g id="编组" transform="translate(4.000000, 0.000000)" fill="url(#linearGradient-1)">
<g id="皇冠" transform="translate(1.000000, 1.000000)">
<path d="M11.6554562,12.7448195 C11.9859208,12.7448195 12.2549716,13.0124081 12.2549716,13.3443349 C12.2549716,13.6747995 11.987383,13.9438503 11.6554562,13.9438503 L1.97840074,13.9438503 C1.64793616,13.9438503 1.37888536,13.6747995 1.37888536,13.3443349 C1.37888536,13.0138703 1.64647393,12.7448195 1.97840074,12.7448195 L11.6554562,12.7448195 Z M6.81692848,0.0073111631 C7.82733122,0.0073111631 8.64471925,0.82616143 8.64471925,1.83510194 C8.64471925,2.60046614 8.1735145,3.25644352 7.50557359,3.52856547 L10.2751086,6.62830047 L12.597134,4.97159091 C12.7301972,4.82682988 12.9305231,4.74933155 13.1381601,4.78442513 C13.3282503,4.81659425 13.4817848,4.93503509 13.5665943,5.09149398 L13.5665943,5.09149398 C13.5680565,5.09734291 13.5709809,5.10026738 13.5724432,5.10465408 C13.6543282,5.25672627 13.6645638,5.42926972 13.6119235,5.58426638 L13.6119235,5.58426638 L12.3383189,11.4522059 C12.3207721,11.5589489 12.2754428,11.653994 12.2125668,11.7314923 C12.1028994,11.8747911 11.9303559,11.9669118 11.735879,11.9669118 L11.735879,11.9669118 L2.06467246,11.9669118 C2.0442012,11.9727607 2.02372995,11.9771474 2.00325869,11.9800719 C1.71958556,12.0283255 1.44761029,11.8660177 1.34671624,11.6072025 C1.31747159,11.5399398 1.2999248,11.4668282 1.29700033,11.3893299 L1.29700033,11.3893299 L0.0263201872,5.55794619 C-0.00146223262,5.46582553 -0.00584893048,5.36785595 0.0131600936,5.27281083 C0.0555648396,5.03008021 0.247117313,4.82975434 0.503008021,4.7873496 C0.707720588,4.75371825 0.903659759,4.82682988 1.03672293,4.96574198 L1.03672293,4.96574198 L3.38945521,6.64292279 L6.16038062,3.54128752 C5.47548773,3.27733312 4.9891377,2.61266887 4.9891377,1.83510194 C4.9891377,0.82616143 5.80652574,0.0073111631 6.81692848,0.0073111631 Z" id="形状结合"></path>
</g>
</g>
<text font-family="DIN-Medium, DIN" font-size="10" font-weight="400" line-spacing="10" fill="#94949B">
<tspan x="0" y="28">TOP2</tspan>
</text>
</g>
</g>
</svg>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<svg width="28px" height="28px" viewBox="0 0 28 28" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>TOP3</title>
<defs>
<linearGradient x1="-4.34743079%" y1="-6.33455695%" x2="102.97459%" y2="107.275344%" id="linearGradient-1">
<stop stop-color="#F0C198" offset="0%"></stop>
<stop stop-color="#DD8E5F" offset="100%"></stop>
</linearGradient>
</defs>
<g id="TOP3" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g transform="translate(2.000000, 0.000000)">
<g id="编组" transform="translate(4.000000, 0.000000)" fill="url(#linearGradient-1)">
<g id="皇冠" transform="translate(1.000000, 1.000000)">
<path d="M11.6554562,12.7448195 C11.9859208,12.7448195 12.2549716,13.0124081 12.2549716,13.3443349 C12.2549716,13.6747995 11.987383,13.9438503 11.6554562,13.9438503 L1.97840074,13.9438503 C1.64793616,13.9438503 1.37888536,13.6747995 1.37888536,13.3443349 C1.37888536,13.0138703 1.64647393,12.7448195 1.97840074,12.7448195 L11.6554562,12.7448195 Z M6.81692848,0.0073111631 C7.82733122,0.0073111631 8.64471925,0.82616143 8.64471925,1.83510194 C8.64471925,2.60046614 8.1735145,3.25644352 7.50557359,3.52856547 L10.2751086,6.62830047 L12.597134,4.97159091 C12.7301972,4.82682988 12.9305231,4.74933155 13.1381601,4.78442513 C13.3282503,4.81659425 13.4817848,4.93503509 13.5665943,5.09149398 L13.5665943,5.09149398 C13.5680565,5.09734291 13.5709809,5.10026738 13.5724432,5.10465408 C13.6543282,5.25672627 13.6645638,5.42926972 13.6119235,5.58426638 L13.6119235,5.58426638 L12.3383189,11.4522059 C12.3207721,11.5589489 12.2754428,11.653994 12.2125668,11.7314923 C12.1028994,11.8747911 11.9303559,11.9669118 11.735879,11.9669118 L11.735879,11.9669118 L2.06467246,11.9669118 C2.0442012,11.9727607 2.02372995,11.9771474 2.00325869,11.9800719 C1.71958556,12.0283255 1.44761029,11.8660177 1.34671624,11.6072025 C1.31747159,11.5399398 1.2999248,11.4668282 1.29700033,11.3893299 L1.29700033,11.3893299 L0.0263201872,5.55794619 C-0.00146223262,5.46582553 -0.00584893048,5.36785595 0.0131600936,5.27281083 C0.0555648396,5.03008021 0.247117313,4.82975434 0.503008021,4.7873496 C0.707720588,4.75371825 0.903659759,4.82682988 1.03672293,4.96574198 L1.03672293,4.96574198 L3.38945521,6.64292279 L6.16038062,3.54128752 C5.47548773,3.27733312 4.9891377,2.61266887 4.9891377,1.83510194 C4.9891377,0.82616143 5.80652574,0.0073111631 6.81692848,0.0073111631 Z" id="形状结合"></path>
</g>
</g>
<text font-family="DIN-Medium, DIN" font-size="10" font-weight="400" line-spacing="10" fill="#E4A883">
<tspan x="0" y="28">TOP3</tspan>
</text>
</g>
</g>
</svg>
\ No newline at end of file
......@@ -30,13 +30,18 @@
align-items: center;
.active_stores_rank {
width: 22px;
width: 24px;
height: 32px;
line-height: 32px;
font-size: 14px;
color: #606266;
font-weight: 500;
margin-right: 10px;
& > img {
width: 24px;
height: 24px;
}
}
.active_stores_logo {
......
......@@ -10,6 +10,9 @@ import React, { useEffect, useState } from 'react'
import { PublicApi } from '@/services/api'
import ImageBox from '@/components/ImageBox'
import { GetReportMallGetActiveMerchantListResponse } from '@/services/ReportApi'
import top1Icon from '@/assets/icons/TOP1.svg'
import top2Icon from '@/assets/icons/TOP2.svg'
import top3Icon from '@/assets/icons/TOP3.svg'
import styles from './index.less'
const ActiveStores: React.FC = (props) => {
......@@ -28,6 +31,19 @@ const ActiveStores: React.FC = (props) => {
}
const renderRank = (index: number) => {
switch(index) {
case 1:
return <img src={top1Icon} />
case 2:
return <img src={top2Icon} />
case 3:
return <img src={top3Icon} />
default:
return `0${index}`
}
}
return (
<div className={styles.active_stores}>
<div className={styles.active_stores_title}>
......@@ -37,7 +53,7 @@ const ActiveStores: React.FC = (props) => {
{
shopList && shopList.map((item, index) => (
<div className={styles.active_stores_list_item} key={item.memberShopId}>
<div className={styles.active_stores_rank}>0{index+1}</div>
<div className={styles.active_stores_rank}>{renderRank(index+1)}</div>
<div className={styles.active_stores_logo}>
<ImageBox width={36} height={36} imgUrl={item.memberLogo} />
</div>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment