Commit b5260379 authored by wanghuan's avatar wanghuan

白名单点击跳转

parent 5a448275
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
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) {
...@@ -36,6 +36,7 @@ ...@@ -36,6 +36,7 @@
return search.length ? matched && matched[2] : null; return search.length ? matched && matched[2] : null;
} }
CFG.appID = '${APPID}'; CFG.appID = '${APPID}';
if (!getUrlParam("appID")) { if (!getUrlParam("appID")) {
// alert("【警告】检测到活动url中没有appID参数\n缺少该参数会导致埋点、分享、app信息获取错误。") // alert("【警告】检测到活动url中没有appID参数\n缺少该参数会导致埋点、分享、app信息获取错误。")
......
...@@ -10,6 +10,7 @@ const apiCfg = { ...@@ -10,6 +10,7 @@ const apiCfg = {
withToken:true, withToken:true,
}, },
pageList:`/customActivity/icbcefamily/pageList`, pageList:`/customActivity/icbcefamily/pageList`,
whitePerson:`/projectx/${projectId}/e-family/whitePerson.do`
} }
export default apiCfg; export default apiCfg;
...@@ -8,6 +8,12 @@ body { ...@@ -8,6 +8,12 @@ body {
font-size: 24px; font-size: 24px;
width: 100%; width: 100%;
height: 100%; height: 100%;
-webkit-touch-callout:none;
-webkit-user-select:none;
-khtml-user-select:none;
-moz-user-select:none;
-ms-user-select:none;
user-select:none;
} }
#root{ #root{
......
...@@ -36,7 +36,8 @@ class Main3 extends Component { ...@@ -36,7 +36,8 @@ class Main3 extends Component {
joyBeans: "0", joyBeans: "0",
figureId:-1, figureId:-1,
needguide: false, needguide: false,
rolepop:false rolepop:false,
whitePersonFlag:false
}; };
} }
...@@ -55,7 +56,9 @@ class Main3 extends Component { ...@@ -55,7 +56,9 @@ class Main3 extends Component {
return; return;
} }
if(type==='ganji' ){ if(type==='ganji' ){
getActivityInfo('HD0460200216484') // getActivityInfo('HD0460200216484')
// 更换链接
getActivityInfo('HD046012GoVX3K3Crj')
return; return;
} }
const urlmap = { const urlmap = {
...@@ -100,6 +103,7 @@ class Main3 extends Component { ...@@ -100,6 +103,7 @@ class Main3 extends Component {
this.freshHomeInfo(); this.freshHomeInfo();
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 ')
...@@ -112,6 +116,8 @@ class Main3 extends Component { ...@@ -112,6 +116,8 @@ class Main3 extends Component {
} }
}); });
} }
} }
initEvent() { initEvent() {
...@@ -126,6 +132,9 @@ class Main3 extends Component { ...@@ -126,6 +132,9 @@ class Main3 extends Component {
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({
whitePersonFlag:homeinfo.whiteUser
})
if(homeinfo.userInfo) if(homeinfo.userInfo)
this.setState({ this.setState({
nickName:homeinfo.userInfo.nickName, nickName:homeinfo.userInfo.nickName,
...@@ -194,8 +203,28 @@ class Main3 extends Component { ...@@ -194,8 +203,28 @@ class Main3 extends Component {
console.log(`assets load complete`) console.log(`assets load complete`)
} }
// 白名单用户点击
whitePerson = async () => {
let {whitePersonFlag} = this.state
let u = navigator.userAgent
let android = u.indexOf('Android') > -1 || u.indexOf('Linux') > -1;
let iPhone = u.indexOf('iPhone') > -1 || u.indexOf('Mac') > -1;
let weixin = u.toLowerCase().indexOf('micromessenger') > -1;
if(whitePersonFlag){
// 白名单,可点击
if(weixin){
// 微信环境
window.location.href = 'https://elife.icbc.com.cn/ELIFENEWBASEH5/dist/#/TransferMinPro?actId=HD046012HXxWUvDEV5'
} else {
// app环境
window.location.href = 'weixin://dl/business/?t=wXDaa7bcNWm';
}
}
}
render() { render() {
const {rolepop, figureId, nickName, joyBeans, needguide } = 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
...@@ -311,11 +340,24 @@ class Main3 extends Component { ...@@ -311,11 +340,24 @@ class Main3 extends Component {
/> />
<div className="main3_role " onClick={this.onclick_main3_role} /> <div className="main3_role " onClick={this.onclick_main3_role} />
{rolepop&&<img {
className="main3_rolepop " whitePersonFlag
uuid="c27fef65-4506-42f8-85df-207999e11de1" ?
src="//yun.duiba.com.cn/spark/assets/77234d6cb9376e89e6aea4d13009b3f859f36197.png" <img
/>} className="main3_rolepop "
uuid="c27fef65-4506-42f8-85df-207999e11de1"
onClick={()=>this.whitePerson()}
// src="//yun.duiba.com.cn/spark/assets/77234d6cb9376e89e6aea4d13009b3f859f36197.png"
src="//yun.duiba.com.cn/spark/assets/ba78770db08f0ad4d7bb73ee59526e7751589946.png"
/>
:
(rolepop &&
<img
className="main3_rolepop "
uuid="c27fef65-4506-42f8-85df-207999e11de1"
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}
onEvent={this.onEvent.bind(this)} onEvent={this.onEvent.bind(this)}
......
...@@ -178,6 +178,7 @@ ...@@ -178,6 +178,7 @@
top: 1337px; top: 1337px;
position: absolute; position: absolute;
overflow: hidden; overflow: hidden;
-webkit-tap-highlight-color:transparent;
} }
.main3_rolepop { .main3_rolepop {
width: 402px; width: 402px;
......
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