list.vue 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256
  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:statusColor[item.status]}">{{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. '0':'未缴费',
  56. '1':'已缴费',
  57. '2':'空置已缴费',
  58. '3':'空置转全额'
  59. },
  60. statusColor:{
  61. '0':'#D9001B',
  62. '1':'#70B603',
  63. '2':'#4B7902',
  64. '3':'#BFBF00',
  65. }
  66. };
  67. },
  68. onLoad() {
  69. this.getHeatList();
  70. },
  71. methods: {
  72. goPayDeatil(id) {
  73. uni.navigateTo({
  74. url: "/pages/heatingPage/pay?id=" + id,
  75. });
  76. },
  77. getHeatList() {
  78. let md5Sign = md5(
  79. "method=" +
  80. "user" +
  81. "&timestamp=" +
  82. getApp().globalData.globalTimestamp +
  83. "&secret=" +
  84. getApp().globalData.secret
  85. );
  86. let url =
  87. getApp().globalData.shareUrl +
  88. "api/api.php" +
  89. "?method=user&source=user&action=get_order_list&timestamp=" +
  90. getApp().globalData.globalTimestamp +
  91. "&sign=" +
  92. md5Sign;
  93. let postData = {
  94. // page: 1,
  95. // page_size: 2,
  96. openId:getApp().globalData.open_id
  97. };
  98. uni.request({
  99. url: url,
  100. method: "POST",
  101. header: {
  102. "content-type": "application/x-www-form-urlencoded",
  103. },
  104. data: postData,
  105. success: (res) => {
  106. console.log(res);
  107. if (res.data.code === 200) {
  108. this.heatList = res.data.data.list;
  109. }
  110. },
  111. fail: () => {
  112. console.log("连接失败");
  113. },
  114. });
  115. },
  116. },
  117. };
  118. </script>
  119. <style lang="scss" scoped>
  120. .content {
  121. display: flex;
  122. flex-direction: column;
  123. align-items: center;
  124. width: 100%;
  125. .choose-box {
  126. padding: 20rpx 0;
  127. width: 100%;
  128. display: flex;
  129. // position: fixed;
  130. height: 50rpx;
  131. top: 0;
  132. // margin-bottom: 50rpx;
  133. .type,
  134. .state {
  135. width: 50%;
  136. display: flex;
  137. justify-content: center;
  138. position: relative;
  139. .packer {
  140. width: 100%;
  141. .picker_title {
  142. z-index: 99;
  143. width: 100%;
  144. height: 100%;
  145. display: flex;
  146. justify-content: center;
  147. }
  148. }
  149. }
  150. .type::after,
  151. .state::after {
  152. z-index: -1;
  153. content: "";
  154. position: absolute;
  155. right: 30%;
  156. top: 20%;
  157. width: 0;
  158. height: 0;
  159. border-top: 15rpx solid rgb(173, 173, 173);
  160. border-left: 15rpx solid transparent;
  161. border-right: 15rpx solid transparent;
  162. }
  163. }
  164. .actives {
  165. width: 90%;
  166. // margin-top: 50rpx;
  167. display: flex;
  168. flex-direction: column;
  169. align-items: center;
  170. .actives-item {
  171. width: 100%;
  172. // height: 150rpx;
  173. box-shadow: 0px 4rpx 32rpx rgba(0, 0, 0, 0.1);
  174. border-radius: 32rpx;
  175. // margin-top: 20px;
  176. padding: 20rpx;
  177. display: flex;
  178. flex-direction: column;
  179. margin-top: 20rpx;
  180. margin-bottom: 10rpx;
  181. .readShare {
  182. display: flex;
  183. justify-content: flex-end;
  184. font-size: 26rpx;
  185. color: rgba(0, 0, 0, 0.3);
  186. margin-top: 20rpx;
  187. align-items: center;
  188. .active-tips-box {
  189. font-size: 28rpx;
  190. padding: 10rpx;
  191. border-radius: 10rpx;
  192. color: #fff;
  193. margin-right: 50rpx;
  194. }
  195. .wait-color {
  196. background-color: #aee359;
  197. }
  198. .ing-color {
  199. background-color: #00a8ea;
  200. }
  201. .end-color {
  202. background-color: #d7d7d7;
  203. }
  204. .read {
  205. width: 20%;
  206. text-align: center;
  207. // margin-right: 60rpx;
  208. }
  209. .share {
  210. width: 20%;
  211. text-align: center;
  212. }
  213. }
  214. }
  215. }
  216. }
  217. .active {
  218. color: $uni-color-primary;
  219. }
  220. .color {
  221. background-color: #589cff !important;
  222. }
  223. .notice-content-box {
  224. display: flex;
  225. padding: 30rpx 20rpx 30rpx 20rpx;
  226. background-color: #ffffff;
  227. box-shadow: 0px 4rpx 32rpx rgba(0, 0, 0, 0.1);
  228. border-radius: 32rpx;
  229. margin-top: 20rpx;
  230. justify-content: space-between;
  231. width: 96%;
  232. .notice-content-font {
  233. font-size: 32rpx;
  234. color: #0d1937;
  235. /* font-weight: 600; */
  236. overflow: hidden;
  237. text-overflow: ellipsis;
  238. white-space: nowrap;
  239. }
  240. .notice-content-time {
  241. font-size: 26rpx;
  242. letter-spacing: 0.02em;
  243. color: #333333;
  244. }
  245. .order-money {
  246. color: #d9001b;
  247. font-size: 36rpx;
  248. font-weight: 500;
  249. }
  250. }
  251. </style>