index.vue 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  1. <template>
  2. <view class="house" :style="'padding-top:'+nvaHeight+'px;'">
  3. <view class="flex1">
  4. <view class="navbox">
  5. <uni-nav-bar color="#272727" left-icon="left" @clickLeft="getBackFn" :background-color="backgroundColor" :border="false" statusBar='true' fixed="true">
  6. </uni-nav-bar>
  7. </view>
  8. <view class="houtop">
  9. <!-- 有 -->
  10. <view class="flexc mb10">
  11. <view class="tit flex1">访客邀请</view>
  12. <view class="tbtns flex0 flexc" @click="getListFn">访客记录
  13. <image :src="more"></image>
  14. </view>
  15. </view>
  16. <view class="txt mb10 fw5">幸福大街幸福小区1号楼3单元1101</view>
  17. <view class="txt">open the door</view>
  18. <image :src="visbg" class="houseimg"></image>
  19. </view>
  20. <view class="hbtns bgb mb18" @click="getAddFn">邀请访客</view>
  21. <view class="hbtns bga ">一键开门</view>
  22. <view class="tips">温馨提示:一键开门只针对已录入的本单元门栋大门</view>
  23. </view>
  24. <view class="hfbox">还未录入门洞信息?<text class="co025 tdu">去录入</text></view>
  25. <loading></loading>
  26. </view>
  27. </template>
  28. <script>
  29. import config from '@/config'
  30. const baseUrl = config.baseUrl
  31. import { checkPermi, checkRole } from "@/utils/permission"; // 权限判断函数
  32. export default{
  33. components:{},
  34. data(){
  35. return{
  36. visbg:require('@/work/static/visitor/visbg.png'),
  37. more:require("@/work/static/visitor/more.png"),
  38. // adrs:require('@/mine/static/house/adrs.png'),
  39. backgroundColor: "transparent",
  40. nvaHeight:44,
  41. list:[{tit:'123'}],
  42. pageSize: 10,
  43. pageNum: 1,
  44. reachflag: true,
  45. wtdt:'',
  46. }
  47. },
  48. onLoad: function() {
  49. uni.getSystemInfo({
  50. success: (e) => {
  51. this.nvaHeight = Number(e.statusBarHeight)+44;
  52. }
  53. })
  54. },
  55. onPageScroll(e) {
  56. var scrollTop = Number(e.scrollTop);
  57. if (scrollTop > 0) {
  58. this.backgroundColor = '#CCDDFF'
  59. } else {
  60. this.backgroundColor = 'transparent'
  61. }
  62. },
  63. methods:{
  64. checkPermi, checkRole,
  65. getAddFn(){
  66. this.$tab.navigateTo("/work/pages/visitor/vadd")
  67. },
  68. getListFn(){
  69. this.$tab.navigateTo("/work/pages/visitor/vlist")
  70. },
  71. getBackFn(){
  72. uni.navigateBack({
  73. delta:1
  74. })
  75. },
  76. getDataFn(){
  77. return
  78. var params={
  79. pageSize:this.pageSize,
  80. pageNum: this.pageNum,
  81. }
  82. params.noticeType=this.tabidx
  83. getNoticeList(params).then(res=>{
  84. if(res.code==200){
  85. }else{
  86. this.$toast(res.msg)
  87. }
  88. })
  89. },
  90. }
  91. }
  92. </script>
  93. <style lang="scss" scoped>
  94. .navbox{position: fixed;left: 0;right: 0;top: 0;z-index: 4; }
  95. .house{min-height: 100vh;background: linear-gradient(180deg, #CDDDFF 0%, rgba(255,255,255,0) 100%) no-repeat;background-size: 100% 578rpx;padding: 0 54rpx 100rpx;display: flex;flex-direction: column;
  96. .houtop{padding: 20rpx 4rpx 0 4rpx;height:520rpx;box-sizing: border-box;margin-bottom: 160rpx;position: relative;
  97. .tit{font-size: 36rpx;font-weight: bold;color: #272727;}
  98. .txt{font-size: 26rpx;color: #272727;}
  99. .tita{min-width: 86rpx;font-weight: 500;margin-left: 26rpx;font-size: 24rpx;color: #0156FE;height: 36rpx;border-radius: 18rpx;border: 2rpx solid #0156FE;}
  100. .houseimg{width: 596rpx;height:244rpx;position: absolute;bottom: 0;right: -58rpx;}
  101. .tbtns{font-weight: 500;font-size: 26rpx;color: #0256FD;
  102. image{width: 20rpx;height: 16rpx;margin-left: 10rpx;}
  103. }
  104. }
  105. .tips{font-weight: 500;text-align: center;margin-top: 26rpx;font-size: 22rpx;color: #0256FD;}
  106. .hbtns{font-weight: bold;display: flex;align-items: center;justify-content: center;font-size: 26rpx;height: 88rpx;border-radius: 44rpx;box-sizing: border-box;color: #FFFFFF;
  107. &.bga{background: #0256FD;}
  108. &.bgb{background: #45CB99;}
  109. }
  110. .hfbox{font-weight: 500;text-align: center;font-size: 24rpx;color: #AAAAAA;margin-top: 40rpx;}
  111. }
  112. </style>