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
afdc8bf7
Commit
afdc8bf7
authored
Apr 14, 2021
by
GuanHua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 收藏列表点击再次购买被浏览器拦截弹窗的问题
parent
3af3ebf1
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
6 deletions
+19
-6
commodity.tsx
src/pages/systemSetting/collection/commodity.tsx
+6
-1
information.tsx
src/pages/systemSetting/collection/information.tsx
+9
-5
shops.tsx
src/pages/systemSetting/collection/shops.tsx
+4
-0
No files found.
src/pages/systemSetting/collection/commodity.tsx
View file @
afdc8bf7
...
...
@@ -68,6 +68,11 @@ const Commodity: React.FC = () => {
break
}
el
.
target
=
'_blank'
;
el
.
id
=
detail
.
commodity
.
id
// 防止反复添加
if
(
!
document
.
getElementById
(
detail
.
commodity
.
id
))
{
document
.
body
.
appendChild
(
el
);
}
el
.
click
()
}
else
{
message
.
destroy
()
...
...
@@ -130,7 +135,7 @@ const Commodity: React.FC = () => {
PublicApi
.
postSearchShopCommodityCollectDeleteCommodityCollect
(
param
).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
fetchCollectCommodityList
()
resolve
()
resolve
(
true
)
}
else
{
reject
()
}
...
...
src/pages/systemSetting/collection/information.tsx
View file @
afdc8bf7
...
...
@@ -21,11 +21,11 @@ const Information: React.FC = () => {
* 获取收藏的资讯列表
*/
const
fetchCollectInformationList
=
()
=>
{
let
param
=
{
const
param
:
any
=
{
current
,
pageSize
}
//@ts-ignore
PublicApi
.
getManageContentInformationCollectList
(
param
).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
setList
(
res
.
data
.
data
)
...
...
@@ -40,9 +40,13 @@ const Information: React.FC = () => {
const
linkToDetail
=
(
detail
)
=>
{
if
(
detail
.
status
===
2
)
{
let
el
=
document
.
createElement
(
'a'
)
const
el
=
document
.
createElement
(
'a'
)
el
.
href
=
`/infomation/detail?id=
${
detail
.
id
}
`
;
el
.
target
=
'_blank'
;
el
.
id
=
detail
.
id
if
(
!
document
.
getElementById
(
detail
.
id
))
{
document
.
body
.
appendChild
(
el
);
}
el
.
click
()
}
else
{
message
.
destroy
()
...
...
@@ -57,7 +61,7 @@ const Information: React.FC = () => {
content
:
`是否要取消收藏?`
,
onOk
:
()
=>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
let
param
=
{
const
param
=
{
informationId
:
detail
.
id
,
status
:
false
}
...
...
@@ -65,7 +69,7 @@ const Information: React.FC = () => {
if
(
res
.
code
===
1000
)
{
// fetchPurchaseList()
fetchCollectInformationList
()
resolve
(
)
resolve
(
true
)
}
else
{
reject
()
}
...
...
src/pages/systemSetting/collection/shops.tsx
View file @
afdc8bf7
...
...
@@ -71,6 +71,10 @@ const Shops: React.FC = () => {
const
el
=
document
.
createElement
(
'a'
)
el
.
href
=
`/shop?shopId=
${
btoa
(
JSON
.
stringify
({
shopId
:
detail
.
id
,
memberId
:
detail
.
memberId
}))}
`
;
el
.
target
=
'_blank'
;
el
.
id
=
detail
.
id
if
(
!
document
.
getElementById
(
detail
.
id
))
{
document
.
body
.
appendChild
(
el
);
}
el
.
click
()
}
else
{
message
.
destroy
()
...
...
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