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
陈智峰
jinfa-platform
Commits
a5fc35ff
Commit
a5fc35ff
authored
Nov 30, 2020
by
GuanHua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix:获取商品描述模板接口错误时处理
parent
6ecb22a4
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
7 deletions
+14
-7
index.tsx
...ents/ProductDescription/components/Introduction/index.tsx
+1
-1
index.ts
src/store/site/index.ts
+13
-6
No files found.
src/pages/lxMall/commodityDetail/components/ProductDescription/components/Introduction/index.tsx
View file @
a5fc35ff
...
...
@@ -25,7 +25,7 @@ const Introduction: React.FC<IntroductionPropsType> = (props) => {
},
[
commodityTemplateInfo
])
const
renderIntroduction
=
()
=>
{
let
templateName
=
commodityTemplateInfo
.
fileName
||
'science'
const
templateName
=
commodityTemplateInfo
?
commodityTemplateInfo
.
fileName
||
'science'
:
'science'
switch
(
templateName
)
{
case
'science'
:
return
<
ScienceTemplate
{
...
commodityDetail
?
.
commodityRemark
}
/>
...
...
src/store/site/index.ts
View file @
a5fc35ff
...
...
@@ -24,8 +24,11 @@ class SiteStore implements ISiteModule {
this
.
mallTemplateId
=
this
.
mallTemplateInfo
.
id
return
}
//@ts-ignore
const
res
=
await
PublicApi
.
getTemplatePlatformFindUseTemplateBySite
({
siteId
:
this
.
siteId
})
const
param
:
any
=
{
siteId
:
this
.
siteId
}
const
res
=
await
PublicApi
.
getTemplatePlatformFindUseTemplateBySite
(
param
)
runInAction
(()
=>
{
this
.
mallTemplateInfo
=
res
.
data
||
{}
this
.
mallTemplateId
=
this
.
mallTemplateInfo
.
id
...
...
@@ -43,11 +46,15 @@ class SiteStore implements ISiteModule {
this
.
commodityTemplateInfo
=
JSON
.
parse
(
tempCommodityTemplateInfo
)
return
}
//@ts-ignore
const
res
=
await
PublicApi
.
getTemplateGoodsFindUseGoodsTemplate
({
siteId
:
this
.
siteId
})
const
param
:
any
=
{
siteId
:
this
.
siteId
}
const
res
=
await
PublicApi
.
getTemplateGoodsFindUseGoodsTemplate
(
param
)
runInAction
(()
=>
{
this
.
commodityTemplateInfo
=
res
.
data
sessionStorage
.
setItem
(
"commodityTemplateInfo"
,
JSON
.
stringify
(
this
.
commodityTemplateInfo
))
if
(
res
.
code
===
1000
)
{
this
.
commodityTemplateInfo
=
res
.
data
sessionStorage
.
setItem
(
"commodityTemplateInfo"
,
JSON
.
stringify
(
this
.
commodityTemplateInfo
))
}
})
}
}
...
...
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