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
53484277
Commit
53484277
authored
Dec 29, 2020
by
wildfirecode13
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
e3effb59
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
60 additions
and
63 deletions
+60
-63
main3.jsx
project/src/pages/main3/main3.jsx
+7
-1
config.js
project/src/util/config.js
+18
-0
enum.js
project/src/util/enum.js
+34
-0
viewCtrl.js
project/src/util/viewCtrl.js
+1
-62
No files found.
project/src/pages/main3/main3.jsx
View file @
53484277
...
@@ -11,6 +11,8 @@ import { GDispatcher } from "spark-wrapper-fyge"
...
@@ -11,6 +11,8 @@ import { GDispatcher } from "spark-wrapper-fyge"
import
dataCenter
,
{
Store
}
from
'../../dataCenter'
;
import
dataCenter
,
{
Store
}
from
'../../dataCenter'
;
import
{
getSVGA
}
from
'../../svga'
;
import
{
getSVGA
}
from
'../../svga'
;
import
{
Toast
}
from
'@spark/ui'
;
import
{
Toast
}
from
'@spark/ui'
;
import
ViewCtrl
from
"../../util/viewCtrl"
;
import
Enum
from
'../../util/enum'
;
let
_widget
;
let
_widget
;
class
Main3
extends
Component
{
class
Main3
extends
Component
{
...
@@ -31,6 +33,7 @@ class Main3 extends Component {
...
@@ -31,6 +33,7 @@ class Main3 extends Component {
setTimeout
(()
=>
{
setTimeout
(()
=>
{
this
.
setState
({
rolepop
:
0
})
this
.
setState
({
rolepop
:
0
})
},
3000
);
},
3000
);
}
}
gotoURL
=
(
type
)
=>
{
gotoURL
=
(
type
)
=>
{
...
@@ -51,6 +54,7 @@ class Main3 extends Component {
...
@@ -51,6 +54,7 @@ class Main3 extends Component {
onClick_userinfo
=
()
=>
{
onClick_userinfo
=
()
=>
{
// Aup.show('Userinfo', {figureId:this.state.figureId}, this);
// Aup.show('Userinfo', {figureId:this.state.figureId}, this);
ViewCtrl
.
showWin
(
Enum
.
Com
.
Userinfo
,
{
figureId
:
this
.
state
.
figureId
});
}
}
onClick_signBtn
=
()
=>
{
onClick_signBtn
=
()
=>
{
...
@@ -87,11 +91,13 @@ class Main3 extends Component {
...
@@ -87,11 +91,13 @@ class Main3 extends Component {
if
(
this
.
props
.
data
&&!
this
.
props
.
data
.
isnewUser
)
{
//不是新用户
if
(
this
.
props
.
data
&&!
this
.
props
.
data
.
isnewUser
)
{
//不是新用户
API
.
signInfo
().
then
((
res
)
=>
{
API
.
signInfo
().
then
((
res
)
=>
{
const
{
needPopup
}
=
res
.
data
;
const
{
needPopup
}
=
res
.
data
;
if
(
needPopup
)
if
(
needPopup
)
{
// Aup.show('Sign', res.data, this);
// Aup.show('Sign', res.data, this);
}
});
});
}
}
}
}
initEvent
()
{
initEvent
()
{
GDispatcher
.
addEventListener
(
Store
.
homeinfo
,
this
.
freshHomeInfo
,
this
);
GDispatcher
.
addEventListener
(
Store
.
homeinfo
,
this
.
freshHomeInfo
,
this
);
GDispatcher
.
addEventListener
(
Store
.
needguide
,
this
.
changeGuideShow
,
this
);
GDispatcher
.
addEventListener
(
Store
.
needguide
,
this
.
changeGuideShow
,
this
);
...
...
project/src/util/config.js
0 → 100644
View file @
53484277
import
Userinfo
from
"../components/userinfo/userinfo.jsx"
;
// import Comtask from '../components/comtask/comtask.jsx';
// import ComconfirmExchange from '../components/comconfirmExcahnge/comconfirmExcahnge.jsx';
// import ComExchangesuccess from '../components/comexchangesuccess/comexchangesuccess.jsx';
const
{
default
:
Enum
}
=
require
(
"./enum"
);
let
comMap
=
new
Map
();
comMap
.
set
(
Enum
.
Com
.
Userinfo
,
Userinfo
);
// comMap.set(Enum.Com.comtask, Comtask);
// comMap.set(Enum.Com.comconfirmExchange, ComconfirmExchange);
// comMap.set(Enum.Com.comExchangesuccess, ComExchangesuccess);
const
config
=
{
comMap
:
comMap
,
netError
:
"网络异常,请稍后重试"
}
export
default
config
\ No newline at end of file
project/src/util/enum.js
0 → 100644
View file @
53484277
const
Enum
=
{
//页面
Page
:
{
// 宠物详情页
Pagepet
:
1001
,
// 活动页
PageIndex
:
1002
,
// loading页面
PageLoading
:
1003
,
// 宠物选择页
PageChoose
:
1004
,
// 兑换订单页
Pageexchangeorder
:
1005
,
//兑换列表页
Pageexchangegoodslist
:
1006
},
//弹窗
Com
:
{
//toast
toast
:
2000
,
comshopmall
:
2001
,
comtask
:
2002
,
comconfirmExchange
:
2003
,
comExchangesuccess
:
2004
,
Userinfo
:
2005
,
},
Store
:{
}
}
export
default
Enum
;
project/src/util/viewCtrl.js
View file @
53484277
import
React
from
'react'
;
import
React
from
'react'
;
import
ReactDOM
from
"react-dom"
;
import
ReactDOM
from
"react-dom"
;
import
Toast
from
'./comp/toast/toast.jsx'
;
import
Waitting
from
'./comp/waitting/waitting.jsx'
;
import
config
from
'./config'
;
import
config
from
'./config'
;
const
ViewCtrl
=
{
const
ViewCtrl
=
{
showToast
:(
msg
=
"活动异常火爆,请稍后再试"
)
=>
{
let
T
=
Toast
;
var
m
=
document
.
createElement
(
'div'
);
m
.
className
=
"popcontainer_empty"
m
.
style
.
zIndex
=
9999
;
document
.
body
.
appendChild
(
m
);
setTimeout
(
function
()
{
var
d
=
500
/
1000
;
m
.
style
.
webkitTransition
=
'opacity '
+
d
+
's ease-in'
;
m
.
style
.
opacity
=
'0'
;
setTimeout
(
function
()
{
document
.
body
.
removeChild
(
m
)
},
500
);
},
1500
);
T
=
<
T
msg
=
{
msg
}
/
>
ReactDOM
.
render
(
T
,
m
);
},
showToast2
:(
msg
=
"活动异常火爆,请稍后再试"
)
=>
{
let
T
=
Toast
;
var
m
=
document
.
createElement
(
'div'
);
m
.
className
=
"popcontainer_empty"
m
.
style
.
zIndex
=
9999
;
document
.
body
.
appendChild
(
m
);
setTimeout
(
function
()
{
var
d
=
500
/
1000
;
m
.
style
.
webkitTransition
=
'opacity '
+
d
+
's ease-in'
;
m
.
style
.
opacity
=
'0'
;
setTimeout
(
function
()
{
document
.
body
.
removeChild
(
m
)
},
500
);
},
999999999
);
T
=
<
T
msg
=
{
msg
}
/
>
ReactDOM
.
render
(
T
,
m
);
},
initWaiting
:()
=>
{
if
(
document
.
getElementById
(
"waittingId"
))
return
;
let
T
=
Waitting
;
var
m
=
document
.
createElement
(
'div'
);
m
.
className
=
"popcontainer_empty"
m
.
id
=
"waittingId"
m
.
style
.
zIndex
=
99999
;
m
.
style
.
opacity
=
0
;
m
.
style
.
pointerEvents
=
"none"
;
document
.
body
.
appendChild
(
m
);
T
=
<
T
/>
ReactDOM
.
render
(
T
,
m
);
},
showWaiting
:()
=>
{
let
node
=
document
.
getElementById
(
"waittingId"
);
node
.
style
.
pointerEvents
=
""
;
node
.
style
.
opacity
=
1
;
},
hideWaiting
:()
=>
{
let
node
=
document
.
getElementById
(
"waittingId"
);
node
.
style
.
pointerEvents
=
"none"
;
node
.
style
.
opacity
=
0
;
},
/**控制显示隐藏,name:节点的类名,value为布尔值 */
/**控制显示隐藏,name:节点的类名,value为布尔值 */
...
...
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