index.vue 28 KB

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