提交 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" />
...@@ -23,7 +17,6 @@ ...@@ -23,7 +17,6 @@
<h5>已参与机构</h5> <h5>已参与机构</h5>
</div> </div>
</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" />
...@@ -93,12 +86,12 @@ export default { ...@@ -93,12 +86,12 @@ export default {
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)
} }
}); });
...@@ -113,7 +106,7 @@ export default { ...@@ -113,7 +106,7 @@ export default {
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;
}); });
}); });
...@@ -121,33 +114,34 @@ export default { ...@@ -121,33 +114,34 @@ export default {
}, },
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,
documentScrollTop = 0;
window.onscroll = () => { window.onscroll = () => {
if(document.body){ if (document.body) {
bodyScrollTop = document.body.scrollTop; bodyScrollTop = document.body.scrollTop;
} }
if(document.documentElement){ if (document.documentElement) {
documentScrollTop = document.documentElement.scrollTop; 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(){ setRemind() {
if(this.isWeb){ if (this.isWeb) {
this.$dialog.confirm({ this.$dialog.confirm({
title: '提醒', title: '提醒',
message: '请前往云鹊医APP参与活动', message: '请前往云鹊医APP参与活动',
...@@ -157,14 +151,14 @@ export default { ...@@ -157,14 +151,14 @@ export default {
}).then(() => { }).then(() => {
window.location.href = 'https://android.myapp.com/myapp/detail.htm?apkName=com.picahealth.yunque&ADTAG=mobile'; window.location.href = 'https://android.myapp.com/myapp/detail.htm?apkName=com.picahealth.yunque&ADTAG=mobile';
}); });
}else{ } else {
this.$rocNative.getToken().then(data => { this.$rocNative.getToken().then(data => {
const { userToken } = data; const { userToken } = data;
checkHospitalStatus(userToken).then(res=>{ checkHospitalStatus(userToken).then(res => {
const status = res.data.status; const status = res.data.status;
if(status==1){ // 机构状态正常 if (status == 1) { // 机构状态正常
remind({token: userToken}).then(res=>{ remind({ token: userToken }).then(res => {
if(res.code=='000000'){ if (res.code == '000000') {
this.$dialog.alert({ this.$dialog.alert({
title: '设置提醒成功', title: '设置提醒成功',
message: '云鹊奖活动正式时间:12月16日 10:00开始,我们将会以APP消息提醒和短信形式提醒道您,请记得及时参与活动', message: '云鹊奖活动正式时间:12月16日 10:00开始,我们将会以APP消息提醒和短信形式提醒道您,请记得及时参与活动',
...@@ -172,13 +166,13 @@ export default { ...@@ -172,13 +166,13 @@ export default {
className: 'remind-success' className: 'remind-success'
}); });
this.remindStatus = true; this.remindStatus = true;
}else{ } else {
this.$toast(res.message) this.$toast(res.message)
} }
}) })
}else if(status==15){ // 15创建机构审核中 } else if (status == 15) { // 15创建机构审核中
let hospital = '默认机构名称'; let hospital = '默认机构名称';
if(res.data && res.data.hospital) { if (res.data && res.data.hospital) {
hospital = res.data.hospital hospital = res.data.hospital
} }
this.$dialog.confirm({ this.$dialog.confirm({
...@@ -188,12 +182,12 @@ export default { ...@@ -188,12 +182,12 @@ export default {
cancelButtonText: '我知道了', cancelButtonText: '我知道了',
className: 'remind-success', className: 'remind-success',
}).then(() => { }).then(() => {
if(this.$rocNative.isAndroid){ if (this.$rocNative.isAndroid) {
this.$rocNative.setNeedClearUrl({url: 'year_end_ssr'}); this.$rocNative.setNeedClearUrl({ url: 'year_end_ssr' });
} }
this.$rocNative.gotoInstitutionalReview({url: window.location.href}); this.$rocNative.gotoInstitutionalReview({ url: window.location.href });
}); });
}else{ // 除了1都是未加入机构 } else { // 除了1都是未加入机构
this.$dialog.confirm({ this.$dialog.confirm({
title: '提醒', title: '提醒',
message: '抱歉,您暂未加入机构,需加入机构才可参与活动', message: '抱歉,您暂未加入机构,需加入机构才可参与活动',
...@@ -201,10 +195,10 @@ export default { ...@@ -201,10 +195,10 @@ export default {
cancelButtonText: '我知道了', cancelButtonText: '我知道了',
className: 'remind-success', className: 'remind-success',
}).then(() => { }).then(() => {
if(this.$rocNative.isAndroid){ if (this.$rocNative.isAndroid) {
this.$rocNative.setNeedClearUrl({url: 'year_end_ssr'}); this.$rocNative.setNeedClearUrl({ url: 'year_end_ssr' });
} }
this.$rocNative.gotoActivityHospital({url: window.location.href}); this.$rocNative.gotoActivityHospital({ url: window.location.href });
}); });
} }
}) })
...@@ -212,19 +206,19 @@ export default { ...@@ -212,19 +206,19 @@ export default {
} }
}, },
// 微信分享 // 微信分享
goShare(){ goShare() {
this.$rocNative.shareWechat(this.shareObj); this.$rocNative.shareWechat(this.shareObj);
}, },
// 活动规则 // 活动规则
ruleLink(){ ruleLink() {
window.location.href = 'https://phome.yunqueyi.com/template_v2/?id=594'; 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 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册