index.vue 12 KB

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