healthConsulting.vue 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  1. <template>
  2. <view class="hb column hidden container ">
  3. <image class="bg" src="/static/images/health_counseling_bg.png" mode="widthFix"></image>
  4. <view :style="{height: statusBarHeight,background: bgColor }"></view>
  5. <u-navbar
  6. title="健康咨询" titleStyle="font-weight: bold;"
  7. @rightClick="rightClick"
  8. :autoBack="true"
  9. :bg-color="bgColor"
  10. >
  11. </u-navbar>
  12. <scroll-view class="content" :scroll-y="true">
  13. <view v-for="(index,item) in 10" :key="index" class="healthlist justify-start">
  14. <image src="/static/images/71014b69fdcc4b56ae2a84bdc28f11c3.png" mode="aspectFill" class="w280 h210 radius12"></image>
  15. <view class="column justify-between ml20">
  16. <view>
  17. <view class="color-text bold fs36">翟佳滨教授专家团队</view>
  18. <view class="fs24 mt8 color-orange">专家团队会诊咨询</view>
  19. </view>
  20. <view class="healthbox" @click="toDetails">会诊咨询</view>
  21. </view>
  22. </view>
  23. <view class="h120"></view>
  24. </scroll-view>
  25. </view>
  26. </template>
  27. <script>
  28. export default {
  29. data() {
  30. return {
  31. statusBarHeight:'',
  32. top:0
  33. }
  34. },
  35. computed: {
  36. // 计算属性的 getter
  37. bgColor: function() {
  38. var top=this.top/30;
  39. return 'rgba(11,179,242, ' + top + ')';
  40. },
  41. },
  42. onLoad() {
  43. // 获取系统信息
  44. const sys = uni.getSystemInfoSync()
  45. this.statusBarHeight = sys.statusBarHeight+'px'
  46. },
  47. onUnload() { //普通页面在 onUnload 生命周期中执行
  48. uni.$emit('stop')
  49. },
  50. onHide() { //tabBar页面在onHide生命周期中执行
  51. uni.$emit('stop')
  52. },
  53. onPageScroll(e) {
  54. //console.log(e)
  55. this.top=e.scrollTop;
  56. },
  57. methods: {
  58. toDetails(){
  59. uni.navigateTo({
  60. url:'/pages_health/ConsultationDetails'
  61. })
  62. }
  63. }
  64. }
  65. </script>
  66. <style scoped lang="scss">
  67. .container{
  68. position: relative;
  69. .bg{
  70. width: 100%;
  71. height: 380rpx;
  72. position: absolute;
  73. top: 0;
  74. left: 0;
  75. z-index: -1;
  76. }
  77. }
  78. .content{
  79. padding-top: calc(var(--status-bar-height) + 140rpx);
  80. height: 100vh;
  81. box-sizing: border-box;
  82. width: 100%;
  83. .healthlist{
  84. width: 85%;
  85. padding: 32rpx;
  86. margin: 0 auto;
  87. background: #FFFFFF;
  88. box-shadow: 0rpx 0rpx 20rpx 8rpx rgba(0,143,211,0.1);
  89. border-radius: 16rpx;
  90. margin-bottom: 20rpx !important;
  91. }
  92. }
  93. .healthbox{
  94. width: 200rpx;
  95. height: 72rpx;
  96. background: linear-gradient( 180deg, #27B7FB 0%, #008FD3 100%);
  97. box-shadow: 0rpx 8rpx 8rpx 0rpx rgba(0,143,211,0.2);
  98. border-radius: 36rpx 36rpx 36rpx 36rpx;
  99. text-align: center;
  100. line-height: 72rpx;
  101. color: #FFFFFF;
  102. }
  103. </style>