Commit b546d22d authored by gqq's avatar gqq

Merge branch 'master' of gitlab2.dui88.com:wildfirecode13/icbcrpg

parents 31bc81c9 5a72c6f8
...@@ -11,7 +11,7 @@ export const homeInfo = { ...@@ -11,7 +11,7 @@ export const homeInfo = {
"success": true "success": true
} }
export const updateUinfo = {"code":"10004","data":null,"message":"昵称包含敏感词","success":true} export const updateUinfo = { "code": "10004", "data": null, "message": "昵称包含敏感词", "success": true }
export const doshare = { export const doshare = {
"code": null, "code": null,
"data": true, "data": true,
...@@ -80,16 +80,16 @@ export const signInfo = { ...@@ -80,16 +80,16 @@ export const signInfo = {
"message": null, "message": null,
"success": true "success": true
} }
const list=[] const list = []
for(let i=1;i<=20;i++){ for (let i = 1; i <= 20; i++) {
list.push({ "bizType": "SUB", "credits": 100, "description": `每日签到${i}`, "gmtCreate": "2020-12-22 17:02:07" }) list.push({ "bizType": "SUB", "credits": 100, "description": `每日签到${i}`, "gmtCreate": "2020-12-22 17:02:07" })
} }
const list2=[] const list2 = []
for(let i=1;i<=5;i++){ for (let i = 1; i <= 5; i++) {
list2.push({ "bizType": "SUB", "credits": 100, "description": `每日签到${i}`, "gmtCreate": "2020-12-22 17:02:07" }) list2.push({ "bizType": "SUB", "credits": 100, "description": `每日签到${i}`, "gmtCreate": "2020-12-22 17:02:07" })
} }
const list3=[] const list3 = []
export const pagelist = list export const pagelist = list
// export const pagelist = [ // export const pagelist = [
...@@ -118,6 +118,14 @@ export const dosign = { ...@@ -118,6 +118,14 @@ export const dosign = {
"message": null, "message": null,
"success": true "success": true
} }
export const judgeAuthority = {
"code": 10012,
"data": {
"authority": "yes"
},
"message": null,
"success": true
}
// export const dosign ={ // export const dosign ={
// "code": null, // "code": null,
......
...@@ -11,6 +11,7 @@ export default { ...@@ -11,6 +11,7 @@ export default {
[`/projectx/${projectId}/e-family/update.do`]: efamily.updateUinfo, [`/projectx/${projectId}/e-family/update.do`]: efamily.updateUinfo,
[`/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/judgeAuthority.do`]: efamily.judgeAuthority,
[`/customActivity/icbcefamily/pageList`]: efamily.pagelist, [`/customActivity/icbcefamily/pageList`]: efamily.pagelist,
}, },
post: { post: {
......
No preview for this file type
const {projectId} = CFG; const { projectId } = CFG;
const apiCfg = { const apiCfg = {
ruledata: `/projectx/${projectId}/projectRule.query`, ruledata: `/projectx/${projectId}/projectRule.query`,
homeinfo: `/projectx/${projectId}/e-family/index.do`, homeinfo: `/projectx/${projectId}/e-family/index.do`,
updateUinfo: `/projectx/${projectId}/e-family/update.do`, updateUinfo: `/projectx/${projectId}/e-family/update.do`,
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:{ dosign: {
uri:`/projectx/${projectId}/e-family/sign.do`, uri: `/projectx/${projectId}/e-family/sign.do`,
withToken:true, withToken: true,
}, },
pageList:`/customActivity/icbcefamily/pageList`, pageList: `/customActivity/icbcefamily/pageList`,
whitePerson:`/projectx/${projectId}/e-family/whitePerson.do` whitePerson: `/projectx/${projectId}/e-family/whitePerson.do`,
judgeAuthority: {
method: 'get',
uri: `/projectx/${projectId}/e-family/judgeAuthority.do`,
withToken: true
}
} }
export default apiCfg; export default apiCfg;
import apiCfg from './apicfg'; import apiCfg from './apicfg';
import {getPxToken} from "@spark/projectx"; import { getPxToken } from "@spark/projectx";
import {callApi} from '@spark/api-base' import { callApi } from '@spark/api-base'
import {isFromShare, newUser} from 'duiba-utils'; import { isFromShare, newUser } from 'duiba-utils';
let mergeData = { let mergeData = {
user_type: newUser ? '0' : '1', user_type: newUser ? '0' : '1',
...@@ -24,7 +24,7 @@ function getRequestParams(value) { ...@@ -24,7 +24,7 @@ function getRequestParams(value) {
method: 'get' method: 'get'
} }
} else if (typeof value === 'object') { } else if (typeof value === 'object') {
const {uri, method = 'post', headers, withToken, secret, secretKey} = value; const { uri, method = 'post', headers, withToken, secret, secretKey } = value;
return { return {
uri, uri,
method, method,
...@@ -44,11 +44,11 @@ function generateAPI(apiList) { ...@@ -44,11 +44,11 @@ function generateAPI(apiList) {
for (let key in apiList) { for (let key in apiList) {
let value = apiList[key]; let value = apiList[key];
const {method, uri, headers: mHeaders, withToken, secret, secretKey} = getRequestParams(value); const { method, uri, headers: mHeaders, withToken, secret, secretKey } = getRequestParams(value);
api[key] = async (params = {}, headers) => { api[key] = async (params = {}, headers) => {
let token; let token;
if (withToken) { if (withToken) {
const {type, payload} = await getPxToken(); const { type, payload } = await getPxToken();
switch (type) { switch (type) {
case 'success': case 'success':
token = payload.token; token = payload.token;
...@@ -59,12 +59,12 @@ function generateAPI(apiList) { ...@@ -59,12 +59,12 @@ function generateAPI(apiList) {
} }
} }
let mergedHeaders = {...mHeaders, ...headers} let mergedHeaders = { ...mHeaders, ...headers }
if (withToken && token) { if (withToken && token) {
params.token = token; params.token = token;
} }
params = {...params, ...mergeData}; params = { ...params, ...mergeData };
const result = await callApi(uri, params, method, mergedHeaders, false, secret, secretKey); const result = await callApi(uri, params, method, mergedHeaders, false, secret, secretKey);
if (result.type === 'success') { if (result.type === 'success') {
......
'use strict'; 'use strict';
import React, { Component } from 'react'; import React, { Component } from 'react';
import { Toast } from '@spark/ui';
import resList from '../../resconfig/resList'; import resList from '../../resconfig/resList';
//import API from '../../api'; import API from '../../api';
import './task.less'; import './task.less';
class Task extends Component { class Task extends Component {
constructor(props) { constructor(props) {
super(props); super(props);
this.state = { resList: resList }; this.state = {
resList: resList,
flag: true
};
} }
componentDidMount() {
this.judgeAuthority();
}
judgeAuthority = async () => {
const result = await API.judgeAuthority();
if (result && result.success) {
if (result.data.authority == 'yes') {
this.setState({
flag: false,
})
} else {
this.setState({
flag: true
})
}
} else {
Toast("网络错误,请刷新页面后重试");
}
}
toApplyCard = () => {
window.location.href = "https://elife.icbc.com.cn/OFSTCARD/creditCard/apply.do?channel=105BKRK0001000000000000000&coreCode=HZDW000174463&paraPromoCode=EW0004600000000EL01";
}
toPurchase = () => {
window.location.href = "https://ghjf.g-town.com.cn/activity/wsd.html?type=wsd";
}
render() { render() {
return ( return (
<div className="ren_wu_da_ting_jie_mian "> <div className="ren_wu_da_ting_jie_mian ">
<img className="bei_jing " src={this.state.resList['65a77904-29e0-45f4-9508-b2fe48bbe708'].url} /> <img className="bei_jing " src={this.state.resList['efe9d3d9-57ff-47a0-97ec-27847da411f9'].url} />
<div className="pai_zi "> <div className="pai_zi ">
<img className="pai_zi_di_tu " src={this.state.resList['cc6efb64-16b2-4b10-9c43-e13735d76fcd'].url} /> <img className="pai_zi_di_tu " src={this.state.resList['89624160-97ff-4924-9d9b-1078ba3d2e65'].url} />
<img className="xing_qiu_da_zuo_zhan " src={this.state.resList['144b92ac-5abf-4a61-b698-115894ac9d1e'].url} /> {this.state.flag && <img className="ban_li_wan_shi_da" src={this.state.resList['f2aea33a-42cd-4518-92e4-a79e80e8c487'].url} />}
<img className="dong_wu_lian_meng " src={this.state.resList['676a2559-b5bd-4520-aab3-fd31795e6f3f'].url} /> {!this.state.flag && <img className="di_shi_ni_men_piao" src={this.state.resList['da5960d0-0d03-4dd8-9673-465c261d3ef2'].url} />}
<img className="xing_qiu_da_zuo_zhan " src={this.state.resList['654f2e6f-aea1-4555-979b-3ca520ed7381'].url} />
<img className="dong_wu_lian_meng " src={this.state.resList['b635ec14-2e70-4f6c-b304-d031e4b0b5d9'].url} />
</div> </div>
<img <img
className="fan_hui_nong_chang_an_niu " className="fan_hui_nong_chang_an_niu "
...@@ -24,9 +62,11 @@ class Task extends Component { ...@@ -24,9 +62,11 @@ class Task extends Component {
onClick={this.props.closeWin} onClick={this.props.closeWin}
/> />
<div className="jiao_hu_kuang "> <div className="jiao_hu_kuang ">
<img className="qian_jing " src={this.state.resList['2c4866b4-69c2-4008-88ab-be9461e8fe12'].url} /> <img className="qian_jing " src={this.state.resList['d9131617-ff12-4e1b-87ea-97304f2f5316'].url} />
{this.state.flag && <img className="qu_ban_li md14" src={this.state.resList['bd9cf4ad-19c0-42b7-a003-fd3a0e948215'].url} onClick={this.toApplyCard} />}
{!this.state.flag && <img className="qu_qiang_gou md13" src={this.state.resList['8d553195-1c36-4d3f-be97-34b0e697813e'].url} onClick={this.toPurchase} />}
<img <img
className="xing_qiu_da_zuo_zhan_qu_wan_wan " className="xing_qiu_da_zuo_zhan_qu_wan_wan md15 "
src={this.state.resList['36bcd134-df2c-4957-b97f-0b8463b4481b'].url} src={this.state.resList['36bcd134-df2c-4957-b97f-0b8463b4481b'].url}
onClick={ onClick={
() => { () => {
...@@ -36,7 +76,7 @@ class Task extends Component { ...@@ -36,7 +76,7 @@ class Task extends Component {
} }
/> />
<img <img
className="dong_wu_lian_meng_qu_wan_wan " className="dong_wu_lian_meng_qu_wan_wan md16 "
src={this.state.resList['36bcd134-df2c-4957-b97f-0b8463b4481b'].url} src={this.state.resList['36bcd134-df2c-4957-b97f-0b8463b4481b'].url}
onClick={ onClick={
() => { () => {
......
...@@ -6,43 +6,69 @@ ...@@ -6,43 +6,69 @@
display: block; display: block;
position: absolute; position: absolute;
top: 50%; top: 50%;
transform:translateY(-50%); transform: translateY(-50%);
.bei_jing { .bei_jing {
width: 750px; width: 750px;
height: 1624px; height: 1624px;
opacity: 1; opacity: 1;
position: absolute; position: absolute;
} }
.pai_zi { .pai_zi {
width: 663px; width: 663px;
height: 805px; height: 986px;
opacity: 1; opacity: 1;
left: 44px; left: 44px;
top: 390px; // top: 390px;
top: 300px;
position: absolute; position: absolute;
.pai_zi_di_tu { .pai_zi_di_tu {
width: 663px; width: 663px;
height: 805px; height: 986px;
opacity: 1; opacity: 1;
position: absolute; position: absolute;
} }
.xing_qiu_da_zuo_zhan { .xing_qiu_da_zuo_zhan {
width: 602px; width: 602px;
height: 256px; height: 256px;
opacity: 1; opacity: 1;
left: 30px; left: 30px;
top: 171px; // top: 427px;
top: 425.5px;
position: absolute; position: absolute;
} }
.dong_wu_lian_meng { .dong_wu_lian_meng {
width: 602px; width: 602px;
height: 256px; height: 256px;
opacity: 1; opacity: 1;
left: 30px; left: 30px;
top: 464px; top: 700px;
position: absolute;
}
.ban_li_wan_shi_da {
width: 602px;
height: 256px;
opacity: 1;
left: 30px;
top: 151px;
position: absolute;
}
.di_shi_ni_men_piao {
width: 602px;
height: 256px;
opacity: 1;
left: 30px;
top: 151px;
position: absolute; position: absolute;
} }
} }
.fan_hui_nong_chang_an_niu { .fan_hui_nong_chang_an_niu {
width: 105px; width: 105px;
height: 99px; height: 99px;
...@@ -51,38 +77,65 @@ ...@@ -51,38 +77,65 @@
top: 224px; top: 224px;
position: absolute; position: absolute;
} }
.jiao_hu_kuang { .jiao_hu_kuang {
width: 750px; width: 750px;
height: 1303px; // height: 1303px;
height: 1378px;
opacity: 1; opacity: 1;
display: block; display: block;
left: 0px; left: 0px;
top: 321px; // top: 321px;
top: 260px;
position: absolute; position: absolute;
.qian_jing { .qian_jing {
width: 750px; width: 750px;
height: 1303px; // height: 1303px;
height: 1378px;
opacity: 1; opacity: 1;
top: 0px; top: 0px;
position: absolute; position: absolute;
} }
.qu_ban_li {
width: 175px;
height: 52px;
opacity: 1;
display: block;
left: 285px;
top: 360px;
position: absolute;
}
.qu_qiang_gou {
width: 175px;
height: 52px;
opacity: 1;
display: block;
left: 285px;
top: 360px;
position: absolute;
}
.xing_qiu_da_zuo_zhan_qu_wan_wan { .xing_qiu_da_zuo_zhan_qu_wan_wan {
width: 175px; width: 175px;
height: 52px; height: 52px;
opacity: 1; opacity: 1;
display: block; display: block;
left: 285px; left: 285px;
top: 420px; top: 635px;
position: absolute; position: absolute;
} }
.dong_wu_lian_meng_qu_wan_wan { .dong_wu_lian_meng_qu_wan_wan {
width: 175px; width: 175px;
height: 52px; height: 52px;
opacity: 1; opacity: 1;
display: block; display: block;
left: 285px; left: 285px;
top: 715px; top: 910px;
position: absolute; position: absolute;
} }
} }
} }
\ No newline at end of file
import { GDispatcher } from 'spark-wrapper-fyge'; import { GDispatcher } from 'spark-wrapper-fyge';
import API from './api' import API from './api'
export const Store = { export const Store = {
homeinfo:"homeinfo", homeinfo: "homeinfo",
ruledata:"ruledata", ruledata: "ruledata",
updateUinfo:"updateUinfo", updateUinfo: "updateUinfo",
doshare:"doshare", doshare: "doshare",
signInfo:"signInfo", signInfo: "signInfo",
dosign:"dosign", dosign: "dosign",
judgeAuthority: "judgeAuthority",
//新手引导 //新手引导
needguide:"needguide", needguide: "needguide",
newgoldnum:"newgoldnum", newgoldnum: "newgoldnum",
} }
//人物角色对应 //人物角色对应
export let Role = { export let Role = {
1:{ 1: {
name:"熊猫1男", name: "熊猫1男",
figureid:1, figureid: 1,
}, },
2:{ 2: {
name:"熊猫2女", name: "熊猫2女",
figureid:2, figureid: 2,
}, },
3:{ 3: {
name:"熊猫3墨镜", name: "熊猫3墨镜",
figureid:3, figureid: 3,
} }
} }
export const netErrMsg = "活动太火爆了,请稍后再试"; export const netErrMsg = "活动太火爆了,请稍后再试";
export async function getAPIdata(netname,reqdata=null){ export async function getAPIdata(netname, reqdata = null) {
let apidata; let apidata;
try{ try {
if(reqdata){ if (reqdata) {
apidata = await API[netname](reqdata); apidata = await API[netname](reqdata);
}else{ } else {
apidata = await API[netname](); apidata = await API[netname]();
} }
}catch(e){ } catch (e) {
console.log(e) console.log(e)
} }
return apidata; return apidata;
} }
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,
...@@ -57,9 +58,9 @@ export async function getHomeInfo(){ ...@@ -57,9 +58,9 @@ export async function getHomeInfo(){
// "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);
} }
} }
...@@ -69,7 +70,7 @@ const Datas = new Map(); ...@@ -69,7 +70,7 @@ const Datas = new Map();
const dataCenter = { const dataCenter = {
setData: (key, value) => { setData: (key, value) => {
Datas.set(key, value); Datas.set(key, value);
if(key==Store.homeinfo||key==Store.needguide){ if (key == Store.homeinfo || key == Store.needguide) {
GDispatcher.dispatchEvent(key) GDispatcher.dispatchEvent(key)
} }
}, },
......
This diff is collapsed.
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