Commit 98e3c4a5 authored by wildfirecode13's avatar wildfirecode13

111

parent 9b6fd952
......@@ -4,7 +4,7 @@ export const homeInfo = {
{
"canUpdateNickName": false,
"figures": [{ "figureId": "1" }, { "figureId": "2" }, { "figureId": "3" }],
"newUser": 1,
"newUser": 0,
"userInfo": { "figureId": "3", "joyBeans": 10100, "nickName": "13" }
},
"message": null,
......
......@@ -14,6 +14,7 @@ class Comprize extends Component {
onCloseCustom = () => {
// Aup.clear()
this.props.closeWin()
}
render() {
......
......@@ -7,6 +7,8 @@ import { getHomeInfo } from '../../dataCenter';
import resList from '../../resconfig/resList'; //import API from '../../api';
import { debounce } from '../../ui';
import './sign.less';
import ViewCtrl from "../../util/viewCtrl";
import Enum from '../../util/enum';
class Sign extends Component {
constructor(props) {
......@@ -34,7 +36,7 @@ class Sign extends Component {
getHomeInfo();
if (res.data.type !== 'joyBean') {
// Aup.show('PrizeRule', res.data, this);
ViewCtrl.showWin(Enum.Com.Comprize, res.data);
} else {
this.props.closeWin();
Toast(`恭喜你成功领取${res.data.awardName}`)
......
......@@ -53,13 +53,12 @@ class Main3 extends Component {
}
onClick_userinfo = () => {
// Aup.show('Userinfo', {figureId:this.state.figureId}, this);
ViewCtrl.showWin(Enum.Com.Userinfo, {figureId:this.state.figureId});
}
onClick_signBtn = () => {
API.signInfo().then((res) => {
// Aup.show('Sign', res.data, this);
ViewCtrl.showWin(Enum.Com.Sign, res.data);
})
}
......@@ -73,7 +72,8 @@ class Main3 extends Component {
onClick_rulebtn = () => {
// console.log('onClick_rulebtn')
// Aup.show('PopRule', {}, this)
ViewCtrl.showWin(Enum.Com.Rule);
}
onclick_jingcai = () => {
......@@ -91,8 +91,8 @@ class Main3 extends Component {
if( this.props.data &&!this.props.data.isnewUser) { //不是新用户
API.signInfo().then((res)=>{
const {needPopup} =res.data;
if(needPopup) {
// Aup.show('Sign', res.data, this);
if(needPopup) {
ViewCtrl.showWin(Enum.Com.Sign, res.data);
}
});
}
......@@ -151,7 +151,7 @@ class Main3 extends Component {
API.signInfo().then((res) => {
const { needPopup } = res.data;
if (needPopup){
// Aup.show('Sign', res.data, this);
ViewCtrl.showWin(Enum.Com.Sign, res.data);
}
})
break;
......
import Userinfo from "../components/userinfo/userinfo.jsx";
import Select from "../components/select/select.jsx";
import Comprize from "../components/prize/prize.jsx";
import Rule from "../components/rule/rule.jsx";
import Sign from "../components/sign/sign.jsx";
// import Comtask from '../components/comtask/comtask.jsx';
// import ComconfirmExchange from '../components/comconfirmExcahnge/comconfirmExcahnge.jsx';
// import ComExchangesuccess from '../components/comexchangesuccess/comexchangesuccess.jsx';
......@@ -10,6 +13,9 @@ let comMap = new Map();
comMap.set(Enum.Com.Userinfo, Userinfo);
comMap.set(Enum.Com.Select, Select);
comMap.set(Enum.Com.Comprize, Comprize);
comMap.set(Enum.Com.Rule, Rule);
comMap.set(Enum.Com.Sign, Sign);
// comMap.set(Enum.Com.comtask, Comtask);
// comMap.set(Enum.Com.comconfirmExchange, ComconfirmExchange);
// comMap.set(Enum.Com.comExchangesuccess, ComExchangesuccess);
......
......@@ -25,6 +25,9 @@ const Enum = {
comExchangesuccess:2004,
Userinfo:2005,
Select:2006,
Sign:2007,
Rule:2008,
Comprize:2009,
},
Store:{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment