index.vue 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529
  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:getApp().globalData.statusObj,
  137. statusColor:getApp().globalData.statusColor,
  138. };
  139. },
  140. onShow() {
  141. uni.hideTabBar({});
  142. this.getHeatList()
  143. },
  144. onLoad() {
  145. // uni.showLoading({
  146. // title: "加载中",
  147. // mask: true,
  148. // });
  149. //this.getSwiperList();
  150. },
  151. onShareAppMessage() {
  152. // url: "/pages/index/index";
  153. return {
  154. title: '缴费系统',
  155. path: '/pages/index/index',
  156. imageUrl:'/static/shareImg2.png',
  157. }
  158. },
  159. methods: {
  160. swiperChange(e) {
  161. this.swiperCurrent = e.detail.current;
  162. },
  163. goOtherPage(item){
  164. uni.navigateTo({
  165. url:item.path
  166. })
  167. },
  168. getSwiperList() {
  169. let md5Sign = md5(
  170. "method=" +
  171. "common" +
  172. "&timestamp=" +
  173. getApp().globalData.globalTimestamp +
  174. "&secret=" +
  175. getApp().globalData.secret
  176. );
  177. let url =
  178. getApp().globalData.shareUrl +
  179. "api/api.php" +
  180. "?method=common&source=main_pics&action=list&timestamp=" +
  181. getApp().globalData.globalTimestamp +
  182. "&sign=" +
  183. md5Sign;
  184. uni.request({
  185. url: url,
  186. method: "POST",
  187. header: {
  188. "content-type": "application/x-www-form-urlencoded",
  189. },
  190. data: {
  191. order_by: "weight desc",
  192. s_status: 1,
  193. page: 1,
  194. page_size: 7,
  195. },
  196. success: (res) => {
  197. console.log(res);
  198. if (res.data.code === 200) {
  199. res.data.data.list.forEach((item) => {
  200. item.pic_path = getApp().globalData.shareUrl + item.pic_path;
  201. });
  202. this.swiperList = res.data.data.list;
  203. // this.shareImgUrl = res.data.data.list[0].pic_path
  204. }
  205. },
  206. fail: () => {
  207. console.log("连接失败");
  208. },
  209. });
  210. },
  211. getHeatList() {
  212. let url = getApp().makeApiUrl("user",'user','get_order_list');
  213. let postData = {
  214. // page: 1,
  215. // page_size: 2,
  216. openId:getApp().globalData.open_id ? getApp().globalData.open_id : uni.getStorageSync('openId')
  217. };
  218. uni.request({
  219. url: url,
  220. method: "POST",
  221. header: {
  222. "content-type": "application/x-www-form-urlencoded",
  223. },
  224. data: postData,
  225. success: (res) => {
  226. console.log(res);
  227. if (res.data.code === 200) {
  228. this.heatList = res.data.data.list;
  229. }
  230. },
  231. fail: () => {
  232. console.log("连接失败");
  233. },
  234. });
  235. },
  236. goPayDeatil(id) {
  237. uni.navigateTo({
  238. url: "/pages/heatingPage/pay?id=" + id,
  239. });
  240. },
  241. goPayList() {
  242. uni.navigateTo({
  243. url: "/pages/heatingPage/list",
  244. });
  245. },
  246. },
  247. onPageScroll(e) {
  248. this.scrollVal = e.scrollTop;
  249. if (e.scrollTop < uni.getSystemInfoSync().windowHeight) {
  250. this.footFlag = true;
  251. }
  252. },
  253. onReachBottom(e) {
  254. this.footFlag = false;
  255. },
  256. };
  257. </script>
  258. <style>
  259. .unclick {
  260. background-color: #bfbfbf !important;
  261. }
  262. .content {
  263. display: flex;
  264. flex-direction: column;
  265. align-items: center;
  266. justify-content: center;
  267. position: relative;
  268. }
  269. .logo {
  270. height: 200rpx;
  271. width: 200rpx;
  272. margin-top: 200rpx;
  273. margin-left: auto;
  274. margin-right: auto;
  275. margin-bottom: 50rpx;
  276. }
  277. .text-area {
  278. display: flex;
  279. justify-content: center;
  280. }
  281. .title {
  282. font-size: 36rpx;
  283. color: #8f8f94;
  284. }
  285. .groove-img {
  286. width: 100%;
  287. height: 100rpx;
  288. bottom: -22rpx;
  289. position: absolute;
  290. }
  291. .rowDot {
  292. display: flex;
  293. position: absolute;
  294. top: 310rpx;
  295. left: 80rpx;
  296. }
  297. .dots {
  298. flex-direction: row;
  299. justify-content: center;
  300. align-items: center;
  301. align-content: center;
  302. }
  303. .dot {
  304. margin-right: 8rpx;
  305. width: 40rpx;
  306. height: 8rpx;
  307. opacity: 1;
  308. border-radius: 6rpx;
  309. background: #fff5f9;
  310. }
  311. .dot.active {
  312. background: #ff4e54;
  313. }
  314. /* .swiper-content { */
  315. /* border-radius: 0 0 10% 10%; */
  316. /* } */
  317. .page-nav-box {
  318. width: 88%;
  319. height: 180rpx;
  320. display: flex;
  321. flex-wrap: wrap;
  322. justify-content: space-around;
  323. align-items: center;
  324. padding: 20rpx 10rpx 30rpx 10rpx;
  325. box-shadow: 0px 2px 16px rgba(0, 0, 0, 0.1);
  326. border-radius: 16rpx;
  327. position: absolute;
  328. top: 360rpx;
  329. background-color: #fff;
  330. }
  331. .nav-content {
  332. width: 25%;
  333. height: 130rpx;
  334. display: flex;
  335. flex-direction: column;
  336. align-items: center;
  337. margin-top: 20rpx;
  338. font-size: 28rpx;
  339. justify-content: space-around;
  340. letter-spacing: 0.02em;
  341. color: #0d1937;
  342. font-family: PingFang SC;
  343. font-style: normal;
  344. /* font-weight: 600; */
  345. }
  346. .notice-box {
  347. width: 90%;
  348. margin-top: 200rpx;
  349. margin-bottom: 20rpx;
  350. }
  351. .notice-title-box {
  352. width: 100%;
  353. display: flex;
  354. justify-content: space-between;
  355. align-items: center;
  356. margin-bottom: 40rpx;
  357. }
  358. .notice-font {
  359. font-family: PingFang SC;
  360. font-style: normal;
  361. font-weight: bold;
  362. font-size: 38rpx;
  363. letter-spacing: 0.02em;
  364. color: #0d1937;
  365. }
  366. .notice-more-font {
  367. font-size: 28rpx;
  368. color: #146afb;
  369. display: flex;
  370. align-items: center;
  371. }
  372. .notice-content-box {
  373. display: flex;
  374. padding: 30rpx 20rpx 30rpx 20rpx;
  375. background-color: #ffffff;
  376. box-shadow: 0px 4rpx 32rpx rgba(0, 0, 0, 0.1);
  377. border-radius: 32rpx;
  378. margin-top: 20rpx;
  379. justify-content: space-between;
  380. }
  381. .maskModal {
  382. width: 100%;
  383. position: absolute;
  384. background-color: rgba(0, 0, 0, 0.4);
  385. border-radius: 32rpx;
  386. height: 100%;
  387. top: 0;
  388. right: 0;
  389. display: flex;
  390. align-items: center;
  391. justify-content: center;
  392. color: #fff;
  393. font-size: 32rpx;
  394. font-weight: bold;
  395. }
  396. .notice-content-font {
  397. font-size: 32rpx;
  398. color: #0d1937;
  399. /* font-weight: 600; */
  400. overflow: hidden;
  401. text-overflow: ellipsis;
  402. white-space: nowrap;
  403. }
  404. .notice-content-time {
  405. font-size: 26rpx;
  406. letter-spacing: 0.02em;
  407. color: #cfcfcf;
  408. }
  409. .park-box {
  410. border-radius: 32rpx;
  411. margin-right: 20rpx;
  412. position: relative;
  413. height: 500rpx;
  414. }
  415. .park-content-box {
  416. width: 394rpx;
  417. background-color: #ffffff;
  418. border-radius: 56rpx 0px 32rpx 32rpx;
  419. position: absolute;
  420. top: 210rpx;
  421. font-size: 30rpx;
  422. padding: 30rpx;
  423. box-shadow: 0px 2px 16px rgba(0, 0, 0, 0.1);
  424. }
  425. .park-title {
  426. /* font-weight: 600; */
  427. line-height: 36rpx;
  428. letter-spacing: 0.02em;
  429. color: #0d1937;
  430. }
  431. .park-address {
  432. /* font-weight: 600; */
  433. font-size: 26rpx;
  434. letter-spacing: 0.02em;
  435. color: #cfcfcf;
  436. margin-top: 10rpx;
  437. }
  438. .park-title-img {
  439. width: 16rpx;
  440. height: 16rpx;
  441. margin-right: 4rpx;
  442. }
  443. .park-footer-box {
  444. margin-top: 30rpx;
  445. }
  446. .park-footer-img {
  447. width: 24rpx;
  448. height: 24rpx;
  449. margin-right: 6rpx;
  450. }
  451. .park-footer-font {
  452. color: #cfcfcf;
  453. font-size: 24rpx;
  454. margin-top: 10rpx;
  455. }
  456. .width-30 {
  457. width: 30%;
  458. }
  459. .attract-content {
  460. color: #697594;
  461. /* font-weight: 600; */
  462. font-size: 24rpx;
  463. margin-top: 8rpx;
  464. overflow: hidden;
  465. text-overflow: ellipsis;
  466. white-space: nowrap;
  467. }
  468. .online-box {
  469. width: 12rpx;
  470. height: 12rpx;
  471. border-radius: 50%;
  472. background-color: #589cff;
  473. margin-right: 5rpx;
  474. }
  475. .offline-box {
  476. width: 12rpx;
  477. height: 12rpx;
  478. border-radius: 50%;
  479. background-color: #ffcf86;
  480. margin-right: 5rpx;
  481. }
  482. .color-a7adba {
  483. color: #a7adba;
  484. }
  485. .content-box {
  486. position: absolute;
  487. width: 100%;
  488. top: 150rpx;
  489. display: flex;
  490. flex-direction: column;
  491. z-index: 999;
  492. justify-content: space-around;
  493. height: 80px;
  494. align-items: center;
  495. }
  496. .content-font {
  497. color: #fff;
  498. font-weight: bold;
  499. font-size: 40rpx;
  500. }
  501. .call-font {
  502. color: #fff;
  503. font-size: 32rpx;
  504. }
  505. .order-money {
  506. color: #d9001b;
  507. font-size: 36rpx;
  508. font-weight: 500;
  509. }
  510. </style>