index.vue 28 KB

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