index.vue 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548
  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. >
  21. <swiper-item
  22. v-for="(item, index) in swiperList"
  23. :key="index"
  24. class="swiper-content"
  25. >
  26. <image :src="item.img" mode="aspectFill" style="width: 100%; height: 100%"></image>
  27. </swiper-item>
  28. </swiper>
  29. <image src="../../static/Intersect.svg" class="groove-img"></image>
  30. <view class="rowDot">
  31. <view v-for="(item, index) in swiperList" :key="index" class="dots">
  32. <view
  33. :class="['dot', index === swiperCurrent ? 'active' : '']"
  34. ></view>
  35. </view>
  36. </view>
  37. </view>
  38. <view class="page-nav-box">
  39. <view v-for="(item, index) in navList" :key="index" class="nav-content" @click="goOtherPage(item)">
  40. <image :src="item.url" mode="aspectFit" style="width: 38px; height: 38px"></image>
  41. <view>{{ item.content }}</view>
  42. </view>
  43. </view>
  44. <view class="notice-box" style="width:90%;">
  45. <view class="notice-title-box" style="margin: 0 auto;margin-bottom: 30rpx;">
  46. <view class="notice-font">缴费订单</view>
  47. <view class="notice-more-font">
  48. <view style="margin-right: 8rpx; font-size: 26rpx" @click="goPayList">更多</view>
  49. <image
  50. src="/static/right-arrow-blue.png"
  51. mode="aspectFill"
  52. style="width: 12rpx; height: 16rpx"
  53. ></image>
  54. </view>
  55. </view>
  56. <view
  57. class="notice-content-box"
  58. v-for="(item, index) in heatList"
  59. :key="index"
  60. style="justify-content: start; padding: 30rpx 0 30rpx 30rpx;border-radius: 0;"
  61. @click="goPayDeatil(item.code)" >
  62. <image
  63. src="/static/order-poster.svg"
  64. style="
  65. width: 112rpx;
  66. height: 112rpx;
  67. margin-right: 20rpx;
  68. border-radius: 10%;
  69. "
  70. ></image>
  71. <view class="notice-content" style="width: 75%">
  72. <view class="notice-content-font">{{
  73. item.name
  74. }}</view>
  75. <view class="display-flex-start" style="margin-top: 20rpx">
  76. <view class="notice-content-time color-a7adba">
  77. {{item.estate_name + item.building_name + item.unit + item.room}}
  78. </view>
  79. <view class="notice-content-time display-flex-start">
  80. <text class="color-a7adba">¥:</text>
  81. <text class="order-money">{{item.total_fee}}</text>
  82. </view>
  83. </view>
  84. <view class="display-between" style="margin-top: 20rpx">
  85. <view class="notice-content-time color-a7adba" style="visibility: hidden;">
  86. {{item.time}}
  87. </view>
  88. <view class="display-flex-start">
  89. <view class="notice-content-time" :style="{color:statusColor[item.status]}">{{statusObj[item.status]}}</view>
  90. </view>
  91. </view>
  92. </view>
  93. </view>
  94. </view>
  95. <foot-tabs :selectedIndex="0" :isShow="footFlag"></foot-tabs>
  96. </view>
  97. </template>
  98. <script>
  99. import md5 from "@/common/md5.js";
  100. import topTitle from "@/components/top-title/top-title.vue";
  101. import footTabs from "@/components/foot-tabs/footTabs.vue";
  102. export default {
  103. components: {
  104. "foot-tabs": footTabs,
  105. "top-title": topTitle,
  106. },
  107. data() {
  108. return {
  109. title: "聚达康暖通",
  110. scrollVal: Number,
  111. footFlag: true,
  112. btnPos:uni.getMenuButtonBoundingClientRect().top + 6,
  113. shareImgUrl:'',
  114. swiperList: [
  115. {
  116. img: "/static/poster-bg.png",
  117. },
  118. {
  119. img: "/static/poster-bg.png",
  120. },
  121. ],
  122. swiperCurrent: 0,
  123. navList: [
  124. {
  125. url: "/static/navList/appeal.png",
  126. path: "/pages/heatingPage/list",
  127. content: "供暖缴费",
  128. },
  129. {
  130. url: "/static/navList/policy.png",
  131. path: "/pages/heatingPage/reportFix",
  132. content: "一件报修",
  133. },
  134. ],
  135. heatList: [],
  136. statusObj:{
  137. '0':'未缴费',
  138. '1':'已缴费',
  139. '2':'空置已缴费',
  140. '3':'空置转全额'
  141. },
  142. statusColor:{
  143. '0':'#D9001B',
  144. '1':'#70B603',
  145. '2':'#4B7902',
  146. '3':'#BFBF00',
  147. }
  148. };
  149. },
  150. onShow() {
  151. uni.hideTabBar({});
  152. this.getHeatList()
  153. },
  154. onLoad() {
  155. // uni.showLoading({
  156. // title: "加载中",
  157. // mask: true,
  158. // });
  159. //this.getSwiperList();
  160. },
  161. onShareAppMessage() {
  162. // url: "/pages/index/index";
  163. return {
  164. title: '缴费系统',
  165. path: '/pages/index/index',
  166. imageUrl:'/static/shareImg2.png',
  167. }
  168. },
  169. methods: {
  170. swiperChange(e) {
  171. this.swiperCurrent = e.detail.current;
  172. },
  173. goOtherPage(item){
  174. uni.navigateTo({
  175. url:item.path
  176. })
  177. },
  178. getSwiperList() {
  179. let md5Sign = md5(
  180. "method=" +
  181. "common" +
  182. "&timestamp=" +
  183. getApp().globalData.globalTimestamp +
  184. "&secret=" +
  185. getApp().globalData.secret
  186. );
  187. let url =
  188. getApp().globalData.shareUrl +
  189. "api/api.php" +
  190. "?method=common&source=main_pics&action=list&timestamp=" +
  191. getApp().globalData.globalTimestamp +
  192. "&sign=" +
  193. md5Sign;
  194. uni.request({
  195. url: url,
  196. method: "POST",
  197. header: {
  198. "content-type": "application/x-www-form-urlencoded",
  199. },
  200. data: {
  201. order_by: "weight desc",
  202. s_status: 1,
  203. page: 1,
  204. page_size: 7,
  205. },
  206. success: (res) => {
  207. console.log(res);
  208. if (res.data.code === 200) {
  209. res.data.data.list.forEach((item) => {
  210. item.pic_path = getApp().globalData.shareUrl + item.pic_path;
  211. });
  212. this.swiperList = res.data.data.list;
  213. // this.shareImgUrl = res.data.data.list[0].pic_path
  214. }
  215. },
  216. fail: () => {
  217. console.log("连接失败");
  218. },
  219. });
  220. },
  221. getHeatList() {
  222. let md5Sign = md5(
  223. "method=" +
  224. "user" +
  225. "&timestamp=" +
  226. getApp().globalData.globalTimestamp +
  227. "&secret=" +
  228. getApp().globalData.secret
  229. );
  230. let url =
  231. getApp().globalData.shareUrl +
  232. "api/api.php" +
  233. "?method=user&source=user&action=get_order_list&timestamp=" +
  234. getApp().globalData.globalTimestamp +
  235. "&sign=" +
  236. md5Sign;
  237. let postData = {
  238. // page: 1,
  239. // page_size: 2,
  240. openId:getApp().globalData.open_id ? getApp().globalData.open_id : uni.getStorageSync('openId')
  241. };
  242. uni.request({
  243. url: url,
  244. method: "POST",
  245. header: {
  246. "content-type": "application/x-www-form-urlencoded",
  247. },
  248. data: postData,
  249. success: (res) => {
  250. console.log(res);
  251. if (res.data.code === 200) {
  252. this.heatList = res.data.data.list;
  253. }
  254. },
  255. fail: () => {
  256. console.log("连接失败");
  257. },
  258. });
  259. },
  260. goPayDeatil(id) {
  261. uni.navigateTo({
  262. url: "/pages/heatingPage/pay?id=" + id,
  263. });
  264. },
  265. goPayList() {
  266. uni.navigateTo({
  267. url: "/pages/heatingPage/list",
  268. });
  269. },
  270. },
  271. onPageScroll(e) {
  272. this.scrollVal = e.scrollTop;
  273. if (e.scrollTop < uni.getSystemInfoSync().windowHeight) {
  274. this.footFlag = true;
  275. }
  276. },
  277. onReachBottom(e) {
  278. this.footFlag = false;
  279. },
  280. };
  281. </script>
  282. <style>
  283. .unclick {
  284. background-color: #bfbfbf !important;
  285. }
  286. .content {
  287. display: flex;
  288. flex-direction: column;
  289. align-items: center;
  290. justify-content: center;
  291. position: relative;
  292. }
  293. .logo {
  294. height: 200rpx;
  295. width: 200rpx;
  296. margin-top: 200rpx;
  297. margin-left: auto;
  298. margin-right: auto;
  299. margin-bottom: 50rpx;
  300. }
  301. .text-area {
  302. display: flex;
  303. justify-content: center;
  304. }
  305. .title {
  306. font-size: 36rpx;
  307. color: #8f8f94;
  308. }
  309. .groove-img {
  310. width: 100%;
  311. height: 100rpx;
  312. bottom: -22rpx;
  313. position: absolute;
  314. }
  315. .rowDot {
  316. display: flex;
  317. position: absolute;
  318. top: 310rpx;
  319. left: 80rpx;
  320. }
  321. .dots {
  322. flex-direction: row;
  323. justify-content: center;
  324. align-items: center;
  325. align-content: center;
  326. }
  327. .dot {
  328. margin-right: 8rpx;
  329. width: 40rpx;
  330. height: 8rpx;
  331. opacity: 1;
  332. border-radius: 6rpx;
  333. background: #fff5f9;
  334. }
  335. .dot.active {
  336. background: #ff4e54;
  337. }
  338. /* .swiper-content { */
  339. /* border-radius: 0 0 10% 10%; */
  340. /* } */
  341. .page-nav-box {
  342. width: 88%;
  343. height: 180rpx;
  344. display: flex;
  345. flex-wrap: wrap;
  346. justify-content: space-around;
  347. align-items: center;
  348. padding: 20rpx 10rpx 30rpx 10rpx;
  349. box-shadow: 0px 2px 16px rgba(0, 0, 0, 0.1);
  350. border-radius: 16rpx;
  351. position: absolute;
  352. top: 360rpx;
  353. background-color: #fff;
  354. }
  355. .nav-content {
  356. width: 25%;
  357. height: 130rpx;
  358. display: flex;
  359. flex-direction: column;
  360. align-items: center;
  361. margin-top: 20rpx;
  362. font-size: 28rpx;
  363. justify-content: space-around;
  364. letter-spacing: 0.02em;
  365. color: #0d1937;
  366. font-family: PingFang SC;
  367. font-style: normal;
  368. /* font-weight: 600; */
  369. }
  370. .notice-box {
  371. width: 90%;
  372. margin-top: 200rpx;
  373. margin-bottom: 20rpx;
  374. }
  375. .notice-title-box {
  376. width: 100%;
  377. display: flex;
  378. justify-content: space-between;
  379. align-items: center;
  380. margin-bottom: 40rpx;
  381. }
  382. .notice-font {
  383. font-family: PingFang SC;
  384. font-style: normal;
  385. font-weight: bold;
  386. font-size: 38rpx;
  387. letter-spacing: 0.02em;
  388. color: #0d1937;
  389. }
  390. .notice-more-font {
  391. font-size: 28rpx;
  392. color: #146afb;
  393. display: flex;
  394. align-items: center;
  395. }
  396. .notice-content-box {
  397. display: flex;
  398. padding: 30rpx 20rpx 30rpx 20rpx;
  399. background-color: #ffffff;
  400. box-shadow: 0px 4rpx 32rpx rgba(0, 0, 0, 0.1);
  401. border-radius: 32rpx;
  402. margin-top: 20rpx;
  403. justify-content: space-between;
  404. }
  405. .maskModal {
  406. width: 100%;
  407. position: absolute;
  408. background-color: rgba(0, 0, 0, 0.4);
  409. border-radius: 32rpx;
  410. height: 100%;
  411. top: 0;
  412. right: 0;
  413. display: flex;
  414. align-items: center;
  415. justify-content: center;
  416. color: #fff;
  417. font-size: 32rpx;
  418. font-weight: bold;
  419. }
  420. .notice-content-font {
  421. font-size: 32rpx;
  422. color: #0d1937;
  423. /* font-weight: 600; */
  424. overflow: hidden;
  425. text-overflow: ellipsis;
  426. white-space: nowrap;
  427. }
  428. .notice-content-time {
  429. font-size: 26rpx;
  430. letter-spacing: 0.02em;
  431. color: #cfcfcf;
  432. }
  433. .park-box {
  434. border-radius: 32rpx;
  435. margin-right: 20rpx;
  436. position: relative;
  437. height: 500rpx;
  438. }
  439. .park-content-box {
  440. width: 394rpx;
  441. background-color: #ffffff;
  442. border-radius: 56rpx 0px 32rpx 32rpx;
  443. position: absolute;
  444. top: 210rpx;
  445. font-size: 30rpx;
  446. padding: 30rpx;
  447. box-shadow: 0px 2px 16px rgba(0, 0, 0, 0.1);
  448. }
  449. .park-title {
  450. /* font-weight: 600; */
  451. line-height: 36rpx;
  452. letter-spacing: 0.02em;
  453. color: #0d1937;
  454. }
  455. .park-address {
  456. /* font-weight: 600; */
  457. font-size: 26rpx;
  458. letter-spacing: 0.02em;
  459. color: #cfcfcf;
  460. margin-top: 10rpx;
  461. }
  462. .park-title-img {
  463. width: 16rpx;
  464. height: 16rpx;
  465. margin-right: 4rpx;
  466. }
  467. .park-footer-box {
  468. margin-top: 30rpx;
  469. }
  470. .park-footer-img {
  471. width: 24rpx;
  472. height: 24rpx;
  473. margin-right: 6rpx;
  474. }
  475. .park-footer-font {
  476. color: #cfcfcf;
  477. font-size: 24rpx;
  478. margin-top: 10rpx;
  479. }
  480. .width-30 {
  481. width: 30%;
  482. }
  483. .attract-content {
  484. color: #697594;
  485. /* font-weight: 600; */
  486. font-size: 24rpx;
  487. margin-top: 8rpx;
  488. overflow: hidden;
  489. text-overflow: ellipsis;
  490. white-space: nowrap;
  491. }
  492. .online-box {
  493. width: 12rpx;
  494. height: 12rpx;
  495. border-radius: 50%;
  496. background-color: #589cff;
  497. margin-right: 5rpx;
  498. }
  499. .offline-box {
  500. width: 12rpx;
  501. height: 12rpx;
  502. border-radius: 50%;
  503. background-color: #ffcf86;
  504. margin-right: 5rpx;
  505. }
  506. .color-a7adba {
  507. color: #a7adba;
  508. }
  509. .content-box {
  510. position: absolute;
  511. width: 100%;
  512. top: 150rpx;
  513. display: flex;
  514. flex-direction: column;
  515. z-index: 999;
  516. justify-content: space-around;
  517. height: 80px;
  518. align-items: center;
  519. }
  520. .content-font {
  521. color: #fff;
  522. font-weight: bold;
  523. font-size: 40rpx;
  524. }
  525. .call-font {
  526. color: #fff;
  527. font-size: 32rpx;
  528. }
  529. .order-money {
  530. color: #d9001b;
  531. font-size: 36rpx;
  532. font-weight: 500;
  533. }
  534. </style>