index.vue 12 KB

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