Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mr-julyedu
Overview
Overview
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
baiguangyao
mr-julyedu
Commits
e4a4ec99
Commit
e4a4ec99
authored
Nov 04, 2023
by
zhoule
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
下掉(注释)首页弹窗-还原代码(本地环境有问题无法编译)
parent
aa58db5b
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
38 additions
and
35 deletions
+38
-35
src/common/UserGift/index.js
+38
-35
No files found.
src/common/UserGift/index.js
View file @
e4a4ec99
...
...
@@ -3,41 +3,44 @@ import "./index.scss"
import
{
http
}
from
"src/utils"
class
UserGift
extends
Component
{
// state = {
// user_gift: "",
// }
// componentDidMount() {
// http.get(`${API["base-api"]}/m/home/popup`).then((res) => {
// const { errno, data } = res.data
// if (errno === 200) {
// this.setState({
// user_gift: data.new_user_gift.prize_img,
// })
// }
// })
// }
// get_newerModal = () => {
// this.props.get_newerModal()
// }
// close = () => {
// this.props.close()
// }
// render() {
// const { user_gift } = this.state
// return (
// <div className={"user-gift-popup"}>
// <div className={"user-gift-bgimg"}>
// <img onClick={this.get_newerModal} src={user_gift} alt="" />
// <img
// className={"close_gift_box"}
// src="https://cdn.julyedu.com/tinypng-common/close_icon.png"
// onClick={this.close}
// alt=""
// />
// </div>
// </div>
// )
// }
state
=
{
user_gift
:
""
,
}
componentDidMount
()
{
http
.
get
(
`
${
API
[
"base-api"
]}
/m/home/popup`
).
then
((
res
)
=>
{
const
{
errno
,
data
}
=
res
.
data
if
(
errno
===
200
)
{
this
.
setState
({
user_gift
:
data
.
new_user_gift
.
prize_img
,
})
}
})
}
get_newerModal
=
()
=>
{
this
.
props
.
get_newerModal
()
}
close
=
()
=>
{
this
.
props
.
close
()
}
render
()
{
const
{
user_gift
}
=
this
.
state
return
(
<
div
className
=
{
"user-gift-popup"
}
>
<
div
className
=
{
"user-gift-bgimg"
}
>
<
img
onClick
=
{
this
.
get_newerModal
}
src
=
{
user_gift
}
alt
=
""
/>
<
img
className
=
{
"close_gift_box"
}
src
=
"https://cdn.julyedu.com/tinypng-common/close_icon.png"
onClick
=
{
this
.
close
}
alt
=
""
/>
<
/div
>
<
/div
>
)
}
}
export
default
UserGift
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