index.vue 12 KB

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