index.vue 28 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027
  1. <template>
  2. <view class="content">
  3. <top-title
  4. :titleValue="title"
  5. :pageScroll="scrollVal"
  6. :btnTop="btnPos"
  7. style="width: 100%"
  8. ></top-title>
  9. <view class="page-section-spacing" style="width: 100%; position: relative">
  10. <swiper
  11. class="swiper"
  12. indicator-dots="false"
  13. autoplay="true"
  14. duration="500"
  15. style="height: 440rpx"
  16. @change="swiperChange"
  17. >
  18. <swiper-item
  19. v-for="(item, index) in swiperList"
  20. :key="index"
  21. class="swiper-content"
  22. >
  23. <image
  24. :src="item.pic_path"
  25. mode="aspectFill"
  26. style="width: 100%; height: 100%"
  27. @click="swiperNavGoPage(item)"
  28. ></image>
  29. </swiper-item>
  30. </swiper>
  31. <image src="../../static/Intersect.svg" class="groove-img"></image>
  32. <view class="rowDot">
  33. <view v-for="(item, index) in swiperList" :key="index" class="dots">
  34. <view
  35. :class="['dot', index === swiperCurrent ? 'active' : '']"
  36. ></view>
  37. </view>
  38. </view>
  39. </view>
  40. <view class="page-nav-box">
  41. <navigator
  42. v-for="(item, index) in navList"
  43. :key="index"
  44. :url="item.path"
  45. open-type="navigate"
  46. class="nav-content"
  47. >
  48. <image
  49. :src="item.url"
  50. mode="aspectFit"
  51. style="width: 38px; height: 38px"
  52. ></image>
  53. <view>{{ item.content }}</view>
  54. </navigator>
  55. </view>
  56. <view class="notice-box" style="width:90%;">
  57. <view class="notice-title-box" style="margin: 0 auto;margin-bottom: 30rpx;">
  58. <view class="notice-font">通知公告</view>
  59. <view class="notice-more-font">
  60. <view style="margin-right: 8rpx; font-size: 26rpx" @click="goNotice">更多</view>
  61. <image src="../../static/right-arrow-blue.png"mode="aspectFill" style="width: 12rpx; height: 16rpx"></image>
  62. </view>
  63. </view>
  64. <view
  65. class="notice-content-box"
  66. style="justify-content: flex-start;border-radius: 0;"
  67. v-for="(item, index) in noticeList"
  68. :key="index"
  69. @click="goNoticeDeatil(item.id)"
  70. >
  71. <image
  72. :src="item.icon"
  73. mode="aspectFit"
  74. style="width:80rpx; height:80rpx"
  75. ></image>
  76. <view class="notice-content display-around-column" style="width: 85%">
  77. <view class="notice-content-font" style="margin-left: 30rpx">{{
  78. item.title
  79. }}</view>
  80. <view class="notice-content-time" style="margin-left: 30rpx">{{
  81. item.publish_time | globalTime
  82. }}</view>
  83. </view>
  84. </view>
  85. </view>
  86. <view class="notice-box" style="margin-top: 40rpx;width: 90%;">
  87. <view class="notice-title-box">
  88. <view class="notice-font">推荐园区</view>
  89. <navigator
  90. class="notice-more-font"
  91. url="../park/index"
  92. open-type="navigate"
  93. >
  94. <view style="margin-right: 8rpx; font-size:26rpx">更多</view>
  95. <image
  96. src="/static/right-arrow-blue.png"
  97. mode="aspectFill"
  98. style="width: 12rpx; height: 16rpx"
  99. ></image>
  100. </navigator>
  101. </view>
  102. <view
  103. class="display-flex-start"
  104. style="overflow-x: scroll; overflow-y: hidden; position: relative"
  105. >
  106. <view
  107. class="park-box"
  108. v-for="item in parkList"
  109. :key="item.id"
  110. @click="goParkDetailFn(item.id)"
  111. >
  112. <image
  113. :src="item.park_pics[0].pic_path || '/static/park/1.png'"
  114. mode="aspectFill"
  115. style="
  116. width: 452rpx;
  117. height: 250rpx;
  118. border-radius: 32rpx 32rpx 0 0;
  119. "
  120. ></image>
  121. <view class="park-content-box">
  122. <view class="park-title">{{ item.name || '-' }}</view>
  123. <view class="park-address display-flex-start" style="flex-direction: column;align-items: flex-start;">
  124. <view class="display-flex-start" style="margin-bottom: 10rpx;">
  125. <image src="/static/park/park-name.png" mode="aspectFill" class="park-title-img"></image>
  126. {{ item.manager || '-' }}
  127. </view>
  128. <view class="display-flex-start">
  129. <image src="/static/park/park-time.png" mode="aspectFill"class="park-title-img"></image>
  130. <!-- {{ item.addtime | globalTime }}建成 -->
  131. {{ item.start_date || '-' }}建成
  132. </view>
  133. </view>
  134. <view class="park-footer-box display-between" style="margin-top: 10rpx;">
  135. <view class="display-between-column width-30">
  136. <view class="display-flex-start"
  137. ><image
  138. src="/static/park/park-num.png"
  139. mode="aspectFill"
  140. class="park-footer-img"
  141. ></image
  142. >{{ item.company_count || '-' }}</view
  143. >
  144. <view class="park-footer-font">企业数量</view>
  145. </view>
  146. <view class="display-between-column width-30">
  147. <view class="display-flex-start">
  148. <image
  149. src="/static/park/park-area.png"
  150. mode="aspectFill"
  151. class="park-footer-img"
  152. ></image>
  153. {{ item.cover_area || '-' }}<text style="font-size: 14rpx">亩</text></view
  154. >
  155. <view class="park-footer-font">占地面积</view>
  156. </view>
  157. <view class="display-between-column" style="width: 33%;">
  158. <view class="display-flex-start">
  159. <image
  160. src="/static/park/park-area2.png"
  161. mode="aspectFill"
  162. class="park-footer-img"
  163. ></image>
  164. {{ item.building_area || '-' }}<text style="font-size: 14rpx">万㎡</text></view
  165. >
  166. <view class="park-footer-font">建设面积</view>
  167. </view>
  168. </view>
  169. </view>
  170. </view>
  171. </view>
  172. </view>
  173. <view class="notice-box" style="margin-top: 20rpx;width: 90%;">
  174. <view class="notice-title-box" style="margin: 0 auto;margin-bottom: 30rpx;">
  175. <view class="notice-font">招商专区</view>
  176. <view class="notice-more-font">
  177. <view style="margin-right: 8rpx; font-size: 26rpx" @click="goAttract"
  178. >更多</view
  179. >
  180. <image
  181. src="/static/right-arrow-blue.png"
  182. mode="aspectFill"
  183. style="width: 12rpx; height: 16rpx"
  184. ></image>
  185. </view>
  186. </view>
  187. <view
  188. class="notice-content-box"
  189. v-for="(item, index) in attractList"
  190. :key="index"
  191. style="justify-content: start; position: relative;border-radius: 0;"
  192. @click="goAttractDeatil(item.id, item.time_type)"
  193. >
  194. <view class="maskModal" v-if="item.time_type == 0">
  195. <text>敬请期待</text>
  196. </view>
  197. <image
  198. :src="item.pic_url"
  199. mode="aspectFill"
  200. style="
  201. width: 112rpx;
  202. height: 112rpx;
  203. margin-right: 20rpx;
  204. border-radius: 10rpx;
  205. "
  206. ></image>
  207. <view class="notice-content" style="width: 75%">
  208. <view class="notice-content-font">{{ item.title }}</view>
  209. <view class="attract-content">{{ item.desc }}</view>
  210. <view
  211. class="notice-content-time"
  212. style="margin-top: 20rpx; font-size: 26rpx"
  213. v-if="item.time_type == 1"
  214. >{{ item.time | globalTime }}</view
  215. >
  216. <view
  217. class="notice-content-time"
  218. style="margin-top: 20rpx; font-size: 26rpx"
  219. v-else
  220. >时间:待定</view
  221. >
  222. </view>
  223. </view>
  224. </view>
  225. <view class="notice-box" style="margin-top: 40rpx;width:90%;">
  226. <view class="notice-title-box" style="margin: 0 auto;margin-bottom: 30rpx;">
  227. <view class="notice-font">区内活动</view>
  228. <view class="notice-more-font">
  229. <view style="margin-right: 8rpx; font-size: 26rpx" @click="goActive"
  230. >更多</view
  231. >
  232. <image
  233. src="/static/right-arrow-blue.png"
  234. mode="aspectFill"
  235. style="width: 12rpx; height: 16rpx"
  236. ></image>
  237. </view>
  238. </view>
  239. <view
  240. class="notice-content-box"
  241. v-for="(item, index) in activityList"
  242. :key="index"
  243. style="justify-content: start; padding: 30rpx 0 30rpx 30rpx;border-radius: 0;"
  244. @click="goActiveDeatil(item.id)"
  245. >
  246. <image
  247. :src="item.url"
  248. style="
  249. width: 112rpx;
  250. height: 112rpx;
  251. margin-right: 20rpx;
  252. border-radius: 10%;
  253. "
  254. ></image>
  255. <view class="notice-content" style="width: 75%">
  256. <view class="notice-content-font">{{
  257. item.title
  258. }}</view>
  259. <view class="display-flex-start" style="margin-top: 20rpx">
  260. <view class="notice-content-time display-flex-start color-a7adba"
  261. v-show="item.isOnline" style="width: 15%;">
  262. <view class="online-box"></view>线上</view>
  263. <view class="notice-content-time display-flex-start color-a7adba"
  264. v-show="!item.isOnline" style="width: 15%;">
  265. <view class="offline-box"></view>线下</view>
  266. <view class="notice-content-time color-a7adba" style="width: 80%;overflow: hidden;text-overflow: ellipsis;white-space: nowrap;">
  267. {{item.department}}
  268. </view>
  269. <!-- <view class="notice-content-time color-a7adba">
  270. {{item.time}}
  271. </view> -->
  272. </view>
  273. <view class="display-between" style="margin-top: 20rpx">
  274. <view class="notice-content-time color-a7adba">
  275. {{item.time}}
  276. </view>
  277. <view class="display-flex-start">
  278. <view class="notice-content-time">浏览 {{ item.browe }}</view>
  279. <view class="notice-content-time">分享 {{ item.share }}</view>
  280. </view>
  281. </view>
  282. </view>
  283. </view>
  284. </view>
  285. <foot-tabs :selectedIndex="0" :isShow="footFlag"></foot-tabs>
  286. </view>
  287. </template>
  288. <script>
  289. import md5 from "@/common/md5.js";
  290. import topTitle from "@/components/top-title/top-title.vue";
  291. import footTabs from "@/components/foot-tabs/footTabs.vue";
  292. export default {
  293. components: {
  294. "foot-tabs": footTabs,
  295. "top-title": topTitle,
  296. },
  297. data() {
  298. return {
  299. title: "Air企通",
  300. scrollVal: Number,
  301. footFlag: true,
  302. btnPos:uni.getMenuButtonBoundingClientRect().top + 6,
  303. swiperList: [
  304. {
  305. img: "/static/swiper/swiper1.jpg",
  306. },
  307. {
  308. img: "/static/swiper/swiper2.jpg",
  309. },
  310. ],
  311. swiperCurrent: 0,
  312. navList: [
  313. {
  314. url: "/static/navList/appeal.png",
  315. path: "/pages/appeal/index",
  316. content: "提诉求",
  317. },
  318. {
  319. url: "/static/navList/policy.png",
  320. path: "/pages/policy/index",
  321. content: "搜政策",
  322. },
  323. {
  324. url: "/static/navList/park.png",
  325. path: "/pages/park/index",
  326. content: "找园区",
  327. },
  328. {
  329. url: "/static/navList/activity.png",
  330. path: "/pages/activity/index",
  331. content: "找活动",
  332. },
  333. {
  334. url: "/static/navList/supply.png",
  335. path: "/pages/supply/index",
  336. content: "发供需",
  337. },
  338. {
  339. url: "/static/navList/enterprise.png",
  340. path: "/pages/enterprise/index",
  341. content: "查企业",
  342. },
  343. {
  344. url: "/static/navList/service.png",
  345. path: "/pages/service/index",
  346. content: "找服务",
  347. },
  348. ],
  349. noticeList: [
  350. // {
  351. // url: "/static/navList/policy-icon.png",
  352. // title: "政策速览 | 小微企业、个体工商户税费...",
  353. // time: "2021-08-05",
  354. // },
  355. // {
  356. // url: "/static/navList/activity-icon.png",
  357. // title: "活动预告 | 想了解跨境电商?8月5日带...",
  358. // time: "2021-08-04",
  359. // },
  360. // {
  361. // url: "/static/navList/notice-icon.png",
  362. // title: "通知公告 | 2022年首批次重点新材料扶...",
  363. // time: "2021-08-03",
  364. // },
  365. ],
  366. parkList: [
  367. // {
  368. // url:'/static/park/1.png',
  369. // title:'华潮科技产业园',
  370. // time:'2015-10-25',
  371. // num:484,
  372. // area1:1.72,
  373. // area2:1.01
  374. // },
  375. // {
  376. // url:'/static/park/1.png',
  377. // title:'华潮科技产业园',
  378. // time:'2015-10-25',
  379. // num:484,
  380. // area1:1.72,
  381. // area2:1.01
  382. // },
  383. // {
  384. // url:'/static/park/1.png',
  385. // title:'华潮科技产业园',
  386. // time:'2015-10-25',
  387. // num:484,
  388. // area1:1.72,
  389. // area2:1.01
  390. // },
  391. ],
  392. attractList: [
  393. // {
  394. // url: "/static/attract/1.png",
  395. // title: "工业互联网",
  396. // subtitle: "工业互联网是全球工业系统与高级计算、分析、...",
  397. // time: "2021-09-05",
  398. // },
  399. // {
  400. // url: "/static/attract/2.png",
  401. // title: "生产性服务业",
  402. // subtitle: "生产性服务业是指为保持工业生产过程的连续性...",
  403. // time: "2021-09-05",
  404. // },
  405. ],
  406. activityList: [
  407. // {
  408. // url: "/static/activity/2.png",
  409. // title: "400场讲座,200门课程,免费送上门!就等你申请",
  410. // isOnline: 1,
  411. // department: "区人力资源局",
  412. // time: "2021-09-05",
  413. // browe: "322",
  414. // share: "2",
  415. // },
  416. // {
  417. // url: "/static/activity/1.png",
  418. // title: "智能制造商标品牌培育系列培训活动",
  419. // isOnline: 0,
  420. // department: "市场监督管理局",
  421. // time: "2021-09-05",
  422. // browe: "322",
  423. // share: "2",
  424. // },
  425. ],
  426. };
  427. },
  428. onShow() {
  429. uni.hideTabBar({});
  430. this.getActive();
  431. },
  432. onLoad() {
  433. uni.showLoading({
  434. title: "加载中",
  435. mask: true,
  436. });
  437. this.getSwiperList();
  438. this.getPark();
  439. this.getNotice();
  440. this.getAttract(); //招商接口
  441. },
  442. onShareAppMessage() {
  443. url: "/pages/index/index";
  444. },
  445. methods: {
  446. swiperChange(e) {
  447. this.swiperCurrent = e.detail.current;
  448. },
  449. swiperNavGoPage(info){
  450. let pageObj = {
  451. 'consult':'/pages/appeal/index',
  452. 'policy':'/pages/policy/index',
  453. 'park':'/pages/park/index',
  454. 'activity':'/pages/activity/index',
  455. 'notice':'/pages/notice/index',
  456. 'company':'/pages/enterprise/index',
  457. }
  458. let pageDetailObj = {
  459. 'consult':'/pages/appeal/appeal_detail?id=',
  460. 'policy':'/pages/policy/policy_deatil?id=',
  461. 'park':'/pages/park/park_detail?id=',
  462. 'activity':'/pages/activity/activity_detail?id=',
  463. 'notice':'/pages/notice/notice_detail?id=',
  464. 'company':'/pages/enterprise/enterprise_detail?id=',
  465. }
  466. console.log(info.link_table,info.link_id)
  467. if(info.link_table){
  468. if(info.link_id && info.link_id != '0'){
  469. uni.navigateTo({
  470. url:pageDetailObj[info.link_table] + info.link_id
  471. })
  472. }else {
  473. uni.navigateTo({
  474. url:pageObj[info.link_table]
  475. })
  476. }
  477. }else {
  478. return
  479. }
  480. },
  481. getSwiperList() {
  482. let md5Sign = md5(
  483. "method=" +
  484. "common" +
  485. "&timestamp=" +
  486. getApp().globalData.globalTimestamp +
  487. "&secret=" +
  488. getApp().globalData.secret
  489. );
  490. let url =
  491. getApp().globalData.shareUrl +
  492. "api/api.php" +
  493. "?method=common&source=main_pics&action=list&timestamp=" +
  494. getApp().globalData.globalTimestamp +
  495. "&sign=" +
  496. md5Sign;
  497. uni.request({
  498. url: url,
  499. method: "POST",
  500. header: {
  501. "content-type": "application/x-www-form-urlencoded",
  502. },
  503. data: {
  504. order_by: "weight desc",
  505. s_status: 1,
  506. page: 1,
  507. page_size: 7,
  508. },
  509. success: (res) => {
  510. console.log(res);
  511. if (res.data.code === 200) {
  512. res.data.data.list.forEach((item) => {
  513. item.pic_path = getApp().globalData.shareUrl + item.pic_path;
  514. });
  515. this.swiperList = res.data.data.list;
  516. }
  517. },
  518. fail: () => {
  519. console.log("连接失败");
  520. },
  521. });
  522. },
  523. getPark() {
  524. let md5Sign = md5(
  525. "method=" +
  526. "park" +
  527. "&timestamp=" +
  528. getApp().globalData.globalTimestamp +
  529. "&secret=" +
  530. getApp().globalData.secret
  531. );
  532. let url =
  533. getApp().globalData.shareUrl +
  534. "api/api.php" +
  535. "?method=park&source=park&action=list&timestamp=" +
  536. getApp().globalData.globalTimestamp +
  537. "&sign=" +
  538. md5Sign;
  539. uni.request({
  540. url: url,
  541. method: "POST",
  542. header: {
  543. "content-type": "application/x-www-form-urlencoded",
  544. },
  545. data: {
  546. order_by: "weight desc",
  547. s_show: 1,
  548. page: 1,
  549. page_size: 5,
  550. },
  551. success: (res) => {
  552. if (res.data.code === 200) {
  553. res.data.data.list.forEach((item) => {
  554. if (item.park_pics.length) {
  555. item.park_pics[0].pic_path =
  556. getApp().globalData.shareUrl + item.park_pics[0].pic_path;
  557. }
  558. });
  559. this.parkList = res.data.data.list;
  560. }
  561. },
  562. fail: () => {
  563. console.log("连接失败");
  564. },
  565. });
  566. },
  567. getNotice() {
  568. let md5Sign = md5(
  569. "method=" +
  570. "common" +
  571. "&timestamp=" +
  572. getApp().globalData.globalTimestamp +
  573. "&secret=" +
  574. getApp().globalData.secret
  575. );
  576. let url =
  577. getApp().globalData.shareUrl +
  578. "api/api.php" +
  579. "?method=common&source=notice&action=list&timestamp=" +
  580. getApp().globalData.globalTimestamp +
  581. "&sign=" +
  582. md5Sign;
  583. uni.request({
  584. url: url,
  585. method: "POST",
  586. header: {
  587. "content-type": "application/x-www-form-urlencoded",
  588. },
  589. data: {
  590. // order_by: "weight desc",
  591. // s_show: 1,
  592. page: 1,
  593. page_size:3,
  594. },
  595. success: (res) => {
  596. if (res.data.code === 200) {
  597. // console.log(res.data.data.list);
  598. this.noticeList = res.data.data.list.map((item) => {
  599. switch (item.type) {
  600. case "1":
  601. item.icon = "/static/navList/activity-icon.png";
  602. // item.title = "活动预告 | " + item.title;
  603. break;
  604. case "2":
  605. item.icon = "/static/navList/policy-icon.png";
  606. // item.title = "政策速览 | " + item.title;
  607. break;
  608. case "3":
  609. item.icon = "/static/navList/notice-icon.png";
  610. // item.title = "通知公告 | " + item.title;
  611. break;
  612. }
  613. return item;
  614. });
  615. }
  616. console.log(this.noticeList)
  617. },
  618. fail: () => {
  619. console.log("连接失败");
  620. },
  621. });
  622. },
  623. getAttract() {
  624. let md5Sign = md5(
  625. "method=" +
  626. "common" +
  627. "&timestamp=" +
  628. getApp().globalData.globalTimestamp +
  629. "&secret=" +
  630. getApp().globalData.secret
  631. );
  632. let url =
  633. getApp().globalData.shareUrl +
  634. "api/api.php" +
  635. "?method=common&source=business&action=list&timestamp=" +
  636. getApp().globalData.globalTimestamp +
  637. "&sign=" +
  638. md5Sign;
  639. let postData = {
  640. // page: 1,
  641. // page_size: 4,
  642. };
  643. uni.request({
  644. url: url,
  645. method: "POST",
  646. header: {
  647. "content-type": "application/x-www-form-urlencoded",
  648. },
  649. data: postData,
  650. success: (res) => {
  651. if (res.data.code === 200) {
  652. res.data.data.list.forEach((item) => {
  653. item.pic_url = getApp().globalData.shareUrl + item.pic_url;
  654. });
  655. this.attractList = res.data.data.list.filter(
  656. (item) => item.show != 0
  657. );
  658. this.attractList = this.attractList.length > 2 ? this.attractList.slice(0,2) : this.attractList
  659. }
  660. },
  661. fail: () => {
  662. console.log("连接失败");
  663. },
  664. });
  665. },
  666. getActive() {
  667. let md5Sign = md5(
  668. "method=" +
  669. "common" +
  670. "&timestamp=" +
  671. getApp().globalData.globalTimestamp +
  672. "&secret=" +
  673. getApp().globalData.secret
  674. );
  675. let url =
  676. getApp().globalData.shareUrl +
  677. "api/api.php" +
  678. "?method=common&source=activity&action=list&timestamp=" +
  679. getApp().globalData.globalTimestamp +
  680. "&sign=" +
  681. md5Sign;
  682. let postData = {
  683. page: 1,
  684. page_size: 2,
  685. s_cancel : 0
  686. };
  687. uni.request({
  688. url: url,
  689. method: "POST",
  690. header: {
  691. "content-type": "application/x-www-form-urlencoded",
  692. },
  693. data: postData,
  694. success: (res) => {
  695. console.log(res);
  696. if (res.data.code === 200) {
  697. let list = res.data.data.list;
  698. this.activityList = list.map((item) => {
  699. /*
  700. url: "/static/activity/2.png",
  701. title: "智能制造商标品牌培育系列培训活动",
  702. way: "市场监督管理局",
  703. date: "2021-08-07",
  704. read: 322,
  705. share: 1,
  706. type: 0, //0线下
  707. */
  708. let ob = {
  709. url: "",
  710. title: "",
  711. department: "",
  712. time: "",
  713. browe: 0,
  714. share: 0,
  715. type: "",
  716. id: "",
  717. };
  718. ob.url = item.pic_url ? getApp().globalData.shareUrl + item.pic_url : '/static/activity/default.png';
  719. ob.title = item.name;
  720. ob.department = item.sponsor;
  721. ob.time = this.$options.filters["globalTime"](item.start_time);
  722. ob.browe =
  723. parseInt(item.base_read_count) + parseInt(item.real_read_count);
  724. ob.share =
  725. parseInt(item.real_repost_count) +
  726. parseInt(item.base_repost_count);
  727. ob.isOnline = item.type == 1 ? 1 : 0;
  728. ob.id = item.id;
  729. return ob;
  730. });
  731. }
  732. },
  733. fail: () => {
  734. console.log("连接失败");
  735. },
  736. });
  737. },
  738. goParkDetailFn(id) {
  739. uni.navigateTo({
  740. url: "/pages/park/park_deatil?id=" + id,
  741. });
  742. },
  743. goNoticeDeatil(id) {
  744. uni.navigateTo({
  745. url: "/pages/notice/notice_deatil?id=" + id,
  746. });
  747. },
  748. goAttractDeatil(id, type) {
  749. if (type == "0") return;
  750. uni.navigateTo({
  751. url: "/pages/attract/attract_deatil?id=" + id,
  752. });
  753. },
  754. goActiveDeatil(id) {
  755. uni.navigateTo({
  756. url: "/pages/activity/activity_deatil?id=" + id,
  757. });
  758. },
  759. goAttract() {
  760. uni.navigateTo({
  761. url: "/pages/attract/index",
  762. });
  763. },
  764. goNotice() {
  765. uni.navigateTo({
  766. url: "/pages/notice/index",
  767. });
  768. },
  769. goActive() {
  770. uni.navigateTo({
  771. url: "/pages/activity/index",
  772. });
  773. },
  774. },
  775. onPageScroll(e) {
  776. this.scrollVal = e.scrollTop;
  777. if (e.scrollTop < uni.getSystemInfoSync().windowHeight) {
  778. this.footFlag = true;
  779. }
  780. },
  781. onReachBottom(e) {
  782. this.footFlag = false;
  783. },
  784. };
  785. </script>
  786. <style>
  787. .unclick {
  788. background-color: #bfbfbf !important;
  789. }
  790. .content {
  791. display: flex;
  792. flex-direction: column;
  793. align-items: center;
  794. justify-content: center;
  795. position: relative;
  796. }
  797. .logo {
  798. height: 200rpx;
  799. width: 200rpx;
  800. margin-top: 200rpx;
  801. margin-left: auto;
  802. margin-right: auto;
  803. margin-bottom: 50rpx;
  804. }
  805. .text-area {
  806. display: flex;
  807. justify-content: center;
  808. }
  809. .title {
  810. font-size: 36rpx;
  811. color: #8f8f94;
  812. }
  813. .groove-img {
  814. width: 100%;
  815. height: 100rpx;
  816. bottom: -22rpx;
  817. position: absolute;
  818. }
  819. .rowDot {
  820. display: flex;
  821. position: absolute;
  822. top: 310rpx;
  823. left: 80rpx;
  824. }
  825. .dots {
  826. flex-direction: row;
  827. justify-content: center;
  828. align-items: center;
  829. align-content: center;
  830. }
  831. .dot {
  832. margin-right: 8rpx;
  833. width: 40rpx;
  834. height: 8rpx;
  835. opacity: 1;
  836. border-radius: 6rpx;
  837. background: #fff5f9;
  838. }
  839. .dot.active {
  840. background: #ff4e54;
  841. }
  842. /* .swiper-content { */
  843. /* border-radius: 0 0 10% 10%; */
  844. /* } */
  845. .page-nav-box {
  846. width: 88%;
  847. /* height: 320rpx; */
  848. display: flex;
  849. flex-wrap: wrap;
  850. padding: 20rpx 10rpx 30rpx 10rpx;
  851. box-shadow: 0px 2px 16px rgba(0, 0, 0, 0.1);
  852. border-radius: 16rpx;
  853. position: absolute;
  854. top: 360rpx;
  855. background-color: #fff;
  856. }
  857. .nav-content {
  858. width: 25%;
  859. height: 130rpx;
  860. display: flex;
  861. flex-direction: column;
  862. align-items: center;
  863. margin-top: 20rpx;
  864. font-size: 28rpx;
  865. justify-content: space-around;
  866. letter-spacing: 0.02em;
  867. color: #0d1937;
  868. font-family: PingFang SC;
  869. font-style: normal;
  870. /* font-weight: 600; */
  871. }
  872. .notice-box {
  873. width: 83%;
  874. margin-top: 320rpx;
  875. margin-bottom: 20rpx;
  876. }
  877. .notice-title-box {
  878. width: 100%;
  879. display: flex;
  880. justify-content: space-between;
  881. align-items: center;
  882. margin-bottom: 40rpx;
  883. }
  884. .notice-font {
  885. font-family: PingFang SC;
  886. font-style: normal;
  887. font-weight: bold;
  888. font-size: 38rpx;
  889. letter-spacing: 0.02em;
  890. color: #0d1937;
  891. }
  892. .notice-more-font {
  893. font-size: 28rpx;
  894. color: #146afb;
  895. display: flex;
  896. align-items: center;
  897. }
  898. .notice-content-box {
  899. display: flex;
  900. padding: 30rpx 20rpx 30rpx 20rpx;
  901. background-color: #ffffff;
  902. box-shadow: 0px 4rpx 32rpx rgba(0, 0, 0, 0.1);
  903. border-radius: 32rpx;
  904. margin-top: 20rpx;
  905. justify-content: space-between;
  906. }
  907. .maskModal {
  908. width: 100%;
  909. position: absolute;
  910. background-color: rgba(0, 0, 0, 0.4);
  911. border-radius: 32rpx;
  912. height: 100%;
  913. top: 0;
  914. right: 0;
  915. display: flex;
  916. align-items: center;
  917. justify-content: center;
  918. color: #fff;
  919. font-size: 32rpx;
  920. font-weight: bold;
  921. }
  922. .notice-content-font {
  923. font-size: 32rpx;
  924. color: #0d1937;
  925. /* font-weight: 600; */
  926. overflow: hidden;
  927. text-overflow: ellipsis;
  928. white-space: nowrap;
  929. }
  930. .notice-content-time {
  931. font-size: 26rpx;
  932. letter-spacing: 0.02em;
  933. color: #cfcfcf;
  934. margin-right: 14rpx;
  935. }
  936. .park-box {
  937. border-radius: 32rpx;
  938. margin-right: 20rpx;
  939. position: relative;
  940. height: 500rpx;
  941. }
  942. .park-content-box {
  943. width: 394rpx;
  944. background-color: #ffffff;
  945. border-radius: 56rpx 0px 32rpx 32rpx;
  946. position: absolute;
  947. top: 210rpx;
  948. font-size: 30rpx;
  949. padding: 30rpx;
  950. box-shadow: 0px 2px 16px rgba(0, 0, 0, 0.1);
  951. }
  952. .park-title {
  953. /* font-weight: 600; */
  954. line-height: 36rpx;
  955. letter-spacing: 0.02em;
  956. color: #0d1937;
  957. }
  958. .park-address {
  959. /* font-weight: 600; */
  960. font-size: 26rpx;
  961. letter-spacing: 0.02em;
  962. color: #cfcfcf;
  963. margin-top: 10rpx;
  964. }
  965. .park-title-img {
  966. width: 16rpx;
  967. height: 16rpx;
  968. margin-right: 4rpx;
  969. }
  970. .park-footer-box {
  971. margin-top: 30rpx;
  972. }
  973. .park-footer-img {
  974. width: 24rpx;
  975. height: 24rpx;
  976. margin-right: 6rpx;
  977. }
  978. .park-footer-font {
  979. color: #cfcfcf;
  980. font-size: 24rpx;
  981. margin-top: 10rpx;
  982. }
  983. .width-30 {
  984. width: 30%;
  985. }
  986. .attract-content {
  987. color: #697594;
  988. /* font-weight: 600; */
  989. font-size: 24rpx;
  990. margin-top: 8rpx;
  991. overflow: hidden;
  992. text-overflow: ellipsis;
  993. white-space: nowrap;
  994. }
  995. .online-box {
  996. width: 12rpx;
  997. height: 12rpx;
  998. border-radius: 50%;
  999. background-color: #589cff;
  1000. margin-right: 5rpx;
  1001. }
  1002. .offline-box {
  1003. width: 12rpx;
  1004. height: 12rpx;
  1005. border-radius: 50%;
  1006. background-color: #ffcf86;
  1007. margin-right: 5rpx;
  1008. }
  1009. .color-a7adba {
  1010. color: #a7adba;
  1011. }
  1012. </style>