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
5a1a528f
Commit
5a1a528f
authored
Dec 23, 2020
by
wildfirecode13
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
8e825082
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
42 additions
and
32 deletions
+42
-32
sign.jsx
project/src/components/sign/sign.jsx
+1
-1
userinfo.jsx
project/src/components/userinfo/userinfo.jsx
+39
-29
dataCenter.js
project/src/dataCenter.js
+1
-1
main3.jsx
project/src/pages/main3/main3.jsx
+1
-1
No files found.
project/src/components/sign/sign.jsx
View file @
5a1a528f
...
@@ -29,7 +29,7 @@ class Sign extends Component {
...
@@ -29,7 +29,7 @@ class Sign extends Component {
API
.
dosign
().
then
((
res
)
=>
{
API
.
dosign
().
then
((
res
)
=>
{
const
continuousDays
=
this
.
state
.
continuousDays
+
1
;
const
continuousDays
=
this
.
state
.
continuousDays
+
1
;
this
.
setState
({
todaySigned
:
true
,
continuousDays
:
continuousDays
});
this
.
setState
({
todaySigned
:
true
,
continuousDays
:
continuousDays
});
this
.
props
.
ctx
.
updateMoney
();
this
.
props
.
ctx
.
freshHomeInfo
();
if
(
res
.
data
.
type
!==
'joyBean'
)
if
(
res
.
data
.
type
!==
'joyBean'
)
Aup
.
show
(
'PrizeRule'
,
res
.
data
,
this
);
Aup
.
show
(
'PrizeRule'
,
res
.
data
,
this
);
});
});
...
...
project/src/components/userinfo/userinfo.jsx
View file @
5a1a528f
...
@@ -4,49 +4,59 @@ import React, { Component } from 'react';
...
@@ -4,49 +4,59 @@ import React, { Component } from 'react';
import
{
Aup
}
from
'../../pop'
;
import
{
Aup
}
from
'../../pop'
;
import
resList
from
'../../resconfig/resList'
;
import
resList
from
'../../resconfig/resList'
;
import
'./userinfo.less'
;
import
'./userinfo.less'
;
import
dataCenter
,
{
getAPIdata
,
getHomeInfo
,
netErrMsg
,
Role
,
Store
}
from
'../../dataCenter'
;
import
{
Toast
,
Loading
,
Badge
,
CountDownButton
,
InputNumber
}
from
'@spark/ui'
;
import
{
Toast
,
Loading
,
Badge
,
CountDownButton
,
InputNumber
}
from
'@spark/ui'
;
import
API
from
'../../api'
;
class
Userinfo
extends
Component
{
class
Userinfo
extends
Component
{
constructor
(
props
)
{
constructor
(
props
)
{
super
(
props
);
super
(
props
);
this
.
state
=
{
this
.
state
=
{
resList
:
resList
,
resList
:
resList
,
figureId
:
props
.
data
.
figureId
figureId
:
props
.
data
.
figureId
};
};
}
}
onclick
=
()
=>
{
onclick
=
async
()
=>
{
let
planame
=
this
.
refs
.
planame
.
value
;
let
planame
=
this
.
refs
.
planame
.
value
;
if
(
planame
.
length
<
1
)
{
if
(
planame
.
length
<
1
)
{
return
Toast
(
"名字不能为空"
);
return
Toast
(
"名字不能为空"
);
}
}
let
updateuinfo
=
await
getAPIdata
(
Store
.
updateUinfo
,{
API
.
updateUinfo
({
type
:
2
,
nickName
:
planame
}).
then
(
res
=>
{
type
:
2
,
this
.
props
.
ctx
.
freshHomeInfo
();
nickName
:
planame
// console.log('res',res);
}).
catch
(
e
=>
{
console
.
log
(
'err'
,
e
);
});
});
if
(
updateuinfo
&&
updateuinfo
.
success
){
// if(updateuinfo.data){
// let updateuinfo = await getAPIdata(Store.updateUinfo, {
// const {result,joyBeans} = updateuinfo.data;
// type: 2,
// if(result){
// nickName: planame
// dataCenter.setData(Store.newgoldnum,joyBeans);
// });
// }
// if (updateuinfo && updateuinfo.success) {
// }
// // if(updateuinfo.data){
// getHomeInfo();
// // const {result,joyBeans} = updateuinfo.data;
// this.props.onClose();
// // if(result){
// dataCenter.setData(Store.needguide,true);
// // dataCenter.setData(Store.newgoldnum,joyBeans);
}
else
{
// // }
// if(updateuinfo){
// // }
// let msg = updateuinfo.message;
// // getHomeInfo();
// Toast(msg);
// // this.props.onClose();
// }else{
// // dataCenter.setData(Store.needguide,true);
// Toast(netErrMsg)
// } else {
// // if(updateuinfo){
// // let msg = updateuinfo.message;
// // Toast(msg);
// // }else{
// // Toast(netErrMsg)
// // }
// }
// }
}
}
}
render
()
{
render
()
{
const
{
figureId
}
=
this
.
state
;
const
{
figureId
}
=
this
.
state
;
return
(
return
(
<
div
className=
"userinfo "
uuid=
"a9143822-c421-48d3-92c3-de9eafe5c234"
>
<
div
className=
"userinfo "
uuid=
"a9143822-c421-48d3-92c3-de9eafe5c234"
>
<
input
className=
"planame"
type=
"text"
placeholder=
"请输入昵称(不超过六字)"
ref=
"planame"
/>
<
input
className=
"planame"
type=
"text"
placeholder=
"请输入昵称(不超过六字)"
ref=
"planame"
/>
...
@@ -61,9 +71,9 @@ class Userinfo extends Component {
...
@@ -61,9 +71,9 @@ class Userinfo extends Component {
src=
{
this
.
state
.
resList
[
'5406c697-b889-4062-8910-343038c4dc93'
].
url
}
src=
{
this
.
state
.
resList
[
'5406c697-b889-4062-8910-343038c4dc93'
].
url
}
/>
/>
{
figureId
==
1
&&
<
img
className=
"userinfo_avatar "
src=
"//yun.duiba.com.cn/spark/assets/393b5936219fa987a141cfcce17d2ffe13cc924e.png"
/>
}
{
figureId
==
1
&&
<
img
className=
"userinfo_avatar "
src=
"//yun.duiba.com.cn/spark/assets/393b5936219fa987a141cfcce17d2ffe13cc924e.png"
/>
}
{
figureId
==
2
&&
<
img
className=
"userinfo_avatar "
src=
"//yun.duiba.com.cn/spark/assets/042c2b238932872aa066fd989f2169715789a3c3.png"
/>
}
{
figureId
==
2
&&
<
img
className=
"userinfo_avatar "
src=
"//yun.duiba.com.cn/spark/assets/042c2b238932872aa066fd989f2169715789a3c3.png"
/>
}
{
figureId
==
3
&&
<
img
className=
"userinfo_avatar "
src=
"//yun.duiba.com.cn/spark/assets/5a672d98433d289091b879a2d546970c281cb9d2.png"
/>
}
{
figureId
==
3
&&
<
img
className=
"userinfo_avatar "
src=
"//yun.duiba.com.cn/spark/assets/5a672d98433d289091b879a2d546970c281cb9d2.png"
/>
}
<
img
<
img
onClick=
{
this
.
props
.
onClose
}
onClick=
{
this
.
props
.
onClose
}
className=
"userinfo_close "
className=
"userinfo_close "
...
...
project/src/dataCenter.js
View file @
5a1a528f
...
@@ -38,7 +38,7 @@ export async function getAPIdata(netname,reqdata=null){
...
@@ -38,7 +38,7 @@ export async function getAPIdata(netname,reqdata=null){
apidata
=
await
API
[
netname
]();
apidata
=
await
API
[
netname
]();
}
}
}
catch
(
e
){
}
catch
(
e
){
console
.
log
(
e
)
}
}
return
apidata
;
return
apidata
;
}
}
...
...
project/src/pages/main3/main3.jsx
View file @
5a1a528f
...
@@ -24,7 +24,7 @@ class Main3 extends Component {
...
@@ -24,7 +24,7 @@ class Main3 extends Component {
};
};
}
}
updateMoney
()
{
freshHomeInfo
()
{
this
.
freshHomeInfo
();
this
.
freshHomeInfo
();
}
}
...
...
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