Commit 3c49ee8d authored by 金理想's avatar 金理想

首页修改发布

parent c32b93b0
...@@ -46,6 +46,7 @@ ...@@ -46,6 +46,7 @@
// alert("【警告】检测到活动url中没有appID参数\n缺少该参数会导致埋点、分享、app信息获取错误。") // alert("【警告】检测到活动url中没有appID参数\n缺少该参数会导致埋点、分享、app信息获取错误。")
} }
CFG.endTime = new Date("2022/01/01 00:00:00").getTime();
window.shareUrl = location.origin + '/customShare/share?id=4609' window.shareUrl = location.origin + '/customShare/share?id=4609'
......
...@@ -50,8 +50,12 @@ class Main3 extends Component { ...@@ -50,8 +50,12 @@ class Main3 extends Component {
} }
gotoURL = (type) => { gotoURL = (type) => {
console.log("==========跳转======")
if (type === 'renwudating') { if (type === 'renwudating') {
//Toast('暂未开放,敬请期待') //Toast('暂未开放,敬请期待')
// TODO 活动结束后不可点击
if(this.checkActivityEnd()) return;
ViewCtrl.showWin(Enum.Com.Task); ViewCtrl.showWin(Enum.Com.Task);
return; return;
} }
...@@ -61,9 +65,14 @@ class Main3 extends Component { ...@@ -61,9 +65,14 @@ class Main3 extends Component {
// getActivityInfo('HD046012GoVX3K3Crj') // getActivityInfo('HD046012GoVX3K3Crj')
// location.href="weixin://dl/business/?t=a2cQGEsrkda" // location.href="weixin://dl/business/?t=a2cQGEsrkda"
// getActivityInfo('HD046012Jbdn6NidNP') // getActivityInfo('HD046012Jbdn6NidNP')
// TODO 活动结束后不可点击
if(this.checkActivityEnd()) return;
getActivityInfo('HD046012JWN7ocK5tb') getActivityInfo('HD046012JWN7ocK5tb')
return; return;
} }
if( type === "wodeejia"){
if(this.checkActivityEnd()) 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',
...@@ -80,6 +89,8 @@ class Main3 extends Component { ...@@ -80,6 +89,8 @@ class Main3 extends Component {
} }
onClick_signBtn = () => { onClick_signBtn = () => {
// TODO 校验活动结束
if(this.checkActivityEnd()) return;
API.signInfo().then((res) => { API.signInfo().then((res) => {
ViewCtrl.showWin(Enum.Com.Sign, res.data); ViewCtrl.showWin(Enum.Com.Sign, res.data);
}) })
...@@ -87,7 +98,9 @@ class Main3 extends Component { ...@@ -87,7 +98,9 @@ class Main3 extends Component {
onClick_shareBtn = () => { onClick_shareBtn = () => {
console.log('onClick_shareBtn') console.log('onClick_shareBtn')
window.icbcshare() // TODO 校验活动结束
if(this.checkActivityEnd()) return;
window.icbcshare();
API.doshare().then(res => { API.doshare().then(res => {
console.log('doshare', res) console.log('doshare', res)
}) })
...@@ -135,6 +148,17 @@ class Main3 extends Component { ...@@ -135,6 +148,17 @@ class Main3 extends Component {
removeEvent() { removeEvent() {
} }
checkActivityEnd = () => {
let now = new Date().getTime();
console.log(now, CFG.endTime)
console.log("======点击了======",now > CFG.endTime)
if(now > CFG.endTime){
return true;
}else{
return false;
}
}
//首页信息显示更新 //首页信息显示更新
freshHomeInfo() { freshHomeInfo() {
let homeinfo = dataCenter.getData(Store.homeinfo); let homeinfo = dataCenter.getData(Store.homeinfo);
......
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