Commit d82767b4 authored by zhangjinzhou's avatar zhangjinzhou

Merge branch 'master' of gitlab2.dui88.com:wildfirecode13/icbcrpg into 引导选人load

# Conflicts:
#	project/src/pages/main3/main3.jsx
合并master
parents b3350494 79b83181
...@@ -5,7 +5,7 @@ export const homeInfo = { ...@@ -5,7 +5,7 @@ export const homeInfo = {
"figures": [ "figures": [
{ "figureId": "1" }, { "figureId": "2" }, { "figureId": "3" } { "figureId": "1" }, { "figureId": "2" }, { "figureId": "3" }
], ],
"newUser": true, "newUser": 0,
"userInfo": null "userInfo": null
}, },
"message": null, "message": null,
...@@ -28,7 +28,7 @@ export const signInfo = { ...@@ -28,7 +28,7 @@ export const signInfo = {
"code": null, "code": null,
"data": { "data": {
"continuousDays": 0, "continuousDays": 0,
"needPopup": 1, "needPopup": 0,
"signLists": [ "signLists": [
{ {
"awardName": "欢趣豆", "awardName": "欢趣豆",
...@@ -85,13 +85,35 @@ export const signInfo = { ...@@ -85,13 +85,35 @@ export const signInfo = {
"message": null, "message": null,
"success": true "success": true
} }
export const dosign = { export const pagelist ={
"code": null, "code": null,
"data": { "data": {
"result": true, "result": true,
"type": "joyBean", "type": "daPaiCoupons",
"awardName": "100欢趣豆" "awardName": "大牌券",
"awardPic": "//yun.dui88.com/projectxh5/coupon-250-250.png"
},
"message": null,
"success": true
}
export const dosign ={
"code": null,
"data": {
"result": true,
"type": "daPaiCoupons",
"awardName": "大牌券",
"awardPic": "//yun.dui88.com/projectxh5/coupon-250-250.png"
}, },
"message": null, "message": null,
"success": true "success": true
} }
// export const dosign ={
// "code": null,
// "data": {
// "result": true,
// "type": "joyBean",
// "awardName": "100欢趣豆"
// },
// "message": null,
// "success": true
// }
\ No newline at end of file
...@@ -12,6 +12,7 @@ export default { ...@@ -12,6 +12,7 @@ export default {
[`/projectx/${projectId}/e-family/share.do`]: efamily.doshare, [`/projectx/${projectId}/e-family/share.do`]: efamily.doshare,
[`/projectx/${projectId}/e-family/signInfo.do`]: efamily.signInfo, [`/projectx/${projectId}/e-family/signInfo.do`]: efamily.signInfo,
[`/projectx/${projectId}/e-family/sign.do`]: efamily.dosign, [`/projectx/${projectId}/e-family/sign.do`]: efamily.dosign,
[`/customActivity/icbcefamily/pageList`]: efamily.pagelist,
}, },
post: { post: {
[`/projectx/${projectId}/join.do`]: collect_0722.join [`/projectx/${projectId}/join.do`]: collect_0722.join
......
...@@ -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
}; };
...@@ -6,6 +6,7 @@ const apiCfg = { ...@@ -6,6 +6,7 @@ const apiCfg = {
doshare: `/projectx/${projectId}/e-family/share.do`, doshare: `/projectx/${projectId}/e-family/share.do`,
signInfo:`/projectx/${projectId}/e-family/signInfo.do`, signInfo:`/projectx/${projectId}/e-family/signInfo.do`,
dosign:`/projectx/${projectId}/e-family/sign.do`, dosign:`/projectx/${projectId}/e-family/sign.do`,
pageList:`/customActivity/icbcefamily/pageList`,
} }
export default apiCfg; export default apiCfg;
'use strict';
import React, { Component } from 'react';
import resList2 from '../../resconfig/resList2';
import { Aup } from '../../pop';
import './prize.less';
class Comprize extends Component {
constructor(props) {
super(props);
const {awardName,type,awardPic}=props.data;
this.state = { resList: resList2,
awardName,type,awardPic
};
}
onCloseCustom = () => {
Aup.clear()
}
render() {
const {awardName,type,awardPic}=this.state;
return (
<div className="prize ">
<img className="prize_bg " src={this.state.resList['27d97dbc-4f9f-4f3e-b064-1b6729dd8193'].url} />
<span className="prize_name ">恭喜你连续签到七天<br/> 获得{awardName}</span>
{type !='daPaiCoupons' &&<span className="prize_tip ">请前往工银e生活app-我的-<br/>优惠券-电子券中查看</span>}
<img className="prize_img " src={awardPic} />
<img className="prize_close " onClick={this.onCloseCustom} src={this.state.resList['b5b823ed-99a2-47fe-9512-1e3db73e8c89'].url} />
<img className="prize_ok " onClick={this.onCloseCustom} src={this.state.resList['1da83a0f-fa15-43c5-a36f-b696a6628303'].url} />
</div>
);
}
}
export default Comprize;
\ No newline at end of file
.prize {
width: 750px;
height: 1321px;
opacity: 1;
top: 77px;
position: absolute;
transform-origin: 0px 0px 0px;
.prize_bg {
width: 750px;
height: 1321px;
opacity: 1;
position: absolute;
transform-origin: 0px 0px 0px;
}
.prize_name {
text-align: center;
width: 340px;
height: 78px;
opacity: 1;
left: 205px;
top: 500px;
position: absolute;
transform-origin: 0px 0px 0px;
font-size: 30px;
color: rgba(83, 83, 83, 1);
}
.prize_tip {
text-align: center;
// width: 298px;
// height: 53px;
opacity: 1;
left: 226px;
top: 1021px;
position: absolute;
transform-origin: 0px 0px 0px;
font-size: 24px;
color: rgba(83, 83, 83, 1);
}
.prize_img {
width: 237px;
height: 237px;
opacity: 1;
left: 254px;
top: 622px;
position: absolute;
transform-origin: 0px 0px 0px;
}
.prize_close {
width: 48px;
height: 48px;
opacity: 1;
left: 635px;
top: 309px;
position: absolute;
transform-origin: 0px 0px 0px;
}
.prize_ok {
width: 446px;
height: 99px;
opacity: 1;
left: 155px;
top: 894px;
position: absolute;
transform-origin: 0px 0px 0px;
}
}
\ No newline at end of file
...@@ -130,12 +130,12 @@ class Select extends Component { ...@@ -130,12 +130,12 @@ class Select extends Component {
nickName:planame, nickName:planame,
figureId:Role[this.nshowidx].figureid figureId:Role[this.nshowidx].figureid
}); });
updateuinfo = { // updateuinfo = {
"code": null, // "code": null,
"data": true, // "data": true,
"message": null, // "message": null,
"success": true // "success": true
} // }
if(updateuinfo&&updateuinfo.success){ if(updateuinfo&&updateuinfo.success){
getHomeInfo(); getHomeInfo();
this.props.onClose(); this.props.onClose();
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
import React, { Component } from 'react'; import React, { Component } from 'react';
import resList from '../../resconfig/resList'; //import API from '../../api'; import resList from '../../resconfig/resList'; //import API from '../../api';
import { Aup, AUPOP, AUP_MBX_STATE } from '../../pop';
import './sign.less'; import './sign.less';
import { Toast, Loading, Badge, CountDownButton, InputNumber } from '@spark/ui'; import { Toast, Loading, Badge, CountDownButton, InputNumber } from '@spark/ui';
import API from '../../api'; import API from '../../api';
...@@ -10,10 +10,11 @@ import API from '../../api'; ...@@ -10,10 +10,11 @@ import API from '../../api';
class Sign extends Component { class Sign extends Component {
constructor(props) { constructor(props) {
super(props); super(props);
const { todaySigned } = props.data; const { todaySigned, continuousDays } = props.data;
this.state = { this.state = {
resList: resList, resList: resList,
todaySigned, todaySigned,
continuousDays
}; };
} }
...@@ -25,7 +26,11 @@ class Sign extends Component { ...@@ -25,7 +26,11 @@ class Sign extends Component {
doSign = () => { doSign = () => {
API.dosign().then((res) => { API.dosign().then((res) => {
const continuousDays = this.state.continuousDays + 1;
this.setState({ todaySigned: true, continuousDays: continuousDays });
this.props.ctx.updateMoney(); this.props.ctx.updateMoney();
if (res.data.type !== 'joyBean')
Aup.show('PrizeRule', res.data, this);
}); });
}; };
......
...@@ -43,19 +43,19 @@ export async function getAPIdata(netname,reqdata=null){ ...@@ -43,19 +43,19 @@ export async function getAPIdata(netname,reqdata=null){
} }
export async function getHomeInfo(){ export async function getHomeInfo(){
let homeinfo = await getAPIdata(Store.homeinfo); let homeinfo = await getAPIdata(Store.homeinfo);
homeinfo = { // homeinfo = {
"code": null, // "code": null,
"data": { // "data": {
"canUpdateNickName": null, // "canUpdateNickName": null,
"figures": [ // "figures": [
{ "figureId": "1" }, { "figureId": "2" }, { "figureId": "3" } // { "figureId": "1" }, { "figureId": "2" }, { "figureId": "3" }
], // ],
"newUser": true, // "newUser": true,
"userInfo": null // "userInfo": null
}, // },
"message": null, // "message": null,
"success": true // "success": true
} // }
if(homeinfo&&homeinfo.success&&homeinfo.data){ if(homeinfo&&homeinfo.success&&homeinfo.data){
dataCenter.setData(Store.homeinfo,homeinfo.data); dataCenter.setData(Store.homeinfo,homeinfo.data);
} }
......
...@@ -4,7 +4,7 @@ import React, { Component } from 'react'; ...@@ -4,7 +4,7 @@ import React, { Component } from 'react';
import resList from '../../resconfig/resList'; //import API from '../../api'; import resList from '../../resconfig/resList'; //import API from '../../api';
import './detail2.less'; import './detail2.less';
import API from '../../api';
class Detail2 extends Component { class Detail2 extends Component {
constructor(props) { constructor(props) {
super(props); super(props);
...@@ -13,13 +13,18 @@ class Detail2 extends Component { ...@@ -13,13 +13,18 @@ class Detail2 extends Component {
}; };
} }
componentDidMount(){ componentDidMount() {
API.pageList({
pageNo:1,
pageSize:20
}).then((res) => {
console.log('pagelist ', res)
})
} }
render() { render() {
const arr = []; const arr = [];
for(let i=0; i < 30;i++) { for (let i = 0; i < 30; i++) {
arr.push(i) arr.push(i)
} }
return ( return (
...@@ -31,7 +36,7 @@ class Detail2 extends Component { ...@@ -31,7 +36,7 @@ class Detail2 extends Component {
uuid="2b6c5d97-e458-42a0-b49b-49e9efc6abbc" uuid="2b6c5d97-e458-42a0-b49b-49e9efc6abbc"
src={this.state.resList['9d6135a5-469f-4293-b931-17786c977974'].url} src={this.state.resList['9d6135a5-469f-4293-b931-17786c977974'].url}
/> />
<img onClick={()=>this.props.navigateTo('mainpage')} className="detail2_back" uuid="detail2_back" src="//yun.duiba.com.cn/spark/assets/805d9455ffa59e37f0f0f19249959c3a9c458f96.png"></img> <img onClick={() => this.props.navigateTo('mainpage')} className="detail2_back" uuid="detail2_back" src="//yun.duiba.com.cn/spark/assets/805d9455ffa59e37f0f0f19249959c3a9c458f96.png"></img>
<div className="detail2_item_list" uuid="3804f60d-697f-4d68-98b5-ca8cf2e2d3ba"> <div className="detail2_item_list" uuid="3804f60d-697f-4d68-98b5-ca8cf2e2d3ba">
{ {
arr.map((i) => ( arr.map((i) => (
......
...@@ -40,6 +40,9 @@ class Main3 extends Component { ...@@ -40,6 +40,9 @@ class Main3 extends Component {
onClick_shareBtn = () => { onClick_shareBtn = () => {
console.log('onClick_shareBtn') console.log('onClick_shareBtn')
API.doshare().then(res=>{
console.log('doshare',res)
})
} }
onClick_rulebtn = () => { onClick_rulebtn = () => {
...@@ -54,12 +57,13 @@ class Main3 extends Component { ...@@ -54,12 +57,13 @@ class Main3 extends Component {
componentDidMount() { componentDidMount() {
this.freshHomeInfo(); this.freshHomeInfo();
this.initEvent(); this.initEvent();
if (!this.props.data.isnewUser) {
API.signInfo().then((res) => { if( this.props.data &&!this.props.data.isnewUser) { //不是新用户
const { needPopup } = res.data; API.signInfo().then((res)=>{
if (needPopup) const {needPopup} =res.data;
if(needPopup)
Aup.show('Sign', res.data, this); Aup.show('Sign', res.data, this);
}) });
} }
} }
initEvent() { initEvent() {
...@@ -72,7 +76,7 @@ class Main3 extends Component { ...@@ -72,7 +76,7 @@ class Main3 extends Component {
//首页信息显示更新 //首页信息显示更新
freshHomeInfo() { freshHomeInfo() {
let homeinfo = dataCenter.getData(Store.homeinfo); let homeinfo = dataCenter.getData(Store.homeinfo);
console.error("freshHome"); console.error("freshHome",homeinfo);
} }
changeGuideShow() { changeGuideShow() {
let needguide = dataCenter.getData(Store.needguide); let needguide = dataCenter.getData(Store.needguide);
......
...@@ -8,10 +8,12 @@ import PopRule from '../components/rule/rule.jsx' ...@@ -8,10 +8,12 @@ import PopRule from '../components/rule/rule.jsx'
import Select from '../components/select/select.jsx' import Select from '../components/select/select.jsx'
import Sign from '../components/sign/sign.jsx' import Sign from '../components/sign/sign.jsx'
import Userinfo from '../components/userinfo/userinfo.jsx' import Userinfo from '../components/userinfo/userinfo.jsx'
import Comprize from '../components/prize/prize.jsx'
// import PopLightCard from '../components/pop/PopLightCard/PopLightCard.jsx' // import PopLightCard from '../components/pop/PopLightCard/PopLightCard.jsx'
let popMap = new Map() let popMap = new Map()
popMap.set("PrizeRule", Comprize)
popMap.set("PopRule", PopRule) popMap.set("PopRule", PopRule)
popMap.set("Select", Select) popMap.set("Select", Select)
popMap.set("Sign", Sign) popMap.set("Sign", Sign)
......
const resList2 = {
'27d97dbc-4f9f-4f3e-b064-1b6729dd8193': {
name: 'prize_bg',
ext: '.png',
uuid: '27d97dbc-4f9f-4f3e-b064-1b6729dd8193',
url: '//yun.duiba.com.cn/spark/assets/edccac4fdb6a4a1479c9b5773e76300018621773.png'
},
'1dd8c28e-73c4-433d-9a49-d8ce3a0ca680': {
name: 'prize_img',
ext: '.png',
uuid: '1dd8c28e-73c4-433d-9a49-d8ce3a0ca680',
url: '//yun.duiba.com.cn/spark/assets/c0392f9dba7287d3d2877c6bff60b55f01ef15e6.png'
},
'b5b823ed-99a2-47fe-9512-1e3db73e8c89': {
name: 'prize_close',
ext: '.png',
uuid: 'b5b823ed-99a2-47fe-9512-1e3db73e8c89',
url: '//yun.duiba.com.cn/spark/assets/2686334f61b25f441c4340343beacdb83532f670.png'
},
'1da83a0f-fa15-43c5-a36f-b696a6628303': {
name: 'prize_ok',
ext: '.png',
uuid: '1da83a0f-fa15-43c5-a36f-b696a6628303',
url: '//yun.duiba.com.cn/spark/assets/d7fd0f2e5f324306613bc1dea0cfd73144596b37.png'
}
};
export default resList2;
\ No newline at end of file
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