index.vue 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544
  1. <template>
  2. <view class="content">
  3. <view class="page-section-spacing" style="width: 100%;position: relative;">
  4. <swiper class="swiper"
  5. indicator-dots="false"
  6. autoplay="true"
  7. duration="500"
  8. style="height:400rpx"
  9. @change="swiperChange">
  10. <swiper-item v-for="(item , index) in swiperList" :key="index" class="swiper-content">
  11. <image :src="item.pic_path" mode="aspectFill" style="width: 100%;height: 100%;"></image>
  12. </swiper-item>
  13. </swiper>
  14. <view class="rowDot">
  15. <view v-for="(item,index) in swiperList" :key="index" class="dots">
  16. <view :class="['dot',index === swiperCurrent ? 'active' : '']"></view>
  17. </view>
  18. </view>
  19. </view>
  20. <view class="page-nav-box">
  21. <navigator v-for="(item , index) in navList" :key="index" :url="item.path" open-type="navigate" class="nav-content">
  22. <image :src="item.url" mode="aspectFit" style="width: 38px;height: 38px;"></image>
  23. <view>{{item.content}}</view>
  24. </navigator>
  25. </view>
  26. <view class="notice-box">
  27. <view class="notice-title-box">
  28. <view class="notice-font">通知公告</view>
  29. <view class="notice-more-font">
  30. <view style="margin-right: 8rpx;font-size: 22rpx;">更多</view>
  31. <image src="../../static/right-arrow-blue.png" mode="aspectFill" style="width: 12rpx;height: 16rpx;"></image>
  32. </view>
  33. </view>
  34. <view class="notice-content-box" v-for="(item , index) in noticeList" :key="index">
  35. <image :src="item.url" mode="aspectFit" style="width:34px;height:34px;"></image>
  36. <view class="notice-content display-around-column">
  37. <view class="notice-content-font">{{item.title}}</view>
  38. <view class="notice-content-time">{{item.time}}</view>
  39. </view>
  40. </view>
  41. </view>
  42. <view class="notice-box" style="margin-top: 40rpx;">
  43. <view class="notice-title-box">
  44. <view class="notice-font">推荐园区</view>
  45. <navigator class="notice-more-font" url="../park/index" open-type="navigate">
  46. <view style="margin-right: 8rpx;font-size: 22rpx;">更多</view>
  47. <image src="/static/right-arrow-blue.png" mode="aspectFill" style="width: 12rpx;height: 16rpx;"></image>
  48. </navigator>
  49. </view>
  50. <view class="display-flex-start" style=" overflow:scroll;position:relative">
  51. <view class="park-box" v-for="(item , index) in parkList" :key="item.id" @click="goParkDetailFn(item.id)">
  52. <image :src="item.park_pics[0].pic_path" mode="aspectFill" style="width:452rpx;height:250rpx;border-radius:32rpx 32rpx 0 0;"></image>
  53. <view class="park-content-box">
  54. <view class="park-title">{{item.name}}</view>
  55. <view class="park-address display-flex-start">
  56. <view class="display-flex-start" style="margin-right: 10rpx;"><image src="/static/park/park-time.png" mode="aspectFill" class="park-title-img"></image>{{item.addtime | globalTime}}建成</view>
  57. <view class="display-flex-start"><image src="/static/park/park-name.png" mode="aspectFill" class="park-title-img"></image>{{item.manager}}</view>
  58. </view>
  59. <view class="park-footer-box display-between">
  60. <view class="display-between-column width-30">
  61. <view class="display-flex-start"><image src="/static/park/park-num.png" mode="aspectFill" class="park-footer-img"></image>{{item.company_count}}</view>
  62. <view class="park-footer-font">企业数量</view>
  63. </view>
  64. <view class="display-between-column width-30">
  65. <view class="display-flex-start">
  66. <image src="/static/park/park-area.png" mode="aspectFill" class="park-footer-img"></image>
  67. {{item.cover_area}}<text style="font-size: 12rpx;">万㎡</text></view>
  68. <view class="park-footer-font">占地面积</view>
  69. </view>
  70. <view class="display-between-column width-30">
  71. <view class="display-flex-start">
  72. <image src="/static/park/park-area2.png" mode="aspectFill" class="park-footer-img"></image>
  73. {{item.building_area}}<text style="font-size: 12rpx;">万㎡</text></view>
  74. <view class="park-footer-font">建设面积</view>
  75. </view>
  76. </view>
  77. </view>
  78. </view>
  79. </view>
  80. </view>
  81. <view class="notice-box" style="margin-top:20rpx;">
  82. <view class="notice-title-box">
  83. <view class="notice-font">招商专区</view>
  84. <view class="notice-more-font">
  85. <view style="margin-right: 8rpx;font-size: 22rpx;">更多</view>
  86. <image src="/static/right-arrow-blue.png" mode="aspectFill" style="width: 12rpx;height: 16rpx;"></image>
  87. </view>
  88. </view>
  89. <view class="notice-content-box" v-for="(item , index) in attractList" :key="index" style="justify-content: start;">
  90. <image :src="item.url" mode="aspectFit" style="width:112rpx;height:112rpx;margin-right: 20rpx;"></image>
  91. <view class="notice-content">
  92. <view class="notice-content-font">{{item.title}}</view>
  93. <view class="attract-content">{{item.subtitle}}</view>
  94. <view class="notice-content-time" style="margin-top: 20rpx;">{{item.time}}</view>
  95. </view>
  96. </view>
  97. </view>
  98. <view class="notice-box" style="margin-top:20rpx;">
  99. <view class="notice-title-box">
  100. <view class="notice-font">区内活动</view>
  101. <view class="notice-more-font">
  102. <view style="margin-right: 8rpx;font-size: 22rpx;">更多</view>
  103. <image src="/static/right-arrow-blue.png" mode="aspectFill" style="width: 12rpx;height: 16rpx;"></image>
  104. </view>
  105. </view>
  106. <view class="notice-content-box" v-for="(item , index) in activityList" :key="index" style="justify-content: start;padding: 30rpx 0 30rpx 30rpx;">
  107. <image :src="item.url" mode="aspectFit" style="width:128rpx;height:128rpx;margin-right: 20rpx;"></image>
  108. <view class="notice-content" style="width: 70%;">
  109. <view class="notice-content-font" style="white-space: break-spaces;">{{item.title}}</view>
  110. <view class="display-flex-start" style="margin-top: 20rpx;">
  111. <view class="notice-content-time display-flex-start color-a7adba" v-show="item.isOnline"><view class="online-box"></view>线上</view>
  112. <view class="notice-content-time display-flex-start color-a7adba" v-show="!item.isOnline"><view class="offline-box"></view>线下</view>
  113. <view class="notice-content-time color-a7adba" >{{item.department}}</view>
  114. <view class="notice-content-time color-a7adba" >{{item.time}}</view>
  115. </view>
  116. <view class="display-flex-end" style="margin-top: 20rpx;">
  117. <view class="notice-content-time">浏览 {{item.browe}}</view>
  118. <view class="notice-content-time">分享 {{item.share}}</view>
  119. </view>
  120. </view>
  121. </view>
  122. </view>
  123. <foot-tabs></foot-tabs>
  124. </view>
  125. </template>
  126. <script>
  127. import md5 from '@/common/md5.js';
  128. export default {
  129. data() {
  130. return {
  131. swiperList:[
  132. {
  133. img:'/static/swiper/swiper1.jpg'
  134. },
  135. {
  136. img:'/static/swiper/swiper2.jpg'
  137. },
  138. ],
  139. swiperCurrent:0,
  140. navList:[
  141. {
  142. url:'/static/navList/appeal.png',
  143. path:'/pages/appeal/index',
  144. content:'提诉求'
  145. },
  146. {
  147. url:'/static/navList/policy.png',
  148. path:'/pages/policy/index',
  149. content:'搜政策'
  150. },
  151. {
  152. url:'/static/navList/park.png',
  153. path:'/pages/park/index',
  154. content:'找园区'
  155. },
  156. {
  157. url:'/static/navList/activity.png',
  158. path:'/pages/activity/index',
  159. content:'找活动'
  160. },
  161. {
  162. url:'/static/navList/supply.png',
  163. path:'/pages/supply/index',
  164. content:'发供需'
  165. },
  166. {
  167. url:'/static/navList/enterprise.png',
  168. path:'/pages/enterprise/index',
  169. content:'查企业'
  170. },
  171. {
  172. url:'/static/navList/service.png',
  173. path:'/pages/service/index',
  174. content:'找服务'
  175. },
  176. ],
  177. noticeList:[
  178. {
  179. url:'/static/navList/policy-icon.png',
  180. title:'政策速览 | 小微企业、个体工商户税费...',
  181. time:'2021-08-05'
  182. },
  183. {
  184. url:'/static/navList/activity-icon.png',
  185. title:'活动预告 | 想了解跨境电商?8月5日带...',
  186. time:'2021-08-04'
  187. },
  188. {
  189. url:'/static/navList/notice-icon.png',
  190. title:'通知公告 | 2022年首批次重点新材料扶...',
  191. time:'2021-08-03'
  192. },
  193. ],
  194. parkList:[
  195. // {
  196. // url:'/static/park/1.png',
  197. // title:'华潮科技产业园',
  198. // time:'2015-10-25',
  199. // num:484,
  200. // area1:1.72,
  201. // area2:1.01
  202. // },
  203. // {
  204. // url:'/static/park/1.png',
  205. // title:'华潮科技产业园',
  206. // time:'2015-10-25',
  207. // num:484,
  208. // area1:1.72,
  209. // area2:1.01
  210. // },
  211. // {
  212. // url:'/static/park/1.png',
  213. // title:'华潮科技产业园',
  214. // time:'2015-10-25',
  215. // num:484,
  216. // area1:1.72,
  217. // area2:1.01
  218. // },
  219. ],
  220. attractList:[
  221. {
  222. url:'/static/attract/1.png',
  223. title:'工业互联网',
  224. subtitle:'工业互联网是全球工业系统与高级计算、分析、...',
  225. time:'2021-09-05'
  226. },
  227. {
  228. url:'/static/attract/2.png',
  229. title:'生产性服务业',
  230. subtitle:'生产性服务业是指为保持工业生产过程的连续性...',
  231. time:'2021-09-05'
  232. },
  233. ],
  234. activityList:[
  235. {
  236. url:'/static/activity/2.png',
  237. title:'400场讲座,200门课程,免费送上门!就等你申请',
  238. isOnline:1,
  239. department:'区人力资源局',
  240. time:'2021-09-05',
  241. browe:'322',
  242. share:'2'
  243. },
  244. {
  245. url:'/static/activity/1.png',
  246. title:'智能制造商标品牌培育系列培训活动',
  247. isOnline:0,
  248. department:'市场监督管理局',
  249. time:'2021-09-05',
  250. browe:'322',
  251. share:'2'
  252. },
  253. ],
  254. }
  255. },
  256. onLoad() {
  257. this.getSwiperList();
  258. this.getPark();
  259. },
  260. methods: {
  261. swiperChange(e){
  262. this.swiperCurrent = e.detail.current
  263. },
  264. getSwiperList(){
  265. let md5Sign = md5("method="+'common'+"&timestamp="+getApp().globalData.globalTimestamp+"&secret="+getApp().globalData.secret)
  266. let url = getApp().globalData.shareUrl+'api/api.php'+'?method=common&source=main_pics&action=list&timestamp='+getApp().globalData.globalTimestamp +'&sign='+md5Sign
  267. uni.request({
  268. url:url,
  269. method: 'POST',
  270. header: {
  271. 'content-type': 'application/x-www-form-urlencoded'
  272. },
  273. data: {
  274. order_by:"weight desc",
  275. s_status:1,
  276. page:1,
  277. page_size:7
  278. },
  279. success: (res) => {
  280. console.log(res)
  281. if(res.data.code === 200){
  282. res.data.data.list.forEach((item)=>{item.pic_path = getApp().globalData.shareUrl + item.pic_path})
  283. this.swiperList = res.data.data.list;
  284. }
  285. },
  286. fail: () => {
  287. console.log("连接失败");
  288. }
  289. });
  290. },
  291. getPark(){
  292. let md5Sign = md5("method="+'park'+"&timestamp="+getApp().globalData.globalTimestamp+"&secret="+getApp().globalData.secret)
  293. let url = getApp().globalData.shareUrl+'api/api.php'+'?method=park&source=park&action=list&timestamp='+getApp().globalData.globalTimestamp +'&sign='+md5Sign
  294. uni.request({
  295. url:url,
  296. method: 'POST',
  297. header: {
  298. 'content-type': 'application/x-www-form-urlencoded'
  299. },
  300. data: {
  301. order_by:"weight desc",
  302. s_show:1,
  303. // page:1,
  304. // page_size:7
  305. },
  306. success: (res) => {
  307. console.log(res)
  308. if(res.data.code === 200){
  309. res.data.data.list.forEach((item)=>{item.park_pics[0].pic_path = getApp().globalData.shareUrl + item.park_pics[0].pic_path});
  310. this.parkList = res.data.data.list;
  311. }
  312. },
  313. fail: () => {
  314. console.log("连接失败");
  315. }
  316. });
  317. },
  318. goParkDetailFn(id){
  319. uni.navigateTo({
  320. url:'/pages/park/park_deatil?id='+id
  321. })
  322. },
  323. }
  324. }
  325. </script>
  326. <style>
  327. .content {
  328. display: flex;
  329. flex-direction: column;
  330. align-items: center;
  331. justify-content: center;
  332. }
  333. .logo {
  334. height: 200rpx;
  335. width: 200rpx;
  336. margin-top: 200rpx;
  337. margin-left: auto;
  338. margin-right: auto;
  339. margin-bottom: 50rpx;
  340. }
  341. .text-area {
  342. display: flex;
  343. justify-content: center;
  344. }
  345. .title {
  346. font-size: 36rpx;
  347. color: #8f8f94;
  348. }
  349. .rowDot {
  350. display: flex;
  351. position: absolute;
  352. top: 135px;
  353. left: 40px;
  354. }
  355. .dots {
  356. flex-direction: row;
  357. justify-content: center;
  358. align-items: center;
  359. align-content: center;
  360. }
  361. .dot {
  362. margin-right: 8rpx;
  363. width: 40rpx;
  364. height: 8rpx;
  365. opacity: 1;
  366. border-radius: 6rpx;
  367. background: #fff5f9;
  368. }
  369. .dot.active {
  370. background: #ff4e54;
  371. }
  372. .swiper-content {
  373. border-radius: 0 0 10% 10%;
  374. }
  375. .page-nav-box {
  376. width: 80%;
  377. /* height: 320rpx; */
  378. display: flex;
  379. flex-wrap: wrap;
  380. padding: 20rpx 10rpx 30rpx 10rpx;
  381. box-shadow: 0px 2px 16px rgba(0, 0, 0, 0.1);
  382. border-radius: 32rpx;
  383. position: absolute;
  384. top: 300rpx;
  385. background-color: #fff;
  386. }
  387. .nav-content {
  388. width: 25%;
  389. height: 130rpx;
  390. display: flex;
  391. flex-direction: column;
  392. align-items: center;
  393. margin-top: 20rpx;
  394. font-size: 22rpx;
  395. justify-content: space-around;
  396. letter-spacing: 0.02em;
  397. color: #0D1937;
  398. font-family: PingFang SC;
  399. font-style: normal;
  400. font-weight: 600;
  401. }
  402. .notice-box{
  403. width: 83%;
  404. margin-top: 300rpx;
  405. margin-bottom:20rpx;
  406. }
  407. .notice-title-box{
  408. width: 100%;
  409. display: flex;
  410. justify-content: space-between;
  411. align-items: center;
  412. margin-bottom:40rpx;
  413. }
  414. .notice-font {
  415. font-family: PingFang SC;
  416. font-style: normal;
  417. font-weight: 600;
  418. font-size: 32rpx;
  419. letter-spacing: 0.02em;
  420. color: #0D1937;
  421. }
  422. .notice-more-font {
  423. font-size: 24rpx;
  424. color: #146AFB;
  425. display: flex;
  426. align-items: center;
  427. }
  428. .notice-content-box {
  429. display: flex;
  430. padding: 30rpx;
  431. background-color: #FFFFFF;
  432. box-shadow: 0px 4rpx 32rpx rgba(0, 0, 0, 0.1);
  433. border-radius: 32rpx;
  434. margin-top: 20rpx;
  435. justify-content: space-between;
  436. }
  437. .notice-content-font {
  438. font-size:26rpx;
  439. color: #0D1937;
  440. font-weight: 600;
  441. overflow: hidden;
  442. text-overflow: ellipsis;
  443. white-space: nowrap;
  444. }
  445. .notice-content-time {
  446. font-size: 18rpx;
  447. letter-spacing: 0.02em;
  448. color: #CFCFCF;
  449. margin-right: 14rpx;
  450. }
  451. .park-box {
  452. border-radius: 32rpx;
  453. margin-right: 20rpx;
  454. position: relative;
  455. height: 450rpx;
  456. }
  457. .park-content-box {
  458. width: 394rpx;
  459. background-color: #FFFFFF;
  460. border-radius: 56rpx 0px 32rpx 32rpx;
  461. position: absolute;
  462. top: 210rpx;
  463. font-size: 24rpx;
  464. padding: 30rpx;
  465. box-shadow: 0px 2px 16px rgba(0, 0, 0, 0.1);
  466. }
  467. .park-title {
  468. font-weight: 600;
  469. line-height: 36rpx;
  470. letter-spacing: 0.02em;
  471. color: #0D1937;
  472. }
  473. .park-address {
  474. font-weight: 600;
  475. font-size: 19rpx;
  476. letter-spacing: 0.02em;
  477. color: #CFCFCF;
  478. margin-top: 10rpx;
  479. }
  480. .park-title-img {
  481. width: 16rpx;
  482. height: 16rpx;
  483. margin-right: 4rpx;
  484. }
  485. .park-footer-box {
  486. margin-top: 30rpx;
  487. }
  488. .park-footer-img{
  489. width: 24rpx;
  490. height: 24rpx;
  491. margin-right: 6rpx;
  492. }
  493. .park-footer-font {
  494. color: #CFCFCF;
  495. font-size: 19rpx;
  496. margin-top: 10rpx;
  497. }
  498. .width-30 {
  499. width: 30%;
  500. }
  501. .attract-content {
  502. color: #697594;
  503. font-weight: 600;
  504. font-size: 20rpx;
  505. margin-top: 8rpx;
  506. overflow: hidden;
  507. text-overflow: ellipsis;
  508. white-space: nowrap;
  509. }
  510. .online-box {
  511. width: 12rpx;
  512. height: 12rpx;
  513. border-radius: 50%;
  514. background-color:#589CFF;
  515. margin-right:5rpx;
  516. }
  517. .offline-box {
  518. width: 12rpx;
  519. height: 12rpx;
  520. border-radius: 50%;
  521. background-color:#FFCF86;
  522. margin-right:5rpx;
  523. }
  524. .color-a7adba{
  525. color: #A7ADBA;
  526. }
  527. </style>