index.vue 28 KB

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