index.vue 7.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302
  1. <template>
  2. <view style="min-height: 100vh;background-color: #FFFFFF;">
  3. <!-- 头部 -->
  4. <u-navbar :border-bottom="false" :is-back="false" title=" ">
  5. <view class="slot-wrap">
  6. <picker @change="ganderChange" range-key="name" :value="ganderIndex" :range="ganderArray">
  7. <view class="padding-left-40 ">
  8. <text class="padding-right-10" style="font-size: 34rpx;">{{gander?gander:'暂无园区信息'}}</text>
  9. <u-icon name="arrow-down-fill" top="-5" size="20" color="#7f7f7f"></u-icon>
  10. </view>
  11. </picker>
  12. </view>
  13. </u-navbar>
  14. <!-- banner -->
  15. <swiper class="screen-swiper square-dot " :indicator-dots="true" :circular="true"
  16. :autoplay="true" interval="5000" duration="500">
  17. <swiper-item v-for="(item,index) in bannerList" :key="index">
  18. <image :src="item.image" mode="aspectFill" ></image>
  19. </swiper-item>
  20. </swiper>
  21. <!-- 公告 -->
  22. <view class="">
  23. <view class="bg-white" style="height: 10rpx;"></view>
  24. <hotConsult :swiperTexts="noticeList"></hotConsult>
  25. </view>
  26. <!-- 园区服务 -->
  27. <view class="bg-white">
  28. <view style="padding: 30rpx 30rpx 0 30rpx; ">
  29. <text class="cuIcon-titles text-blue"></text>
  30. <text class="text-bold text-lg">园区服务</text>
  31. </view>
  32. <view class="nav-list padding-top-30" >
  33. <view hover-class="none"
  34. @click="jump(item.index)"
  35. class="nav-li light" :style="{backgroundColor:item.color}"
  36. v-for="(item,index) in elements" :key="index">
  37. <view class="nav-title" style="color: #000000;font-size: 28rpx;">{{item.title}}</view>
  38. <view class="" style="padding-top: 10rpx;font-size: 24rpx;color: #acacac;">{{item.name}}</view>
  39. <image :src="item.icon" mode=""></image>
  40. </view>
  41. </view>
  42. </view>
  43. <view class="bg-white">
  44. <view style="padding: 30rpx 30rpx 0 30rpx; ">
  45. <text class="cuIcon-titles text-blue"></text>
  46. <text class="text-bold text-lg">消防服务</text>
  47. </view>
  48. <view class="nav-list padding-top-30" >
  49. <view hover-class="none"
  50. @click="jump(item.index)"
  51. class="nav-li light" navigateTo :style="{backgroundColor:item.color}"
  52. v-for="(item,index) in fireList" :key="index">
  53. <view class="nav-title" style="color: #000000;font-size: 28rpx;">{{item.title}}</view>
  54. <view class="" style="padding-top: 10rpx;font-size: 24rpx;color: #acacac;">{{item.name}}</view>
  55. <image :src="item.icon" mode=""></image>
  56. </view>
  57. </view>
  58. </view>
  59. <!-- <u-divider bg-color="#f1f1f1" color="#62a3dc" border-color="#62a3dc" height="100">查看更多</u-divider> -->
  60. </view>
  61. </template>
  62. <script>
  63. import hotConsult from "@/components/hot-consult/hot-consult.vue"
  64. export default {
  65. components:{
  66. hotConsult
  67. },
  68. data() {
  69. return {
  70. //园区 label
  71. gander:'新邻产业园',
  72. //默认选中下标
  73. ganderIndex:0,
  74. //园区列表
  75. ganderArray:[],
  76. //banner
  77. bannerList: [],
  78. // 公告
  79. noticeList:[],
  80. //消防服务
  81. fireList:[],
  82. //园区服务
  83. elements: [],
  84. };
  85. },
  86. onLoad() {
  87. this.fetchStaticData()
  88. },
  89. methods:{
  90. ganderChange(e){
  91. console.log(e);
  92. },
  93. jump(index){
  94. let url=''
  95. if (index==1) {
  96. //我的企业
  97. url='/pages/company/company'
  98. }else if(index==2){
  99. //人员认证
  100. url="/pages/auth/auth"
  101. }else if (index==3) {
  102. //我的测温
  103. url="/pages/index/my-temperature/my-temperature"
  104. }else if (index==4) {
  105. //通行记录
  106. url="/pages/index/access-record/access-record"
  107. }
  108. if (!this.$isEmpty(url)) {
  109. uni.navigateTo({
  110. url:url
  111. })
  112. }
  113. },
  114. fetchStaticData(){
  115. this.bannerList=[
  116. {
  117. 'image': "http://139.9.103.171:1888/miniofile/xlyq/banner01.jpg"
  118. },
  119. ]
  120. this.ganderArray=[
  121. {
  122. name:'新邻产业园',
  123. value:'1'
  124. },
  125. {
  126. name:'新邻工业园',
  127. value:'2'
  128. }
  129. ]
  130. this.noticeList=[
  131. {
  132. title:'疫情期间,出入小区请佩戴好口罩,配合门卫大叔做好测温登记工作。谢谢大家的配合。'
  133. },
  134. {
  135. title:'停水停电通知。市政通水设施突发性故障抢修,本小区供水压力暂受影响,敬请做好储水准备,预约影响时间2020年11月28号22时至11月29号16时,由此给您带来不便,敬请谅解。'
  136. },
  137. {
  138. title:'2020年10月1日-2020年10月8日,中秋 国庆节放假,假期间需注意,祝国庆节玩的开心。'
  139. },
  140. {
  141. title:'疫情期间,出入小区请佩戴好口罩,配合门卫大叔做好测温登记工作。谢谢大家的配合。'
  142. }
  143. ]
  144. this.elements=[
  145. {
  146. title: '我的企业',
  147. name: 'My business',
  148. color: '#f9f4f1',
  149. icon: '../../static/index/gander/qiye.png',
  150. index:1
  151. },
  152. {
  153. title: '人员认证',
  154. name: 'Personnel certification',
  155. color: '#ecf3f9',
  156. icon: '../../static/index/gander/renzheng.png',
  157. index:2
  158. },
  159. {
  160. title: '我的测温',
  161. name: 'My temperature',
  162. color: '#f0f3ff',
  163. icon: '../../static/index/gander/cewen1.png',
  164. index:3
  165. },
  166. {
  167. title: '通行记录',
  168. name: 'Access records',
  169. color: '#f7f7f5',
  170. icon: '../../static/index/gander/tongxing.png',
  171. index:4
  172. }
  173. ]
  174. this.fireList=[
  175. {
  176. title: '烟感报警',
  177. name: 'Smoke alarm',
  178. color: '#f2f0fd',
  179. icon: '../../static/index/fire/yangan.png',
  180. index:5
  181. },
  182. {
  183. title: '燃气告警',
  184. name: 'Gas alarm',
  185. color: '#fffaf8',
  186. icon: '../../static/index/fire/ranqi.png',
  187. index:6
  188. },
  189. {
  190. title: '消防水压',
  191. name: 'Fire water pressure',
  192. color: '#ecf3f9',
  193. icon: '../../static/index/fire/xiaofang.png',
  194. index:7
  195. },
  196. {
  197. },
  198. ]
  199. }
  200. }
  201. };
  202. </script>
  203. <style lang="scss" scoped>
  204. page{
  205. background-color: #FFFFFF;
  206. min-height: 100vh;
  207. }
  208. //四宫格 begin
  209. .nav-list {
  210. display: flex;
  211. flex-wrap: wrap;
  212. justify-content: center;
  213. }
  214. .nav-li {
  215. padding: 30upx 30rpx;
  216. border-radius: 12upx;
  217. width: 44%;
  218. margin: 10rpx 2% 10upx;
  219. background-size: cover;
  220. background-position: center;
  221. position: relative;
  222. z-index: 1;
  223. }
  224. .nav-li::after {
  225. content: "";
  226. position: absolute;
  227. z-index: -1;
  228. background-color: inherit;
  229. width: 100%;
  230. height: 100%;
  231. left: 0;
  232. bottom: -10%;
  233. border-radius: 10upx;
  234. opacity: 0.2;
  235. transform: scale(0.9, 0.9);
  236. }
  237. .nav-li.cur {
  238. color: #fff;
  239. background: rgb(94, 185, 94);
  240. box-shadow: 4upx 4upx 6upx rgba(94, 185, 94, 0.4);
  241. }
  242. .nav-title {
  243. font-size: 32upx;
  244. font-weight: 300;
  245. }
  246. .nav-title::first-letter {
  247. font-size: 40upx;
  248. margin-right: 4upx;
  249. }
  250. .nav-name {
  251. font-size: 28upx;
  252. text-transform: Capitalize;
  253. margin-top: 20upx;
  254. position: relative;
  255. }
  256. .nav-name::before {
  257. content: "";
  258. position: absolute;
  259. display: block;
  260. width: 40upx;
  261. height: 6upx;
  262. background: #fff;
  263. bottom: 0;
  264. right: 0;
  265. opacity: 0.5;
  266. }
  267. .nav-name::after {
  268. content: "";
  269. position: absolute;
  270. display: block;
  271. width: 100upx;
  272. height: 1px;
  273. background: #fff;
  274. bottom: 0;
  275. right: 40upx;
  276. opacity: 0.3;
  277. }
  278. .nav-name::first-letter {
  279. font-weight: bold;
  280. font-size: 36upx;
  281. margin-right: 1px;
  282. }
  283. .nav-li image {
  284. position: absolute;
  285. right: 30upx;
  286. top: 22upx;
  287. width: 66upx;
  288. height: 66upx;
  289. }
  290. //四宫格 end
  291. </style>