index.vue 28 KB

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