Commit 04ce7ab8 authored by 实打实的's avatar 实打实的

新版

parent e637ffbb
...@@ -121,7 +121,7 @@ export const dosign = { ...@@ -121,7 +121,7 @@ export const dosign = {
export const judgeAuthority = { export const judgeAuthority = {
"code": 10012, "code": 10012,
"data": { "data": {
"authority": "no" "authority": "yes"
}, },
"message": null, "message": null,
"success": true "success": true
......
...@@ -18,6 +18,8 @@ ...@@ -18,6 +18,8 @@
<script src="https://yun.duiba.com.cn/db_games/hybrid_app2.js"></script> <script src="https://yun.duiba.com.cn/db_games/hybrid_app2.js"></script>
<script> <script>
// new VConsole();
function getApp() { function getApp() {
return { return {
cloud: {}, cloud: {},
...@@ -25,9 +27,10 @@ ...@@ -25,9 +27,10 @@
requestType: "mock" requestType: "mock"
} }
} }
var CFG = CFG || {}; var CFG = CFG || {};
CFG.projectId = location.pathname.split('/')[2] || '1'; CFG.projectId = location.pathname.split('/')[2] || '1';
function getUrlParam(name) { function getUrlParam(name) {
var search = window.location.search; var search = window.location.search;
var matched = search var matched = search
...@@ -43,7 +46,8 @@ ...@@ -43,7 +46,8 @@
} }
window.shareUrl = 'https://duiba' + CFG.appID + CFG.projectId + Math.floor(Math.random() * 90000) + '.activity-1.m.duiba.com.cn/customShare/share?id=4609' window.shareUrl = 'https://duiba' + CFG.appID + CFG.projectId + Math.floor(Math.random() * 90000) +
'.activity-1.m.duiba.com.cn/customShare/share?id=4609'
window.shareimg = 'https://yun.duiba.com.cn/spark/assets/e7bec756134eaca143ea54e9f6856b6a6e10d33f.png'; window.shareimg = 'https://yun.duiba.com.cn/spark/assets/e7bec756134eaca143ea54e9f6856b6a6e10d33f.png';
window.sharetitle = '欢趣专区全新升级,快来看看吧'; window.sharetitle = '欢趣专区全新升级,快来看看吧';
......
...@@ -18,6 +18,7 @@ class Task extends Component { ...@@ -18,6 +18,7 @@ class Task extends Component {
this.judgeAuthority(); this.judgeAuthority();
} }
judgeAuthority = async () => { judgeAuthority = async () => {
let result = await API.judgeAuthority(); let result = await API.judgeAuthority();
if (result && result.success) { if (result && result.success) {
...@@ -41,12 +42,24 @@ class Task extends Component { ...@@ -41,12 +42,24 @@ class Task extends Component {
Loading.hide(); Loading.hide();
} }
getActivityInfo = (actId) => {
console.log('getActivityInfo')
if (ICBCUtilTools.isAndroid()) { // 如果是安卓
window.Myutils.getActivityInfo(actId);
return;
}
if (ICBCUtilTools.isiPhone()) {
window.WebViewJavascriptBridge.callHandler("Myutils.getActivityInfo", actId)
}
}
toApplyCard = () => { toApplyCard = () => {
window.location.href = "https://elife.icbc.com.cn/OFSTCARD/creditCard/apply.do?channel=105BKRK0001000000000000000&coreCode=HZDW000174463&paraPromoCode=EW0004600000000EL01"; window.location.href = "https://elife.icbc.com.cn/OFSTCARD/creditCard/apply.do?channel=105BKRK0001000000000000000&coreCode=HZDW000174463&paraPromoCode=EW0004600000000EL01";
} }
toPurchase = () => { toPurchase = () => {
window.location.href = "https://ghjf.g-town.com.cn/activity/wsd.html?type=wsd"; // window.location.href = "https://ghjf.g-town.com.cn/activity/wsd.html?type=wsd";
this.getActivityInfo('HD046012MadrYFGPcb');
} }
......
...@@ -19,11 +19,11 @@ let _widget; ...@@ -19,11 +19,11 @@ let _widget;
function getActivityInfo(actId) { function getActivityInfo(actId) {
console.log('getActivityInfo') console.log('getActivityInfo')
if (ICBCUtilTools.isAndroid()) { // 如果是安卓 if (ICBCUtilTools.isAndroid()) { // 如果是安卓
window.Myutils.getActivityInfo(actId); window.Myutils.getActivityInfo(actId);
return; return;
} }
if (ICBCUtilTools.isiPhone()) { if (ICBCUtilTools.isiPhone()) {
window.WebViewJavascriptBridge.callHandler("Myutils.getActivityInfo", actId) window.WebViewJavascriptBridge.callHandler("Myutils.getActivityInfo", actId)
} }
} }
...@@ -34,28 +34,28 @@ class Main3 extends Component { ...@@ -34,28 +34,28 @@ class Main3 extends Component {
resList: resList, resList: resList,
nickName: '', nickName: '',
joyBeans: "0", joyBeans: "0",
figureId:-1, figureId: -1,
needguide: false, needguide: false,
rolepop:false, rolepop: false,
whitePersonFlag:false whitePersonFlag: false
}; };
} }
onclick_main3_role=()=>{ onclick_main3_role = () => {
this.setState({rolepop:true}) this.setState({ rolepop: true })
setTimeout(() => { setTimeout(() => {
this.setState({rolepop:false}) this.setState({ rolepop: false })
}, 3000); }, 3000);
} }
gotoURL=(type)=>{ gotoURL = (type) => {
if(type==='renwudating'){ if (type === 'renwudating') {
//Toast('暂未开放,敬请期待') //Toast('暂未开放,敬请期待')
ViewCtrl.showWin(Enum.Com.Task); ViewCtrl.showWin(Enum.Com.Task);
return; return;
} }
if(type==='ganji' ){ if (type === 'ganji') {
// getActivityInfo('HD0460200216484') // getActivityInfo('HD0460200216484')
// 更换链接 // 更换链接
// getActivityInfo('HD046012GoVX3K3Crj') // getActivityInfo('HD046012GoVX3K3Crj')
...@@ -65,17 +65,18 @@ class Main3 extends Component { ...@@ -65,17 +65,18 @@ class Main3 extends Component {
return; return;
} }
const urlmap = { const urlmap = {
xiaomaibu:'https://gonghang.activity-1.m.duiba.com.cn/projectx/pa14d7c75/index.html?appID=66480', xiaomaibu: 'https://gonghang.activity-1.m.duiba.com.cn/projectx/pa14d7c75/index.html?appID=66480',
equnongchang:'https://gonghang.activity-1.m.duiba.com.cn/projectx/pb3bde510/index.html?appID=66480', // equnongchang:'https://gonghang.activity-1.m.duiba.com.cn/projectx/pb3bde510/index.html?appID=66480',
// equnongchang:'https://gonghang.activity-1.m.duiba.com.cn/projectx/p6e9a59d7/index.html?appID=66480', // equnongchang:'https://gonghang.activity-1.m.duiba.com.cn/projectx/p6e9a59d7/index.html?appID=66480',
wodeejia:'https://gonghang.activity-1.m.duiba.com.cn/projectx/pb3bde510/index.html?appID=66480&gohome=true', equnongchang: 'https://gonghang.activity-1.m.duiba.com.cn/projectx/p6e9a59d7/index.html?appID=66480',
wodeejia: 'https://gonghang.activity-1.m.duiba.com.cn/projectx/pb3bde510/index.html?appID=66480&gohome=true',
} }
console.log('goto',urlmap[type]) console.log('goto', urlmap[type])
location.href=urlmap[type] location.href = urlmap[type]
} }
onClick_userinfo = () => { onClick_userinfo = () => {
ViewCtrl.showWin(Enum.Com.Userinfo, {figureId:this.state.figureId}); ViewCtrl.showWin(Enum.Com.Userinfo, { figureId: this.state.figureId });
} }
onClick_signBtn = () => { onClick_signBtn = () => {
...@@ -87,8 +88,8 @@ class Main3 extends Component { ...@@ -87,8 +88,8 @@ class Main3 extends Component {
onClick_shareBtn = () => { onClick_shareBtn = () => {
console.log('onClick_shareBtn') console.log('onClick_shareBtn')
window.icbcshare() window.icbcshare()
API.doshare().then(res=>{ API.doshare().then(res => {
console.log('doshare',res) console.log('doshare', res)
}) })
} }
...@@ -100,7 +101,7 @@ class Main3 extends Component { ...@@ -100,7 +101,7 @@ class Main3 extends Component {
onclick_jingcai = () => { onclick_jingcai = () => {
console.log('onclick_jingcai') console.log('onclick_jingcai')
location.href="https://gonghang.activity-1.m.duiba.com.cn/projectx/p4f90ce5d/index.html?appID=66480" location.href = "https://gonghang.activity-1.m.duiba.com.cn/projectx/p4f90ce5d/index.html?appID=66480"
} }
componentDidMount() { componentDidMount() {
...@@ -108,20 +109,20 @@ class Main3 extends Component { ...@@ -108,20 +109,20 @@ class Main3 extends Component {
this.initEvent(); this.initEvent();
getSVGA('//yun.duiba.com.cn/spark/assets/37b62d421a7d224b291960c898bdc9fd1824f561.svga','.main3_role') getSVGA('//yun.duiba.com.cn/spark/assets/37b62d421a7d224b291960c898bdc9fd1824f561.svga', '.main3_role')
getSVGA('//yun.duiba.com.cn/spark/assets/8928d4a90feb4614b76753de25ad3694f85c11d6.svga','.main3_btn_jingcai2') getSVGA('//yun.duiba.com.cn/spark/assets/8928d4a90feb4614b76753de25ad3694f85c11d6.svga', '.main3_btn_jingcai2')
getSVGA('//yun.duiba.com.cn/spark/assets/327e6a094060ad20d67bfccc16ffe42f20adc1d1.svga','.main3_cursor ') getSVGA('//yun.duiba.com.cn/spark/assets/327e6a094060ad20d67bfccc16ffe42f20adc1d1.svga', '.main3_cursor ')
if( this.props.data &&!this.props.data.isnewUser) { //不是新用户 if (this.props.data && !this.props.data.isnewUser) { //不是新用户
API.signInfo().then((res)=>{ API.signInfo().then((res) => {
const {needPopup} =res.data; const { needPopup } = res.data;
if(needPopup) { if (needPopup) {
ViewCtrl.showWin(Enum.Com.Sign, res.data); ViewCtrl.showWin(Enum.Com.Sign, res.data);
} }
}); });
} }
} }
initEvent() { initEvent() {
...@@ -134,16 +135,16 @@ class Main3 extends Component { ...@@ -134,16 +135,16 @@ class Main3 extends Component {
//首页信息显示更新 //首页信息显示更新
freshHomeInfo() { freshHomeInfo() {
let homeinfo = dataCenter.getData(Store.homeinfo); let homeinfo = dataCenter.getData(Store.homeinfo);
if(!homeinfo)return; if (!homeinfo) return;
console.log('freshHomeInfo',homeinfo.userInfo); console.log('freshHomeInfo', homeinfo.userInfo);
this.setState({ this.setState({
whitePersonFlag:homeinfo.whiteUser whitePersonFlag: homeinfo.whiteUser
}) })
if(homeinfo.userInfo) if (homeinfo.userInfo)
this.setState({ this.setState({
nickName:homeinfo.userInfo.nickName, nickName: homeinfo.userInfo.nickName,
joyBeans:homeinfo.userInfo.joyBeans, joyBeans: homeinfo.userInfo.joyBeans,
figureId:homeinfo.userInfo.figureId, figureId: homeinfo.userInfo.figureId,
}) })
} }
changeGuideShow() { changeGuideShow() {
...@@ -179,7 +180,7 @@ class Main3 extends Component { ...@@ -179,7 +180,7 @@ class Main3 extends Component {
dataCenter.setData(Store.needguide, false); dataCenter.setData(Store.needguide, false);
API.signInfo().then((res) => { API.signInfo().then((res) => {
const { needPopup } = res.data; const { needPopup } = res.data;
if (needPopup){ if (needPopup) {
ViewCtrl.showWin(Enum.Com.Sign, res.data); ViewCtrl.showWin(Enum.Com.Sign, res.data);
} }
}) })
...@@ -210,25 +211,25 @@ class Main3 extends Component { ...@@ -210,25 +211,25 @@ class Main3 extends Component {
// 白名单用户点击 // 白名单用户点击
whitePerson = async () => { whitePerson = async () => {
let {whitePersonFlag} = this.state let { whitePersonFlag } = this.state
let u = navigator.userAgent let u = navigator.userAgent
let android = u.indexOf('Android') > -1 || u.indexOf('Linux') > -1; let android = u.indexOf('Android') > -1 || u.indexOf('Linux') > -1;
let iPhone = u.indexOf('iPhone') > -1 || u.indexOf('Mac') > -1; let iPhone = u.indexOf('iPhone') > -1 || u.indexOf('Mac') > -1;
let weixin = u.toLowerCase().indexOf('micromessenger') > -1; let weixin = u.toLowerCase().indexOf('micromessenger') > -1;
if(whitePersonFlag){ if (whitePersonFlag) {
// 白名单,可点击 // 白名单,可点击
if(weixin){ if (weixin) {
// 微信环境 // 微信环境
window.location.href = 'https://elife.icbc.com.cn/ELIFENEWBASEH5/dist/#/TransferMinPro?actId=HD046012HXxWUvDEV5' window.location.href = 'https://elife.icbc.com.cn/ELIFENEWBASEH5/dist/#/TransferMinPro?actId=HD046012HXxWUvDEV5'
} else { } else {
// app环境 // app环境
window.location.href = 'weixin://dl/business/?t=wXDaa7bcNWm'; window.location.href = 'weixin://dl/business/?t=wXDaa7bcNWm';
}
} }
}
} }
render() { render() {
const {rolepop, figureId, nickName, joyBeans, needguide, whitePersonFlag } = this.state; const { rolepop, figureId, nickName, joyBeans, needguide, whitePersonFlag } = this.state;
return ( return (
<div className="main3" uuid="8754a9d1-7453-474b-b722-7cb71483ae85" ref="main3" > <div className="main3" uuid="8754a9d1-7453-474b-b722-7cb71483ae85" ref="main3" >
<img <img
...@@ -236,8 +237,8 @@ class Main3 extends Component { ...@@ -236,8 +237,8 @@ class Main3 extends Component {
// src='http://yun.duiba.com.cn/spark/assets/f814904585bbeb176da6121c1dcd253196017b1b.jpg' // src='http://yun.duiba.com.cn/spark/assets/f814904585bbeb176da6121c1dcd253196017b1b.jpg'
// src="//yun.duiba.com.cn/spark/assets/1e8e7c7a761f6d4d84b157129333ab8f79262d25.png" // src="//yun.duiba.com.cn/spark/assets/1e8e7c7a761f6d4d84b157129333ab8f79262d25.png"
src="//yun.duiba.com.cn/spark/assets/93fece351d90ee288ce6f5618a6ae2f8392cb8c3.png" src="//yun.duiba.com.cn/spark/assets/93fece351d90ee288ce6f5618a6ae2f8392cb8c3.png"
// uuid="25a6c3f8-3f78-4758-b2ab-5bcbfaa0d8bc" // uuid="25a6c3f8-3f78-4758-b2ab-5bcbfaa0d8bc"
// src="//yun.duiba.com.cn/spark/assets/3dff859e5097ca38eebf736863ea0344dfc1ac76.png" // src="//yun.duiba.com.cn/spark/assets/3dff859e5097ca38eebf736863ea0344dfc1ac76.png"
/> />
<div className="main3_top " uuid="257105ac-5616-4e29-a4dc-302ed2604193"> <div className="main3_top " uuid="257105ac-5616-4e29-a4dc-302ed2604193">
<div <div
...@@ -271,7 +272,7 @@ class Main3 extends Component { ...@@ -271,7 +272,7 @@ class Main3 extends Component {
<span className="main3_num " uuid="018875e0-9592-4854-ba0b-2cd58464a6a2"> <span className="main3_num " uuid="018875e0-9592-4854-ba0b-2cd58464a6a2">
欢趣豆:{joyBeans} 欢趣豆:{joyBeans}
</span> </span>
<span className="main3_nick " uuid="a7518930-17cc-427a-a6e5-27a593b309c4"> <span className="main3_nick " uuid="a7518930-17cc-427a-a6e5-27a593b309c4">
{nickName} {nickName}
</span> </span>
<img <img
...@@ -302,67 +303,67 @@ class Main3 extends Component { ...@@ -302,67 +303,67 @@ class Main3 extends Component {
uuid="def4d721-bfe0-4c42-970c-40d99e1c2944" uuid="def4d721-bfe0-4c42-970c-40d99e1c2944"
src={this.state.resList['82a28387-28f0-4e49-856a-dbe5e981bbb1'].url} src={this.state.resList['82a28387-28f0-4e49-856a-dbe5e981bbb1'].url}
/> />
<div className="main3_btn_jingcai2 " /> <div className="main3_btn_jingcai2 " />
<img <img
onClick={this.onclick_jingcai} onClick={this.onclick_jingcai}
className="main3_btn_jingcai md4" className="main3_btn_jingcai md4"
uuid="de6b0150-9221-439d-adf7-ec3e3ad5466e" uuid="de6b0150-9221-439d-adf7-ec3e3ad5466e"
src={this.state.resList['8d1cc843-b298-42e1-a092-954edfcf93e2'].url} src={this.state.resList['8d1cc843-b298-42e1-a092-954edfcf93e2'].url}
/> />
</div> </div>
<img <img
onClick={()=>this.gotoURL('wodeejia')} onClick={() => this.gotoURL('wodeejia')}
className="main3_btn5 md9" className="main3_btn5 md9"
uuid="72de3087-a678-4c8e-90f0-98174bb08c70" uuid="72de3087-a678-4c8e-90f0-98174bb08c70"
src={this.state.resList['bd2d0b8b-f567-4146-be92-dc1704f06b4a'].url} src={this.state.resList['bd2d0b8b-f567-4146-be92-dc1704f06b4a'].url}
/> />
<img <img
onClick={()=>this.gotoURL('xiaomaibu')} onClick={() => this.gotoURL('xiaomaibu')}
className="main3_btn4 md8" className="main3_btn4 md8"
uuid="031a922c-6690-49a4-9659-2055ef8c174f" uuid="031a922c-6690-49a4-9659-2055ef8c174f"
src={this.state.resList['197b83b3-3d8a-47ed-bede-dd07bf533edc'].url} src={this.state.resList['197b83b3-3d8a-47ed-bede-dd07bf533edc'].url}
/> />
<img <img
onClick={()=>this.gotoURL('renwudating')} onClick={() => this.gotoURL('renwudating')}
className="main3_btn3 md7" className="main3_btn3 md7"
uuid="06d08e49-d168-4d83-93cb-422e8053ffa1" uuid="06d08e49-d168-4d83-93cb-422e8053ffa1"
src={this.state.resList['febc6038-d4f1-48ad-a855-b45656bdc9f9'].url} src={this.state.resList['febc6038-d4f1-48ad-a855-b45656bdc9f9'].url}
/> />
<img <img
onClick={()=>this.gotoURL('equnongchang')} onClick={() => this.gotoURL('equnongchang')}
className="main3_btn2 md6" className="main3_btn2 md6"
uuid="7bd21565-f46e-4c72-ad2c-d978d90ff4b3" uuid="7bd21565-f46e-4c72-ad2c-d978d90ff4b3"
src={this.state.resList['b1c1b1ea-7d5e-40b5-b95f-e66ed468ac18'].url} src={this.state.resList['b1c1b1ea-7d5e-40b5-b95f-e66ed468ac18'].url}
/> />
<img <img
onClick={()=>this.gotoURL('ganji')} onClick={() => this.gotoURL('ganji')}
className="main3_btn1 md5" className="main3_btn1 md5"
uuid="732aaae8-c0d9-4477-9ebf-2a47171d60e8" uuid="732aaae8-c0d9-4477-9ebf-2a47171d60e8"
src={this.state.resList['732aaae8-c0d9-4477-9ebf-2a47171d60e8'].url} src={this.state.resList['732aaae8-c0d9-4477-9ebf-2a47171d60e8'].url}
/> />
<div <div
className="main3_cursor " className="main3_cursor "
/> />
<div className="main3_role " onClick={this.onclick_main3_role} /> <div className="main3_role " onClick={this.onclick_main3_role} />
{ {
whitePersonFlag whitePersonFlag
? ?
<img <img
className="main3_rolepop " className="main3_rolepop "
uuid="c27fef65-4506-42f8-85df-207999e11de1" uuid="c27fef65-4506-42f8-85df-207999e11de1"
onClick={()=>this.whitePerson()} onClick={() => this.whitePerson()}
// src="//yun.duiba.com.cn/spark/assets/77234d6cb9376e89e6aea4d13009b3f859f36197.png" // src="//yun.duiba.com.cn/spark/assets/77234d6cb9376e89e6aea4d13009b3f859f36197.png"
src="//yun.duiba.com.cn/spark/assets/ba78770db08f0ad4d7bb73ee59526e7751589946.png" src="//yun.duiba.com.cn/spark/assets/ba78770db08f0ad4d7bb73ee59526e7751589946.png"
/> />
: :
(rolepop && (rolepop &&
<img <img
className="main3_rolepop " className="main3_rolepop "
uuid="c27fef65-4506-42f8-85df-207999e11de1" uuid="c27fef65-4506-42f8-85df-207999e11de1"
src="//yun.duiba.com.cn/spark/assets/77234d6cb9376e89e6aea4d13009b3f859f36197.png" src="//yun.duiba.com.cn/spark/assets/77234d6cb9376e89e6aea4d13009b3f859f36197.png"
/>) />)
} }
{needguide ? <CanvasWidget className="diacontmidpos canvasLayer" widgetFactory={Guideact} widgetConfig={widgetConfig} {needguide ? <CanvasWidget className="diacontmidpos canvasLayer" widgetFactory={Guideact} widgetConfig={widgetConfig}
......
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