index.vue 7.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301
  1. <template>
  2. <view class="">
  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. if (index==1) {
  95. //我的企业
  96. uni.navigateTo({
  97. url:"../company/company"
  98. })
  99. }else if(index==2){
  100. //人员认证
  101. uni.navigateTo({
  102. url:"../auth/auth"
  103. })
  104. }else if (index==3) {
  105. //我的测温
  106. uni.navigateTo({
  107. url:"my-temperature/my-temperature"
  108. })
  109. }else if (index==4) {
  110. //通行记录
  111. uni.navigateTo({
  112. url:"./access-record/access-record"
  113. })
  114. }
  115. },
  116. fetchStaticData(){
  117. this.bannerList=[
  118. {
  119. 'image': "http://139.9.103.171:1888/miniofile/xlyq/banner01.jpg"
  120. },
  121. ]
  122. this.ganderArray=[
  123. {
  124. name:'新邻产业园',
  125. value:'1'
  126. },
  127. {
  128. name:'新邻工业园',
  129. value:'2'
  130. }
  131. ]
  132. this.noticeList=[
  133. {
  134. title:'疫情期间,出入小区请佩戴好口罩,配合门卫大叔做好测温登记工作。谢谢大家的配合。'
  135. },
  136. {
  137. title:'停水停电通知。市政通水设施突发性故障抢修,本小区供水压力暂受影响,敬请做好储水准备,预约影响时间2020年11月28号22时至11月29号16时,由此给您带来不便,敬请谅解。'
  138. },
  139. {
  140. title:'2020年10月1日-2020年10月8日,中秋 国庆节放假,假期间需注意,祝国庆节玩的开心。'
  141. },
  142. {
  143. title:'疫情期间,出入小区请佩戴好口罩,配合门卫大叔做好测温登记工作。谢谢大家的配合。'
  144. }
  145. ]
  146. this.elements=[
  147. {
  148. title: '我的企业',
  149. name: 'My business',
  150. color: '#f9f4f1',
  151. icon: '../../static/index/gander/qiye.png',
  152. index:1
  153. },
  154. {
  155. title: '人员认证',
  156. name: 'Personnel certification',
  157. color: '#ecf3f9',
  158. icon: '../../static/index/gander/renzheng.png',
  159. index:2
  160. },
  161. {
  162. title: '我的测温',
  163. name: 'My temperature',
  164. color: '#f0f3ff',
  165. icon: '../../static/index/gander/cewen1.png',
  166. index:3
  167. },
  168. {
  169. title: '通行记录',
  170. name: 'Access records',
  171. color: '#f7f7f5',
  172. icon: '../../static/index/gander/tongxing.png',
  173. index:4
  174. }
  175. ]
  176. this.fireList=[
  177. {
  178. title: '烟感报警',
  179. name: 'Smoke alarm',
  180. color: '#f2f0fd',
  181. icon: '../../static/index/fire/yangan.png',
  182. index:5
  183. },
  184. {
  185. title: '燃气告警',
  186. name: 'Gas alarm',
  187. color: '#fffaf8',
  188. icon: '../../static/index/fire/ranqi.png',
  189. index:6
  190. },
  191. {
  192. title: '消防水压',
  193. name: 'Fire water pressure',
  194. color: '#ecf3f9',
  195. icon: '../../static/index/fire/xiaofang.png',
  196. index:7
  197. },
  198. {
  199. },
  200. ]
  201. }
  202. }
  203. };
  204. </script>
  205. <style lang="scss" scoped>
  206. //四宫格 begin
  207. .nav-list {
  208. display: flex;
  209. flex-wrap: wrap;
  210. justify-content: center;
  211. }
  212. .nav-li {
  213. padding: 30upx 30rpx;
  214. border-radius: 12upx;
  215. width: 44%;
  216. margin: 10rpx 2% 10upx;
  217. background-size: cover;
  218. background-position: center;
  219. position: relative;
  220. z-index: 1;
  221. }
  222. .nav-li::after {
  223. content: "";
  224. position: absolute;
  225. z-index: -1;
  226. background-color: inherit;
  227. width: 100%;
  228. height: 100%;
  229. left: 0;
  230. bottom: -10%;
  231. border-radius: 10upx;
  232. opacity: 0.2;
  233. transform: scale(0.9, 0.9);
  234. }
  235. .nav-li.cur {
  236. color: #fff;
  237. background: rgb(94, 185, 94);
  238. box-shadow: 4upx 4upx 6upx rgba(94, 185, 94, 0.4);
  239. }
  240. .nav-title {
  241. font-size: 32upx;
  242. font-weight: 300;
  243. }
  244. .nav-title::first-letter {
  245. font-size: 40upx;
  246. margin-right: 4upx;
  247. }
  248. .nav-name {
  249. font-size: 28upx;
  250. text-transform: Capitalize;
  251. margin-top: 20upx;
  252. position: relative;
  253. }
  254. .nav-name::before {
  255. content: "";
  256. position: absolute;
  257. display: block;
  258. width: 40upx;
  259. height: 6upx;
  260. background: #fff;
  261. bottom: 0;
  262. right: 0;
  263. opacity: 0.5;
  264. }
  265. .nav-name::after {
  266. content: "";
  267. position: absolute;
  268. display: block;
  269. width: 100upx;
  270. height: 1px;
  271. background: #fff;
  272. bottom: 0;
  273. right: 40upx;
  274. opacity: 0.3;
  275. }
  276. .nav-name::first-letter {
  277. font-weight: bold;
  278. font-size: 36upx;
  279. margin-right: 1px;
  280. }
  281. .nav-li image {
  282. position: absolute;
  283. right: 30upx;
  284. top: 22upx;
  285. width: 66upx;
  286. height: 66upx;
  287. }
  288. //四宫格 end
  289. </style>