You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

138 lines
2.6 KiB

4 months ago
3 months ago
4 months ago
4 months ago
4 months ago
3 months ago
4 months ago
4 months ago
4 months ago
3 months ago
4 months ago
3 months ago
4 months ago
4 months ago
3 months ago
4 months ago
  1. <template>
  2. <view class="ul">
  3. <view class="li flex-b" v-for="(item,index) in list" :key="index" @click="goDetail(item)">
  4. <view class="leftTxt">
  5. <view class="tit towRowText">
  6. {{ item.title }}
  7. </view>
  8. <view class="date">{{item.timeDesc }}</view>
  9. </view>
  10. <view class="cover">
  11. <image :src="item.picture" mode=""></image>
  12. </view>
  13. </view>
  14. <up-popup :show="showPop" @close="showPop=false" mode="center" :round="10" :customStyle="{width: '90%'}" closeable>
  15. <view class="popCon">
  16. <view class="hello">你好</view>
  17. <view class="p">
  18. 欢迎来到 <text>新疆首府公馆</text>为了更好的为您提供服务请您选择房屋信息进行业主身份认证
  19. </view>
  20. <oneBtn text="点击认证业主" @oneBtnClick="oneBtnClickFn"></oneBtn>
  21. </view>
  22. </up-popup>
  23. </view>
  24. </template>
  25. <script setup>
  26. import { ref } from 'vue'
  27. import {
  28. userStore
  29. } from '@/store/index.js';
  30. const counterStore = userStore();
  31. import {
  32. getHouses,
  33. } from '@/config/api.js'
  34. defineProps({
  35. list: {
  36. type: Array,
  37. default: []
  38. }
  39. })
  40. const showPop = ref(false)
  41. function goDetail(item) {
  42. if(!counterStore.userInfo.myHouse) {
  43. getHousesFn()
  44. }
  45. uni.navigateTo({
  46. url: '/pages/subPage/notice/noticeDetail?id='+item.id
  47. })
  48. }
  49. function oneBtnClickFn () {
  50. showPop.value = false
  51. uni.navigateTo({
  52. url: '/pages/subPage/authentication/authentication'
  53. })
  54. }
  55. // 我的房子
  56. async function getHousesFn() {
  57. if (!counterStore.token) {
  58. uni.navigateTo({
  59. url: '/pages/subPage/login/login'
  60. })
  61. return
  62. }
  63. const {
  64. data: res
  65. } = await getHouses()
  66. if(!res.length) {
  67. return showPop.value = true
  68. }
  69. counterStore.upDateUseInfo('myHouse', res)
  70. }
  71. </script>
  72. <style lang="scss" scoped>
  73. .ul {
  74. width: 100%;
  75. .li {
  76. width: 100%;
  77. padding: 30rpx 0;
  78. border-bottom: 1px solid #EFEFEF;
  79. &:last-child {
  80. border-bottom: none;
  81. }
  82. .leftTxt {
  83. padding-right: 80rpx;
  84. width: 0;
  85. flex: 1;
  86. .tit.towRowText {
  87. font-size: 28rpx;
  88. color: #343434;
  89. font-weight: bold;
  90. }
  91. .date {
  92. font-size: 28rpx;
  93. color: #999999;
  94. margin-top: 40rpx;
  95. }
  96. }
  97. .cover {
  98. width: 210rpx;
  99. height: 150rpx;
  100. background: #EFEFEF;
  101. border-radius: 12rpx;
  102. overflow: hidden;
  103. image {
  104. display: block;
  105. width: 100%;
  106. height: 100%;
  107. }
  108. }
  109. }
  110. }
  111. .popCon {
  112. padding: 60rpx 40rpx;
  113. color: #333;
  114. .hello {
  115. font-size: 36rpx;
  116. font-weight: 700;
  117. }
  118. .p {
  119. font-size: 28rpx;
  120. padding: 30rpx 0 60rpx 0;
  121. text {
  122. color: $themC;
  123. }
  124. }
  125. }
  126. </style>