提交 eb890294 编写于 作者: tao.wu's avatar tao.wu

根据服务端返回时间显示

上级 7c20e69c
......@@ -95,6 +95,13 @@
this.$rocNative.getStatusBarHeight().then(res=>{
const dpr = window.devicePixelRatio;
this.statusBarHeight = this.$rocNative.isIOS ? res.statusBarHeight: res.statusBarHeight / dpr;
// alert(this.$rocNative.isIOS)
// alert(res.homeIndicatorHeight)
// alert(res.statusBarHeight)
if(this.$rocNative.isIOS && res.homeIndicatorHeight && res.statusBarHeight===0){
this.statusBarHeight = 44;
}
// alert(this.statusBarHeight)
this.$emit('getHeaderHeight', this.statusBarHeight + 44);
})
},
......
......@@ -242,7 +242,6 @@
yestodayAwards: '', // 昨日可获得
token: '',
activityId: '', // 上线前等产品通知修改默认值
scoreAwardTips: '',
encryptId: '', // 加密后的id,(分享传参用)
serverTime: '',
......@@ -394,6 +393,15 @@
return item.mobile;
}
},
checkShowAwardModal(currentTime){
let msecSixteen = new Date('2019/12/16 00:00:00').getTime();
let msecThirty = new Date('2019/12/31 00:00:00').getTime();
if( currentTime < msecSixteen || currentTime > msecThirty ){
vm.awardModalShow = false;
}else{
vm.awardModalShow = true;
}
},
returnScoreAwardTips() {
let award = '';
if( vm.doctorInfo ) {
......@@ -563,18 +571,19 @@
if( isYesterdayRankShow ){
return;
}
const currentDateTime = new Date(vm.doctorInfo.todayDate).getTime() || new Date().getTime();
vm.checkShowAwardModal(currentDateTime);
if(vm.doctorInfo.userYesterdayRank==1){
vm.awardModalShow = true;
// vm.awardModalShow = true;
vm.yestodayAwards = getFirstAwards(vm.doctorInfo.yesterdayDate) + '*1台';
}else if(vm.doctorInfo.userYesterdayRank>=2 && vm.doctorInfo.userYesterdayRank<=3){
vm.awardModalShow = true;
// vm.awardModalShow = true;
vm.yestodayAwards = vm.awardList.No3 + '*1支';
}else if(vm.doctorInfo.userYesterdayRank>=4 && vm.doctorInfo.userYesterdayRank<=10){
vm.awardModalShow = true;
// vm.awardModalShow = true;
vm.yestodayAwards = vm.awardList.No10 + '*1支';
}else{
vm.awardModalShow = false;
// vm.awardModalShow = false;
}
if(vm.awardModalShow){
......
......@@ -61,10 +61,16 @@
return {
statusTxt: '',
// showMask: false,
path: getShareUrl() + 'year_end_ssr/activityPage',
// path: getShareUrl() + 'year_end_ssr/activityPage',
path: 'http://10.177.11.228:3009/year_end_ssr/activityPage'
}
},
mounted(){
const ua = navigator.userAgent.toLowerCase();//获取判断用的对象
if (ua.match(/MicroMessenger/i) == "micromessenger") {
}else{
this.$callApp(this.path);
}
this.statusTxt = (this.$route.query.status.toString()=='true') ? '领取成功' : '您已领取';
document.querySelector('body').setAttribute('style', 'background: "";');
// 微信分享
......
import Vue from 'vue'
import PicaJsBridge from '@/utils/jsbridge'
// import Vconsole from 'vconsole';
// const vConsole = new Vconsole();
import Vconsole from 'vconsole';
const vConsole = new Vconsole();
Vue.prototype.$rocNative = new PicaJsBridge();
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册