index.vue 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630
  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. <view class="content-box">
  11. <view class="content-font">西安聚达康能源科技有限公司</view>
  12. <view class="call-font">服务热线:13759970386</view>
  13. </view>
  14. <swiper
  15. class="swiper"
  16. indicator-dots="false"
  17. autoplay="true"
  18. duration="500"
  19. style="height: 440rpx"
  20. @change="swiperChange"
  21. >
  22. <swiper-item
  23. v-for="(item, index) in swiperList"
  24. :key="index"
  25. class="swiper-content"
  26. >
  27. <image :src="item.pic_path" mode="aspectFill" style="width: 100%; height: 100%" @click="swiperNavGoPage(item)"></image>
  28. </swiper-item>
  29. </swiper>
  30. <image src="../../static/Intersect.svg" class="groove-img"></image>
  31. <view class="rowDot">
  32. <view v-for="(item, index) in swiperList" :key="index" class="dots">
  33. <view
  34. :class="['dot', index === swiperCurrent ? 'active' : '']"
  35. ></view>
  36. </view>
  37. </view>
  38. </view>
  39. <view class="page-nav-box">
  40. <view v-for="(item, index) in navList" :key="index" class="nav-content" @click="goOtherPage(item)">
  41. <image :src="item.url" mode="aspectFit" style="width: 38px; height: 38px"></image>
  42. <view>{{ item.content }}</view>
  43. </view>
  44. </view>
  45. <view class="notice-box" style="width:90%;">
  46. <view class="notice-title-box" style="margin: 0 auto;margin-bottom: 30rpx;">
  47. <view class="notice-font">缴费订单</view>
  48. <view class="notice-more-font">
  49. <view style="margin-right: 8rpx; font-size: 26rpx" @click="goPayList">更多</view>
  50. <image
  51. src="/static/right-arrow-blue.png"
  52. mode="aspectFill"
  53. style="width: 12rpx; height: 16rpx"
  54. ></image>
  55. </view>
  56. </view>
  57. <view
  58. class="notice-content-box"
  59. v-for="(item, index) in activityList"
  60. :key="index"
  61. style="justify-content: start; padding: 30rpx 0 30rpx 30rpx;border-radius: 0;"
  62. @click="goActiveDeatil(item.id)" >
  63. <image
  64. :src="item.url"
  65. style="
  66. width: 112rpx;
  67. height: 112rpx;
  68. margin-right: 20rpx;
  69. border-radius: 10%;
  70. "
  71. ></image>
  72. <view class="notice-content" style="width: 75%">
  73. <view class="notice-content-font">{{
  74. item.title
  75. }}</view>
  76. <view class="display-flex-start" style="margin-top: 20rpx">
  77. <view class="notice-content-time color-a7adba">
  78. {{item.address}}
  79. </view>
  80. <view class="notice-content-time display-flex-start">
  81. <text class="color-a7adba">¥:</text>
  82. <text class="order-money">{{item.money}}</text>
  83. </view>
  84. </view>
  85. <view class="display-between" style="margin-top: 20rpx">
  86. <view class="notice-content-time color-a7adba" style="visibility: hidden;">
  87. {{item.time}}
  88. </view>
  89. <view class="display-flex-start">
  90. <view class="notice-content-time" style="color: #d9001b;">{{item.orderStatus}}</view>
  91. </view>
  92. </view>
  93. </view>
  94. </view>
  95. </view>
  96. <foot-tabs :selectedIndex="0" :isShow="footFlag"></foot-tabs>
  97. </view>
  98. </template>
  99. <script>
  100. import md5 from "@/common/md5.js";
  101. import topTitle from "@/components/top-title/top-title.vue";
  102. import footTabs from "@/components/foot-tabs/footTabs.vue";
  103. export default {
  104. components: {
  105. "foot-tabs": footTabs,
  106. "top-title": topTitle,
  107. },
  108. data() {
  109. return {
  110. title: "聚达康暖通",
  111. scrollVal: Number,
  112. footFlag: true,
  113. btnPos:uni.getMenuButtonBoundingClientRect().top + 6,
  114. shareImgUrl:'',
  115. swiperList: [
  116. // {
  117. // img: "/static/swiper/swiper1.jpg",
  118. // },
  119. // {
  120. // img: "/static/swiper/swiper2.jpg",
  121. // },
  122. ],
  123. swiperCurrent: 0,
  124. navList: [
  125. {
  126. url: "/static/navList/appeal.png",
  127. path: "/pages/heatingPage/list",
  128. content: "供暖缴费",
  129. },
  130. {
  131. url: "/static/navList/policy.png",
  132. path: "/pages/supply/putSupply",
  133. content: "一件报修",
  134. },
  135. ],
  136. activityList: [
  137. {
  138. url: "/static/order-poster.svg",
  139. title: "2022-2023年度供暖费",
  140. address: "千林郡5号楼1单元10层1001室",
  141. money:'2385.40',
  142. time: "2021-09-05",
  143. orderStatus:'待缴费'
  144. },
  145. {
  146. url: "/static/order-poster.svg",
  147. title: "2022-2023年度供暖费",
  148. address: "千林郡5号楼1单元10层1001室",
  149. money:'2385.40',
  150. time: "2021-09-05",
  151. orderStatus:'已缴费'
  152. },
  153. ],
  154. };
  155. },
  156. onShow() {
  157. uni.hideTabBar({});
  158. //this.getActive();
  159. },
  160. onLoad() {
  161. // uni.showLoading({
  162. // title: "加载中",
  163. // mask: true,
  164. // });
  165. this.getSwiperList();
  166. },
  167. onShareAppMessage() {
  168. // url: "/pages/index/index";
  169. return {
  170. title: '爱企通',
  171. path: '/pages/index/index',
  172. imageUrl:'/static/shareImg2.png',
  173. }
  174. },
  175. methods: {
  176. swiperChange(e) {
  177. this.swiperCurrent = e.detail.current;
  178. },
  179. swiperNavGoPage(info){
  180. let pageObj = {
  181. 'consult':'/pages/appeal/index',
  182. 'policy':'/pages/policy/index',
  183. 'park':'/pages/park/index',
  184. 'activity':'/pages/activity/index',
  185. 'notice':'/pages/notice/index',
  186. 'company':'/pages/enterprise/index',
  187. }
  188. let pageDetailObj = {
  189. 'consult':'/pages/appeal/appeal_detail?id=',
  190. 'policy':'/pages/policy/policy_deatil?id=',
  191. 'park':'/pages/park/park_detail?id=',
  192. 'activity':'/pages/activity/activity_detail?id=',
  193. 'notice':'/pages/notice/notice_detail?id=',
  194. 'company':'/pages/enterprise/enterprise_detail?id=',
  195. }
  196. console.log(info.link_table,info.link_id)
  197. if(info.link_table){
  198. if(info.link_id && info.link_id != '0'){
  199. uni.navigateTo({
  200. url:pageDetailObj[info.link_table] + info.link_id
  201. })
  202. }else {
  203. uni.navigateTo({
  204. url:pageObj[info.link_table]
  205. })
  206. }
  207. }else {
  208. return
  209. }
  210. },
  211. goOtherPage(item){
  212. uni.navigateTo({
  213. url:item.path
  214. })
  215. },
  216. getSwiperList() {
  217. let md5Sign = md5(
  218. "method=" +
  219. "common" +
  220. "&timestamp=" +
  221. getApp().globalData.globalTimestamp +
  222. "&secret=" +
  223. getApp().globalData.secret
  224. );
  225. let url =
  226. getApp().globalData.shareUrl +
  227. "api/api.php" +
  228. "?method=common&source=main_pics&action=list&timestamp=" +
  229. getApp().globalData.globalTimestamp +
  230. "&sign=" +
  231. md5Sign;
  232. uni.request({
  233. url: url,
  234. method: "POST",
  235. header: {
  236. "content-type": "application/x-www-form-urlencoded",
  237. },
  238. data: {
  239. order_by: "weight desc",
  240. s_status: 1,
  241. page: 1,
  242. page_size: 7,
  243. },
  244. success: (res) => {
  245. console.log(res);
  246. if (res.data.code === 200) {
  247. res.data.data.list.forEach((item) => {
  248. item.pic_path = getApp().globalData.shareUrl + item.pic_path;
  249. });
  250. this.swiperList = res.data.data.list;
  251. this.swiperList[0].pic_path = '/static/poster-bg.png'
  252. this.swiperList[1].pic_path = '/static/poster-bg.png'
  253. // this.shareImgUrl = res.data.data.list[0].pic_path
  254. }
  255. },
  256. fail: () => {
  257. console.log("连接失败");
  258. },
  259. });
  260. },
  261. getActive() {
  262. let md5Sign = md5(
  263. "method=" +
  264. "common" +
  265. "&timestamp=" +
  266. getApp().globalData.globalTimestamp +
  267. "&secret=" +
  268. getApp().globalData.secret
  269. );
  270. let url =
  271. getApp().globalData.shareUrl +
  272. "api/api.php" +
  273. "?method=common&source=activity&action=list&timestamp=" +
  274. getApp().globalData.globalTimestamp +
  275. "&sign=" +
  276. md5Sign;
  277. let postData = {
  278. page: 1,
  279. page_size: 2,
  280. s_cancel : 0,
  281. order_by : "weight desc,id desc"
  282. };
  283. uni.request({
  284. url: url,
  285. method: "POST",
  286. header: {
  287. "content-type": "application/x-www-form-urlencoded",
  288. },
  289. data: postData,
  290. success: (res) => {
  291. console.log(res);
  292. if (res.data.code === 200) {
  293. let list = res.data.data.list;
  294. this.activityList = list.map((item) => {
  295. let ob = {
  296. url: "",
  297. title: "",
  298. department: "",
  299. time: "",
  300. browe: 0,
  301. share: 0,
  302. type: "",
  303. id: "",
  304. };
  305. ob.url = item.pic_url ? getApp().globalData.shareUrl + item.pic_url : '/static/activity/default.png';
  306. ob.title = item.name;
  307. ob.department = item.sponsor;
  308. ob.time = this.$options.filters["globalTime"](item.start_time);
  309. ob.browe = parseInt(item.base_read_count) + parseInt(item.real_read_count);
  310. ob.share = parseInt(item.real_repost_count) + parseInt(item.base_repost_count);
  311. ob.isOnline = item.type == 1 ? 1 : 0;
  312. ob.id = item.id;
  313. return ob;
  314. });
  315. }
  316. },
  317. fail: () => {
  318. console.log("连接失败");
  319. },
  320. });
  321. },
  322. goNoticeDeatil(id) {
  323. uni.navigateTo({
  324. url: "/pages/notice/notice_deatil?id=" + id,
  325. });
  326. },
  327. goAttractDeatil(id, type) {
  328. if (type == "0") return;
  329. uni.navigateTo({
  330. url: "/pages/attract/attract_deatil?id=" + id,
  331. });
  332. },
  333. goActiveDeatil(id) {
  334. uni.navigateTo({
  335. url: "/pages/activity/activity_deatil?id=" + id,
  336. });
  337. },
  338. goAttract() {
  339. uni.navigateTo({
  340. url: "/pages/attract/index",
  341. });
  342. },
  343. goNotice() {
  344. uni.navigateTo({
  345. url: "/pages/notice/index",
  346. });
  347. },
  348. goPayList() {
  349. uni.navigateTo({
  350. url: "/pages/heatingPage/list",
  351. });
  352. },
  353. },
  354. onPageScroll(e) {
  355. this.scrollVal = e.scrollTop;
  356. if (e.scrollTop < uni.getSystemInfoSync().windowHeight) {
  357. this.footFlag = true;
  358. }
  359. },
  360. onReachBottom(e) {
  361. this.footFlag = false;
  362. },
  363. };
  364. </script>
  365. <style>
  366. .unclick {
  367. background-color: #bfbfbf !important;
  368. }
  369. .content {
  370. display: flex;
  371. flex-direction: column;
  372. align-items: center;
  373. justify-content: center;
  374. position: relative;
  375. }
  376. .logo {
  377. height: 200rpx;
  378. width: 200rpx;
  379. margin-top: 200rpx;
  380. margin-left: auto;
  381. margin-right: auto;
  382. margin-bottom: 50rpx;
  383. }
  384. .text-area {
  385. display: flex;
  386. justify-content: center;
  387. }
  388. .title {
  389. font-size: 36rpx;
  390. color: #8f8f94;
  391. }
  392. .groove-img {
  393. width: 100%;
  394. height: 100rpx;
  395. bottom: -22rpx;
  396. position: absolute;
  397. }
  398. .rowDot {
  399. display: flex;
  400. position: absolute;
  401. top: 310rpx;
  402. left: 80rpx;
  403. }
  404. .dots {
  405. flex-direction: row;
  406. justify-content: center;
  407. align-items: center;
  408. align-content: center;
  409. }
  410. .dot {
  411. margin-right: 8rpx;
  412. width: 40rpx;
  413. height: 8rpx;
  414. opacity: 1;
  415. border-radius: 6rpx;
  416. background: #fff5f9;
  417. }
  418. .dot.active {
  419. background: #ff4e54;
  420. }
  421. /* .swiper-content { */
  422. /* border-radius: 0 0 10% 10%; */
  423. /* } */
  424. .page-nav-box {
  425. width: 88%;
  426. height: 180rpx;
  427. display: flex;
  428. flex-wrap: wrap;
  429. justify-content: space-around;
  430. align-items: center;
  431. padding: 20rpx 10rpx 30rpx 10rpx;
  432. box-shadow: 0px 2px 16px rgba(0, 0, 0, 0.1);
  433. border-radius: 16rpx;
  434. position: absolute;
  435. top: 360rpx;
  436. background-color: #fff;
  437. }
  438. .nav-content {
  439. width: 25%;
  440. height: 130rpx;
  441. display: flex;
  442. flex-direction: column;
  443. align-items: center;
  444. margin-top: 20rpx;
  445. font-size: 28rpx;
  446. justify-content: space-around;
  447. letter-spacing: 0.02em;
  448. color: #0d1937;
  449. font-family: PingFang SC;
  450. font-style: normal;
  451. /* font-weight: 600; */
  452. }
  453. .notice-box {
  454. width: 90%;
  455. margin-top: 200rpx;
  456. margin-bottom: 20rpx;
  457. }
  458. .notice-title-box {
  459. width: 100%;
  460. display: flex;
  461. justify-content: space-between;
  462. align-items: center;
  463. margin-bottom: 40rpx;
  464. }
  465. .notice-font {
  466. font-family: PingFang SC;
  467. font-style: normal;
  468. font-weight: bold;
  469. font-size: 38rpx;
  470. letter-spacing: 0.02em;
  471. color: #0d1937;
  472. }
  473. .notice-more-font {
  474. font-size: 28rpx;
  475. color: #146afb;
  476. display: flex;
  477. align-items: center;
  478. }
  479. .notice-content-box {
  480. display: flex;
  481. padding: 30rpx 20rpx 30rpx 20rpx;
  482. background-color: #ffffff;
  483. box-shadow: 0px 4rpx 32rpx rgba(0, 0, 0, 0.1);
  484. border-radius: 32rpx;
  485. margin-top: 20rpx;
  486. justify-content: space-between;
  487. }
  488. .maskModal {
  489. width: 100%;
  490. position: absolute;
  491. background-color: rgba(0, 0, 0, 0.4);
  492. border-radius: 32rpx;
  493. height: 100%;
  494. top: 0;
  495. right: 0;
  496. display: flex;
  497. align-items: center;
  498. justify-content: center;
  499. color: #fff;
  500. font-size: 32rpx;
  501. font-weight: bold;
  502. }
  503. .notice-content-font {
  504. font-size: 32rpx;
  505. color: #0d1937;
  506. /* font-weight: 600; */
  507. overflow: hidden;
  508. text-overflow: ellipsis;
  509. white-space: nowrap;
  510. }
  511. .notice-content-time {
  512. font-size: 26rpx;
  513. letter-spacing: 0.02em;
  514. color: #cfcfcf;
  515. }
  516. .park-box {
  517. border-radius: 32rpx;
  518. margin-right: 20rpx;
  519. position: relative;
  520. height: 500rpx;
  521. }
  522. .park-content-box {
  523. width: 394rpx;
  524. background-color: #ffffff;
  525. border-radius: 56rpx 0px 32rpx 32rpx;
  526. position: absolute;
  527. top: 210rpx;
  528. font-size: 30rpx;
  529. padding: 30rpx;
  530. box-shadow: 0px 2px 16px rgba(0, 0, 0, 0.1);
  531. }
  532. .park-title {
  533. /* font-weight: 600; */
  534. line-height: 36rpx;
  535. letter-spacing: 0.02em;
  536. color: #0d1937;
  537. }
  538. .park-address {
  539. /* font-weight: 600; */
  540. font-size: 26rpx;
  541. letter-spacing: 0.02em;
  542. color: #cfcfcf;
  543. margin-top: 10rpx;
  544. }
  545. .park-title-img {
  546. width: 16rpx;
  547. height: 16rpx;
  548. margin-right: 4rpx;
  549. }
  550. .park-footer-box {
  551. margin-top: 30rpx;
  552. }
  553. .park-footer-img {
  554. width: 24rpx;
  555. height: 24rpx;
  556. margin-right: 6rpx;
  557. }
  558. .park-footer-font {
  559. color: #cfcfcf;
  560. font-size: 24rpx;
  561. margin-top: 10rpx;
  562. }
  563. .width-30 {
  564. width: 30%;
  565. }
  566. .attract-content {
  567. color: #697594;
  568. /* font-weight: 600; */
  569. font-size: 24rpx;
  570. margin-top: 8rpx;
  571. overflow: hidden;
  572. text-overflow: ellipsis;
  573. white-space: nowrap;
  574. }
  575. .online-box {
  576. width: 12rpx;
  577. height: 12rpx;
  578. border-radius: 50%;
  579. background-color: #589cff;
  580. margin-right: 5rpx;
  581. }
  582. .offline-box {
  583. width: 12rpx;
  584. height: 12rpx;
  585. border-radius: 50%;
  586. background-color: #ffcf86;
  587. margin-right: 5rpx;
  588. }
  589. .color-a7adba {
  590. color: #a7adba;
  591. }
  592. .content-box {
  593. position: absolute;
  594. width: 100%;
  595. top: 150rpx;
  596. display: flex;
  597. flex-direction: column;
  598. z-index: 999;
  599. justify-content: space-around;
  600. height: 80px;
  601. align-items: center;
  602. }
  603. .content-font {
  604. color: #fff;
  605. font-weight: bold;
  606. font-size: 40rpx;
  607. }
  608. .call-font {
  609. color: #fff;
  610. font-size: 32rpx;
  611. }
  612. .order-money {
  613. color: #d9001b;
  614. font-size: 36rpx;
  615. font-weight: 500;
  616. }
  617. </style>