Commit 8e4c5d9e authored by wildfirecode13's avatar wildfirecode13

11

parent 054820ba
This diff is collapsed.
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -24,7 +24,8 @@ ...@@ -24,7 +24,8 @@
"redux-thunk": "^2.3.0", "redux-thunk": "^2.3.0",
"spark-utils": "^0.0.12", "spark-utils": "^0.0.12",
"style-loader": "^1.2.1", "style-loader": "^1.2.1",
"svgaplayerweb": "^2.3.1" "svgaplayerweb": "^2.3.1",
"teddi": "file:../../work/teddi"
}, },
"devDependencies": { "devDependencies": {
"mockjs": "^1.1.0" "mockjs": "^1.1.0"
......
...@@ -4,6 +4,6 @@ module.exports = { ...@@ -4,6 +4,6 @@ module.exports = {
TEMP_DIR: "./.temp", TEMP_DIR: "./.temp",
ENTRY: "src/app.jsx", ENTRY: "src/app.jsx",
TEMPLATE: "./public/index.html", TEMPLATE: "./public/index.html",
MOCK_STATUS: false, MOCK_STATUS: true,
PX2REM: true PX2REM: true
}; };
const {projectId} = CFG;
const apiCfg = { const apiCfg = {
getRule:`projectRule.query`, getRule: `/projectx/${projectId}/projectRule.query`,
doJoin: { doJoin: {
uri: `join.do`, uri: `join.do`,
method: "post" method: "post"
......
...@@ -9,11 +9,24 @@ MD(); ...@@ -9,11 +9,24 @@ MD();
import Loading from "./pages/loading/loading.jsx"; import Loading from "./pages/loading/loading.jsx";
import Main from "./pages/main/main.jsx"; import Main from "./pages/main/main.jsx";
class App extends Component { class App extends Component {
constructor(props) {
super(props);
this.state = {
page: 'loading',
};
}
navigateTo=(page,pagedata) =>{
this.setState({page, pagedata})
}
render() { render() {
const {page,pagedata} = this.state;
return ( return (
// <Loading></Loading> <div>
<Main></Main> {page=='loading' && <Loading data={pagedata} navigateTo={this.navigateTo}></Loading>}
{page=='main' && <Main data={pagedata} navigateTo={this.navigateTo}></Main>}
</div>
); );
} }
} }
......
'use strict'; 'use strict';
import { appID } from 'duiba-utils';
import React, { Component } from 'react'; import React, { Component } from 'react';
import { Timer } from 'teddi';
import resList from '../../resconfig/resList'; //import API from '../../api'; import resList from '../../resconfig/resList'; //import API from '../../api';
import API from '../../api';
import './loading.less'; import './loading.less';
class Loading extends Component { class Loading extends Component {
...@@ -13,6 +16,32 @@ class Loading extends Component { ...@@ -13,6 +16,32 @@ class Loading extends Component {
}; };
} }
componentDidMount() {
Promise.all([this.getCountdown(), API.getRule()]).then(([, res]) => {
this.oncomplete(res);
});
}
getCountdown() {
return new Promise((r) => {
const delta = 30;
const timer = new Timer(1 * 30, 1000 / 30);
timer.on('timer', this.onupdate, this);
timer.on('complete', r, this);
timer.start();
});
}
onupdate() {
console.log('update');
}
oncomplete(res) {
this.props.navigateTo('main', {
info: res.data,
});
}
render() { render() {
return ( return (
<div className="loading " uuid="b325d068-5750-48c1-8447-29b6f572e955"> <div className="loading " uuid="b325d068-5750-48c1-8447-29b6f572e955">
......
...@@ -13,16 +13,14 @@ class Main extends Component { ...@@ -13,16 +13,14 @@ class Main extends Component {
this.state = { this.state = {
resList: resList, resList: resList,
}; };
console.log('main constructor', props);
} }
myFuc = () => {
222222;
};
componentDidMount() { componentDidMount() {
// const url = 'https://yun.duiba.com.cn/aurora/assets/dffd145ab76b633d180db947d813ec0fd4fd602f.svga'; // loadSVGA(url); // // const url = 'https://yun.duiba.com.cn/aurora/assets/dffd145ab76b633d180db947d813ec0fd4fd602f.svga'; // loadSVGA(url); //
// getSVGA(url, '.svga-placeholder'); // getSVGA(url, '.svga-placeholder');
if (this.props.data) {
}
} }
getElement() {} getElement() {}
...@@ -31,39 +29,37 @@ class Main extends Component { ...@@ -31,39 +29,37 @@ class Main extends Component {
const { guide } = this.state; const { guide } = this.state;
return ( return (
<div className="main " uuid="7d70e354-c6e9-47c8-a482-4101c0a75401"> <div className="main " uuid="7d70e354-c6e9-47c8-a482-4101c0a75401">
<div className="svga-placeholder" uuid="c718b8c3-43da-43d0-8422-91459c8f29a9" /> {false && <div className="svga-placeholder" uuid="c718b8c3-43da-43d0-8422-91459c8f29a9" />}
<img <img
className="main_bg " className="main_bg "
uuid="122bc8da-cec5-4044-93ea-d998cc08bac3" uuid="122bc8da-cec5-4044-93ea-d998cc08bac3"
src={this.state.resList['2e7a6b79-7bb1-4997-861d-e079aa4ad1a8'].url} src={this.state.resList['2e7a6b79-7bb1-4997-861d-e079aa4ad1a8'].url}
/> />
<div className="main_guide1 " uuid="f6b7ef96-d25e-4889-9489-9db8418203d5"> {false && (
<div className="main_guide1 " uuid="f6b7ef96-d25e-4889-9489-9db8418203d5">
<img uuid="0cee1480-587c-4b8b-8e39-5921f24b8e18" />
<div uuid="f303b985-9d70-4b2c-958d-9e0ac7c0c850">
<img uuid="a215905f-bfcb-4169-91f6-39f1e00b07e7" />
<span uuid="05a474b7-cf01-4512-9a36-10892d426003">
亲爱的朋友,欢迎来到e趣小镇,我是您的小镇管家小e! 首先赠送你10000欢趣豆 下面跟着我一起了解e趣小镇吧!
</span>
</div>
</div>
)}
{false && (
<img <img
className="main_guide1_bg2 " className="main_guide2 "
uuid="0cee1480-587c-4b8b-8e39-5921f24b8e18" uuid="9d824876-91f3-4c75-9ef3-cb92284f79a7"
src={this.state.resList['757ae62a-5b3f-46be-981d-52450f1982ed'].url} src={this.state.resList['72d109c4-9799-4900-8758-99b507366007'].url}
/> />
<div className="main_guide1_pop " uuid="f303b985-9d70-4b2c-958d-9e0ac7c0c850"> )}
<img {false && (
className="main_guide1_bg1 " <img
uuid="a215905f-bfcb-4169-91f6-39f1e00b07e7" className="main_guide3 "
src={this.state.resList['fa7ff91c-079e-4da1-b556-0e2a1b1aa0b6'].url} uuid="d0f0eccb-269e-46eb-b0e3-b87d90eb0d7c"
/> src={this.state.resList['213be104-04d9-41c7-bfdb-2b457c162d84'].url}
<span className="main_guide1_txt " uuid="05a474b7-cf01-4512-9a36-10892d426003"> />
亲爱的朋友,欢迎来到e趣小镇,我是您的小镇管家小e! 首先赠送你10000欢趣豆 下面跟着我一起了解e趣小镇吧! )}
</span>
</div>
</div>
<img
className="main_guide2 "
uuid="9d824876-91f3-4c75-9ef3-cb92284f79a7"
src={this.state.resList['72d109c4-9799-4900-8758-99b507366007'].url}
/>
<img
className="main_guide3 "
uuid="d0f0eccb-269e-46eb-b0e3-b87d90eb0d7c"
src={this.state.resList['213be104-04d9-41c7-bfdb-2b457c162d84'].url}
/>
{guide && ( {guide && (
<img <img
className="main_guide4 " className="main_guide4 "
...@@ -71,31 +67,41 @@ class Main extends Component { ...@@ -71,31 +67,41 @@ class Main extends Component {
src={this.state.resList['632edd4c-7875-4ec2-8592-16584b2247eb'].url} src={this.state.resList['632edd4c-7875-4ec2-8592-16584b2247eb'].url}
/> />
)} )}
<img {false && (
className="main_guide5 " <img
uuid="764d1a9a-7d72-47dd-ab92-3cba1d381e6e" className="main_guide5 "
src={this.state.resList['aa6fa348-12df-4a78-90b9-8204c0d1faf7'].url} uuid="764d1a9a-7d72-47dd-ab92-3cba1d381e6e"
/> src={this.state.resList['aa6fa348-12df-4a78-90b9-8204c0d1faf7'].url}
<img />
className="main_guide6 " )}
uuid="45839b03-22eb-4290-8f6a-c1911b3d74fb" {false && (
src={this.state.resList['7e94a414-4046-4479-a11b-f9c5356ec4e3'].url} <img
/> className="main_guide6 "
<img uuid="45839b03-22eb-4290-8f6a-c1911b3d74fb"
className="main_guide7 " src={this.state.resList['7e94a414-4046-4479-a11b-f9c5356ec4e3'].url}
uuid="1efa84e0-f5e6-4bdf-aab8-5f7488502391" />
src={this.state.resList['ea2becb6-0e9d-48a6-9a8e-a00ffaf316e5'].url} )}
/> {false && (
<img <img
className="main_guide8 " className="main_guide7 "
uuid="cabf6418-85dd-429e-a018-99d0ebfe724c" uuid="1efa84e0-f5e6-4bdf-aab8-5f7488502391"
src={this.state.resList['9955baa7-3554-4e96-b487-86a9bd3481b2'].url} src={this.state.resList['ea2becb6-0e9d-48a6-9a8e-a00ffaf316e5'].url}
/> />
<img )}
className="main_guide9 " {false && (
uuid="257ed10a-e663-4eae-a9b9-76cdaa5a330f" <img
src={this.state.resList['0a28b718-6599-45d6-b3d4-98c65c67a2e9'].url} className="main_guide8 "
/> uuid="cabf6418-85dd-429e-a018-99d0ebfe724c"
src={this.state.resList['9955baa7-3554-4e96-b487-86a9bd3481b2'].url}
/>
)}
{false && (
<img
className="main_guide9 "
uuid="257ed10a-e663-4eae-a9b9-76cdaa5a330f"
src={this.state.resList['0a28b718-6599-45d6-b3d4-98c65c67a2e9'].url}
/>
)}
<img <img
className="main_skip " className="main_skip "
uuid="40faf764-6304-462f-b91b-53c5aaf04321" uuid="40faf764-6304-462f-b91b-53c5aaf04321"
......
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