Commit 53484277 authored by wildfirecode13's avatar wildfirecode13

1

parent e3effb59
......@@ -11,6 +11,8 @@ import { GDispatcher } from "spark-wrapper-fyge"
import dataCenter, { Store } from '../../dataCenter';
import { getSVGA } from '../../svga';
import { Toast } from '@spark/ui';
import ViewCtrl from "../../util/viewCtrl";
import Enum from '../../util/enum';
let _widget;
class Main3 extends Component {
......@@ -31,6 +33,7 @@ class Main3 extends Component {
setTimeout(() => {
this.setState({rolepop:0})
}, 3000);
}
gotoURL=(type)=>{
......@@ -51,6 +54,7 @@ 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 = () => {
......@@ -87,11 +91,13 @@ class Main3 extends Component {
if( this.props.data &&!this.props.data.isnewUser) { //不是新用户
API.signInfo().then((res)=>{
const {needPopup} =res.data;
if(needPopup)
if(needPopup) {
// Aup.show('Sign', res.data, this);
}
});
}
}
initEvent() {
GDispatcher.addEventListener(Store.homeinfo, this.freshHomeInfo, this);
GDispatcher.addEventListener(Store.needguide, this.changeGuideShow, this);
......
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
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;
import React from 'react';
import ReactDOM from "react-dom";
import Toast from './comp/toast/toast.jsx';
import Waitting from './comp/waitting/waitting.jsx';
import config from './config';
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为布尔值 */
......
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