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

pretty-code 代码格式排版

上级 2026b8a4
<template>
<section class="index-wrap">
<h5header v-if="!isWeb"
title="云鹊奖"
:scrollVal="scrollVal"
:baseShowHeight="25"
:shareObj="shareObj"
:setedScroll="true"
/>
<h5header v-if="!isWeb" title="云鹊奖" :scrollVal="scrollVal" :baseShowHeight="25" :shareObj="shareObj" :setedScroll="true" />
<div id="imgHeight1">
<img src="../assets/img/img1.png" />
<img src="../assets/img/img2.png" />
......@@ -23,7 +17,6 @@
<h5>已参与机构</h5>
</div>
</div>
</div>
<div class="btn-appoint btn-app-share" id="imgHeight3">
<img v-if="!remindStatus" @click="setRemind" src="../assets/img/btn_appoint.png" />
......@@ -93,12 +86,12 @@ export default {
shareObj: {}
}
},
created(){
getCnt().then(res=>{
if(res.code=='000000'){
created() {
getCnt().then(res => {
if (res.code == '000000') {
this.doctorIdCnt = res.data.doctorIdCnt;
this.hospitalIdCnt = res.data.hospitalIdCnt;
}else{
} else {
this.$toast(res.message)
}
});
......@@ -113,7 +106,7 @@ export default {
this.isWeb = this.$rocNative.isWeb;
this.$rocNative.getToken().then(res => {
const { userToken } = res;
getRemindStatus(userToken).then(res=>{
getRemindStatus(userToken).then(res => {
this.remindStatus = res.data;
});
});
......@@ -121,33 +114,34 @@ export default {
},
methods: {
// 处理滚动按钮悬浮事件
scrollHandle(){
scrollHandle() {
const _self = this;
const imgHeight1 = document.getElementById('imgHeight1').offsetHeight;
const imgHeight2 = document.getElementById('imgHeight2').offsetHeight;
const imgHeight3 = document.getElementById('imgHeight3').offsetHeight;
let bodyScrollTop = 0, documentScrollTop = 0;
let bodyScrollTop = 0,
documentScrollTop = 0;
window.onscroll = () => {
if(document.body){
if (document.body) {
bodyScrollTop = document.body.scrollTop;
}
if(document.documentElement){
if (document.documentElement) {
documentScrollTop = document.documentElement.scrollTop;
}
const heightVal = imgHeight1 + imgHeight2 + imgHeight3;
const scrollVal = bodyScrollTop || documentScrollTop;
this.scrollVal = scrollVal;
if(scrollVal>=heightVal){
if (scrollVal >= heightVal) {
_self.showFixed = true;
}else{
} else {
_self.showFixed = false;
}
}
},
// 提醒预约
setRemind(){
if(this.isWeb){
setRemind() {
if (this.isWeb) {
this.$dialog.confirm({
title: '提醒',
message: '请前往云鹊医APP参与活动',
......@@ -157,14 +151,14 @@ export default {
}).then(() => {
window.location.href = 'https://android.myapp.com/myapp/detail.htm?apkName=com.picahealth.yunque&ADTAG=mobile';
});
}else{
} else {
this.$rocNative.getToken().then(data => {
const { userToken } = data;
checkHospitalStatus(userToken).then(res=>{
checkHospitalStatus(userToken).then(res => {
const status = res.data.status;
if(status==1){ // 机构状态正常
remind({token: userToken}).then(res=>{
if(res.code=='000000'){
if (status == 1) { // 机构状态正常
remind({ token: userToken }).then(res => {
if (res.code == '000000') {
this.$dialog.alert({
title: '设置提醒成功',
message: '云鹊奖活动正式时间:12月16日 10:00开始,我们将会以APP消息提醒和短信形式提醒道您,请记得及时参与活动',
......@@ -172,13 +166,13 @@ export default {
className: 'remind-success'
});
this.remindStatus = true;
}else{
} else {
this.$toast(res.message)
}
})
}else if(status==15){ // 15创建机构审核中
} else if (status == 15) { // 15创建机构审核中
let hospital = '默认机构名称';
if(res.data && res.data.hospital) {
if (res.data && res.data.hospital) {
hospital = res.data.hospital
}
this.$dialog.confirm({
......@@ -188,12 +182,12 @@ export default {
cancelButtonText: '我知道了',
className: 'remind-success',
}).then(() => {
if(this.$rocNative.isAndroid){
this.$rocNative.setNeedClearUrl({url: 'year_end_ssr'});
if (this.$rocNative.isAndroid) {
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({
title: '提醒',
message: '抱歉,您暂未加入机构,需加入机构才可参与活动',
......@@ -201,10 +195,10 @@ export default {
cancelButtonText: '我知道了',
className: 'remind-success',
}).then(() => {
if(this.$rocNative.isAndroid){
this.$rocNative.setNeedClearUrl({url: 'year_end_ssr'});
if (this.$rocNative.isAndroid) {
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 {
}
},
// 微信分享
goShare(){
goShare() {
this.$rocNative.shareWechat(this.shareObj);
},
// 活动规则
ruleLink(){
ruleLink() {
window.location.href = 'https://phome.yunqueyi.com/template_v2/?id=594';
}
},
}
</script>
<style lang="less" scoped>
@import '../assets/style/index.less';
@import '../assets/style/index.less';
</style>
<style lang="less">
@import '../assets/style/revant.less';
@import '../assets/style/revant.less';
</style>
\ No newline at end of file
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册