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
Hide 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 {
API
.
dosign
().
then
((
res
)
=>
{
const
continuousDays
=
this
.
state
.
continuousDays
+
1
;
this
.
setState
({
todaySigned
:
true
,
continuousDays
:
continuousDays
});
this
.
props
.
ctx
.
updateMoney
();
this
.
props
.
ctx
.
freshHomeInfo
();
if
(
res
.
data
.
type
!==
'joyBean'
)
Aup
.
show
(
'PrizeRule'
,
res
.
data
,
this
);
});
...
...
project/src/components/userinfo/userinfo.jsx
View file @
5a1a528f
...
...
@@ -4,49 +4,59 @@ import React, { Component } from 'react';
import
{
Aup
}
from
'../../pop'
;
import
resList
from
'../../resconfig/resList'
;
import
'./userinfo.less'
;
import
dataCenter
,
{
getAPIdata
,
getHomeInfo
,
netErrMsg
,
Role
,
Store
}
from
'../../dataCenter'
;
import
{
Toast
,
Loading
,
Badge
,
CountDownButton
,
InputNumber
}
from
'@spark/ui'
;
import
API
from
'../../api'
;
class
Userinfo
extends
Component
{
constructor
(
props
)
{
super
(
props
);
this
.
state
=
{
resList
:
resList
,
figureId
:
props
.
data
.
figureId
figureId
:
props
.
data
.
figureId
};
}
onclick
=
()
=>
{
onclick
=
async
()
=>
{
let
planame
=
this
.
refs
.
planame
.
value
;
if
(
planame
.
length
<
1
)
{
if
(
planame
.
length
<
1
)
{
return
Toast
(
"名字不能为空"
);
}
let
updateuinfo
=
await
getAPIdata
(
Store
.
updateUinfo
,{
type
:
2
,
nickName
:
planame
API
.
updateUinfo
({
type
:
2
,
nickName
:
planame
}).
then
(
res
=>
{
this
.
props
.
ctx
.
freshHomeInfo
();
// console.log('res',res);
}).
catch
(
e
=>
{
console
.
log
(
'err'
,
e
);
});
if
(
updateuinfo
&&
updateuinfo
.
success
){
// if(updateuinfo.data){
// const {result,joyBeans} = updateuinfo.data;
// if(result){
// dataCenter.setData(Store.newgoldnum,joyBeans);
// }
// }
// getHomeInfo();
// this.props.onClose();
// dataCenter.setData(Store.needguide,true);
}
else
{
// if(updateuinfo){
// let msg = updateuinfo.message;
// Toast(msg);
// }else{
// Toast(netErrMsg)
// }
}
// let updateuinfo = await getAPIdata(Store.updateUinfo, {
// type: 2,
// nickName: planame
// });
// if (updateuinfo && updateuinfo.success) {
// // if(updateuinfo.data){
// // const {result,joyBeans} = updateuinfo.data;
// // if(result){
// // dataCenter.setData(Store.newgoldnum,joyBeans);
// // }
// // }
// // getHomeInfo();
// // this.props.onClose();
// // dataCenter.setData(Store.needguide,true);
// } else {
// // if(updateuinfo){
// // let msg = updateuinfo.message;
// // Toast(msg);
// // }else{
// // Toast(netErrMsg)
// // }
// }
}
render
()
{
const
{
figureId
}
=
this
.
state
;
const
{
figureId
}
=
this
.
state
;
return
(
<
div
className=
"userinfo "
uuid=
"a9143822-c421-48d3-92c3-de9eafe5c234"
>
<
input
className=
"planame"
type=
"text"
placeholder=
"请输入昵称(不超过六字)"
ref=
"planame"
/>
...
...
@@ -60,10 +70,10 @@ class Userinfo extends Component {
uuid=
"1addc1b2-f339-4f8b-81c8-21153b03653a"
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
==
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
==
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
==
3
&&
<
img
className=
"userinfo_avatar "
src=
"//yun.duiba.com.cn/spark/assets/5a672d98433d289091b879a2d546970c281cb9d2.png"
/>
}
<
img
onClick=
{
this
.
props
.
onClose
}
className=
"userinfo_close "
...
...
project/src/dataCenter.js
View file @
5a1a528f
...
...
@@ -38,7 +38,7 @@ export async function getAPIdata(netname,reqdata=null){
apidata
=
await
API
[
netname
]();
}
}
catch
(
e
){
console
.
log
(
e
)
}
return
apidata
;
}
...
...
project/src/pages/main3/main3.jsx
View file @
5a1a528f
...
...
@@ -24,7 +24,7 @@ class Main3 extends Component {
};
}
updateMoney
()
{
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