index.vue 12 KB

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