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

pretty-code 代码格式排版

上级 2026b8a4
<template> <template>
<section class="index-wrap"> <section class="index-wrap">
<h5header v-if="!isWeb" <h5header v-if="!isWeb" title="云鹊奖" :scrollVal="scrollVal" :baseShowHeight="25" :shareObj="shareObj" :setedScroll="true" />
title="云鹊奖"
:scrollVal="scrollVal"
:baseShowHeight="25"
:shareObj="shareObj"
:setedScroll="true"
/>
<div id="imgHeight1"> <div id="imgHeight1">
<img src="../assets/img/img1.png" /> <img src="../assets/img/img1.png" />
<img src="../assets/img/img2.png" /> <img src="../assets/img/img2.png" />
<img src="../assets/img/img3.png" /> <img src="../assets/img/img3.png" />
</div> </div>
<div class="wrap-join" id="imgHeight2"> <div class="wrap-join" id="imgHeight2">
<div class="wrap-count"> <div class="wrap-count">
<div> <div>
<h1>{{doctorIdCnt}}</h1> <h1>{{doctorIdCnt}}</h1>
<h5>已参与人数</h5> <h5>已参与人数</h5>
</div>
<div>
<h1>{{hospitalIdCnt}}</h1>
<h5>已参与机构</h5>
</div>
</div> </div>
<div>
<h1>{{hospitalIdCnt}}</h1>
<h5>已参与机构</h5>
</div>
</div>
</div> </div>
<div class="btn-appoint btn-app-share" id="imgHeight3"> <div class="btn-appoint btn-app-share" id="imgHeight3">
<img v-if="!remindStatus" @click="setRemind" src="../assets/img/btn_appoint.png" /> <img v-if="!remindStatus" @click="setRemind" src="../assets/img/btn_appoint.png" />
<template v-else> <template v-else>
<img src="../assets/img/btn_appointed.png"> <img src="../assets/img/btn_appointed.png">
<div class="appoint-time">12月16号我们会提示你参加活动</div> <div class="appoint-time">12月16号我们会提示你参加活动</div>
</template> </template>
</div> </div>
<div> <div>
<img src="../assets/img/img6.png" /> <img src="../assets/img/img6.png" />
<img src="../assets/img/img7.png" /> <img src="../assets/img/img7.png" />
<img src="../assets/img/img8.png" /> <img src="../assets/img/img8.png" />
<img src="../assets/img/img9.png" /> <img src="../assets/img/img9.png" />
<img src="../assets/img/img10.png" /> <img src="../assets/img/img10.png" />
</div> </div>
<div class="btn-share btn-app-share"><img @click="goShare" src="../assets/img/btn_share.png" /></div> <div class="btn-share btn-app-share"><img @click="goShare" src="../assets/img/btn_share.png" /></div>
<div class="rule-show"> <div class="rule-show">
<img src="../assets/img/rule_title.png" /> <img src="../assets/img/rule_title.png" />
<div class="rule-bg"> <div class="rule-bg">
<section> <section>
<h1>每日任务,攒勤奋分</h1> <h1>每日任务,攒勤奋分</h1>
<p><span>比赛时间:</span>2019.12.16 10:00-2019.12.30 00:00</p> <p><span>比赛时间:</span>2019.12.16 10:00-2019.12.30 00:00</p>
<p><span>医生机构:</span>根据机构内注册医生的勤奋分总额排名,活动结束后机构榜单指定名次可获得云鹊豆,榜单第一可获得云鹊机构奖荣誉。</p> <p><span>医生机构:</span>根据机构内注册医生的勤奋分总额排名,活动结束后机构榜单指定名次可获得云鹊豆,榜单第一可获得云鹊机构奖荣誉。</p>
<p><span>医生个人:</span>完成每日学习任务可积攒勤奋分和云鹊豆,每日个人排行榜前十可获得相应实物奖品,个人累计排行第一获得云鹊勤奋之星荣誉、iphone11(64G)一台及云鹊豆奖品。</p> <p><span>医生个人:</span>完成每日学习任务可积攒勤奋分和云鹊豆,每日个人排行榜前十可获得相应实物奖品,个人累计排行第一获得云鹊勤奋之星荣誉、iphone11(64G)一台及云鹊豆奖品。</p>
</section> </section>
<section class="margin-top-20"> <section class="margin-top-20">
<h1>公布排名</h1> <h1>公布排名</h1>
<p><span>公布时间:</span>2019.12.30 10:00-2020.1.5</p> <p><span>公布时间:</span>2019.12.30 10:00-2020.1.5</p>
<p>公布个人获奖名单和机构获奖名单</p> <p>公布个人获奖名单和机构获奖名单</p>
</section> </section>
<div class="line"></div> <div class="line"></div>
<div @click="ruleLink" class="btn-rule">查看规则详情</div> <div @click="ruleLink" class="btn-rule">查看规则详情</div>
</div> </div>
<img class="bird" src="../assets/img/bird.png"> <img class="bird" src="../assets/img/bird.png">
</div> </div>
<div class="abs-btn"> <div class="abs-btn">
<img @click="ruleLink" src="../assets/img/btn_rules.png"> <img @click="ruleLink" src="../assets/img/btn_rules.png">
</div> </div>
<div v-if="showFixed && !remindStatus" @click="setRemind" class="fix-btn"> <div v-if="showFixed && !remindStatus" @click="setRemind" class="fix-btn">
<div>开赛时提醒我</div> <div>开赛时提醒我</div>
</div> </div>
</section> </section>
</template> </template>
...@@ -84,147 +77,148 @@ export default { ...@@ -84,147 +77,148 @@ export default {
}, },
data() { data() {
return { return {
showFixed: false, showFixed: false,
remindStatus: false, remindStatus: false,
doctorIdCnt: '', doctorIdCnt: '',
hospitalIdCnt: '', hospitalIdCnt: '',
scrollVal: 0, scrollVal: 0,
isWeb: false, isWeb: false,
shareObj: {} shareObj: {}
} }
}, },
created(){ created() {
getCnt().then(res=>{ getCnt().then(res => {
if(res.code=='000000'){ if (res.code == '000000') {
this.doctorIdCnt = res.data.doctorIdCnt; this.doctorIdCnt = res.data.doctorIdCnt;
this.hospitalIdCnt = res.data.hospitalIdCnt; this.hospitalIdCnt = res.data.hospitalIdCnt;
}else{ } else {
this.$toast(res.message) this.$toast(res.message)
} }
}); });
}, },
mounted() { mounted() {
this.shareObj = { this.shareObj = {
shareUrl: window.location.href, shareUrl: window.location.href,
title1: '年终活动-标题', title1: '年终活动-标题',
title2: '年终活动-文字描述', title2: '年终活动-文字描述',
shareImageUrl: 'https://test-file.yunqueyi.com/png/2019/11/18/1574046505000_48x48.png' shareImageUrl: 'https://test-file.yunqueyi.com/png/2019/11/18/1574046505000_48x48.png'
} }
this.isWeb = this.$rocNative.isWeb; this.isWeb = this.$rocNative.isWeb;
this.$rocNative.getToken().then(res => { this.$rocNative.getToken().then(res => {
const { userToken } = res; const { userToken } = res;
getRemindStatus(userToken).then(res=>{ getRemindStatus(userToken).then(res => {
this.remindStatus = res.data; this.remindStatus = res.data;
}); });
}); });
this.scrollHandle(); this.scrollHandle();
}, },
methods: { methods: {
// 处理滚动按钮悬浮事件 // 处理滚动按钮悬浮事件
scrollHandle(){ scrollHandle() {
const _self = this; const _self = this;
const imgHeight1 = document.getElementById('imgHeight1').offsetHeight; const imgHeight1 = document.getElementById('imgHeight1').offsetHeight;
const imgHeight2 = document.getElementById('imgHeight2').offsetHeight; const imgHeight2 = document.getElementById('imgHeight2').offsetHeight;
const imgHeight3 = document.getElementById('imgHeight3').offsetHeight; const imgHeight3 = document.getElementById('imgHeight3').offsetHeight;
let bodyScrollTop = 0, documentScrollTop = 0; let bodyScrollTop = 0,
window.onscroll = () => { documentScrollTop = 0;
if(document.body){ window.onscroll = () => {
bodyScrollTop = document.body.scrollTop; if (document.body) {
} bodyScrollTop = document.body.scrollTop;
if(document.documentElement){ }
documentScrollTop = document.documentElement.scrollTop; if (document.documentElement) {
} documentScrollTop = document.documentElement.scrollTop;
}
const heightVal = imgHeight1 + imgHeight2 + imgHeight3; const heightVal = imgHeight1 + imgHeight2 + imgHeight3;
const scrollVal = bodyScrollTop || documentScrollTop; const scrollVal = bodyScrollTop || documentScrollTop;
this.scrollVal = scrollVal; this.scrollVal = scrollVal;
if(scrollVal>=heightVal){ if (scrollVal >= heightVal) {
_self.showFixed = true; _self.showFixed = true;
}else{ } else {
_self.showFixed = false; _self.showFixed = false;
} }
}
},
// 提醒预约
setRemind() {
if (this.isWeb) {
this.$dialog.confirm({
title: '提醒',
message: '请前往云鹊医APP参与活动',
confirmButtonText: '下载APP',
cancelButtonText: '我知道了',
className: 'remind-success',
}).then(() => {
window.location.href = 'https://android.myapp.com/myapp/detail.htm?apkName=com.picahealth.yunque&ADTAG=mobile';
});
} else {
this.$rocNative.getToken().then(data => {
const { userToken } = data;
checkHospitalStatus(userToken).then(res => {
const status = res.data.status;
if (status == 1) { // 机构状态正常
remind({ token: userToken }).then(res => {
if (res.code == '000000') {
this.$dialog.alert({
title: '设置提醒成功',
message: '云鹊奖活动正式时间:12月16日 10:00开始,我们将会以APP消息提醒和短信形式提醒道您,请记得及时参与活动',
confirmButtonText: '我知道了',
className: 'remind-success'
});
this.remindStatus = true;
} else {
this.$toast(res.message)
}
})
} else if (status == 15) { // 15创建机构审核中
let hospital = '默认机构名称';
if (res.data && res.data.hospital) {
hospital = res.data.hospital
}
this.$dialog.confirm({
title: '提醒',
message: `抱歉,您创建的机构【${hospital}】正在审核中,审核通过后可参与活动<br/><br/>如有疑问可联系客:<span>400-920-8877</span><br/>(周一至周五9:00-18:00)`,
confirmButtonText: '查看进度',
cancelButtonText: '我知道了',
className: 'remind-success',
}).then(() => {
if (this.$rocNative.isAndroid) {
this.$rocNative.setNeedClearUrl({ url: 'year_end_ssr' });
}
this.$rocNative.gotoInstitutionalReview({ url: window.location.href });
});
} else { // 除了1都是未加入机构
this.$dialog.confirm({
title: '提醒',
message: '抱歉,您暂未加入机构,需加入机构才可参与活动',
confirmButtonText: '加入机构',
cancelButtonText: '我知道了',
className: 'remind-success',
}).then(() => {
if (this.$rocNative.isAndroid) {
this.$rocNative.setNeedClearUrl({ url: 'year_end_ssr' });
}
this.$rocNative.gotoActivityHospital({ url: window.location.href });
});
}
})
});
}
},
// 微信分享
goShare() {
this.$rocNative.shareWechat(this.shareObj);
},
// 活动规则
ruleLink() {
window.location.href = 'https://phome.yunqueyi.com/template_v2/?id=594';
} }
},
// 提醒预约
setRemind(){
if(this.isWeb){
this.$dialog.confirm({
title: '提醒',
message: '请前往云鹊医APP参与活动',
confirmButtonText: '下载APP',
cancelButtonText: '我知道了',
className: 'remind-success',
}).then(() => {
window.location.href = 'https://android.myapp.com/myapp/detail.htm?apkName=com.picahealth.yunque&ADTAG=mobile';
});
}else{
this.$rocNative.getToken().then(data => {
const { userToken } = data;
checkHospitalStatus(userToken).then(res=>{
const status = res.data.status;
if(status==1){ // 机构状态正常
remind({token: userToken}).then(res=>{
if(res.code=='000000'){
this.$dialog.alert({
title: '设置提醒成功',
message: '云鹊奖活动正式时间:12月16日 10:00开始,我们将会以APP消息提醒和短信形式提醒道您,请记得及时参与活动',
confirmButtonText: '我知道了',
className: 'remind-success'
});
this.remindStatus = true;
}else{
this.$toast(res.message)
}
})
}else if(status==15){ // 15创建机构审核中
let hospital = '默认机构名称';
if(res.data && res.data.hospital) {
hospital = res.data.hospital
}
this.$dialog.confirm({
title: '提醒',
message: `抱歉,您创建的机构【${hospital}】正在审核中,审核通过后可参与活动<br/><br/>如有疑问可联系客:<span>400-920-8877</span><br/>(周一至周五9:00-18:00)`,
confirmButtonText: '查看进度',
cancelButtonText: '我知道了',
className: 'remind-success',
}).then(() => {
if(this.$rocNative.isAndroid){
this.$rocNative.setNeedClearUrl({url: 'year_end_ssr'});
}
this.$rocNative.gotoInstitutionalReview({url: window.location.href});
});
}else{ // 除了1都是未加入机构
this.$dialog.confirm({
title: '提醒',
message: '抱歉,您暂未加入机构,需加入机构才可参与活动',
confirmButtonText: '加入机构',
cancelButtonText: '我知道了',
className: 'remind-success',
}).then(() => {
if(this.$rocNative.isAndroid){
this.$rocNative.setNeedClearUrl({url: 'year_end_ssr'});
}
this.$rocNative.gotoActivityHospital({url: window.location.href});
});
}
})
});
}
},
// 微信分享
goShare(){
this.$rocNative.shareWechat(this.shareObj);
},
// 活动规则
ruleLink(){
window.location.href = 'https://phome.yunqueyi.com/template_v2/?id=594';
}
}, },
} }
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
@import '../assets/style/index.less'; @import '../assets/style/index.less';
</style> </style>
<style lang="less"> <style lang="less">
@import '../assets/style/revant.less'; @import '../assets/style/revant.less';
</style> </style>
\ No newline at end of file
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册