parent
864b245a57
commit
101a864339
8 changed files with 207 additions and 42 deletions
@ -0,0 +1,6 @@ |
||||
/** |
||||
* 判断是否为手机端 |
||||
*/ |
||||
export const isMobile = () => { |
||||
return navigator.userAgent.match(/(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i) ? true : false; |
||||
} |
||||
@ -0,0 +1,127 @@ |
||||
<template> |
||||
<div class="guidance"> |
||||
<div class="guide_title">海慈医院体检预约须知</div> |
||||
<div class="guide_contant" ref="scrollView" id="scroll-view" @scroll="scroll"> |
||||
<p>尊敬的驾驶员:</p> |
||||
<p> 海慈医院体检预约须知海慈医院体检预约须知海慈医院体检预约须知海慈医院体检预约须知海慈医院体检预约须知海慈医院体检预约须知海慈医院体检预约须知海慈医院体检预约须知海慈医院体检预约须知</p> |
||||
<p> 海慈医院体检预约须知海慈医院体检预约须知海慈医院体检预约须知海慈医院体检预约须知海慈医院体检预约须知海慈医院体检预约须知海慈医院体检预约须知海慈医院体检预约须知海慈医院体检预约须知</p> |
||||
<p> 海慈医院体检预约须知海慈医院体检预约须知海慈医院体检预约须知海慈医院体检预约须知海慈医院体检预约须知海慈医院体检预约须知海慈医院体检预约须知海慈医院体检预约须知海慈医院体检预约须知</p> |
||||
<p> 海慈医院体检预约须知海慈医院体检预约须知海慈医院体检预约须知海慈医院体检预约须知海慈医院体检预约须知海慈医院体检预约须知海慈医院体检预约须知海慈医院体检预约须知海慈医院体检预约须知</p> |
||||
<p> 海慈医院体检预约须知海慈医院体检预约须知海慈医院体检预约须知海慈医院体检预约须知海慈医院体检预约须知海慈医院体检预约须知海慈医院体检预约须知海慈医院体检预约须知海慈医院体检预约须知</p> |
||||
<p> 海慈医院体检预约须知海慈医院体检预约须知海慈医院体检预约须知海慈医院体检预约须知海慈医院体检预约须知海慈医院体检预约须知海慈医院体检预约须知海慈医院体检预约须知海慈医院体检预约须知</p> |
||||
<p> 海慈医院体检预约须知海慈医院体检预约须知海慈医院体检预约须知海慈医院体检预约须知海慈医院体检预约须知海慈医院体检预约须知海慈医院体检预约须知海慈医院体检预约须知海慈医院体检预约须知</p> |
||||
<p> 海慈医院体检预约须知海慈医院体检预约须知海慈医院体检预约须知海慈医院体检预约须知海慈医院体检预约须知海慈医院体检预约须知海慈医院体检预约须知海慈医院体检预约须知海慈医院体检预约须知</p> |
||||
<p> 海慈医院体检预约须知海慈医院体检预约须知海慈医院体检预约须知海慈医院体检预约须知海慈医院体检预约须知海慈医院体检预约须知海慈医院体检预约须知海慈医院体检预约须知海慈医院体检预约须知</p> |
||||
</div> |
||||
<div class="guide_btn"> |
||||
<div class="guide_actBtn" @click="doCancel">取消</div> |
||||
<div class="guide_actBtn blue" @click="doRead">已阅读</div> |
||||
</div> |
||||
</div> |
||||
</template> |
||||
|
||||
<script> |
||||
export default { |
||||
data() { |
||||
return { |
||||
isFlag: false,//是否阅读到底部 |
||||
} |
||||
}, |
||||
mounted() { |
||||
console.log(this.$route.query); |
||||
}, |
||||
methods: { |
||||
//取消 |
||||
doCancel() { |
||||
this.$router.go(-1); |
||||
}, |
||||
//已阅读 |
||||
doRead() { |
||||
if (!this.isFlag) { |
||||
//未阅读完整 |
||||
lightAppJssdk.notification.alert({ |
||||
message: "须知未完全阅读,请滑动屏幕完成阅读", |
||||
title: "提示",//可传空 |
||||
buttonName: "继续阅读", |
||||
success: function (data) { |
||||
//onSuccess将在点击button之后回调 |
||||
/*回调*/ |
||||
}, |
||||
fail: function (data) { //错误返回 |
||||
} |
||||
}); |
||||
} |
||||
else { |
||||
//阅读完整 |
||||
this.$router.push({ name: '', params: {} }) |
||||
} |
||||
}, |
||||
//监听阅读进度 |
||||
scroll(e) { |
||||
if (this.isFlag) { |
||||
return; |
||||
} |
||||
const { scrollTop, clientHeight, scrollHeight } = e.target; |
||||
if (scrollTop + clientHeight === scrollHeight) { |
||||
this.isFlag = true; |
||||
console.log('阅读完成') |
||||
} |
||||
}, |
||||
} |
||||
}; |
||||
</script> |
||||
|
||||
<!-- Add "scoped" attribute to limit CSS to this component only --> |
||||
<style scoped lang="scss"> |
||||
.guidance { |
||||
height:100%; |
||||
background-color: #fff; |
||||
|
||||
.guide_title { |
||||
color: #333333; |
||||
line-height: 0.5rem; |
||||
font-size: 0.36rem; |
||||
font-family: PingFang SC-Bold, PingFang SC; |
||||
font-weight: bold; |
||||
text-align: center; |
||||
margin: 0.72rem 0 0; |
||||
} |
||||
|
||||
.guide_contant { |
||||
height: 6rem; |
||||
color: #333333; |
||||
font-size: 0.26rem; |
||||
font-family: PingFang SC-Regular, PingFang SC; |
||||
font-weight: 400; |
||||
overflow-y: auto; |
||||
margin: 0.93rem 0.4rem 0 0; |
||||
padding: 0 0.4rem; |
||||
} |
||||
|
||||
.guide_btn { |
||||
margin: 0.86rem 0.4rem 0; |
||||
|
||||
.guide_actBtn { |
||||
float:left; |
||||
display: inline-block; |
||||
width: 3rem; |
||||
color: #999999; |
||||
font-size: 0.3rem; |
||||
font-family: PingFang SC-Bold, PingFang SC; |
||||
font-weight: bold; |
||||
line-height: 0.98rem; |
||||
text-align: center; |
||||
background: #FFFFFF; |
||||
border-radius: 0.08rem; |
||||
border: 0.02rem solid #E1E1E1; |
||||
|
||||
&.blue { |
||||
float:right; |
||||
color: #fff; |
||||
background: #1677FF; |
||||
border-color: #1677FF; |
||||
} |
||||
} |
||||
} |
||||
} |
||||
</style> |
||||
Loading…
Reference in new issue