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 :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. noticeList: [
  341. // {
  342. // url: "/static/navList/policy-icon.png",
  343. // title: "政策速览 | 小微企业、个体工商户税费...",
  344. // time: "2021-08-05",
  345. // },
  346. // {
  347. // url: "/static/navList/activity-icon.png",
  348. // title: "活动预告 | 想了解跨境电商?8月5日带...",
  349. // time: "2021-08-04",
  350. // },
  351. // {
  352. // url: "/static/navList/notice-icon.png",
  353. // title: "通知公告 | 2022年首批次重点新材料扶...",
  354. // time: "2021-08-03",
  355. // },
  356. ],
  357. parkList: [
  358. // {
  359. // url:'/static/park/1.png',
  360. // title:'华潮科技产业园',
  361. // time:'2015-10-25',
  362. // num:484,
  363. // area1:1.72,
  364. // area2:1.01
  365. // },
  366. // {
  367. // url:'/static/park/1.png',
  368. // title:'华潮科技产业园',
  369. // time:'2015-10-25',
  370. // num:484,
  371. // area1:1.72,
  372. // area2:1.01
  373. // },
  374. // {
  375. // url:'/static/park/1.png',
  376. // title:'华潮科技产业园',
  377. // time:'2015-10-25',
  378. // num:484,
  379. // area1:1.72,
  380. // area2:1.01
  381. // },
  382. ],
  383. attractList: [
  384. // {
  385. // url: "/static/attract/1.png",
  386. // title: "工业互联网",
  387. // subtitle: "工业互联网是全球工业系统与高级计算、分析、...",
  388. // time: "2021-09-05",
  389. // },
  390. // {
  391. // url: "/static/attract/2.png",
  392. // title: "生产性服务业",
  393. // subtitle: "生产性服务业是指为保持工业生产过程的连续性...",
  394. // time: "2021-09-05",
  395. // },
  396. ],
  397. activityList: [
  398. // {
  399. // url: "/static/activity/2.png",
  400. // title: "400场讲座,200门课程,免费送上门!就等你申请",
  401. // isOnline: 1,
  402. // department: "区人力资源局",
  403. // time: "2021-09-05",
  404. // browe: "322",
  405. // share: "2",
  406. // },
  407. // {
  408. // url: "/static/activity/1.png",
  409. // title: "智能制造商标品牌培育系列培训活动",
  410. // isOnline: 0,
  411. // department: "市场监督管理局",
  412. // time: "2021-09-05",
  413. // browe: "322",
  414. // share: "2",
  415. // },
  416. ],
  417. };
  418. },
  419. onShow() {
  420. uni.hideTabBar({});
  421. this.getActive();
  422. },
  423. onLoad() {
  424. // uni.showLoading({
  425. // title: "加载中",
  426. // mask: true,
  427. // });
  428. this.getSwiperList();
  429. this.getPark();
  430. this.getNotice();
  431. this.getAttract(); //招商接口
  432. },
  433. onShareAppMessage() {
  434. // url: "/pages/index/index";
  435. return {
  436. title: '爱企通',
  437. path: '/pages/index/index',
  438. imageUrl:'/static/shareImg2.png',
  439. }
  440. },
  441. methods: {
  442. swiperChange(e) {
  443. this.swiperCurrent = e.detail.current;
  444. },
  445. swiperNavGoPage(info){
  446. let pageObj = {
  447. 'consult':'/pages/appeal/index',
  448. 'policy':'/pages/policy/index',
  449. 'park':'/pages/park/index',
  450. 'activity':'/pages/activity/index',
  451. 'notice':'/pages/notice/index',
  452. 'company':'/pages/enterprise/index',
  453. }
  454. let pageDetailObj = {
  455. 'consult':'/pages/appeal/appeal_detail?id=',
  456. 'policy':'/pages/policy/policy_deatil?id=',
  457. 'park':'/pages/park/park_detail?id=',
  458. 'activity':'/pages/activity/activity_detail?id=',
  459. 'notice':'/pages/notice/notice_detail?id=',
  460. 'company':'/pages/enterprise/enterprise_detail?id=',
  461. }
  462. console.log(info.link_table,info.link_id)
  463. if(info.link_table){
  464. if(info.link_id && info.link_id != '0'){
  465. uni.navigateTo({
  466. url:pageDetailObj[info.link_table] + info.link_id
  467. })
  468. }else {
  469. uni.navigateTo({
  470. url:pageObj[info.link_table]
  471. })
  472. }
  473. }else {
  474. return
  475. }
  476. },
  477. goOtherPage(item){
  478. uni.navigateTo({
  479. url:item.path
  480. })
  481. },
  482. getSwiperList() {
  483. let md5Sign = md5(
  484. "method=" +
  485. "common" +
  486. "&timestamp=" +
  487. getApp().globalData.globalTimestamp +
  488. "&secret=" +
  489. getApp().globalData.secret
  490. );
  491. let url =
  492. getApp().globalData.shareUrl +
  493. "api/api.php" +
  494. "?method=common&source=main_pics&action=list&timestamp=" +
  495. getApp().globalData.globalTimestamp +
  496. "&sign=" +
  497. md5Sign;
  498. uni.request({
  499. url: url,
  500. method: "POST",
  501. header: {
  502. "content-type": "application/x-www-form-urlencoded",
  503. },
  504. data: {
  505. order_by: "weight desc",
  506. s_status: 1,
  507. page: 1,
  508. page_size: 7,
  509. },
  510. success: (res) => {
  511. console.log(res);
  512. if (res.data.code === 200) {
  513. res.data.data.list.forEach((item) => {
  514. item.pic_path = getApp().globalData.shareUrl + item.pic_path;
  515. });
  516. this.swiperList = res.data.data.list;
  517. // this.shareImgUrl = res.data.data.list[0].pic_path
  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. order_by : "weight desc,id desc"
  689. };
  690. uni.request({
  691. url: url,
  692. method: "POST",
  693. header: {
  694. "content-type": "application/x-www-form-urlencoded",
  695. },
  696. data: postData,
  697. success: (res) => {
  698. console.log(res);
  699. if (res.data.code === 200) {
  700. let list = res.data.data.list;
  701. this.activityList = list.map((item) => {
  702. /*
  703. url: "/static/activity/2.png",
  704. title: "智能制造商标品牌培育系列培训活动",
  705. way: "市场监督管理局",
  706. date: "2021-08-07",
  707. read: 322,
  708. share: 1,
  709. type: 0, //0线下
  710. */
  711. let ob = {
  712. url: "",
  713. title: "",
  714. department: "",
  715. time: "",
  716. browe: 0,
  717. share: 0,
  718. type: "",
  719. id: "",
  720. };
  721. ob.url = item.pic_url ? getApp().globalData.shareUrl + item.pic_url : '/static/activity/default.png';
  722. ob.title = item.name;
  723. ob.department = item.sponsor;
  724. ob.time = this.$options.filters["globalTime"](item.start_time);
  725. ob.browe = parseInt(item.base_read_count) + parseInt(item.real_read_count);
  726. ob.share = parseInt(item.real_repost_count) + 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>