index.vue 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452
  1. <template>
  2. <view class="home" :style="'padding-top:'+nvaHeight+'px;'">
  3. <view class="navbox">
  4. <uni-nav-bar color="#ffffff" leftWidth='400rpx' :background-color="backgroundColor" :border="false" statusBar='true' fixed="true">
  5. <block slot="left">
  6. <view class="topl flexc">
  7. <image :src="adrimg" ></image>
  8. <view class="over">{{city}}</view>
  9. </view>
  10. </block>
  11. </uni-nav-bar>
  12. </view>
  13. <!-- 主体 -->
  14. <!-- <image :src="navbg" class="navbg"></image> -->
  15. <view class="wymain">
  16. <view class="adrbox">
  17. <view class="flexc mb14">
  18. <image :src="adraimg" class="adr"></image>
  19. <view class="adrtit">智慧<text>社区</text></view>
  20. </view>
  21. <view class="adrtxt flexc mb4">
  22. <view class="over">嗨~{{nickName}}!</view><text>业主</text>
  23. </view>
  24. <view class="adrtip" v-if="houselist&&houselist.length">{{houselist[0].communityName}}{{houselist[0].detailedAddress}}</view>
  25. <image :src="adrbgimg" class="adrbgimg"></image>
  26. </view>
  27. <!-- 轮播图 -->
  28. <swiper class="swiper mb12" circular :indicator-color="incolorh" :indicator-active-color="activecolorh" :indicator-dots="indicatorDotsh" :autoplay="autoplayh">
  29. <!-- v-if="checkPermi(['system:application:list'])" -->
  30. <swiper-item>
  31. <view class="grid">
  32. <view class="grid-item-box" @click="getHouseFn" >
  33. <view class="img"><image :src="htabi" class="imgf"></image></view>
  34. <view>我的房屋<text class="co05">(
  35. <block v-if="count.houseCount>98">99+</block>
  36. <block v-else>{{count.houseCount||0}}</block>
  37. )</text></view>
  38. </view>
  39. <view class="grid-item-box" @click="getCarFn" >
  40. <view class="img"><image :src="htabj" class="imgg"></image></view>
  41. <view>我的车辆<text class="co05">(
  42. <block v-if="count.carCount>98">99+</block>
  43. <block v-else>{{count.carCount||0}}</block>
  44. )</text></view>
  45. </view>
  46. <view class="grid-item-box" @click="getWarrantyFn" >
  47. <view class="img"><image :src="htabb" class="imga"></image></view>
  48. <view>物业报修
  49. <view class="cir">
  50. <block v-if="count.propertyRepair>98">99+</block>
  51. <block v-else>{{count.propertyRepair||0}}</block>
  52. </view>
  53. </view>
  54. </view>
  55. <view class="grid-item-box" @click="getNewsFn" >
  56. <view class="img"><image :src="htabd" class="imgb"></image></view>
  57. <view>社区资讯<view class="cir">
  58. <block v-if="count.commentInteractionUserCount>98">99+</block>
  59. <block v-else>{{count.commentInteractionUserCount||0}}</block>
  60. </view></view>
  61. <!-- <view class="flexcw">
  62. <view class="txt">点赞<text class="co05 mr2">(5)</text></view>
  63. <view class="txt">评论<text class="co05">(12)</text></view>
  64. </view> -->
  65. <view class="txt">点赞<text class="co05 mr2">(
  66. <block v-if="count.likeCount>98">99+</block>
  67. <block v-else>{{count.likeCount||0}}</block>
  68. )</text>评论<text class="co05">(
  69. <block v-if="count.contentCount>98">99+</block>
  70. <block v-else>{{count.contentCount||0}}</block>
  71. )</text></view>
  72. </view>
  73. <view class="grid-item-box" @click="getNewsDjFn" >
  74. <view class="img"><image :src="htabe" class="imgc"></image></view>
  75. <view>党建资讯</view>
  76. </view>
  77. <view class="grid-item-box" @click="getComplaintFn" >
  78. <view class="img"><image :src="htabf" class="imgd"></image></view>
  79. <view>投诉建议<view class="cir">
  80. <block v-if="count.complaintSuggestion>98">99+</block>
  81. <block v-else>{{count.complaintSuggestion||0}}</block>
  82. </view></view>
  83. </view>
  84. <view class="grid-item-box" @click="getVisitorFn" >
  85. <view class="img"><image :src="htabg" class="imge"></image></view>
  86. <view>访客邀请</view>
  87. </view>
  88. <view class="grid-item-box" @click="getWygjFn" >
  89. <view class="img"><image :src="htabh" class="imga"></image></view>
  90. <view>联系管家</view>
  91. </view>
  92. </view>
  93. </swiper-item>
  94. <swiper-item>
  95. <view class="grid">
  96. <view class="grid-item-box" @click="getClearFn" >
  97. <view class="img"><image :src="htaba" class="imga"></image></view>
  98. <view>家政服务</view>
  99. </view>
  100. <view class="grid-item-box" @click="getBusListFn(1)" >
  101. <view class="img"><image :src="htabc" class="imgb"></image></view>
  102. <view>供求资讯</view>
  103. </view>
  104. <view class="grid-item-box" @click="getMoneyFn" >
  105. <view class="img"><image :src="htabk" class="imgh"></image></view>
  106. <view>物业缴费</view>
  107. </view>
  108. <view class="grid-item-box" @click="getBusListFn(1)" >
  109. <view class="img"><image :src="htabl" class="imga"></image></view>
  110. <view>敬请期待</view>
  111. </view>
  112. </view>
  113. </swiper-item>
  114. </swiper>
  115. <!-- 消息 -->
  116. <view class="mb12">
  117. <notice :noticelist='noticelist' :activeColor="activeColor" :nactiveColor="nactiveColor" @getNoticeDet="getNoticeDet"></notice>
  118. </view>
  119. <view class="mb18 flexc">
  120. <view class="cbgs mr12">
  121. <image :src="cbga"></image>
  122. <view class="cbga">
  123. <view class="tit">空闲充电桩</view>
  124. <view class="txt">37</view>
  125. </view>
  126. </view>
  127. <view class="cbgs">
  128. <image :src="cbgb"></image>
  129. <view class="cbga">
  130. <view class="tita">剩余停车位</view>
  131. <view class="txta">37</view>
  132. </view>
  133. </view>
  134. </view>
  135. <!-- 我的快递 -->
  136. <view class="hlist">
  137. <view class="hlista flexc mb6">
  138. <image :src="lista" class="limg flex0"></image>
  139. <view class="tit flex1">我的快递</view>
  140. <view class="more flex0 flexc" @click="getKdFn">更多<image :src="more"></image></view>
  141. </view>
  142. <box-list :datainfo="list" type="delivery"></box-list>
  143. </view>
  144. </view>
  145. <!-- 今日优惠 -->
  146. <view class="hlist plr12">
  147. <view class="hlista flexc mb10 ">
  148. <image :src="listb" class="limg flex0"></image>
  149. <view class="tit flex1">今日优惠</view>
  150. <view class="more flex0 flexc">更多<image :src="more"></image></view>
  151. </view>
  152. </view>
  153. <view class="mb4">
  154. <box-list type='coupon' :datainfo="list"></box-list>
  155. </view>
  156. <view class="wymain">
  157. <!-- 本地资讯 -->
  158. <view class="hlist">
  159. <view class="hlista flexc" style="padding-bottom: 0;">
  160. <image :src="listc" class="limg flex0"></image>
  161. <view class="htabs flexc">
  162. <view :class="tabval==ite.val?'act':''" v-for="(ite,idx) in tablist" :key="idx">{{ite.tit}}</view>
  163. </view>
  164. <view class="more flex0 flexc">更多<image :src="more"></image></view>
  165. </view>
  166. <box-list :datainfo="list" :wtdt="wtdt" type="news"></box-list>
  167. </view>
  168. </view>
  169. <loading></loading>
  170. <pop-up :type="type" @getClose="getClose" :phoneList="phoneList" :initFace='initFace' @getXxwsFn="getXxwsFn"></pop-up>
  171. <footers v-if="isfootflag" :footerindex="footerindex"></footers>
  172. </view>
  173. </template>
  174. <script>
  175. import footers from '@/components/footer/footer.vue'
  176. import notice from '@/components/swiper/notice.vue'
  177. import boxList from "@/components/box/list.vue"
  178. import popUp from "@/components/box/popup.vue"
  179. import {houseInfoList} from "@/api/work/work.js"
  180. import {gesettingsList,getCount} from "@/api/work/index.js"
  181. import {newsList} from "@/api/work/manage.js"
  182. import self from '@/utils/location.js';
  183. import store from "@/store"
  184. export default {
  185. components:{footers,notice,boxList,popUp},
  186. data(){
  187. return{
  188. footerindex:'home',
  189. isfootflag:true,
  190. nvaHeight:44,
  191. activeColor:'#A7A7A7',
  192. nactiveColor:'#E6E6E6',
  193. backgroundColor: "transparent",
  194. navbg:require("@/static/images/navbg.png"),
  195. adrimg:require("@/static/images/home/adr.png"),
  196. adraimg:require("@/static/images/home/adra.png"),
  197. adrbgimg:require("@/static/images/home/adrbg.png"),
  198. htaba:require("@/static/images/home/htaba.png"),
  199. htabb:require("@/static/images/home/htabb.png"),
  200. htabc:require("@/static/images/home/htabc.png"),
  201. htabd:require("@/static/images/home/htabd.png"),
  202. htabe:require("@/static/images/home/htabe.png"),
  203. htabf:require("@/static/images/home/htabf.png"),
  204. htabg:require("@/static/images/home/htabg.png"),
  205. htabh:require("@/static/images/home/htabh.png"),
  206. htabi:require("@/static/images/home/htabi.png"),
  207. htabj:require("@/static/images/home/htabj.png"),
  208. htabk:require("@/static/images/home/htabk.png"),
  209. htabl:require("@/static/images/home/htabl.png"),
  210. cbga:require("@/static/images/home/cbga.png"),
  211. cbgb:require("@/static/images/home/cbgb.png"),
  212. lista:require("@/static/images/home/lista.png"),
  213. listb:require("@/static/images/home/listb.png"),
  214. listc:require("@/static/images/home/listc.png"),
  215. more:require("@/static/images/home/more.png"),
  216. initFace:'N',//initFace Y需要,N不需要人脸认证
  217. type:'',//wygj
  218. wtdt:"加载更多",
  219. yhbg:require("@/static/images/home/yhbg.png"),
  220. eye:require("@/static/images/home/eye.png"),
  221. autoplay:false,
  222. autoplayh:false,
  223. incolorh:'#E6E6E6',
  224. activecolorh:'#A7A7A7',
  225. indicatorDotsh: true,
  226. city:'合肥市',
  227. list:[{tit:'123'},{tit:'123'},{tit:'123'}],
  228. userId:this.$store.state.user.userId,
  229. nickName:this.$store.state.user.nickName,
  230. phonenumber:this.$store.state.user.phonenumber,
  231. // avatar:this.$store.state.user.avatar,
  232. tabval:0,
  233. houselist:[],
  234. phoneList:[],
  235. tablist:[{tit:'本地资讯',val:"0"},{tit:'供求资讯',val:"1"},{tit:'热门资讯',val:"2"}],
  236. count:'',//统计
  237. noticelist:[]
  238. }
  239. },
  240. onPageScroll(e) {
  241. var scrollTop = Number(e.scrollTop);
  242. if (scrollTop > 0) {
  243. this.backgroundColor = '#FFF7E1'
  244. } else {
  245. this.backgroundColor = 'transparent'
  246. }
  247. },
  248. onLoad: function() {
  249. // 登录提示去除,登录页面,验证码不要,微信支付宝登录,快递,我的车辆,,
  250. //房屋:房产证分开,我的房本 。物业报修:标题不要,报修门户,不是必填。联系方式:默认自己的。 列表查看详情,列表状态加个进度条,详情东西都在列表页展示,,类似快递形式,报修加评论。社区资讯:发表评论框小了,抄头条。访客,来访人数,5人以上,1,23456789,样式修改。来访时间,当前时间,来访事由,选择,来访门户,默认,,有驾车,在车牌号,手机号放上面,常用访客:家人信息。投诉建议和报修一样,交流回复。管家电话:点击s可以打,
  251. //物管端 今日统计可以打开点击,,外来车辆登记,临停,,人员面貌,群众,党员,,评论审核,不用二次确认框,
  252. var that=this;
  253. uni.getSystemInfo({
  254. success: (e) => {
  255. this.nvaHeight = Number(e.statusBarHeight)+44;
  256. }
  257. })
  258. // 获取房子
  259. this.getDataFn()
  260. this.gesettingsList()
  261. this.getCount()
  262. this.newsList();
  263. // #ifndef H5
  264. self.getLocation(function(res){
  265. if(res==-1){
  266. }else{
  267. that.city=res.city;
  268. }
  269. })
  270. // #endif
  271. },
  272. methods:{
  273. getDataFn(){
  274. var params={
  275. userId:this.userId,
  276. pageSize:5,
  277. pageNum: 1,
  278. }
  279. houseInfoList(params).then(res=>{
  280. if(res.code==200){
  281. this.houselist = JSON.parse(JSON.stringify(res.rows));
  282. if(res.rows&&res.rows.length){
  283. var info=res.rows[0];
  284. var obj={
  285. houseId:info.houseId,
  286. communityName:info.communityName,
  287. detailedAddress:info.detailedAddress,
  288. }
  289. store.commit('SET_HOUSE', obj)
  290. }
  291. }else{
  292. this.$toast(res.msg)
  293. }
  294. })
  295. },
  296. newsList(){
  297. var params={
  298. pageSize:10,
  299. pageNum: 1,
  300. status:1,
  301. }
  302. newsList(params).then(res=>{
  303. if(res.code==200){
  304. this.noticelist = res.rows;
  305. }else{
  306. this.$toast(res.msg)
  307. }
  308. })
  309. },
  310. getBusListFn(){
  311. },
  312. getCount(){
  313. var params={
  314. userId:this.userId,
  315. residentPhone:this.phonenumber
  316. }
  317. getCount(params).then(res => {
  318. if(res.code==200){
  319. this.count=res.data;
  320. }
  321. })
  322. },
  323. gesettingsList(){
  324. gesettingsList().then(res=>{
  325. if(res.code==200){
  326. this.phoneList=res.rows
  327. }
  328. })
  329. },
  330. getClose(){
  331. this.type='';
  332. this.initFace='N';
  333. },
  334. getXxwsFn(){
  335. this.$tab.navigateTo(`/mine/pages/house/addhouse`)
  336. },
  337. getNoticeDet(id){
  338. this.$tab.navigateTo(`/news/pages/news/detail?id=${id}`)
  339. },
  340. getZhanFn(){
  341. this.zhanflag=!this.zhanflag
  342. },
  343. getClearFn(){//家政服务
  344. this.$tab.navigateTo(`/work/pages/clean/index`)
  345. },
  346. getWarrantyFn(){//物业报修
  347. this.$tab.navigateTo(`/work/pages/service/warranty`)
  348. },
  349. getHouseFn(){//我的房屋
  350. this.$tab.navigateTo(`/mine/pages/house/index`)
  351. },
  352. getCarFn(){//我的车辆
  353. this.$tab.navigateTo(`/mine/pages/car/index`)
  354. },
  355. getMoneyFn(){//物业缴费
  356. this.$tab.navigateTo(`/work/pages/manage/index`)
  357. },
  358. getVisitorFn(){//访客邀请
  359. this.$tab.navigateTo(`/work/pages/visitor/index`)
  360. },
  361. getNewsFn(){//社区资讯
  362. this.$tab.navigateTo(`/news/pages/news/newssq`)
  363. },
  364. getNewsDjFn(){//党建资讯
  365. this.$tab.navigateTo(`/news/pages/news/newsdj`)
  366. },
  367. getComplaintFn(){//投诉建议
  368. this.$tab.navigateTo(`/news/pages/complaint/index`)
  369. },
  370. getKdFn(){//我的快递
  371. this.$tab.navigateTo(`/mine/pages/delivery/index`)
  372. },
  373. getWygjFn(){//物业管家
  374. this.type='wygj'
  375. }
  376. }
  377. }
  378. </script>
  379. <style lang="scss" scoped>
  380. .home{min-height: 100vh;background: linear-gradient(180deg, #FFF7E1 0%, rgba(255,255,255,0) 100%) no-repeat;background-size: 100% 782rpx;}
  381. .navbox{position: fixed;left: 0;right: 0;top: 0;z-index: 4; }
  382. .navbg{width: 100%;height: 782rpx;}
  383. .wymain{z-index: 2;position: relative;padding: 0 24rpx;}
  384. .topl{overflow: hidden;padding-left: 16rpx;
  385. image{width: 18rpx;height: 22rpx;margin-right: 14rpx;flex: 0 0 auto;}
  386. view{font-weight: bold;font-size: 26rpx;color: #272727;}
  387. }
  388. .adrbox{position: relative;padding:8rpx 260rpx 16rpx 36rpx;margin-bottom: 28rpx;
  389. .adr{width: 36rpx;height: 34rpx;margin-right: 14rpx;}
  390. .adrtit{font-size: 17px;color: #272727;font-weight: bold;
  391. text{color: #E99D4F;}
  392. }
  393. .adrtxt{font-size: 16px;color: #272727;font-weight: bold;
  394. text{font-size: 10px;color: #E99D4F;display: inline-flex;background: rgba(233, 157, 79, 0.3);margin-left: 22rpx;min-width: 66rpx;height: 30rpx;padding: 0 14rpx;box-sizing: border-box;flex: 0 0 auto;border-radius: 8px;align-items: center;justify-content: center;}
  395. }
  396. .adrtip{font-weight: 500;font-size: 24rpx;color: #828282;}
  397. .adrbgimg{width: 262rpx;height: 242rpx;position: absolute;right: 0rpx;top: -54rpx;}
  398. }
  399. // tab栏
  400. .grid{
  401. display: flex;align-items: center;flex-wrap: wrap;
  402. .grid-item-box {display: flex;flex-direction: column;align-items: center;width: 25%;box-sizing: border-box;height: 152rpx;
  403. .img{width: 50rpx;height: 50rpx;display: flex;align-items: center;justify-content: center;margin-bottom: 20rpx;
  404. .imga{width: 48rpx;height: 44rpx;}
  405. .imgb{width: 42rpx;height: 42rpx;}
  406. .imgc{width: 44rpx;height: 48rpx;}
  407. .imgd{width: 46rpx;height: 38rpx;}
  408. .imge{width: 40rpx;height: 50rpx;}
  409. .imgf{width: 48rpx;height: 50rpx;}
  410. .imgg{width: 48rpx;height: 40rpx;}
  411. .imgh{width: 44rpx;height: 46rpx;}
  412. }
  413. view{font-weight: bold;font-size: 26rpx;color: #272727;position: relative;
  414. .cir{width: 20rpx;height: 20rpx;background: #D32C26;border-radius: 10rpx;font-weight: bold;font-size: 16rpx;color: #FCF9F1;position: absolute;display: flex;align-items: center;justify-content: center;padding: 0 2rpx;box-sizing: border-box;right: -10rpx;top: -10rpx;
  415. }
  416. }
  417. .txt{font-size: 20rpx;color: #666666;}
  418. }
  419. }
  420. .cbgs{width: 340rpx;height: 152rpx;position: relative;
  421. image{width: 340rpx;height: 152rpx;position: absolute;left: 0;top: 0;z-index: 0;}
  422. .cbga{z-index: 1;position: relative;padding: 30rpx 0 0 36rpx;
  423. .tit{font-weight: bold;font-size: 28rpx;color: #FFFFFF;text-shadow: 0px 4rpx 6rpx #13A97A;margin-bottom: 10rpx;}
  424. .txt{font-size: 40rpx;color: #FFFFFF;text-shadow: 0px 4rpx 6rpx #13A97A;}
  425. .tita{font-weight: bold;font-size: 28rpx;color: #FFFFFF;text-shadow: 0px 4rpx 6rpx #E89D00;;margin-bottom: 10rpx;}
  426. .txta{font-size: 40rpx;color: #FFFFFF;text-shadow: 0px 4rpx 6rpx #E89D00;}
  427. }
  428. }
  429. .hlist{
  430. .hlista{padding: 8rpx 0;
  431. .limg{width: 32rpx;height: 32rpx;margin-right: 18rpx;}
  432. .tit{font-weight: bold;font-size: 30rpx;color: #272727;}
  433. .more{font-weight: 500;font-size: 24rpx;color: #AAAAAA;
  434. image{width: 18rpx;height: 16rpx;margin-left: 16rpx;}
  435. }
  436. .htabs{flex: 1;overflow: auto;padding: 10rpx 0;
  437. view{font-weight: 500;font-size: 28rpx;color: #666666;position: relative;height: 56rpx;line-height: 56rpx;margin-right: 48rpx;flex: 0 0 auto;
  438. &.act{font-size: 15px;font-weight: bold;color: #272727;
  439. &:after{width: 36rpx;height: 10rpx;background: linear-gradient(150deg, rgba(177,240,216,0.97), rgba(3,218,138,0.97));border-radius: 6rpx;content: '';position: absolute;bottom: -10rpx;left: 50%;margin-left: -18rpx;}
  440. }
  441. }
  442. }
  443. }
  444. }
  445. </style>