Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
J
jinfa-platform
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
shenshaokai
jinfa-platform
Commits
ad6bd32a
Commit
ad6bd32a
authored
Nov 04, 2020
by
GuanHua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat:对接商城首页和店铺列表活跃店铺和人气店铺的接口
parent
57a54c8f
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
68 additions
and
121 deletions
+68
-121
index.tsx
...xMall/components/Filter/components/ActiveStores/index.tsx
+32
-39
index.tsx
...all/components/FindMore/components/popularShops/index.tsx
+31
-41
index.tsx
...all/components/FindMore/components/shoppingNews/index.tsx
+0
-39
api.ts
src/services/api.ts
+3
-1
ytt.config.ts
ytt.config.ts
+2
-1
No files found.
src/pages/lxMall/components/Filter/components/ActiveStores/index.tsx
View file @
ad6bd32a
...
...
@@ -3,10 +3,13 @@
* @Author: ghua
* @Date: 2020-08-20 16:23:39
* @Last Modified by: ghua
* @Last Modified time: 2020-1
0-22 18:03:14
* @Last Modified time: 2020-1
1-04 10:23:59
*/
import
React
from
'react'
import
React
,
{
useEffect
,
useState
}
from
'react'
import
{
PublicApi
}
from
'@/services/api'
import
ImageBox
from
'@/components/ImageBox'
import
{
GetReportMallGetActiveMerchantListResponse
}
from
'@/services/ReportApi'
import
styles
from
'./index.less'
interface
ActiveStoresPropsType
{
...
...
@@ -14,6 +17,20 @@ interface ActiveStoresPropsType {
}
const
ActiveStores
:
React
.
FC
<
ActiveStoresPropsType
>
=
(
props
)
=>
{
const
[
shopList
,
setShopList
]
=
useState
<
GetReportMallGetActiveMerchantListResponse
>
([])
useEffect
(()
=>
{
fetchData
()
},
[])
const
fetchData
=
()
=>
{
PublicApi
.
getReportMallGetActiveMerchantList
().
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
setShopList
(
res
.
data
)
}
})
}
return
(
<
div
className=
{
styles
.
active_stores
}
>
...
...
@@ -21,43 +38,19 @@ const ActiveStores: React.FC<ActiveStoresPropsType> = (props) => {
<
label
>
活跃店铺
</
label
>
</
div
>
<
div
className=
{
styles
.
active_stores_list
}
>
<
div
className=
{
styles
.
active_stores_list_item
}
>
<
div
className=
{
styles
.
active_stores_rank
}
>
01
</
div
>
<
div
className=
{
styles
.
active_stores_logo
}
>
<
img
src=
"https://ss0.bdstatic.com/70cFvHSh_Q1YnxGkpoWK1HF6hhy/it/u=3381279230,433852972&fm=26&gp=0.jpg"
/>
</
div
>
<
div
className=
{
styles
.
active_stores_name
}
>
<
a
href=
"/"
>
无锡市群明钢业有限公司
</
a
></
div
>
</
div
>
<
div
className=
{
styles
.
active_stores_list_item
}
>
<
div
className=
{
styles
.
active_stores_rank
}
>
02
</
div
>
<
div
className=
{
styles
.
active_stores_logo
}
>
<
img
src=
"https://ss0.bdstatic.com/70cFvHSh_Q1YnxGkpoWK1HF6hhy/it/u=3381279230,433852972&fm=26&gp=0.jpg"
/>
</
div
>
<
div
className=
{
styles
.
active_stores_name
}
>
无锡市群明钢业有限公司
</
div
>
</
div
>
<
div
className=
{
styles
.
active_stores_list_item
}
>
<
div
className=
{
styles
.
active_stores_rank
}
>
03
</
div
>
<
div
className=
{
styles
.
active_stores_logo
}
>
<
img
src=
"https://ss0.bdstatic.com/70cFvHSh_Q1YnxGkpoWK1HF6hhy/it/u=3381279230,433852972&fm=26&gp=0.jpg"
/>
</
div
>
<
div
className=
{
styles
.
active_stores_name
}
>
无锡市群明钢业有限公司
</
div
>
</
div
>
<
div
className=
{
styles
.
active_stores_list_item
}
>
<
div
className=
{
styles
.
active_stores_rank
}
>
04
</
div
>
<
div
className=
{
styles
.
active_stores_logo
}
>
<
img
src=
"https://ss0.bdstatic.com/70cFvHSh_Q1YnxGkpoWK1HF6hhy/it/u=3381279230,433852972&fm=26&gp=0.jpg"
/>
</
div
>
<
div
className=
{
styles
.
active_stores_name
}
>
无锡市群明钢业有限公司
</
div
>
</
div
>
<
div
className=
{
styles
.
active_stores_list_item
}
>
<
div
className=
{
styles
.
active_stores_rank
}
>
05
</
div
>
<
div
className=
{
styles
.
active_stores_logo
}
>
<
img
src=
"https://ss0.bdstatic.com/70cFvHSh_Q1YnxGkpoWK1HF6hhy/it/u=3381279230,433852972&fm=26&gp=0.jpg"
/>
</
div
>
<
div
className=
{
styles
.
active_stores_name
}
>
无锡市群明钢业有限公司
</
div
>
</
div
>
{
shopList
&&
shopList
.
map
((
item
,
index
)
=>
(
<
div
className=
{
styles
.
active_stores_list_item
}
>
<
div
className=
{
styles
.
active_stores_rank
}
>
0
{
index
+
1
}
</
div
>
<
div
className=
{
styles
.
active_stores_logo
}
>
<
ImageBox
width=
{
36
}
height=
{
36
}
imgUrl=
{
item
.
memberLogo
}
/>
</
div
>
<
div
className=
{
styles
.
active_stores_name
}
>
<
a
href=
{
`/shop?shopId=${btoa(JSON.stringify({ shopId: item.memberShopId, memberId: item.memberId }))}`
}
>
{
item
.
memberName
}
</
a
>
</
div
>
</
div
>
))
}
</
div
>
</
div
>
)
...
...
src/pages/lxMall/components/FindMore/components/popularShops/index.tsx
View file @
ad6bd32a
import
React
from
'react'
import
React
,
{
useEffect
,
useState
}
from
'react'
import
{
PublicApi
}
from
'@/services/api'
import
{
GetReportMallGetPopularShopListResponse
}
from
'@/services/ReportApi'
import
ImageBox
from
'@/components/ImageBox'
import
styles
from
'../../index.less'
interface
PopularShopsPropsType
{
}
interface
PopularShopsPropsType
{}
const
PopularShops
:
React
.
FC
<
PopularShopsPropsType
>
=
(
props
)
=>
{
const
[
shopList
,
setShopList
]
=
useState
<
GetReportMallGetPopularShopListResponse
>
([])
useEffect
(()
=>
{
fetchData
()
},
[])
const
fetchData
=
()
=>
{
PublicApi
.
getReportMallGetPopularShopList
().
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
setShopList
(
res
.
data
)
}
})
}
return
(
<
div
className=
{
styles
.
popular_shops
}
>
...
...
@@ -14,43 +28,19 @@ const PopularShops: React.FC<PopularShopsPropsType> = (props) => {
<
span
>
排名每天凌晨更新
</
span
>
</
div
>
<
div
className=
{
styles
.
popular_shops_list
}
>
<
div
className=
{
styles
.
popular_shops_list_item
}
>
<
div
className=
{
styles
.
popular_shops_rank
}
>
01
</
div
>
<
div
className=
{
styles
.
popular_shops_logo
}
>
<
img
src=
"https://ss0.bdstatic.com/70cFvHSh_Q1YnxGkpoWK1HF6hhy/it/u=3381279230,433852972&fm=26&gp=0.jpg"
/>
</
div
>
<
div
className=
{
styles
.
popular_shops_name
}
>
<
a
href=
"/"
>
无锡市群明钢业有限公司
</
a
></
div
>
</
div
>
<
div
className=
{
styles
.
popular_shops_list_item
}
>
<
div
className=
{
styles
.
popular_shops_rank
}
>
02
</
div
>
<
div
className=
{
styles
.
popular_shops_logo
}
>
<
img
src=
"https://ss0.bdstatic.com/70cFvHSh_Q1YnxGkpoWK1HF6hhy/it/u=3381279230,433852972&fm=26&gp=0.jpg"
/>
</
div
>
<
div
className=
{
styles
.
popular_shops_name
}
>
无锡市群明钢业有限公司
</
div
>
</
div
>
<
div
className=
{
styles
.
popular_shops_list_item
}
>
<
div
className=
{
styles
.
popular_shops_rank
}
>
03
</
div
>
<
div
className=
{
styles
.
popular_shops_logo
}
>
<
img
src=
"https://ss0.bdstatic.com/70cFvHSh_Q1YnxGkpoWK1HF6hhy/it/u=3381279230,433852972&fm=26&gp=0.jpg"
/>
</
div
>
<
div
className=
{
styles
.
popular_shops_name
}
>
无锡市群明钢业有限公司
</
div
>
</
div
>
<
div
className=
{
styles
.
popular_shops_list_item
}
>
<
div
className=
{
styles
.
popular_shops_rank
}
>
04
</
div
>
<
div
className=
{
styles
.
popular_shops_logo
}
>
<
img
src=
"https://ss0.bdstatic.com/70cFvHSh_Q1YnxGkpoWK1HF6hhy/it/u=3381279230,433852972&fm=26&gp=0.jpg"
/>
</
div
>
<
div
className=
{
styles
.
popular_shops_name
}
>
无锡市群明钢业有限公司
</
div
>
</
div
>
<
div
className=
{
styles
.
popular_shops_list_item
}
>
<
div
className=
{
styles
.
popular_shops_rank
}
>
05
</
div
>
<
div
className=
{
styles
.
popular_shops_logo
}
>
<
img
src=
"https://ss0.bdstatic.com/70cFvHSh_Q1YnxGkpoWK1HF6hhy/it/u=3381279230,433852972&fm=26&gp=0.jpg"
/>
</
div
>
<
div
className=
{
styles
.
popular_shops_name
}
>
无锡市群明钢业有限公司
</
div
>
</
div
>
{
shopList
&&
shopList
.
map
((
item
,
index
)
=>
index
<=
5
&&
(
<
div
className=
{
styles
.
popular_shops_list_item
}
>
<
div
className=
{
styles
.
popular_shops_rank
}
>
0
{
index
+
1
}
</
div
>
<
div
className=
{
styles
.
popular_shops_logo
}
>
<
ImageBox
width=
{
36
}
height=
{
36
}
imgUrl=
{
item
.
memberLogo
}
/>
</
div
>
<
div
className=
{
styles
.
popular_shops_name
}
>
<
a
href=
{
`/shop?shopId=${btoa(JSON.stringify({ shopId: item.memberShopId, memberId: item.memberId }))}`
}
>
{
item
.
memberName
}
</
a
>
</
div
>
</
div
>
))
}
</
div
>
</
div
>
)
...
...
src/pages/lxMall/components/FindMore/components/shoppingNews/index.tsx
View file @
ad6bd32a
...
...
@@ -8,45 +8,6 @@ import { PublicApi } from '@/services/api'
import
moment
from
'moment'
import
styles
from
'../../index.less'
const
buy_dynamic_list
=
[
{
title
:
'黑色头层牛皮自然摔纹'
,
state
:
0
,
content
:
'2000平方英尺'
,
date
:
'09/09 09:00'
},
{
title
:
'黑色头层牛皮自然摔纹'
,
state
:
0
,
content
:
'2000平方英尺'
,
date
:
'09/09 09:00'
},
{
title
:
'黑色头层牛皮自然摔纹'
,
state
:
0
,
content
:
'2000平方英尺'
,
date
:
'09/09 09:00'
},
{
title
:
'黑色头层牛皮自然摔纹'
,
state
:
1
,
content
:
'2000平方英尺'
,
date
:
'09/09 09:00'
},
{
title
:
'黑色头层牛皮自然摔纹'
,
state
:
1
,
content
:
'2000平方英尺'
,
date
:
'09/09 09:00'
},
{
title
:
'黑色头层牛皮自然摔纹'
,
state
:
1
,
content
:
'2000平方英尺'
,
date
:
'09/09 09:00'
},
]
const
ShoppingNews
:
React
.
FC
=
()
=>
{
const
[
list
,
setList
]
=
useState
<
any
>
([])
const
actionRef
=
useRef
<
any
>
()
...
...
src/services/api.ts
View file @
ad6bd32a
...
...
@@ -10,6 +10,7 @@ import * as OrderApi from './OrderApi'
import
*
as
SettleApi
from
'./SettleApi'
import
*
as
AfterService
from
'./AfterServiceApi'
import
*
as
EnhanceApi
from
'./EnhanceApi'
;
import
*
as
ReportApi
from
'./ReportApi'
;
/**
* 可在这里写入自定义的接口
...
...
@@ -31,5 +32,6 @@ export const PublicApi = {
...
OrderApi
,
...
SettleApi
,
...
AfterService
,
...
EnhanceApi
...
EnhanceApi
,
...
ReportApi
}
ytt.config.ts
View file @
ad6bd32a
...
...
@@ -11,7 +11,8 @@ const tokenList = [
{
name
:
'Settle'
,
token
:
'fffbeeaaa198c285955997c606bc279fc6950fea118580c786f2c73eecccaa6a'
},
//结算服务
{
name
:
'AfterService'
,
token
:
'39db719680bf1b3db21bc1deda933cde16d17559e9676bf848ec96c1320e68df'
},
// '售后服务'
// { name: '', token: 'c0e920f071595a73ba234b6fa6cfe42192d3d740d59f030caa2c7f0f08777d78' } // 商户会员管理服务
{
name
:
'Enhance'
,
token
:
'594a7e7ff17f6f40fb9fb726c1da9a3f282a926a8d386eb6cbfd668a3f75f251'
}
// 加工服务
{
name
:
'Enhance'
,
token
:
'594a7e7ff17f6f40fb9fb726c1da9a3f282a926a8d386eb6cbfd668a3f75f251'
},
// 加工服务
{
name
:
'Report'
,
token
:
'69ee5a79363c763ded1a2eb42952a5181ffcdfc5ffb93b6e1e22ac92a25b38bf'
},
// 报表服务
]
const
getConfigMap
=
(
tokens
)
=>
tokens
.
map
(
v
=>
({
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment