index.vue 28 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040
  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. if(item.content === '发供需'){
  478. if(getApp().globalData.globalAuth){
  479. uni.navigateTo({
  480. url:item.path
  481. })
  482. }else {
  483. uni.showToast({
  484. title: "您还没有登录授权",
  485. duration: 2500,
  486. icon: "none",
  487. });
  488. return;
  489. }
  490. }else {
  491. uni.navigateTo({
  492. url:item.path
  493. })
  494. }
  495. },
  496. getSwiperList() {
  497. let md5Sign = md5(
  498. "method=" +
  499. "common" +
  500. "&timestamp=" +
  501. getApp().globalData.globalTimestamp +
  502. "&secret=" +
  503. getApp().globalData.secret
  504. );
  505. let url =
  506. getApp().globalData.shareUrl +
  507. "api/api.php" +
  508. "?method=common&source=main_pics&action=list&timestamp=" +
  509. getApp().globalData.globalTimestamp +
  510. "&sign=" +
  511. md5Sign;
  512. uni.request({
  513. url: url,
  514. method: "POST",
  515. header: {
  516. "content-type": "application/x-www-form-urlencoded",
  517. },
  518. data: {
  519. order_by: "weight desc",
  520. s_status: 1,
  521. page: 1,
  522. page_size: 7,
  523. },
  524. success: (res) => {
  525. console.log(res);
  526. if (res.data.code === 200) {
  527. res.data.data.list.forEach((item) => {
  528. item.pic_path = getApp().globalData.shareUrl + item.pic_path;
  529. });
  530. this.swiperList = res.data.data.list;
  531. }
  532. },
  533. fail: () => {
  534. console.log("连接失败");
  535. },
  536. });
  537. },
  538. getPark() {
  539. let md5Sign = md5(
  540. "method=" +
  541. "park" +
  542. "&timestamp=" +
  543. getApp().globalData.globalTimestamp +
  544. "&secret=" +
  545. getApp().globalData.secret
  546. );
  547. let url =
  548. getApp().globalData.shareUrl +
  549. "api/api.php" +
  550. "?method=park&source=park&action=list&timestamp=" +
  551. getApp().globalData.globalTimestamp +
  552. "&sign=" +
  553. md5Sign;
  554. uni.request({
  555. url: url,
  556. method: "POST",
  557. header: {
  558. "content-type": "application/x-www-form-urlencoded",
  559. },
  560. data: {
  561. order_by: "weight desc",
  562. s_show: 1,
  563. page: 1,
  564. page_size: 5,
  565. },
  566. success: (res) => {
  567. if (res.data.code === 200) {
  568. res.data.data.list.forEach((item) => {
  569. if (item.park_pics.length) {
  570. item.park_pics[0].pic_path =
  571. getApp().globalData.shareUrl + item.park_pics[0].pic_path;
  572. }
  573. });
  574. this.parkList = res.data.data.list;
  575. }
  576. },
  577. fail: () => {
  578. console.log("连接失败");
  579. },
  580. });
  581. },
  582. getNotice() {
  583. let md5Sign = md5(
  584. "method=" +
  585. "common" +
  586. "&timestamp=" +
  587. getApp().globalData.globalTimestamp +
  588. "&secret=" +
  589. getApp().globalData.secret
  590. );
  591. let url =
  592. getApp().globalData.shareUrl +
  593. "api/api.php" +
  594. "?method=common&source=notice&action=list&timestamp=" +
  595. getApp().globalData.globalTimestamp +
  596. "&sign=" +
  597. md5Sign;
  598. uni.request({
  599. url: url,
  600. method: "POST",
  601. header: {
  602. "content-type": "application/x-www-form-urlencoded",
  603. },
  604. data: {
  605. // order_by: "weight desc",
  606. // s_show: 1,
  607. page: 1,
  608. page_size:3,
  609. },
  610. success: (res) => {
  611. if (res.data.code === 200) {
  612. // console.log(res.data.data.list);
  613. this.noticeList = res.data.data.list.map((item) => {
  614. switch (item.type) {
  615. case "1":
  616. item.icon = "/static/navList/activity-icon.png";
  617. // item.title = "活动预告 | " + item.title;
  618. break;
  619. case "2":
  620. item.icon = "/static/navList/policy-icon.png";
  621. // item.title = "政策速览 | " + item.title;
  622. break;
  623. case "3":
  624. item.icon = "/static/navList/notice-icon.png";
  625. // item.title = "通知公告 | " + item.title;
  626. break;
  627. }
  628. return item;
  629. });
  630. }
  631. console.log(this.noticeList)
  632. },
  633. fail: () => {
  634. console.log("连接失败");
  635. },
  636. });
  637. },
  638. getAttract() {
  639. let md5Sign = md5(
  640. "method=" +
  641. "common" +
  642. "&timestamp=" +
  643. getApp().globalData.globalTimestamp +
  644. "&secret=" +
  645. getApp().globalData.secret
  646. );
  647. let url =
  648. getApp().globalData.shareUrl +
  649. "api/api.php" +
  650. "?method=common&source=business&action=list&timestamp=" +
  651. getApp().globalData.globalTimestamp +
  652. "&sign=" +
  653. md5Sign;
  654. let postData = {
  655. // page: 1,
  656. // page_size: 4,
  657. };
  658. uni.request({
  659. url: url,
  660. method: "POST",
  661. header: {
  662. "content-type": "application/x-www-form-urlencoded",
  663. },
  664. data: postData,
  665. success: (res) => {
  666. if (res.data.code === 200) {
  667. res.data.data.list.forEach((item) => {
  668. item.pic_url = getApp().globalData.shareUrl + item.pic_url;
  669. });
  670. this.attractList = res.data.data.list.filter(
  671. (item) => item.show != 0
  672. );
  673. this.attractList = this.attractList.length > 2 ? this.attractList.slice(0,2) : this.attractList
  674. }
  675. },
  676. fail: () => {
  677. console.log("连接失败");
  678. },
  679. });
  680. },
  681. getActive() {
  682. let md5Sign = md5(
  683. "method=" +
  684. "common" +
  685. "&timestamp=" +
  686. getApp().globalData.globalTimestamp +
  687. "&secret=" +
  688. getApp().globalData.secret
  689. );
  690. let url =
  691. getApp().globalData.shareUrl +
  692. "api/api.php" +
  693. "?method=common&source=activity&action=list&timestamp=" +
  694. getApp().globalData.globalTimestamp +
  695. "&sign=" +
  696. md5Sign;
  697. let postData = {
  698. page: 1,
  699. page_size: 2,
  700. s_cancel : 0
  701. };
  702. uni.request({
  703. url: url,
  704. method: "POST",
  705. header: {
  706. "content-type": "application/x-www-form-urlencoded",
  707. },
  708. data: postData,
  709. success: (res) => {
  710. console.log(res);
  711. if (res.data.code === 200) {
  712. let list = res.data.data.list;
  713. this.activityList = list.map((item) => {
  714. /*
  715. url: "/static/activity/2.png",
  716. title: "智能制造商标品牌培育系列培训活动",
  717. way: "市场监督管理局",
  718. date: "2021-08-07",
  719. read: 322,
  720. share: 1,
  721. type: 0, //0线下
  722. */
  723. let ob = {
  724. url: "",
  725. title: "",
  726. department: "",
  727. time: "",
  728. browe: 0,
  729. share: 0,
  730. type: "",
  731. id: "",
  732. };
  733. ob.url = item.pic_url ? getApp().globalData.shareUrl + item.pic_url : '/static/activity/default.png';
  734. ob.title = item.name;
  735. ob.department = item.sponsor;
  736. ob.time = this.$options.filters["globalTime"](item.start_time);
  737. ob.browe =
  738. parseInt(item.base_read_count) + parseInt(item.real_read_count);
  739. ob.share =
  740. parseInt(item.real_repost_count) +
  741. parseInt(item.base_repost_count);
  742. ob.isOnline = item.type == 1 ? 1 : 0;
  743. ob.id = item.id;
  744. return ob;
  745. });
  746. }
  747. },
  748. fail: () => {
  749. console.log("连接失败");
  750. },
  751. });
  752. },
  753. goParkDetailFn(id) {
  754. uni.navigateTo({
  755. url: "/pages/park/park_deatil?id=" + id,
  756. });
  757. },
  758. goNoticeDeatil(id) {
  759. uni.navigateTo({
  760. url: "/pages/notice/notice_deatil?id=" + id,
  761. });
  762. },
  763. goAttractDeatil(id, type) {
  764. if (type == "0") return;
  765. uni.navigateTo({
  766. url: "/pages/attract/attract_deatil?id=" + id,
  767. });
  768. },
  769. goActiveDeatil(id) {
  770. uni.navigateTo({
  771. url: "/pages/activity/activity_deatil?id=" + id,
  772. });
  773. },
  774. goAttract() {
  775. uni.navigateTo({
  776. url: "/pages/attract/index",
  777. });
  778. },
  779. goNotice() {
  780. uni.navigateTo({
  781. url: "/pages/notice/index",
  782. });
  783. },
  784. goActive() {
  785. uni.navigateTo({
  786. url: "/pages/activity/index",
  787. });
  788. },
  789. },
  790. onPageScroll(e) {
  791. this.scrollVal = e.scrollTop;
  792. if (e.scrollTop < uni.getSystemInfoSync().windowHeight) {
  793. this.footFlag = true;
  794. }
  795. },
  796. onReachBottom(e) {
  797. this.footFlag = false;
  798. },
  799. };
  800. </script>
  801. <style>
  802. .unclick {
  803. background-color: #bfbfbf !important;
  804. }
  805. .content {
  806. display: flex;
  807. flex-direction: column;
  808. align-items: center;
  809. justify-content: center;
  810. position: relative;
  811. }
  812. .logo {
  813. height: 200rpx;
  814. width: 200rpx;
  815. margin-top: 200rpx;
  816. margin-left: auto;
  817. margin-right: auto;
  818. margin-bottom: 50rpx;
  819. }
  820. .text-area {
  821. display: flex;
  822. justify-content: center;
  823. }
  824. .title {
  825. font-size: 36rpx;
  826. color: #8f8f94;
  827. }
  828. .groove-img {
  829. width: 100%;
  830. height: 100rpx;
  831. bottom: -22rpx;
  832. position: absolute;
  833. }
  834. .rowDot {
  835. display: flex;
  836. position: absolute;
  837. top: 310rpx;
  838. left: 80rpx;
  839. }
  840. .dots {
  841. flex-direction: row;
  842. justify-content: center;
  843. align-items: center;
  844. align-content: center;
  845. }
  846. .dot {
  847. margin-right: 8rpx;
  848. width: 40rpx;
  849. height: 8rpx;
  850. opacity: 1;
  851. border-radius: 6rpx;
  852. background: #fff5f9;
  853. }
  854. .dot.active {
  855. background: #ff4e54;
  856. }
  857. /* .swiper-content { */
  858. /* border-radius: 0 0 10% 10%; */
  859. /* } */
  860. .page-nav-box {
  861. width: 88%;
  862. /* height: 320rpx; */
  863. display: flex;
  864. flex-wrap: wrap;
  865. padding: 20rpx 10rpx 30rpx 10rpx;
  866. box-shadow: 0px 2px 16px rgba(0, 0, 0, 0.1);
  867. border-radius: 16rpx;
  868. position: absolute;
  869. top: 360rpx;
  870. background-color: #fff;
  871. }
  872. .nav-content {
  873. width: 25%;
  874. height: 130rpx;
  875. display: flex;
  876. flex-direction: column;
  877. align-items: center;
  878. margin-top: 20rpx;
  879. font-size: 28rpx;
  880. justify-content: space-around;
  881. letter-spacing: 0.02em;
  882. color: #0d1937;
  883. font-family: PingFang SC;
  884. font-style: normal;
  885. /* font-weight: 600; */
  886. }
  887. .notice-box {
  888. width: 83%;
  889. margin-top: 320rpx;
  890. margin-bottom: 20rpx;
  891. }
  892. .notice-title-box {
  893. width: 100%;
  894. display: flex;
  895. justify-content: space-between;
  896. align-items: center;
  897. margin-bottom: 40rpx;
  898. }
  899. .notice-font {
  900. font-family: PingFang SC;
  901. font-style: normal;
  902. font-weight: bold;
  903. font-size: 38rpx;
  904. letter-spacing: 0.02em;
  905. color: #0d1937;
  906. }
  907. .notice-more-font {
  908. font-size: 28rpx;
  909. color: #146afb;
  910. display: flex;
  911. align-items: center;
  912. }
  913. .notice-content-box {
  914. display: flex;
  915. padding: 30rpx 20rpx 30rpx 20rpx;
  916. background-color: #ffffff;
  917. box-shadow: 0px 4rpx 32rpx rgba(0, 0, 0, 0.1);
  918. border-radius: 32rpx;
  919. margin-top: 20rpx;
  920. justify-content: space-between;
  921. }
  922. .maskModal {
  923. width: 100%;
  924. position: absolute;
  925. background-color: rgba(0, 0, 0, 0.4);
  926. border-radius: 32rpx;
  927. height: 100%;
  928. top: 0;
  929. right: 0;
  930. display: flex;
  931. align-items: center;
  932. justify-content: center;
  933. color: #fff;
  934. font-size: 32rpx;
  935. font-weight: bold;
  936. }
  937. .notice-content-font {
  938. font-size: 32rpx;
  939. color: #0d1937;
  940. /* font-weight: 600; */
  941. overflow: hidden;
  942. text-overflow: ellipsis;
  943. white-space: nowrap;
  944. }
  945. .notice-content-time {
  946. font-size: 26rpx;
  947. letter-spacing: 0.02em;
  948. color: #cfcfcf;
  949. margin-right: 14rpx;
  950. }
  951. .park-box {
  952. border-radius: 32rpx;
  953. margin-right: 20rpx;
  954. position: relative;
  955. height: 500rpx;
  956. }
  957. .park-content-box {
  958. width: 394rpx;
  959. background-color: #ffffff;
  960. border-radius: 56rpx 0px 32rpx 32rpx;
  961. position: absolute;
  962. top: 210rpx;
  963. font-size: 30rpx;
  964. padding: 30rpx;
  965. box-shadow: 0px 2px 16px rgba(0, 0, 0, 0.1);
  966. }
  967. .park-title {
  968. /* font-weight: 600; */
  969. line-height: 36rpx;
  970. letter-spacing: 0.02em;
  971. color: #0d1937;
  972. }
  973. .park-address {
  974. /* font-weight: 600; */
  975. font-size: 26rpx;
  976. letter-spacing: 0.02em;
  977. color: #cfcfcf;
  978. margin-top: 10rpx;
  979. }
  980. .park-title-img {
  981. width: 16rpx;
  982. height: 16rpx;
  983. margin-right: 4rpx;
  984. }
  985. .park-footer-box {
  986. margin-top: 30rpx;
  987. }
  988. .park-footer-img {
  989. width: 24rpx;
  990. height: 24rpx;
  991. margin-right: 6rpx;
  992. }
  993. .park-footer-font {
  994. color: #cfcfcf;
  995. font-size: 24rpx;
  996. margin-top: 10rpx;
  997. }
  998. .width-30 {
  999. width: 30%;
  1000. }
  1001. .attract-content {
  1002. color: #697594;
  1003. /* font-weight: 600; */
  1004. font-size: 24rpx;
  1005. margin-top: 8rpx;
  1006. overflow: hidden;
  1007. text-overflow: ellipsis;
  1008. white-space: nowrap;
  1009. }
  1010. .online-box {
  1011. width: 12rpx;
  1012. height: 12rpx;
  1013. border-radius: 50%;
  1014. background-color: #589cff;
  1015. margin-right: 5rpx;
  1016. }
  1017. .offline-box {
  1018. width: 12rpx;
  1019. height: 12rpx;
  1020. border-radius: 50%;
  1021. background-color: #ffcf86;
  1022. margin-right: 5rpx;
  1023. }
  1024. .color-a7adba {
  1025. color: #a7adba;
  1026. }
  1027. </style>