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

新版

parent e637ffbb
......@@ -121,7 +121,7 @@ export const dosign = {
export const judgeAuthority = {
"code": 10012,
"data": {
"authority": "no"
"authority": "yes"
},
"message": null,
"success": true
......
......@@ -18,6 +18,8 @@
<script src="https://yun.duiba.com.cn/db_games/hybrid_app2.js"></script>
<script>
// new VConsole();
function getApp() {
return {
cloud: {},
......@@ -28,6 +30,7 @@
var CFG = CFG || {};
CFG.projectId = location.pathname.split('/')[2] || '1';
function getUrlParam(name) {
var search = window.location.search;
var matched = search
......@@ -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.sharetitle = '欢趣专区全新升级,快来看看吧';
......
......@@ -18,6 +18,7 @@ class Task extends Component {
this.judgeAuthority();
}
judgeAuthority = async () => {
let result = await API.judgeAuthority();
if (result && result.success) {
......@@ -41,12 +42,24 @@ class Task extends Component {
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 = () => {
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";
// 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 {
resList: resList,
nickName: '',
joyBeans: "0",
figureId:-1,
figureId: -1,
needguide: false,
rolepop:false,
whitePersonFlag:false
rolepop: false,
whitePersonFlag: false
};
}
onclick_main3_role=()=>{
this.setState({rolepop:true})
onclick_main3_role = () => {
this.setState({ rolepop: true })
setTimeout(() => {
this.setState({rolepop:false})
this.setState({ rolepop: false })
}, 3000);
}
gotoURL=(type)=>{
if(type==='renwudating'){
gotoURL = (type) => {
if (type === 'renwudating') {
//Toast('暂未开放,敬请期待')
ViewCtrl.showWin(Enum.Com.Task);
return;
}
if(type==='ganji' ){
if (type === 'ganji') {
// getActivityInfo('HD0460200216484')
// 更换链接
// getActivityInfo('HD046012GoVX3K3Crj')
......@@ -65,17 +65,18 @@ class Main3 extends Component {
return;
}
const urlmap = {
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',
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/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])
location.href=urlmap[type]
console.log('goto', urlmap[type])
location.href = urlmap[type]
}
onClick_userinfo = () => {
ViewCtrl.showWin(Enum.Com.Userinfo, {figureId:this.state.figureId});
ViewCtrl.showWin(Enum.Com.Userinfo, { figureId: this.state.figureId });
}
onClick_signBtn = () => {
......@@ -87,8 +88,8 @@ class Main3 extends Component {
onClick_shareBtn = () => {
console.log('onClick_shareBtn')
window.icbcshare()
API.doshare().then(res=>{
console.log('doshare',res)
API.doshare().then(res => {
console.log('doshare', res)
})
}
......@@ -100,7 +101,7 @@ class Main3 extends Component {
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() {
......@@ -108,14 +109,14 @@ class Main3 extends Component {
this.initEvent();
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/327e6a094060ad20d67bfccc16ffe42f20adc1d1.svga','.main3_cursor ')
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/327e6a094060ad20d67bfccc16ffe42f20adc1d1.svga', '.main3_cursor ')
if( this.props.data &&!this.props.data.isnewUser) { //不是新用户
API.signInfo().then((res)=>{
const {needPopup} =res.data;
if(needPopup) {
if (this.props.data && !this.props.data.isnewUser) { //不是新用户
API.signInfo().then((res) => {
const { needPopup } = res.data;
if (needPopup) {
ViewCtrl.showWin(Enum.Com.Sign, res.data);
}
});
......@@ -134,16 +135,16 @@ class Main3 extends Component {
//首页信息显示更新
freshHomeInfo() {
let homeinfo = dataCenter.getData(Store.homeinfo);
if(!homeinfo)return;
console.log('freshHomeInfo',homeinfo.userInfo);
if (!homeinfo) return;
console.log('freshHomeInfo', homeinfo.userInfo);
this.setState({
whitePersonFlag:homeinfo.whiteUser
whitePersonFlag: homeinfo.whiteUser
})
if(homeinfo.userInfo)
if (homeinfo.userInfo)
this.setState({
nickName:homeinfo.userInfo.nickName,
joyBeans:homeinfo.userInfo.joyBeans,
figureId:homeinfo.userInfo.figureId,
nickName: homeinfo.userInfo.nickName,
joyBeans: homeinfo.userInfo.joyBeans,
figureId: homeinfo.userInfo.figureId,
})
}
changeGuideShow() {
......@@ -179,7 +180,7 @@ class Main3 extends Component {
dataCenter.setData(Store.needguide, false);
API.signInfo().then((res) => {
const { needPopup } = res.data;
if (needPopup){
if (needPopup) {
ViewCtrl.showWin(Enum.Com.Sign, res.data);
}
})
......@@ -210,14 +211,14 @@ class Main3 extends Component {
// 白名单用户点击
whitePerson = async () => {
let {whitePersonFlag} = this.state
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 (whitePersonFlag) {
// 白名单,可点击
if(weixin){
if (weixin) {
// 微信环境
window.location.href = 'https://elife.icbc.com.cn/ELIFENEWBASEH5/dist/#/TransferMinPro?actId=HD046012HXxWUvDEV5'
} else {
......@@ -228,7 +229,7 @@ class Main3 extends Component {
}
render() {
const {rolepop, figureId, nickName, joyBeans, needguide, whitePersonFlag } = this.state;
const { rolepop, figureId, nickName, joyBeans, needguide, whitePersonFlag } = this.state;
return (
<div className="main3" uuid="8754a9d1-7453-474b-b722-7cb71483ae85" ref="main3" >
<img
......@@ -312,31 +313,31 @@ class Main3 extends Component {
</div>
<img
onClick={()=>this.gotoURL('wodeejia')}
onClick={() => this.gotoURL('wodeejia')}
className="main3_btn5 md9"
uuid="72de3087-a678-4c8e-90f0-98174bb08c70"
src={this.state.resList['bd2d0b8b-f567-4146-be92-dc1704f06b4a'].url}
/>
<img
onClick={()=>this.gotoURL('xiaomaibu')}
onClick={() => this.gotoURL('xiaomaibu')}
className="main3_btn4 md8"
uuid="031a922c-6690-49a4-9659-2055ef8c174f"
src={this.state.resList['197b83b3-3d8a-47ed-bede-dd07bf533edc'].url}
/>
<img
onClick={()=>this.gotoURL('renwudating')}
onClick={() => this.gotoURL('renwudating')}
className="main3_btn3 md7"
uuid="06d08e49-d168-4d83-93cb-422e8053ffa1"
src={this.state.resList['febc6038-d4f1-48ad-a855-b45656bdc9f9'].url}
/>
<img
onClick={()=>this.gotoURL('equnongchang')}
onClick={() => this.gotoURL('equnongchang')}
className="main3_btn2 md6"
uuid="7bd21565-f46e-4c72-ad2c-d978d90ff4b3"
src={this.state.resList['b1c1b1ea-7d5e-40b5-b95f-e66ed468ac18'].url}
/>
<img
onClick={()=>this.gotoURL('ganji')}
onClick={() => this.gotoURL('ganji')}
className="main3_btn1 md5"
uuid="732aaae8-c0d9-4477-9ebf-2a47171d60e8"
src={this.state.resList['732aaae8-c0d9-4477-9ebf-2a47171d60e8'].url}
......@@ -352,7 +353,7 @@ class Main3 extends Component {
<img
className="main3_rolepop "
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/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