index.vue 28 KB

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