index.vue 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  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" v-if="house">{{house.communityName}}{{house.detailedAddress}}</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. house:this.$store.state.user.house,
  41. nvaHeight:44,
  42. list:[],
  43. pageSize: 10,
  44. pageNum: 1,
  45. reachflag: true,
  46. wtdt:'',
  47. }
  48. },
  49. onLoad: function() {
  50. uni.getSystemInfo({
  51. success: (e) => {
  52. this.nvaHeight = Number(e.statusBarHeight)+44;
  53. }
  54. })
  55. },
  56. onPageScroll(e) {
  57. var scrollTop = Number(e.scrollTop);
  58. if (scrollTop > 0) {
  59. this.backgroundColor = '#CCDDFF'
  60. } else {
  61. this.backgroundColor = 'transparent'
  62. }
  63. },
  64. methods:{
  65. checkPermi, checkRole,
  66. getAddFn(){
  67. this.$tab.navigateTo("/work/pages/visitor/vadd")
  68. },
  69. getListFn(){
  70. this.$tab.navigateTo("/work/pages/visitor/vlist")
  71. },
  72. getBackFn(){
  73. uni.navigateBack({
  74. delta:1
  75. })
  76. },
  77. getDataFn(){
  78. return
  79. var params={
  80. pageSize:this.pageSize,
  81. pageNum: this.pageNum,
  82. }
  83. params.noticeType=this.tabidx
  84. getNoticeList(params).then(res=>{
  85. if(res.code==200){
  86. }else{
  87. this.$toast(res.msg)
  88. }
  89. })
  90. },
  91. }
  92. }
  93. </script>
  94. <style lang="scss" scoped>
  95. .navbox{position: fixed;left: 0;right: 0;top: 0;z-index: 4; }
  96. .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;
  97. .houtop{padding: 20rpx 4rpx 0 4rpx;height:520rpx;box-sizing: border-box;margin-bottom: 160rpx;position: relative;
  98. .tit{font-size: 36rpx;font-weight: bold;color: #272727;}
  99. .txt{font-size: 26rpx;color: #272727;}
  100. .tita{min-width: 86rpx;font-weight: 500;margin-left: 26rpx;font-size: 24rpx;color: #0156FE;height: 36rpx;border-radius: 18rpx;border: 2rpx solid #0156FE;}
  101. .houseimg{width: 596rpx;height:244rpx;position: absolute;bottom: 0;right: -58rpx;}
  102. .tbtns{font-weight: 500;font-size: 26rpx;color: #0256FD;
  103. image{width: 20rpx;height: 16rpx;margin-left: 10rpx;}
  104. }
  105. }
  106. .tips{font-weight: 500;text-align: center;margin-top: 26rpx;font-size: 22rpx;color: #0256FD;}
  107. .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;
  108. &.bga{background: #0256FD;}
  109. &.bgb{background: #45CB99;}
  110. }
  111. .hfbox{font-weight: 500;text-align: center;font-size: 24rpx;color: #AAAAAA;margin-top: 40rpx;}
  112. }
  113. </style>