list.vue 6.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274
  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. onShow() {
  67. this.getHeatList();
  68. this.isAuth = getApp().globalData.isAuth;
  69. },
  70. onLoad() {
  71. this.getHeatList();
  72. this.isAuth = getApp().globalData.isAuth;
  73. },
  74. methods: {
  75. goPayDeatil(id) {
  76. uni.navigateTo({
  77. url: "/pages/heatingPage/pay?id=" + id,
  78. });
  79. },
  80. getHeatList() {
  81. let url = getApp().makeApiUrl("user",'user','get_order_list');
  82. let postData = {
  83. // page: 1,
  84. // page_size: 2,
  85. openId:getApp().globalData.open_id
  86. };
  87. uni.request({
  88. url: url,
  89. method: "POST",
  90. header: {
  91. "content-type": "application/x-www-form-urlencoded",
  92. },
  93. data: postData,
  94. success: (res) => {
  95. console.log(res);
  96. if (res.data.code === 200) {
  97. this.heatList = res.data.data.list;
  98. this.owner_id = res.data.data.owner_id;
  99. }
  100. },
  101. fail: () => {
  102. console.log("连接失败");
  103. },
  104. });
  105. },
  106. goHouse(){
  107. uni.navigateTo({
  108. url: "/pages/selfCenter/with_house",
  109. });
  110. },
  111. goAuth() {
  112. uni.navigateTo({
  113. url: "/pages/auth/index",
  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. .noLogin-box {
  252. width: 100%;
  253. display: flex;
  254. flex-direction: column;
  255. justify-content: space-between;
  256. align-items: center;
  257. margin-top: 160rpx;
  258. color: #a7adba;
  259. }
  260. .withHouseBtn {
  261. color: #589cff;
  262. cursor: pointer;
  263. margin-top: 40rpx;
  264. }
  265. </style>