index.vue 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739
  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: scroll; 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"
  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:7
  474. },
  475. success: (res) => {
  476. console.log(res);
  477. if (res.data.code === 200) {
  478. res.data.data.list.forEach((item) => {
  479. item.park_pics[0].pic_path =
  480. getApp().globalData.shareUrl + item.park_pics[0].pic_path;
  481. });
  482. this.parkList = res.data.data.list;
  483. }
  484. },
  485. fail: () => {
  486. console.log("连接失败");
  487. },
  488. });
  489. },
  490. goParkDetailFn(id) {
  491. uni.navigateTo({
  492. url: "/pages/park/park_deatil?id=" + id,
  493. });
  494. },
  495. goNoticeDeatil(id) {
  496. uni.navigateTo({
  497. url: "/pages/notice/notice_deatil?id=" + id,
  498. });
  499. },
  500. goAttractDeatil(id) {
  501. uni.navigateTo({
  502. url: "/pages/attract/attract_deatil?id=" + id,
  503. });
  504. },
  505. goAttract() {
  506. uni.navigateTo({
  507. url: "/pages/attract/index",
  508. });
  509. },
  510. goNotice() {
  511. uni.navigateTo({
  512. url: "/pages/notice/index",
  513. });
  514. },
  515. },
  516. };
  517. </script>
  518. <style>
  519. .content {
  520. display: flex;
  521. flex-direction: column;
  522. align-items: center;
  523. justify-content: center;
  524. }
  525. .logo {
  526. height: 200rpx;
  527. width: 200rpx;
  528. margin-top: 200rpx;
  529. margin-left: auto;
  530. margin-right: auto;
  531. margin-bottom: 50rpx;
  532. }
  533. .text-area {
  534. display: flex;
  535. justify-content: center;
  536. }
  537. .title {
  538. font-size: 36rpx;
  539. color: #8f8f94;
  540. }
  541. .groove-img {
  542. width: 100%;
  543. height: 100rpx;
  544. bottom: -22rpx;
  545. position: absolute;
  546. }
  547. .rowDot {
  548. display: flex;
  549. position: absolute;
  550. top: 270rpx;
  551. left: 80rpx;
  552. }
  553. .dots {
  554. flex-direction: row;
  555. justify-content: center;
  556. align-items: center;
  557. align-content: center;
  558. }
  559. .dot {
  560. margin-right: 8rpx;
  561. width: 40rpx;
  562. height: 8rpx;
  563. opacity: 1;
  564. border-radius: 6rpx;
  565. background: #fff5f9;
  566. }
  567. .dot.active {
  568. background: #ff4e54;
  569. }
  570. .swiper-content {
  571. /* border-radius: 0 0 10% 10%; */
  572. }
  573. .page-nav-box {
  574. width: 80%;
  575. /* height: 320rpx; */
  576. display: flex;
  577. flex-wrap: wrap;
  578. padding: 20rpx 10rpx 30rpx 10rpx;
  579. box-shadow: 0px 2px 16px rgba(0, 0, 0, 0.1);
  580. border-radius: 32rpx;
  581. position: absolute;
  582. top: 300rpx;
  583. background-color: #fff;
  584. }
  585. .nav-content {
  586. width: 25%;
  587. height: 130rpx;
  588. display: flex;
  589. flex-direction: column;
  590. align-items: center;
  591. margin-top: 20rpx;
  592. font-size: 22rpx;
  593. justify-content: space-around;
  594. letter-spacing: 0.02em;
  595. color: #0d1937;
  596. font-family: PingFang SC;
  597. font-style: normal;
  598. font-weight: 600;
  599. }
  600. .notice-box {
  601. width: 83%;
  602. margin-top: 300rpx;
  603. margin-bottom: 20rpx;
  604. }
  605. .notice-title-box {
  606. width: 100%;
  607. display: flex;
  608. justify-content: space-between;
  609. align-items: center;
  610. margin-bottom: 40rpx;
  611. }
  612. .notice-font {
  613. font-family: PingFang SC;
  614. font-style: normal;
  615. font-weight: 600;
  616. font-size: 32rpx;
  617. letter-spacing: 0.02em;
  618. color: #0d1937;
  619. }
  620. .notice-more-font {
  621. font-size: 24rpx;
  622. color: #146afb;
  623. display: flex;
  624. align-items: center;
  625. }
  626. .notice-content-box {
  627. display: flex;
  628. padding: 30rpx;
  629. background-color: #ffffff;
  630. box-shadow: 0px 4rpx 32rpx rgba(0, 0, 0, 0.1);
  631. border-radius: 32rpx;
  632. margin-top: 20rpx;
  633. justify-content: space-between;
  634. }
  635. .notice-content-font {
  636. font-size: 26rpx;
  637. color: #0d1937;
  638. font-weight: 600;
  639. overflow: hidden;
  640. text-overflow: ellipsis;
  641. white-space: nowrap;
  642. }
  643. .notice-content-time {
  644. font-size: 18rpx;
  645. letter-spacing: 0.02em;
  646. color: #cfcfcf;
  647. margin-right: 14rpx;
  648. }
  649. .park-box {
  650. border-radius: 32rpx;
  651. margin-right: 20rpx;
  652. position: relative;
  653. height: 450rpx;
  654. }
  655. .park-content-box {
  656. width: 394rpx;
  657. background-color: #ffffff;
  658. border-radius: 56rpx 0px 32rpx 32rpx;
  659. position: absolute;
  660. top: 210rpx;
  661. font-size: 24rpx;
  662. padding: 30rpx;
  663. box-shadow: 0px 2px 16px rgba(0, 0, 0, 0.1);
  664. }
  665. .park-title {
  666. font-weight: 600;
  667. line-height: 36rpx;
  668. letter-spacing: 0.02em;
  669. color: #0d1937;
  670. }
  671. .park-address {
  672. font-weight: 600;
  673. font-size: 19rpx;
  674. letter-spacing: 0.02em;
  675. color: #cfcfcf;
  676. margin-top: 10rpx;
  677. }
  678. .park-title-img {
  679. width: 16rpx;
  680. height: 16rpx;
  681. margin-right: 4rpx;
  682. }
  683. .park-footer-box {
  684. margin-top: 30rpx;
  685. }
  686. .park-footer-img {
  687. width: 24rpx;
  688. height: 24rpx;
  689. margin-right: 6rpx;
  690. }
  691. .park-footer-font {
  692. color: #cfcfcf;
  693. font-size: 19rpx;
  694. margin-top: 10rpx;
  695. }
  696. .width-30 {
  697. width: 30%;
  698. }
  699. .attract-content {
  700. color: #697594;
  701. font-weight: 600;
  702. font-size: 20rpx;
  703. margin-top: 8rpx;
  704. overflow: hidden;
  705. text-overflow: ellipsis;
  706. white-space: nowrap;
  707. }
  708. .online-box {
  709. width: 12rpx;
  710. height: 12rpx;
  711. border-radius: 50%;
  712. background-color: #589cff;
  713. margin-right: 5rpx;
  714. }
  715. .offline-box {
  716. width: 12rpx;
  717. height: 12rpx;
  718. border-radius: 50%;
  719. background-color: #ffcf86;
  720. margin-right: 5rpx;
  721. }
  722. .color-a7adba {
  723. color: #a7adba;
  724. }
  725. </style>