list.vue 6.3 KB

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