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: {},
...@@ -28,6 +30,7 @@ ...@@ -28,6 +30,7 @@
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');
} }
......
...@@ -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,14 +109,14 @@ class Main3 extends Component { ...@@ -108,14 +109,14 @@ 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);
} }
}); });
...@@ -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,14 +211,14 @@ class Main3 extends Component { ...@@ -210,14 +211,14 @@ 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 {
...@@ -228,7 +229,7 @@ class Main3 extends Component { ...@@ -228,7 +229,7 @@ class Main3 extends Component {
} }
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
...@@ -312,31 +313,31 @@ class Main3 extends Component { ...@@ -312,31 +313,31 @@ class Main3 extends Component {
</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}
...@@ -352,7 +353,7 @@ class Main3 extends Component { ...@@ -352,7 +353,7 @@ class Main3 extends Component {
<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"
/> />
......
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