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
73e98386
Commit
73e98386
authored
Dec 22, 2020
by
wildfirecode13
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of gitlab2.dui88.com:wildfirecode13/icbcrpg
parents
842aba95
d991d823
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
162 additions
and
14 deletions
+162
-14
index.js
project/mock/e-family/index.js
+3
-3
select.jsx
project/src/components/select/select.jsx
+24
-3
dataCenter.js
project/src/dataCenter.js
+16
-1
bundle.js
project/src/pages/main3/bundle.js
+14
-1
main3.jsx
project/src/pages/main3/main3.jsx
+102
-3
main3.less
project/src/pages/main3/main3.less
+3
-3
No files found.
project/mock/e-family/index.js
View file @
73e98386
...
@@ -4,13 +4,13 @@ export const homeInfo = {
...
@@ -4,13 +4,13 @@ export const homeInfo = {
"canUpdateNickName"
:
false
,
"canUpdateNickName"
:
false
,
"figures"
:
[
"figures"
:
[
{
{
"figureId"
:
"
1
"
"figureId"
:
"
4
"
},
},
{
{
"figureId"
:
"
2
"
"figureId"
:
"
5
"
},
},
{
{
"figureId"
:
"
3
"
"figureId"
:
"
7
"
}
}
],
],
"newUser"
:
true
,
"newUser"
:
true
,
...
...
project/src/components/select/select.jsx
View file @
73e98386
'use strict'
;
'use strict'
;
import
{
Toast
}
from
'@spark/ui'
;
import
React
,
{
Component
}
from
'react'
;
import
React
,
{
Component
}
from
'react'
;
import
dataCenter
,
{
getAPIdata
,
Store
}
from
'../../dataCenter'
;
import
dataCenter
,
{
getAPIdata
,
netErrMsg
,
Role
,
Store
}
from
'../../dataCenter'
;
import
resList
from
'../../resconfig/resList'
;
//import API from '../../api';
import
resList
from
'../../resconfig/resList'
;
//import API from '../../api';
import
'./select.less'
;
import
'./select.less'
;
...
@@ -18,6 +19,15 @@ class Select extends Component {
...
@@ -18,6 +19,15 @@ class Select extends Component {
}
}
componentDidMount
()
{
componentDidMount
()
{
const
{
figures
}
=
dataCenter
.
getData
(
Store
.
homeinfo
);
//现只有三个
for
(
let
i
=
1
;
i
<
4
;
i
++
){
let
ifigure
=
figures
[
i
-
1
];
if
(
ifigure
){
Role
[
i
].
figureid
=
ifigure
.
figureId
;
}
}
console
.
log
(
"figureid设置==》"
,
Role
);
// setTimeout(() => {
// setTimeout(() => {
// console.log('关闭这个弹窗');
// console.log('关闭这个弹窗');
// this.props.onClose();
// this.props.onClose();
...
@@ -113,12 +123,23 @@ class Select extends Component {
...
@@ -113,12 +123,23 @@ class Select extends Component {
let
planame
=
this
.
refs
.
planame
.
value
;
let
planame
=
this
.
refs
.
planame
.
value
;
console
.
log
(
planame
);
console
.
log
(
planame
);
if
(
planame
.
length
<
1
){
if
(
planame
.
length
<
1
){
return
;
return
Toast
(
"名字不能为空"
)
;
}
}
let
updateuinfo
=
await
getAPIdata
(
Store
.
updateUinfo
);
let
updateuinfo
=
await
getAPIdata
(
Store
.
updateUinfo
,{
type
:
1
,
nickName
:
planame
,
figureId
:
Role
[
this
.
nshowidx
].
figureid
});
if
(
updateuinfo
&&
updateuinfo
.
success
){
if
(
updateuinfo
&&
updateuinfo
.
success
){
this
.
props
.
onClose
();
this
.
props
.
onClose
();
dataCenter
.
setData
(
Store
.
needguide
,
true
);
dataCenter
.
setData
(
Store
.
needguide
,
true
);
}
else
{
if
(
updateuinfo
){
let
msg
=
updateuinfo
.
message
;
Toast
(
msg
);
}
else
{
Toast
(
netErrMsg
)
}
}
}
}
}
render
()
{
render
()
{
...
...
project/src/dataCenter.js
View file @
73e98386
...
@@ -12,7 +12,22 @@ export const Store = {
...
@@ -12,7 +12,22 @@ export const Store = {
//新手引导
//新手引导
needguide
:
"needguide"
,
needguide
:
"needguide"
,
}
}
//人物角色对应
export
let
Role
=
{
1
:{
name
:
"熊猫1"
,
figureid
:
1
,
},
2
:{
name
:
"熊猫2"
,
figureid
:
2
,
},
3
:{
name
:
"熊猫3"
,
figureid
:
3
,
}
}
export
const
netErrMsg
=
"活动太火爆了,请稍后再试"
;
export
async
function
getAPIdata
(
netname
,
reqdata
=
null
){
export
async
function
getAPIdata
(
netname
,
reqdata
=
null
){
let
apidata
;
let
apidata
;
try
{
try
{
...
...
project/src/pages/main3/bundle.js
View file @
73e98386
...
@@ -34,11 +34,24 @@ var GameStage = /** @class */ (function (_super) {
...
@@ -34,11 +34,24 @@ var GameStage = /** @class */ (function (_super) {
__extends
(
GameStage
,
_super
);
__extends
(
GameStage
,
_super
);
function
GameStage
()
{
function
GameStage
()
{
var
_this
=
_super
!==
null
&&
_super
.
apply
(
this
,
arguments
)
||
this
;
var
_this
=
_super
!==
null
&&
_super
.
apply
(
this
,
arguments
)
||
this
;
_this
.
step
=
1
;
_this
.
_
step
=
1
;
_this
.
canclick
=
true
;
_this
.
canclick
=
true
;
_this
.
guideconfig
=
{};
_this
.
guideconfig
=
{};
return
_this
;
return
_this
;
}
}
Object
.
defineProperty
(
GameStage
.
prototype
,
"step"
,
{
get
:
function
()
{
return
this
.
_step
;
},
set
:
function
(
val
)
{
if
(
this
.
_step
!=
val
)
{
this
.
_step
=
val
;
this
.
dispatchOutEvent
(
"nowstep"
,
val
);
}
},
enumerable
:
false
,
configurable
:
true
});
GameStage
.
prototype
.
onLaunched
=
function
()
{
GameStage
.
prototype
.
onLaunched
=
function
()
{
this
.
stagew
=
this
.
stage
.
viewRect
.
width
;
this
.
stagew
=
this
.
stage
.
viewRect
.
width
;
this
.
stageh
=
this
.
stage
.
viewRect
.
height
;
this
.
stageh
=
this
.
stage
.
viewRect
.
height
;
...
...
project/src/pages/main3/main3.jsx
View file @
73e98386
...
@@ -6,7 +6,7 @@ import API from '../../api';
...
@@ -6,7 +6,7 @@ import API from '../../api';
import
{
Aup
,
AUPOP
,
AUP_MBX_STATE
}
from
'../../pop'
;
import
{
Aup
,
AUPOP
,
AUP_MBX_STATE
}
from
'../../pop'
;
import
'./main3.less'
;
import
'./main3.less'
;
import
{
CanvasWidget
}
from
'spark-utils'
;
import
{
CanvasWidget
}
from
'spark-utils'
;
import
{
Guideact
}
from
'
./bundle'
;
//'@spark/guideact
';//
import
{
Guideact
}
from
'
@spark/guideact'
;
//'./bundle
';//
import
{
widgetConfig
}
from
'./widgetConfig'
;
import
{
widgetConfig
}
from
'./widgetConfig'
;
import
{
GDispatcher
}
from
"spark-wrapper-fyge"
import
{
GDispatcher
}
from
"spark-wrapper-fyge"
import
dataCenter
,
{
Store
}
from
'../../dataCenter'
;
import
dataCenter
,
{
Store
}
from
'../../dataCenter'
;
...
@@ -308,6 +308,96 @@ class Main3 extends Component {
...
@@ -308,6 +308,96 @@ class Main3 extends Component {
stepdata
:
this
.
guideconfig
[
5
]
stepdata
:
this
.
guideconfig
[
5
]
});
});
this
.
guideconfig
[
6
]
=
{
hole
:
{
holetype
:
"cir"
,
holex
:
170
,
holey
:
820
,
holesize
:
[
165
,
440
]
},
txt
:
{
text
:
"点击任务大厅,进入
\n
任务界面,完成任务
\n
可获得好礼哦~"
,
txtwidth
:
375
,
txtx
:
375
,
txty
:
500
,
txtalign
:
"left"
},
role
:[
{
rolex
:
375
,
roley
:
canvashei
-
550
,
roletex
:
"guide2_1"
}
],
nextbtn
:
{
btnx
:
375
,
btny
:
665
,
btntex
:
"nextbtn"
},
skipbtn
:
skipbtndata
,
touch
:
touchdata
,
pagey
:
0
,
}
_widget
&&
_widget
.
dispatchInEvent
(
"setStepData"
,
{
step
:
6
,
stepdata
:
this
.
guideconfig
[
6
]
});
let
offsety7
=
0
;
let
holly
=
1110
;
if
((
holly
+
165
/
2
)
>
canvashei
-
300
){
let
holly1
=
canvashei
-
300
-
165
/
2
;
offsety7
=
holly
-
holly1
;
}
this
.
guideconfig
[
7
]
=
{
hole
:
{
holetype
:
"cir"
,
holex
:
575
,
holey
:
1110
-
offsety7
,
holesize
:
[
165
,
440
]
},
txt
:
{
text
:
"点击小卖铺可以进到
\n
商城页面,在这里购
\n
买心仪的物品哦~"
,
txtwidth
:
320
,
txtx
:
85
,
txty
:
500
-
offsety7
,
txtalign
:
"left"
},
role
:[
{
rolex
:
0
,
roley
:
canvashei
-
550
,
roletex
:
"guide2_1"
}
],
nextbtn
:
{
btnx
:
86
,
btny
:
665
-
offsety7
,
btntex
:
"nextbtn"
},
skipbtn
:
{
skipx
:
(
canvaswid
-
107
)
/
2
,
skipy
:
canvashei
-
200
,
skiplevel
:
6
,
skiptex
:
"skipbtn"
,
},
touch
:
touchdata
,
pagey
:
offsety7
,
}
console
.
log
(
"77777偏移===》"
,
offsety7
);
_widget
&&
_widget
.
dispatchInEvent
(
"setStepData"
,
{
step
:
7
,
stepdata
:
this
.
guideconfig
[
7
]
});
this
.
startGuide
();
this
.
startGuide
();
}
}
startGuide
()
{
startGuide
()
{
...
@@ -324,8 +414,17 @@ class Main3 extends Component {
...
@@ -324,8 +414,17 @@ class Main3 extends Component {
dataCenter
.
setData
(
Store
.
needguide
,
false
);
dataCenter
.
setData
(
Store
.
needguide
,
false
);
break
;
break
;
case
"nowstep"
:
//当前所处引导步骤
let
nowstepdata
=
this
.
guideconfig
[
payload
];
let
nowpagey
=
nowstepdata
.
pagey
;
this
.
refs
.
main3
.
scrollTop
=
nowpagey
;
console
.
log
(
"滑动位置调整===》"
,
nowpagey
);
break
;
default
:
default
:
break
;
break
;
}
}
}
}
onAssetsProcess
(
loaded
,
total
)
{
onAssetsProcess
(
loaded
,
total
)
{
...
@@ -339,7 +438,7 @@ class Main3 extends Component {
...
@@ -339,7 +438,7 @@ class Main3 extends Component {
render
()
{
render
()
{
const
{
avatar
,
nickname
,
num
,
needguide
}
=
this
.
state
;
const
{
avatar
,
nickname
,
num
,
needguide
}
=
this
.
state
;
return
(
return
(
<
div
className=
"main3 diacontmidpos"
uuid=
"8754a9d1-7453-474b-b722-7cb71483ae85"
>
<
div
className=
"main3 diacontmidpos"
uuid=
"8754a9d1-7453-474b-b722-7cb71483ae85"
ref=
"main3"
>
<
img
<
img
className=
"main3_bg "
className=
"main3_bg "
uuid=
"25a6c3f8-3f78-4758-b2ab-5bcbfaa0d8bc"
uuid=
"25a6c3f8-3f78-4758-b2ab-5bcbfaa0d8bc"
...
@@ -454,7 +553,7 @@ class Main3 extends Component {
...
@@ -454,7 +553,7 @@ class Main3 extends Component {
src=
{
this
.
state
.
resList
[
'56b64b91-4e9a-49bd-bfd0-20d10b6e6556'
].
url
}
src=
{
this
.
state
.
resList
[
'56b64b91-4e9a-49bd-bfd0-20d10b6e6556'
].
url
}
/>
/>
{
needguide
?
<
CanvasWidget
className=
"
canvas-widget
"
widgetFactory=
{
Guideact
}
widgetConfig=
{
widgetConfig
}
{
needguide
?
<
CanvasWidget
className=
"
diacontmidpos
"
widgetFactory=
{
Guideact
}
widgetConfig=
{
widgetConfig
}
onEvent=
{
this
.
onEvent
.
bind
(
this
)
}
onEvent=
{
this
.
onEvent
.
bind
(
this
)
}
onReady=
{
this
.
onReady
.
bind
(
this
)
}
onAssetsProcess=
{
this
.
onAssetsProcess
.
bind
(
this
)
}
onReady=
{
this
.
onReady
.
bind
(
this
)
}
onAssetsProcess=
{
this
.
onAssetsProcess
.
bind
(
this
)
}
onAssetsComplete=
{
this
.
onAssetsComplete
.
bind
(
this
)
}
/>
:
""
}
onAssetsComplete=
{
this
.
onAssetsComplete
.
bind
(
this
)
}
/>
:
""
}
...
...
project/src/pages/main3/main3.less
View file @
73e98386
...
@@ -156,8 +156,8 @@
...
@@ -156,8 +156,8 @@
}
}
.canvas-widget{
.canvas-widget{
width: 750px;
//
width: 750px;
height: 1624px;
//
height: 1624px;
position: absolute;
//
position: absolute;
}
}
}
}
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