index.vue 19 KB

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