list.vue 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249
  1. <template>
  2. <view class="content">
  3. <view class="actives">
  4. <view
  5. class="notice-content-box"
  6. v-for="(item, index) in heatList"
  7. :key="index"
  8. style="justify-content: start; padding: 30rpx 0 30rpx 30rpx;border-radius: 0;"
  9. @click="goPayDeatil(item.code)" >
  10. <image
  11. src="/static/order-poster.svg"
  12. style="
  13. width: 112rpx;
  14. height: 112rpx;
  15. margin-right: 20rpx;
  16. border-radius: 10%;
  17. "
  18. ></image>
  19. <view class="notice-content" style="width: 75%">
  20. <view class="notice-content-font">{{
  21. item.name
  22. }}</view>
  23. <view class="display-flex-start" style="margin-top: 20rpx">
  24. <view class="notice-content-time color-a7adba">
  25. {{item.estate_name + item.building_name + item.unit + item.room}}
  26. </view>
  27. <view class="notice-content-time display-flex-start">
  28. <text class="color-a7adba">¥:</text>
  29. <text class="order-money">{{item.total_fee}}</text>
  30. </view>
  31. </view>
  32. <view class="display-between" style="margin-top: 20rpx">
  33. <view class="notice-content-time color-a7adba" style="visibility: hidden;">
  34. {{item.time}}
  35. </view>
  36. <view class="display-flex-start">
  37. <view class="notice-content-time" style="color: #d9001b;">{{statusObj[item.type]}}</view>
  38. </view>
  39. </view>
  40. </view>
  41. </view>
  42. <image src="../../static/nodata.svg" mode="aspectFit" style="width: 100%;" v-if="activityList.length === 0"></image>
  43. </view>
  44. </view>
  45. </template>
  46. <script>
  47. import md5 from "@/common/md5.js";
  48. export default {
  49. data() {
  50. return {
  51. message: "缴费订单",
  52. themeColor: "#007AFF",
  53. heatList: [],
  54. statusObj:{
  55. '1':'已缴费',
  56. '2':'待缴费',
  57. '3':'空置已缴费'
  58. }
  59. };
  60. },
  61. onLoad() {
  62. this.getHeatList();
  63. },
  64. methods: {
  65. goPayDeatil(id) {
  66. uni.navigateTo({
  67. url: "/pages/heatingPage/pay?id=" + id,
  68. });
  69. },
  70. getHeatList() {
  71. let md5Sign = md5(
  72. "method=" +
  73. "user" +
  74. "&timestamp=" +
  75. getApp().globalData.globalTimestamp +
  76. "&secret=" +
  77. getApp().globalData.secret
  78. );
  79. let url =
  80. getApp().globalData.shareUrl +
  81. "api/api.php" +
  82. "?method=user&source=user&action=get_order_list&timestamp=" +
  83. getApp().globalData.globalTimestamp +
  84. "&sign=" +
  85. md5Sign;
  86. let postData = {
  87. // page: 1,
  88. // page_size: 2,
  89. openId:getApp().globalData.open_id
  90. };
  91. uni.request({
  92. url: url,
  93. method: "POST",
  94. header: {
  95. "content-type": "application/x-www-form-urlencoded",
  96. },
  97. data: postData,
  98. success: (res) => {
  99. console.log(res);
  100. if (res.data.code === 200) {
  101. this.heatList = res.data.data.list;
  102. }
  103. },
  104. fail: () => {
  105. console.log("连接失败");
  106. },
  107. });
  108. },
  109. },
  110. };
  111. </script>
  112. <style lang="scss" scoped>
  113. .content {
  114. display: flex;
  115. flex-direction: column;
  116. align-items: center;
  117. width: 100%;
  118. .choose-box {
  119. padding: 20rpx 0;
  120. width: 100%;
  121. display: flex;
  122. // position: fixed;
  123. height: 50rpx;
  124. top: 0;
  125. // margin-bottom: 50rpx;
  126. .type,
  127. .state {
  128. width: 50%;
  129. display: flex;
  130. justify-content: center;
  131. position: relative;
  132. .packer {
  133. width: 100%;
  134. .picker_title {
  135. z-index: 99;
  136. width: 100%;
  137. height: 100%;
  138. display: flex;
  139. justify-content: center;
  140. }
  141. }
  142. }
  143. .type::after,
  144. .state::after {
  145. z-index: -1;
  146. content: "";
  147. position: absolute;
  148. right: 30%;
  149. top: 20%;
  150. width: 0;
  151. height: 0;
  152. border-top: 15rpx solid rgb(173, 173, 173);
  153. border-left: 15rpx solid transparent;
  154. border-right: 15rpx solid transparent;
  155. }
  156. }
  157. .actives {
  158. width: 90%;
  159. // margin-top: 50rpx;
  160. display: flex;
  161. flex-direction: column;
  162. align-items: center;
  163. .actives-item {
  164. width: 100%;
  165. // height: 150rpx;
  166. box-shadow: 0px 4rpx 32rpx rgba(0, 0, 0, 0.1);
  167. border-radius: 32rpx;
  168. // margin-top: 20px;
  169. padding: 20rpx;
  170. display: flex;
  171. flex-direction: column;
  172. margin-top: 20rpx;
  173. margin-bottom: 10rpx;
  174. .readShare {
  175. display: flex;
  176. justify-content: flex-end;
  177. font-size: 26rpx;
  178. color: rgba(0, 0, 0, 0.3);
  179. margin-top: 20rpx;
  180. align-items: center;
  181. .active-tips-box {
  182. font-size: 28rpx;
  183. padding: 10rpx;
  184. border-radius: 10rpx;
  185. color: #fff;
  186. margin-right: 50rpx;
  187. }
  188. .wait-color {
  189. background-color: #aee359;
  190. }
  191. .ing-color {
  192. background-color: #00a8ea;
  193. }
  194. .end-color {
  195. background-color: #d7d7d7;
  196. }
  197. .read {
  198. width: 20%;
  199. text-align: center;
  200. // margin-right: 60rpx;
  201. }
  202. .share {
  203. width: 20%;
  204. text-align: center;
  205. }
  206. }
  207. }
  208. }
  209. }
  210. .active {
  211. color: $uni-color-primary;
  212. }
  213. .color {
  214. background-color: #589cff !important;
  215. }
  216. .notice-content-box {
  217. display: flex;
  218. padding: 30rpx 20rpx 30rpx 20rpx;
  219. background-color: #ffffff;
  220. box-shadow: 0px 4rpx 32rpx rgba(0, 0, 0, 0.1);
  221. border-radius: 32rpx;
  222. margin-top: 20rpx;
  223. justify-content: space-between;
  224. width: 96%;
  225. .notice-content-font {
  226. font-size: 32rpx;
  227. color: #0d1937;
  228. /* font-weight: 600; */
  229. overflow: hidden;
  230. text-overflow: ellipsis;
  231. white-space: nowrap;
  232. }
  233. .notice-content-time {
  234. font-size: 26rpx;
  235. letter-spacing: 0.02em;
  236. color: #333333;
  237. }
  238. .order-money {
  239. color: #d9001b;
  240. font-size: 36rpx;
  241. font-weight: 500;
  242. }
  243. }
  244. </style>