index.vue 15 KB

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