index.vue 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582
  1. <template>
  2. <view class="content">
  3. <view class="page-section-spacing" style="width: 100%;position: relative;">
  4. <swiper class="swiper"
  5. indicator-dots="false"
  6. autoplay="true"
  7. duration="500"
  8. style="height:400rpx"
  9. @change="swiperChange">
  10. <swiper-item v-for="(item , index) in swiperList" :key="index" class="swiper-content">
  11. <image :src="item.pic_path" mode="aspectFill" style="width: 100%;height: 100%;"></image>
  12. </swiper-item>
  13. </swiper>
  14. <image src="../../static/Intersect.svg" class="groove-img"></image>
  15. <view class="rowDot">
  16. <view v-for="(item,index) in swiperList" :key="index" class="dots">
  17. <view :class="['dot',index === swiperCurrent ? 'active' : '']"></view>
  18. </view>
  19. </view>
  20. </view>
  21. <view class="page-nav-box">
  22. <navigator v-for="(item , index) in navList" :key="index" :url="item.path" open-type="navigate" class="nav-content">
  23. <image :src="item.url" mode="aspectFit" style="width: 38px;height: 38px;"></image>
  24. <view>{{item.content}}</view>
  25. </navigator>
  26. </view>
  27. <view class="notice-box">
  28. <view class="notice-title-box">
  29. <view class="notice-font">通知公告</view>
  30. <view class="notice-more-font">
  31. <view style="margin-right: 8rpx;font-size: 22rpx;">更多</view>
  32. <image src="../../static/right-arrow-blue.png" mode="aspectFill" style="width: 12rpx;height: 16rpx;"></image>
  33. </view>
  34. </view>
  35. <view class="notice-content-box" v-for="(item , index) in noticeList" :key="index">
  36. <image :src="item.url" mode="aspectFit" style="width:34px;height:34px;"></image>
  37. <view class="notice-content display-around-column">
  38. <view class="notice-content-font">{{item.title}}</view>
  39. <view class="notice-content-time">{{item.time}}</view>
  40. </view>
  41. </view>
  42. </view>
  43. <view class="notice-box" style="margin-top: 40rpx;">
  44. <view class="notice-title-box">
  45. <view class="notice-font">推荐园区</view>
  46. <navigator class="notice-more-font" url="../park/index" open-type="navigate">
  47. <view style="margin-right: 8rpx;font-size: 22rpx;">更多</view>
  48. <image src="/static/right-arrow-blue.png" mode="aspectFill" style="width: 12rpx;height: 16rpx;"></image>
  49. </navigator>
  50. </view>
  51. <view class="display-flex-start" style=" overflow:scroll;position:relative">
  52. <view class="park-box" v-for="(item , index) in parkList" :key="item.id" @click="goParkDetailFn(item.id)">
  53. <image :src="item.park_pics[0].pic_path" mode="aspectFill" style="width:452rpx;height:250rpx;border-radius:32rpx 32rpx 0 0;"></image>
  54. <view class="park-content-box">
  55. <view class="park-title">{{item.name}}</view>
  56. <view class="park-address display-flex-start">
  57. <view class="display-flex-start" style="margin-right: 10rpx;"><image src="/static/park/park-time.png" mode="aspectFill" class="park-title-img"></image>{{item.addtime | globalTime}}建成</view>
  58. <view class="display-flex-start"><image src="/static/park/park-name.png" mode="aspectFill" class="park-title-img"></image>{{item.manager}}</view>
  59. </view>
  60. <view class="park-footer-box display-between">
  61. <view class="display-between-column width-30">
  62. <view class="display-flex-start"><image src="/static/park/park-num.png" mode="aspectFill" class="park-footer-img"></image>{{item.company_count}}</view>
  63. <view class="park-footer-font">企业数量</view>
  64. </view>
  65. <view class="display-between-column width-30">
  66. <view class="display-flex-start">
  67. <image src="/static/park/park-area.png" mode="aspectFill" class="park-footer-img"></image>
  68. {{item.cover_area}}<text style="font-size: 12rpx;">万㎡</text></view>
  69. <view class="park-footer-font">占地面积</view>
  70. </view>
  71. <view class="display-between-column width-30">
  72. <view class="display-flex-start">
  73. <image src="/static/park/park-area2.png" mode="aspectFill" class="park-footer-img"></image>
  74. {{item.building_area}}<text style="font-size: 12rpx;">万㎡</text></view>
  75. <view class="park-footer-font">建设面积</view>
  76. </view>
  77. </view>
  78. </view>
  79. </view>
  80. </view>
  81. </view>
  82. <view class="notice-box" style="margin-top:20rpx;">
  83. <view class="notice-title-box">
  84. <view class="notice-font">招商专区</view>
  85. <view class="notice-more-font">
  86. <view style="margin-right: 8rpx;font-size: 22rpx;">更多</view>
  87. <image src="/static/right-arrow-blue.png" mode="aspectFill" style="width: 12rpx;height: 16rpx;"></image>
  88. </view>
  89. </view>
  90. <view class="notice-content-box" v-for="(item , index) in attractList" :key="index" style="justify-content: start;">
  91. <image :src="item.url" mode="aspectFit" style="width:112rpx;height:112rpx;margin-right: 20rpx;"></image>
  92. <view class="notice-content">
  93. <view class="notice-content-font">{{item.title}}</view>
  94. <view class="attract-content">{{item.subtitle}}</view>
  95. <view class="notice-content-time" style="margin-top: 20rpx;">{{item.time}}</view>
  96. </view>
  97. </view>
  98. </view>
  99. <view class="notice-box" style="margin-top:20rpx;">
  100. <view class="notice-title-box">
  101. <view class="notice-font">区内活动</view>
  102. <view class="notice-more-font">
  103. <view style="margin-right: 8rpx;font-size: 22rpx;">更多</view>
  104. <image src="/static/right-arrow-blue.png" mode="aspectFill" style="width: 12rpx;height: 16rpx;"></image>
  105. </view>
  106. </view>
  107. <view class="notice-content-box" v-for="(item , index) in activityList" :key="index" style="justify-content: start;padding: 30rpx 0 30rpx 30rpx;">
  108. <image :src="item.url" mode="aspectFit" style="width:128rpx;height:128rpx;margin-right: 20rpx;"></image>
  109. <view class="notice-content" style="width: 70%;">
  110. <view class="notice-content-font" style="white-space: break-spaces;">{{item.title}}</view>
  111. <view class="display-flex-start" style="margin-top: 20rpx;">
  112. <view class="notice-content-time display-flex-start color-a7adba" v-show="item.isOnline"><view class="online-box"></view>线上</view>
  113. <view class="notice-content-time display-flex-start color-a7adba" v-show="!item.isOnline"><view class="offline-box"></view>线下</view>
  114. <view class="notice-content-time color-a7adba" >{{item.department}}</view>
  115. <view class="notice-content-time color-a7adba" >{{item.time}}</view>
  116. </view>
  117. <view class="display-flex-end" style="margin-top: 20rpx;">
  118. <view class="notice-content-time">浏览 {{item.browe}}</view>
  119. <view class="notice-content-time">分享 {{item.share}}</view>
  120. </view>
  121. </view>
  122. </view>
  123. </view>
  124. <foot-tabs></foot-tabs>
  125. </view>
  126. </template>
  127. <script>
  128. import md5 from '@/common/md5.js';
  129. export default {
  130. data() {
  131. return {
  132. swiperList:[
  133. {
  134. img:'/static/swiper/swiper1.jpg'
  135. },
  136. {
  137. img:'/static/swiper/swiper2.jpg'
  138. },
  139. ],
  140. swiperCurrent:0,
  141. navList:[
  142. {
  143. url:'/static/navList/appeal.png',
  144. path:'/pages/appeal/index',
  145. content:'提诉求'
  146. },
  147. {
  148. url:'/static/navList/policy.png',
  149. path:'/pages/policy/index',
  150. content:'搜政策'
  151. },
  152. {
  153. url:'/static/navList/park.png',
  154. path:'/pages/park/index',
  155. content:'找园区'
  156. },
  157. {
  158. url:'/static/navList/activity.png',
  159. path:'/pages/activity/index',
  160. content:'找活动'
  161. },
  162. {
  163. url:'/static/navList/supply.png',
  164. path:'/pages/supply/index',
  165. content:'发供需'
  166. },
  167. {
  168. url:'/static/navList/enterprise.png',
  169. path:'/pages/enterprise/index',
  170. content:'查企业'
  171. },
  172. {
  173. url:'/static/navList/service.png',
  174. path:'/pages/service/index',
  175. content:'找服务'
  176. },
  177. ],
  178. noticeList:[
  179. {
  180. url:'/static/navList/policy-icon.png',
  181. title:'政策速览 | 小微企业、个体工商户税费...',
  182. time:'2021-08-05'
  183. },
  184. {
  185. url:'/static/navList/activity-icon.png',
  186. title:'活动预告 | 想了解跨境电商?8月5日带...',
  187. time:'2021-08-04'
  188. },
  189. {
  190. url:'/static/navList/notice-icon.png',
  191. title:'通知公告 | 2022年首批次重点新材料扶...',
  192. time:'2021-08-03'
  193. },
  194. ],
  195. parkList:[
  196. // {
  197. // url:'/static/park/1.png',
  198. // title:'华潮科技产业园',
  199. // time:'2015-10-25',
  200. // num:484,
  201. // area1:1.72,
  202. // area2:1.01
  203. // },
  204. // {
  205. // url:'/static/park/1.png',
  206. // title:'华潮科技产业园',
  207. // time:'2015-10-25',
  208. // num:484,
  209. // area1:1.72,
  210. // area2:1.01
  211. // },
  212. // {
  213. // url:'/static/park/1.png',
  214. // title:'华潮科技产业园',
  215. // time:'2015-10-25',
  216. // num:484,
  217. // area1:1.72,
  218. // area2:1.01
  219. // },
  220. ],
  221. attractList:[
  222. {
  223. url:'/static/attract/1.png',
  224. title:'工业互联网',
  225. subtitle:'工业互联网是全球工业系统与高级计算、分析、...',
  226. time:'2021-09-05'
  227. },
  228. {
  229. url:'/static/attract/2.png',
  230. title:'生产性服务业',
  231. subtitle:'生产性服务业是指为保持工业生产过程的连续性...',
  232. time:'2021-09-05'
  233. },
  234. ],
  235. activityList:[
  236. {
  237. url:'/static/activity/2.png',
  238. title:'400场讲座,200门课程,免费送上门!就等你申请',
  239. isOnline:1,
  240. department:'区人力资源局',
  241. time:'2021-09-05',
  242. browe:'322',
  243. share:'2'
  244. },
  245. {
  246. url:'/static/activity/1.png',
  247. title:'智能制造商标品牌培育系列培训活动',
  248. isOnline:0,
  249. department:'市场监督管理局',
  250. time:'2021-09-05',
  251. browe:'322',
  252. share:'2'
  253. },
  254. ],
  255. }
  256. },
  257. onLoad() {
  258. this.getSwiperList();
  259. this.getPark();
  260. // this.loginLoad();
  261. },
  262. methods: {
  263. swiperChange(e){
  264. this.swiperCurrent = e.detail.current
  265. },
  266. loginLoad(){
  267. let that = this;
  268. uni.login({
  269. success(res) {
  270. that.loginRequest(res.code)
  271. }
  272. })
  273. },
  274. loginRequest(codeRes){
  275. let md5Sign = md5("method="+'user'+"&timestamp="+getApp().globalData.globalTimestamp+"&secret="+getApp().globalData.secret)
  276. let url = getApp().globalData.shareUrl+'api/api.php'+'?method=user&source=user&action=login&timestamp='+getApp().globalData.globalTimestamp +'&sign='+md5Sign
  277. uni.request({
  278. url:url,
  279. method: 'POST',
  280. header: {
  281. 'content-type': 'application/x-www-form-urlencoded'
  282. },
  283. data: {
  284. code:codeRes
  285. },
  286. success: (res) => {
  287. console.log(res)
  288. if(res.data.code === 200){
  289. }
  290. },
  291. fail: () => {
  292. console.log("连接失败");
  293. }
  294. });
  295. },
  296. getSwiperList(){
  297. let md5Sign = md5("method="+'common'+"&timestamp="+getApp().globalData.globalTimestamp+"&secret="+getApp().globalData.secret)
  298. let url = getApp().globalData.shareUrl+'api/api.php'+'?method=common&source=main_pics&action=list&timestamp='+getApp().globalData.globalTimestamp +'&sign='+md5Sign
  299. uni.request({
  300. url:url,
  301. method: 'POST',
  302. header: {
  303. 'content-type': 'application/x-www-form-urlencoded'
  304. },
  305. data: {
  306. order_by:"weight desc",
  307. s_status:1,
  308. page:1,
  309. page_size:7
  310. },
  311. success: (res) => {
  312. console.log(res)
  313. if(res.data.code === 200){
  314. res.data.data.list.forEach((item)=>{item.pic_path = getApp().globalData.shareUrl + item.pic_path})
  315. this.swiperList = res.data.data.list;
  316. }
  317. },
  318. fail: () => {
  319. console.log("连接失败");
  320. }
  321. });
  322. },
  323. getPark(){
  324. let md5Sign = md5("method="+'park'+"&timestamp="+getApp().globalData.globalTimestamp+"&secret="+getApp().globalData.secret)
  325. let url = getApp().globalData.shareUrl+'api/api.php'+'?method=park&source=park&action=list&timestamp='+getApp().globalData.globalTimestamp +'&sign='+md5Sign
  326. uni.request({
  327. url:url,
  328. method: 'POST',
  329. header: {
  330. 'content-type': 'application/x-www-form-urlencoded'
  331. },
  332. data: {
  333. order_by:"weight desc",
  334. s_show:1,
  335. // page:1,
  336. // page_size:7
  337. },
  338. success: (res) => {
  339. console.log(res)
  340. if(res.data.code === 200){
  341. res.data.data.list.forEach((item)=>{item.park_pics[0].pic_path = getApp().globalData.shareUrl + item.park_pics[0].pic_path});
  342. this.parkList = res.data.data.list;
  343. }
  344. },
  345. fail: () => {
  346. console.log("连接失败");
  347. }
  348. });
  349. },
  350. goParkDetailFn(id){
  351. uni.navigateTo({
  352. url:'/pages/park/park_deatil?id='+id
  353. })
  354. },
  355. }
  356. }
  357. </script>
  358. <style>
  359. .content {
  360. display: flex;
  361. flex-direction: column;
  362. align-items: center;
  363. justify-content: center;
  364. }
  365. .logo {
  366. height: 200rpx;
  367. width: 200rpx;
  368. margin-top: 200rpx;
  369. margin-left: auto;
  370. margin-right: auto;
  371. margin-bottom: 50rpx;
  372. }
  373. .text-area {
  374. display: flex;
  375. justify-content: center;
  376. }
  377. .title {
  378. font-size: 36rpx;
  379. color: #8f8f94;
  380. }
  381. .groove-img {
  382. width: 100%;
  383. height: 100rpx;
  384. bottom: -22rpx;
  385. position: absolute;
  386. }
  387. .rowDot {
  388. display: flex;
  389. position: absolute;
  390. top: 270rpx;
  391. left: 80rpx;
  392. }
  393. .dots {
  394. flex-direction: row;
  395. justify-content: center;
  396. align-items: center;
  397. align-content: center;
  398. }
  399. .dot {
  400. margin-right: 8rpx;
  401. width: 40rpx;
  402. height: 8rpx;
  403. opacity: 1;
  404. border-radius: 6rpx;
  405. background: #fff5f9;
  406. }
  407. .dot.active {
  408. background: #ff4e54;
  409. }
  410. .swiper-content {
  411. /* border-radius: 0 0 10% 10%; */
  412. }
  413. .page-nav-box {
  414. width: 80%;
  415. /* height: 320rpx; */
  416. display: flex;
  417. flex-wrap: wrap;
  418. padding: 20rpx 10rpx 30rpx 10rpx;
  419. box-shadow: 0px 2px 16px rgba(0, 0, 0, 0.1);
  420. border-radius: 32rpx;
  421. position: absolute;
  422. top: 300rpx;
  423. background-color: #fff;
  424. }
  425. .nav-content {
  426. width: 25%;
  427. height: 130rpx;
  428. display: flex;
  429. flex-direction: column;
  430. align-items: center;
  431. margin-top: 20rpx;
  432. font-size: 22rpx;
  433. justify-content: space-around;
  434. letter-spacing: 0.02em;
  435. color: #0D1937;
  436. font-family: PingFang SC;
  437. font-style: normal;
  438. font-weight: 600;
  439. }
  440. .notice-box{
  441. width: 83%;
  442. margin-top: 300rpx;
  443. margin-bottom:20rpx;
  444. }
  445. .notice-title-box{
  446. width: 100%;
  447. display: flex;
  448. justify-content: space-between;
  449. align-items: center;
  450. margin-bottom:40rpx;
  451. }
  452. .notice-font {
  453. font-family: PingFang SC;
  454. font-style: normal;
  455. font-weight: 600;
  456. font-size: 32rpx;
  457. letter-spacing: 0.02em;
  458. color: #0D1937;
  459. }
  460. .notice-more-font {
  461. font-size: 24rpx;
  462. color: #146AFB;
  463. display: flex;
  464. align-items: center;
  465. }
  466. .notice-content-box {
  467. display: flex;
  468. padding: 30rpx;
  469. background-color: #FFFFFF;
  470. box-shadow: 0px 4rpx 32rpx rgba(0, 0, 0, 0.1);
  471. border-radius: 32rpx;
  472. margin-top: 20rpx;
  473. justify-content: space-between;
  474. }
  475. .notice-content-font {
  476. font-size:26rpx;
  477. color: #0D1937;
  478. font-weight: 600;
  479. overflow: hidden;
  480. text-overflow: ellipsis;
  481. white-space: nowrap;
  482. }
  483. .notice-content-time {
  484. font-size: 18rpx;
  485. letter-spacing: 0.02em;
  486. color: #CFCFCF;
  487. margin-right: 14rpx;
  488. }
  489. .park-box {
  490. border-radius: 32rpx;
  491. margin-right: 20rpx;
  492. position: relative;
  493. height: 450rpx;
  494. }
  495. .park-content-box {
  496. width: 394rpx;
  497. background-color: #FFFFFF;
  498. border-radius: 56rpx 0px 32rpx 32rpx;
  499. position: absolute;
  500. top: 210rpx;
  501. font-size: 24rpx;
  502. padding: 30rpx;
  503. box-shadow: 0px 2px 16px rgba(0, 0, 0, 0.1);
  504. }
  505. .park-title {
  506. font-weight: 600;
  507. line-height: 36rpx;
  508. letter-spacing: 0.02em;
  509. color: #0D1937;
  510. }
  511. .park-address {
  512. font-weight: 600;
  513. font-size: 19rpx;
  514. letter-spacing: 0.02em;
  515. color: #CFCFCF;
  516. margin-top: 10rpx;
  517. }
  518. .park-title-img {
  519. width: 16rpx;
  520. height: 16rpx;
  521. margin-right: 4rpx;
  522. }
  523. .park-footer-box {
  524. margin-top: 30rpx;
  525. }
  526. .park-footer-img{
  527. width: 24rpx;
  528. height: 24rpx;
  529. margin-right: 6rpx;
  530. }
  531. .park-footer-font {
  532. color: #CFCFCF;
  533. font-size: 19rpx;
  534. margin-top: 10rpx;
  535. }
  536. .width-30 {
  537. width: 30%;
  538. }
  539. .attract-content {
  540. color: #697594;
  541. font-weight: 600;
  542. font-size: 20rpx;
  543. margin-top: 8rpx;
  544. overflow: hidden;
  545. text-overflow: ellipsis;
  546. white-space: nowrap;
  547. }
  548. .online-box {
  549. width: 12rpx;
  550. height: 12rpx;
  551. border-radius: 50%;
  552. background-color:#589CFF;
  553. margin-right:5rpx;
  554. }
  555. .offline-box {
  556. width: 12rpx;
  557. height: 12rpx;
  558. border-radius: 50%;
  559. background-color:#FFCF86;
  560. margin-right:5rpx;
  561. }
  562. .color-a7adba{
  563. color: #A7ADBA;
  564. }
  565. </style>