index.vue 12 KB

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