index.vue 15 KB

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