Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
I
icbcRPG
Project
Project
Details
Activity
Releases
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
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
wildfirecode13
icbcRPG
Commits
162f6fdd
Commit
162f6fdd
authored
Dec 22, 2020
by
wildfirecode13
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
a84ab89c
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
42 additions
and
31 deletions
+42
-31
index.js
project/mock/e-family/index.js
+5
-16
index.html
project/public/index.html
+1
-1
app.jsx
project/src/app.jsx
+5
-1
sign.jsx
project/src/components/sign/sign.jsx
+16
-5
loading.jsx
project/src/pages/loading/loading.jsx
+4
-7
main3.jsx
project/src/pages/main3/main3.jsx
+11
-1
No files found.
project/mock/e-family/index.js
View file @
162f6fdd
export
const
homeInfo
=
{
export
const
homeInfo
=
{
"code"
:
null
,
"code"
:
null
,
"data"
:
{
"data"
:
{
"canUpdateNickName"
:
false
,
"canUpdateNickName"
:
null
,
"figures"
:
[
"figures"
:
[
{
{
"figureId"
:
"1"
},
{
"figureId"
:
"2"
},
{
"figureId"
:
"3"
}
"figureId"
:
"4"
},
{
"figureId"
:
"5"
},
{
"figureId"
:
"7"
}
],
],
"newUser"
:
true
,
"newUser"
:
true
,
"userInfo"
:
{
"userInfo"
:
null
"figureId"
:
"1"
,
"joyBeans"
:
10000
,
"nickName"
:
"霞霞"
}
},
},
"message"
:
null
,
"message"
:
null
,
"success"
:
true
"success"
:
true
}
}
export
const
updateUinfo
=
{
export
const
updateUinfo
=
{
"code"
:
null
,
"code"
:
null
,
"data"
:
true
,
"data"
:
true
,
...
@@ -39,7 +28,7 @@ export const signInfo = {
...
@@ -39,7 +28,7 @@ export const signInfo = {
"code"
:
null
,
"code"
:
null
,
"data"
:
{
"data"
:
{
"continuousDays"
:
0
,
"continuousDays"
:
0
,
"needPopup"
:
true
,
"needPopup"
:
1
,
"signLists"
:
[
"signLists"
:
[
{
{
"awardName"
:
"欢趣豆"
,
"awardName"
:
"欢趣豆"
,
...
...
project/public/index.html
View file @
162f6fdd
...
@@ -5,7 +5,7 @@
...
@@ -5,7 +5,7 @@
<meta
charset=
"utf-8"
>
<meta
charset=
"utf-8"
>
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1, shrink-to-fit=no"
>
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1, shrink-to-fit=no"
>
<meta
name=
"theme-color"
content=
"#000000"
>
<meta
name=
"theme-color"
content=
"#000000"
>
<title>
React App
</title>
<title>
e趣小镇
</title>
<script
src=
"getTokenKey"
id=
"scriptkey"
></script>
<script
src=
"getTokenKey"
id=
"scriptkey"
></script>
<script
id=
"scriptjs"
src=
"//yun.duiba.com.cn/js-libs/px-token/0.0.4/px-token.min.js"
></script>
<script
id=
"scriptjs"
src=
"//yun.duiba.com.cn/js-libs/px-token/0.0.4/px-token.min.js"
></script>
<script
src=
"//yun.duiba.com.cn/js-libs/rem/1.1.0/rem.min.js"
></script>
<script
src=
"//yun.duiba.com.cn/js-libs/rem/1.1.0/rem.min.js"
></script>
...
...
project/src/app.jsx
View file @
162f6fdd
...
@@ -25,6 +25,10 @@ class App extends Component {
...
@@ -25,6 +25,10 @@ class App extends Component {
// }, 1000);
// }, 1000);
// }
// }
eventHandler
=
()
=>
{
console
.
log
(
'eventHandler'
)
}
navigateTo
=
(
page
,
pagedata
)
=>
{
navigateTo
=
(
page
,
pagedata
)
=>
{
this
.
setState
({
page
,
pagedata
})
this
.
setState
({
page
,
pagedata
})
}
}
...
@@ -36,7 +40,7 @@ class App extends Component {
...
@@ -36,7 +40,7 @@ class App extends Component {
{
page
==
'loading'
&&
<
Loading
data=
{
pagedata
}
navigateTo=
{
this
.
navigateTo
}
></
Loading
>
}
{
page
==
'loading'
&&
<
Loading
data=
{
pagedata
}
navigateTo=
{
this
.
navigateTo
}
></
Loading
>
}
{
page
==
'mainpage'
&&
<
Main3
data=
{
pagedata
}
navigateTo=
{
this
.
navigateTo
}
></
Main3
>
}
{
page
==
'mainpage'
&&
<
Main3
data=
{
pagedata
}
navigateTo=
{
this
.
navigateTo
}
></
Main3
>
}
{
page
==
'detail'
&&
<
Detail2
data=
{
pagedata
}
navigateTo=
{
this
.
navigateTo
}
></
Detail2
>
}
{
page
==
'detail'
&&
<
Detail2
data=
{
pagedata
}
navigateTo=
{
this
.
navigateTo
}
></
Detail2
>
}
<
AUPOP
AUPopState=
{
AUP_MBX_STATE
}
></
AUPOP
>
<
AUPOP
eventHandler=
{
this
.
eventHandler
}
AUPopState=
{
AUP_MBX_STATE
}
></
AUPOP
>
</>
</>
);
);
}
}
...
...
project/src/components/sign/sign.jsx
View file @
162f6fdd
...
@@ -2,15 +2,18 @@
...
@@ -2,15 +2,18 @@
import
React
,
{
Component
}
from
'react'
;
import
React
,
{
Component
}
from
'react'
;
import
resList
from
'../../resconfig/resList'
;
//import API from '../../api';
import
resList
from
'../../resconfig/resList'
;
//import API from '../../api';
import
'./sign.less'
;
import
'./sign.less'
;
import
{
Toast
,
Loading
,
Badge
,
CountDownButton
,
InputNumber
}
from
'@spark/ui'
;
import
{
Toast
,
Loading
,
Badge
,
CountDownButton
,
InputNumber
}
from
'@spark/ui'
;
import
API
from
'../../api'
;
class
Sign
extends
Component
{
class
Sign
extends
Component
{
constructor
(
props
)
{
constructor
(
props
)
{
super
(
props
);
super
(
props
);
const
{
todaySigned
}
=
props
.
data
;
this
.
state
=
{
this
.
state
=
{
resList
:
resList
,
resList
:
resList
,
todaySigned
};
};
}
}
...
@@ -20,7 +23,14 @@ class Sign extends Component {
...
@@ -20,7 +23,14 @@ class Sign extends Component {
},
1000
);
},
1000
);
}
}
doSign
=
()
=>
{
API
.
dosign
().
then
((
res
)
=>
{
this
.
props
.
ctx
.
updateMoney
();
})
}
render
()
{
render
()
{
const
{
todaySigned
}
=
this
.
state
;
return
(
return
(
<
div
className=
"sign "
uuid=
"14a66aed-4e41-4fea-9d16-6aa02c1bad5a"
>
<
div
className=
"sign "
uuid=
"14a66aed-4e41-4fea-9d16-6aa02c1bad5a"
>
<
img
<
img
...
@@ -272,16 +282,17 @@ class Sign extends Component {
...
@@ -272,16 +282,17 @@ class Sign extends Component {
+100
+100
</
span
>
</
span
>
</
div
>
</
div
>
<
img
{
todaySigned
&&
<
img
className=
"sign_signed_btn "
className=
"sign_signed_btn "
uuid=
"d8ca8cb8-92f1-4512-aead-d674cac5a46c"
uuid=
"d8ca8cb8-92f1-4512-aead-d674cac5a46c"
src=
{
this
.
state
.
resList
[
'534772d2-3e5a-487d-8236-8913de270cb0'
].
url
}
src=
{
this
.
state
.
resList
[
'534772d2-3e5a-487d-8236-8913de270cb0'
].
url
}
/>
/>
}
<
img
{
!
todaySigned
&&
<
img
onClick=
{
this
.
doSign
}
className=
"sign_btn "
className=
"sign_btn "
uuid=
"4dfe2b82-10bd-4442-a01e-65c18869a18e"
uuid=
"4dfe2b82-10bd-4442-a01e-65c18869a18e"
src=
{
this
.
state
.
resList
[
'13b618c4-cd2a-4037-9664-b77381fbfade'
].
url
}
src=
{
this
.
state
.
resList
[
'13b618c4-cd2a-4037-9664-b77381fbfade'
].
url
}
/>
/>
}
<
div
className=
"signed_7 "
uuid=
"7b91c31c-0de4-4148-9887-6ab24e963258"
>
<
div
className=
"signed_7 "
uuid=
"7b91c31c-0de4-4148-9887-6ab24e963258"
>
<
img
<
img
className=
"signed_7_bg "
className=
"signed_7_bg "
...
...
project/src/pages/loading/loading.jsx
View file @
162f6fdd
...
@@ -86,21 +86,18 @@ class Loading extends Component {
...
@@ -86,21 +86,18 @@ class Loading extends Component {
}
}
oncomplete
()
{
oncomplete
()
{
this
.
props
.
navigateTo
(
'mainpage'
)
;
let
isnewUser
;
let
homeinfo
=
dataCenter
.
getData
(
Store
.
homeinfo
);
let
homeinfo
=
dataCenter
.
getData
(
Store
.
homeinfo
);
if
(
homeinfo
){
if
(
homeinfo
){
const
{
newUser
}
=
homeinfo
;
const
{
newUser
}
=
homeinfo
;
if
(
newUser
){
//新用户,走选择,然后再走引导,引导结束后,走签到
if
(
newUser
){
//新用户,走选择,然后再走引导,引导结束后,走签到
Aup
.
show
(
'Select'
,
{},
this
);
Aup
.
show
(
'Select'
,
{},
this
);
}
else
{
isnewUser
=
1
;
API
.
signInfo
().
then
((
res
)
=>
{
const
{
needPopup
}
=
res
.
data
;
if
(
needPopup
)
Aup
.
show
(
'Sign'
,
res
.
data
,
this
);
})
}
}
}
}
this
.
props
.
navigateTo
(
'mainpage'
,{
isnewUser
});
}
}
render
()
{
render
()
{
...
...
project/src/pages/main3/main3.jsx
View file @
162f6fdd
...
@@ -23,6 +23,10 @@ class Main3 extends Component {
...
@@ -23,6 +23,10 @@ class Main3 extends Component {
};
};
}
}
updateMoney
(){
console
.
log
(
'update money'
)
}
onClick_userinfo
=
()
=>
{
onClick_userinfo
=
()
=>
{
Aup
.
show
(
'Userinfo'
,
{},
this
);
Aup
.
show
(
'Userinfo'
,
{},
this
);
// console.log('onClick_signBtn')
// console.log('onClick_signBtn')
...
@@ -32,7 +36,6 @@ class Main3 extends Component {
...
@@ -32,7 +36,6 @@ class Main3 extends Component {
API
.
signInfo
().
then
((
res
)
=>
{
API
.
signInfo
().
then
((
res
)
=>
{
Aup
.
show
(
'Sign'
,
res
.
data
,
this
);
Aup
.
show
(
'Sign'
,
res
.
data
,
this
);
})
})
// console.log('onClick_signBtn')
}
}
onClick_shareBtn
=
()
=>
{
onClick_shareBtn
=
()
=>
{
...
@@ -50,6 +53,13 @@ class Main3 extends Component {
...
@@ -50,6 +53,13 @@ class Main3 extends Component {
componentDidMount
()
{
componentDidMount
()
{
this
.
initEvent
();
this
.
initEvent
();
if
(
!
this
.
props
.
data
.
isnewUser
)
{
API
.
signInfo
().
then
((
res
)
=>
{
const
{
needPopup
}
=
res
.
data
;
if
(
needPopup
)
Aup
.
show
(
'Sign'
,
res
.
data
,
this
);
})
}
}
}
initEvent
()
{
initEvent
()
{
GDispatcher
.
addEventListener
(
Store
.
homeinfo
,
this
.
freshHomeInfo
,
this
);
GDispatcher
.
addEventListener
(
Store
.
homeinfo
,
this
.
freshHomeInfo
,
this
);
...
...
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