Commit bf481ce5 authored by wildfirecode13's avatar wildfirecode13

1

parent 3a069cfd
......@@ -2,10 +2,8 @@
width: 612px;
height: 936px;
left: 71px;
// top: 291px;
top: 50%;
margin-top: -145px;
margin-top: -468px;
position: absolute;
.sign_bg {
width: 609px;
......
......@@ -19,7 +19,7 @@ class Detail2 extends Component {
render() {
const arr = [];
for(let i=0; i < 10;i++) {
for(let i=0; i < 30;i++) {
arr.push(i)
}
return (
......
......@@ -8,7 +8,7 @@ import './main3.less';
import { CanvasWidget } from 'spark-utils';
import { Guideact } from './bundle';//'@spark/guideact';//
import { widgetConfig } from './widgetConfig';
import {GDispatcher} from "spark-wrapper-fyge"
import { GDispatcher } from "spark-wrapper-fyge"
import dataCenter, { Store } from '../../dataCenter';
let _widget;
class Main3 extends Component {
......@@ -19,47 +19,70 @@ class Main3 extends Component {
nickname: 'nickname',
avatar: 1,
num: "1123",
needguide:false
needguide: false
};
}
onClick_userinfo = () => {
Aup.show('Userinfo', {}, this);
// console.log('onClick_signBtn')
}
onClick_signBtn = () => {
Aup.show('Sign', {}, this);
// console.log('onClick_signBtn')
}
onClick_shareBtn = () => {
console.log('onClick_shareBtn')
}
onClick_rulebtn = () => {
// console.log('onClick_rulebtn')
Aup.show('PopRule', {}, this)
}
onclick_jingcai = () => {
console.log('onclick_jingcai')
}
componentDidMount() {
this.initEvent();
if (this.props.data) {
setTimeout(() => {
// Aup.show('PopRule', {}, this)
// Aup.show('Userinfo', {}, this);
// Aup.show('Sign', {}, this); // Aup.show('Select', {}, this);
}, 200);
}
// if (this.props.data) {
// setTimeout(() => {
// // Aup.show('PopRule', {}, this)
// // Aup.show('Userinfo', {}, this);
// // Aup.show('Sign', {}, this); // Aup.show('Select', {}, this);
// }, 200);
// }
}
initEvent(){
GDispatcher.addEventListener(Store.homeinfo,this.freshHomeInfo,this);
GDispatcher.addEventListener(Store.needguide,this.changeGuideShow,this);
initEvent() {
GDispatcher.addEventListener(Store.homeinfo, this.freshHomeInfo, this);
GDispatcher.addEventListener(Store.needguide, this.changeGuideShow, this);
}
removeEvent(){
removeEvent() {
}
//首页信息显示更新
freshHomeInfo(){
freshHomeInfo() {
let homeinfo = dataCenter.getData(Store.homeinfo);
}
changeGuideShow(){
changeGuideShow() {
let needguide = dataCenter.getData(Store.needguide);
this.setState({
needguide:needguide
needguide: needguide
});
}
onReady(widget) {
_widget = widget;
}
_widget = widget;
}
onEvent(type, payload) {
console.log(type, payload);
switch(type){
switch (type) {
case "guidecomplete":
dataCenter.setData(Store.needguide,false);
dataCenter.setData(Store.needguide, false);
break;
default:
break;
......@@ -74,7 +97,7 @@ class Main3 extends Component {
}
render() {
const { avatar, nickname, num,needguide } = this.state;
const { avatar, nickname, num, needguide } = this.state;
return (
<div className="main3 " uuid="8754a9d1-7453-474b-b722-7cb71483ae85">
<img
......@@ -113,7 +136,7 @@ class Main3 extends Component {
<span className="main3_num " uuid="018875e0-9592-4854-ba0b-2cd58464a6a2">
欢趣豆:12352
</span>
<span className="main3_nick " uuid="a7518930-17cc-427a-a6e5-27a593b309c4">
<span onClick={this.onClick_userinfo} className="main3_nick " uuid="a7518930-17cc-427a-a6e5-27a593b309c4">
用户昵称
</span>
<img
......@@ -126,21 +149,25 @@ class Main3 extends Component {
/>
</div>
<img
onClick={this.onClick_signBtn}
className="main3_sign "
uuid="fdb364dd-23db-46fe-8ab4-df733ce0596b"
src={this.state.resList['e4ba9074-781a-4dc1-a696-34753b57f924'].url}
/>
<img
onClick={this.onClick_rulebtn}
className="main3_rule "
uuid="46338849-e102-41a8-9298-43639f634bcf"
src={this.state.resList['98666530-5e40-49d7-8b86-8397e3ee0889'].url}
/>
<img
onClick={this.onClick_shareBtn}
className="main3_share "
uuid="def4d721-bfe0-4c42-970c-40d99e1c2944"
src={this.state.resList['82a28387-28f0-4e49-856a-dbe5e981bbb1'].url}
/>
<img
onClick={this.onclick_jingcai}
className="main3_btn_jingcai "
uuid="de6b0150-9221-439d-adf7-ec3e3ad5466e"
src={this.state.resList['8d1cc843-b298-42e1-a092-954edfcf93e2'].url}
......@@ -187,11 +214,11 @@ class Main3 extends Component {
src={this.state.resList['56b64b91-4e9a-49bd-bfd0-20d10b6e6556'].url}
/>
{needguide?<CanvasWidget className="canvas-widget" widgetFactory={Guideact} widgetConfig={widgetConfig}
{needguide ? <CanvasWidget className="canvas-widget" widgetFactory={Guideact} widgetConfig={widgetConfig}
onEvent={this.onEvent.bind(this)}
onReady={this.onReady.bind(this)} onAssetsProcess={this.onAssetsProcess.bind(this)}
onAssetsComplete={this.onAssetsComplete.bind(this)} />:""}
onAssetsComplete={this.onAssetsComplete.bind(this)} /> : ""}
</div>
);
}
......
......@@ -45,8 +45,7 @@
position: absolute;
}
.main3_num {
width: 164px;
height: 22px;
left: 105px;
top: 57px;
position: absolute;
......@@ -54,8 +53,7 @@
color: #ffffff;
}
.main3_nick {
width: 96px;
height: 24px;
left: 105px;
top: 20px;
position: absolute;
......
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