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
8df1e773
Commit
8df1e773
authored
Apr 27, 2021
by
GuanHua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: app渠道商城装修问题修复
parent
11e921cc
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
22 additions
and
14 deletions
+22
-14
index.tsx
src/pages/channel/templateDetail/index.tsx
+13
-5
index.tsx
.../lxMall/components/FindMore/components/newTrade/index.tsx
+5
-7
index.tsx
src/pages/mobileTemplate/channelTemplateEdit/index.tsx
+4
-2
No files found.
src/pages/channel/templateDetail/index.tsx
View file @
8df1e773
...
...
@@ -6,6 +6,7 @@ import DetailPage from '@/components/DetailPage'
import
UseModal
from
'../components/useModal'
import
{
PublicApi
}
from
'@/services/api'
import
{
Environment_Status
}
from
'@/constants'
import
{
GlobalConfig
}
from
'@/global/config'
import
{
GetTemplateWebPageTemplateWebFindChannelTemplateDetailsResponse
}
from
'@/services/TemplateApi'
import
styles
from
'./index.less'
...
...
@@ -19,21 +20,28 @@ interface TemplateDetailPropsType {
}
const
TemplateDetail
:
React
.
FC
<
TemplateDetailPropsType
>
=
(
props
)
=>
{
const
{
query
:
{
type
,
id
}
}
=
props
.
location
const
{
query
:
{
id
}
}
=
props
.
location
const
[
detailInfo
,
setDetailInfo
]
=
useState
<
GetTemplateWebPageTemplateWebFindChannelTemplateDetailsResponse
>
()
const
[
useModalVisible
,
setUseModalVisible
]
=
useState
<
boolean
>
(
false
)
const
[
confirmLoading
,
setConfirmLoading
]
=
useState
(
false
)
const
[
shopType
,
setShopType
]
=
useState
<
number
>
()
useEffect
(()
=>
{
fetchDetail
()
},
[])
const
getType
=
(
info
:
GetTemplateWebPageTemplateWebFindChannelTemplateDetailsResponse
):
number
=>
{
const
mallInfo
=
GlobalConfig
.
web
.
shopInfo
.
filter
((
item
)
=>
item
.
id
===
info
.
shopId
)[
0
]
return
mallInfo
.
type
}
const
fetchDetail
=
()
=>
{
const
param
:
any
=
{
id
}
PublicApi
.
getTemplateWebPageTemplateWebFindChannelTemplateDetails
(
param
).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
setShopType
(
getType
(
res
.
data
))
setDetailInfo
(
res
.
data
)
}
})
...
...
@@ -58,10 +66,10 @@ const TemplateDetail: React.FC<TemplateDetailPropsType> = (props) => {
const
handleLinkEdit
=
()
=>
{
if
(
detailInfo
?.
environment
===
1
)
{
// web店铺装修
window
.
location
.
href
=
`/memberCenter/channelAbility/template/edit?id=
${
detailInfo
.
id
}
&template=
${
detailInfo
.
fileName
}
`
window
.
location
.
href
=
`/memberCenter/channelAbility/template/edit?id=
${
detailInfo
.
id
}
&template=
${
detailInfo
.
fileName
}
&type=
${
shopType
}
`
}
else
if
(
detailInfo
?.
environment
===
4
)
{
// app店铺装修
window
.
location
.
href
=
`/memberCenter/channelAbility/template/mobile/edit?id=
${
detailInfo
.
id
}
&template=
${
detailInfo
.
fileName
}
`
window
.
location
.
href
=
`/memberCenter/channelAbility/template/mobile/edit?id=
${
detailInfo
.
id
}
&template=
${
detailInfo
.
fileName
}
&type=
${
shopType
}
`
}
else
{
message
.
info
(
"暂不支持该类型模板装修"
)
}
...
...
@@ -69,9 +77,9 @@ const TemplateDetail: React.FC<TemplateDetailPropsType> = (props) => {
const
handleLinkPreview
=
()
=>
{
if
(
detailInfo
?.
environment
===
1
)
{
window
.
location
.
href
=
`/memberCenter/channelAbility/template/preview?id=
${
detailInfo
.
id
}
&template=
${
detailInfo
.
fileName
}
`
window
.
location
.
href
=
`/memberCenter/channelAbility/template/preview?id=
${
detailInfo
.
id
}
&template=
${
detailInfo
.
fileName
}
&type=
${
shopType
}
`
}
else
if
(
detailInfo
?.
environment
===
4
)
{
window
.
location
.
href
=
`/memberCenter/channelAbility/template/mobile/preview?id=
${
detailInfo
.
id
}
&template=
${
detailInfo
.
fileName
}
`
window
.
location
.
href
=
`/memberCenter/channelAbility/template/mobile/preview?id=
${
detailInfo
.
id
}
&template=
${
detailInfo
.
fileName
}
&type=
${
shopType
}
`
}
else
{
message
.
info
(
"暂不支持该类型模板预览"
)
}
...
...
src/pages/lxMall/components/FindMore/components/newTrade/index.tsx
View file @
8df1e773
...
...
@@ -20,7 +20,7 @@ const NewTrade: React.FC = () => {
},
[])
const
autoPlayList
=
(
maxLenght
)
=>
{
const
new_trade_list
=
document
.
getElementById
(
"new_trade_list"
)
const
new_trade_list
:
any
=
document
.
getElementById
(
"new_trade_list"
)
if
(
new_trade_list
)
{
const
autoPlaySpeed
=
5000
const
unitDistance
=
79
...
...
@@ -29,8 +29,6 @@ const NewTrade: React.FC = () => {
timer
=
setInterval
(()
=>
{
distance
+=
unitDistance
if
(
distance
<
maxDistance
)
{
//@ts-ignore
new_trade_list
.
style
=
`transform: translateY(
${
-
distance
}
px);`
}
else
{
clearInterval
(
timer
)
...
...
@@ -47,16 +45,16 @@ const NewTrade: React.FC = () => {
},
[
current
])
const
fetchData
=
()
=>
{
let
param
=
{
const
param
:
any
=
{
current
:
current
,
pageSize
:
pageSize
}
//@ts-ignore
PublicApi
.
getOrderProcurementOrderTransactionDynamics
(
param
).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
le
t
newList
=
[...
list
,
...
res
.
data
.
data
]
cons
t
newList
=
[...
list
,
...
res
.
data
.
data
]
setList
(
newList
)
le
t
maxLenght
=
newList
.
length
cons
t
maxLenght
=
newList
.
length
if
(
res
.
data
.
data
&&
res
.
data
.
data
.
length
>
0
)
{
autoPlayList
(
maxLenght
)
}
...
...
src/pages/mobileTemplate/channelTemplateEdit/index.tsx
View file @
8df1e773
...
...
@@ -43,6 +43,7 @@ interface ShopPreviewPropsType {
* 模板名称
*/
template
:
string
;
type
:
number
,
}
}
}
...
...
@@ -50,13 +51,14 @@ interface ShopPreviewPropsType {
const
TemplateList
=
[
'science'
]
const
mobileShopTempleteEdit
:
React
.
FC
<
ShopPreviewPropsType
>
=
(
props
)
=>
{
const
{
query
:
{
id
,
template
}
}
=
props
.
location
const
{
query
:
{
id
,
template
,
type
}
}
=
props
.
location
const
[
loading
,
setLoading
]
=
useState
<
boolean
>
(
true
)
const
[
theme
,
setTheme
]
=
useState
<
string
>
(
'theme-mall-science'
)
const
[
componentConfigs
,
setComponentConfigs
]
=
useState
({})
const
headers
=
{
environment
:
"4"
environment
:
"4"
,
type
:
Number
(
type
)
}
useEffect
(()
=>
{
...
...
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