news.vue 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295
  1. <template>
  2. <view class="page">
  3. <view class="box" v-for="(item,index) in dataList" :key="index">
  4. <view class="main-between cross-center header">
  5. <!-- <view class="cross-center head t-omit" :class="{'border_bottom':true}">
  6. <image src="https://t17.9026.com/web/statics/image/sale/1.png" mode=""></image>
  7. 周先生
  8. </view> -->
  9. <view class="cross-center head1">
  10. <image src="../../../static/image/index/msg.png" mode=""></image>
  11. 客户楼盘绑定通知
  12. </view>
  13. <view class="main-between cross-center" @click="del_msg(item.id,index)">
  14. <!-- <view class="date">2021-11-17</view> -->
  15. <image class="del" src="https://t17.9026.com/web/statics/image/user-center/del.png" mode=""></image>
  16. </view>
  17. </view>
  18. <view class="center">
  19. <!-- <view class="main-between cross-center">
  20. <view class="title">整体评价</view>
  21. <view class="isopen cross-center">
  22. 展开
  23. <image src="https://t17.9026.com/web/statics/image/user-center/arrow-bottom.png" mode=""></image>
  24. </view>
  25. </view> -->
  26. <view class="center-text">{{item.message}}</view>
  27. <!-- 客户xxxx向您发起了楼盘xxxx的认证通知,请前往我的-我的客户查看并处理 -->
  28. <!-- <view class="center-img">
  29. <image v-for="(item, index) in 5" :key="index" src="https://t17.9026.com/web/statics/image/user-center/1.png" mode=""></image>
  30. </view>
  31. <view class="main-between goods">
  32. <view class="main-left desc">
  33. <image class="goods-img" src="https://t17.9026.com/web/statics/image/user-center/1.png" mode=""></image>
  34. <view>
  35. <view class="title">兴城人居ins居家占位套餐</view>
  36. <view class="price">
  37. <text class="company">¥</text>
  38. 2466.00
  39. </view>
  40. </view>
  41. </view>
  42. <view class="isopen cross-center">
  43. 收起
  44. <image src="https://t17.9026.com/web/statics/image/user-center/arrow-top.png" mode=""></image>
  45. </view>
  46. </view> -->
  47. </view>
  48. <view class="main-between footer cross-center border_top">
  49. <view class="left">查看详情</view>
  50. <image style="width: 12rpx;height: 22rpx;" src="https://t17.9026.com/web/statics/image/index/arrow-right-gray.png"
  51. mode="" ></image>
  52. </view>
  53. </view>
  54. <view class="no-more" v-if="noMore && dataList.length>0">没有更多了...</view>
  55. </view>
  56. </template>
  57. <script>
  58. export default {
  59. data() {
  60. return {
  61. page:1,
  62. dataList:[],
  63. noMore:false
  64. };
  65. },
  66. onLoad() {
  67. this.getMessageList()
  68. },
  69. onReachBottom() {
  70. if(!this.noMore){
  71. this.page++
  72. this.getMessageList()
  73. }
  74. },
  75. methods:{
  76. getMessageList(){
  77. this.$request({
  78. url:this.$api.sale.message_list,
  79. data:{
  80. page:this.page
  81. },
  82. method:'post'
  83. }).then(res=>{
  84. if(res.code===0){
  85. if(this.page===1){
  86. this.dataList=res.data.list
  87. }else{
  88. this.dataList=this.dataList(res.data.list)
  89. }
  90. if(res.data.list.length<20){
  91. this.noMore=true
  92. }
  93. }
  94. })
  95. },
  96. del_msg(id,index){
  97. uni.showModal({
  98. title: '提示',
  99. content: '确定删除该条消息吗',
  100. success:(qq)=> {
  101. if (qq.confirm) {
  102. this.$request({
  103. url:this.$api.sale.message_delete,
  104. data:{
  105. message_id:id
  106. },
  107. method:'post'
  108. }).then(res=>{
  109. if(res.code===0){
  110. this.dataList.splice(index,1)
  111. }
  112. })
  113. } else if (qq.cancel) {
  114. console.log('用户点击取消');
  115. }
  116. }
  117. });
  118. }
  119. }
  120. };
  121. </script>
  122. <style lang="scss" scoped>
  123. .page {
  124. padding-top: 22rpx;
  125. background: #f6f6f6;
  126. }
  127. .box {
  128. width: 678rpx;
  129. height: auto;
  130. background: #ffffff;
  131. border-radius: 6rpx;
  132. padding: 26rpx 31rpx;
  133. margin: 0 auto 20rpx;
  134. .border_bottom {
  135. border-bottom: 1px solid #eaeaea;
  136. }
  137. .border_top {
  138. border-top: 1px solid #eaeaea;
  139. }
  140. .header {
  141. padding-bottom: 21rpx;
  142. .head {
  143. max-width: 500rpx;
  144. height: 48rpx;
  145. background: #f6f6f6;
  146. border-radius: 24rpx;
  147. padding: 0 17rpx;
  148. overflow: hidden;
  149. image {
  150. width: 32rpx;
  151. height: 32rpx;
  152. margin-right: 14rpx;
  153. border-radius: 50%;
  154. }
  155. font-size: 24rpx;
  156. font-weight: 500;
  157. color: #666666;
  158. }
  159. .head1 {
  160. max-width: 500rpx;
  161. height: 48rpx;
  162. overflow: hidden;
  163. image {
  164. width: 45rpx;
  165. height: 45rpx;
  166. margin-right: 14rpx;
  167. border-radius: 50%;
  168. }
  169. font-size: 30rpx;
  170. font-weight: bold;
  171. color: #222222;
  172. }
  173. .date {
  174. font-size: 22rpx;
  175. font-weight: 500;
  176. color: #222222;
  177. margin-right: 30rpx;
  178. }
  179. .del {
  180. width: 36rpx;
  181. height: 36rpx;
  182. }
  183. }
  184. .center {
  185. padding: 0 0 10rpx;
  186. .title {
  187. font-size: 30rpx;
  188. font-weight: bold;
  189. color: #222222;
  190. }
  191. .isopen {
  192. font-size: 24rpx;
  193. font-weight: bold;
  194. color: #a18353;
  195. image {
  196. width: 19rpx;
  197. height: 12rpx;
  198. margin-left: 8rpx;
  199. }
  200. }
  201. .center-text {
  202. margin-top: 20rpx;
  203. font-size: 24rpx;
  204. font-weight: 500;
  205. color: #999999;
  206. line-height: 34rpx;
  207. }
  208. .center-img {
  209. margin-top: 28rpx;
  210. image {
  211. width: 146rpx;
  212. height: 96rpx;
  213. border-radius: 12rpx;
  214. margin-right: 15rpx;
  215. }
  216. }
  217. .goods {
  218. padding-top: 42rpx;
  219. border-top: 1rpx solid #EAEAEA;
  220. .desc {
  221. width: 511rpx;
  222. height: 141rpx;
  223. background: #F8F8F8;
  224. border-radius: 6rpx;
  225. padding: 18rpx 24rpx;
  226. .goods-img {
  227. width: 101rpx;
  228. height: 99rpx;
  229. border-radius: 8rpx;
  230. margin-right: 21rpx;
  231. }
  232. .title {
  233. font-size: 26rpx;
  234. font-weight: 500;
  235. color: #222222;
  236. line-height: 46rpx;
  237. }
  238. .price {
  239. font-size: 24rpx;
  240. font-weight: 500;
  241. color: #FC3737;
  242. line-height: 36rpx;
  243. .company {}
  244. }
  245. }
  246. }
  247. }
  248. .footer {
  249. padding: 28rpx 0 0;
  250. .left {
  251. font-size: 28rpx;
  252. font-weight: 500;
  253. color: #666666;
  254. }
  255. }
  256. }
  257. .no-more {
  258. font-size: 24rpx;
  259. font-weight: 500;
  260. color: #666666;
  261. margin-top: 37rpx;
  262. text-align: center;
  263. }
  264. </style>