my_fix.vue 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138
  1. <template>
  2. <view class="content">
  3. <view
  4. class="fix-content-box"
  5. v-for="(item, index) in fixList"
  6. :key="index"
  7. style="justify-content: start; padding: 30rpx 0 30rpx 30rpx;border-radius: 0;"
  8. @click="goActiveDeatil(item.id)" >
  9. <view class="notice-content">
  10. <view class="notice-content-font">{{item.title}}</view>
  11. <view class="display-between" style="margin-top: 20rpx">
  12. <view class="notice-content-time">
  13. 提交时间:{{item.time}}
  14. </view>
  15. <view class="display-flex-start" style="visibility: hidden;">
  16. <view class="notice-content-time">{{item.orderStatus}}</view>
  17. </view>
  18. </view>
  19. </view>
  20. </view>
  21. <image src="../../static/nodata.svg" mode="aspectFit" style="width: 100%;" v-if="fixList.length === 0"></image>
  22. </view>
  23. </template>
  24. <script>
  25. import md5 from "@/common/md5.js";
  26. export default {
  27. data() {
  28. return {
  29. message: "我的报修",
  30. themeColor: "#007AFF",
  31. mode: "selector",
  32. typeActive: true,
  33. indexType: 0,
  34. indexState: 0,
  35. fixList: [
  36. {
  37. title: "暖气不热",
  38. time: "2023-08-18",
  39. },
  40. {
  41. title: "二楼暖气管道井漏水严重,同时发出严重的声响,请尽快处理",
  42. time: "2023-09-05",
  43. },
  44. ],
  45. activeListCopy: [],
  46. };
  47. },
  48. onLoad() {
  49. this.getActive();
  50. },
  51. methods: {
  52. goDeatil(id) {
  53. uni.navigateTo({
  54. url: "/pages/activity/activity_deatil?id=" + id,
  55. });
  56. },
  57. getActive() {
  58. let md5Sign = md5(
  59. "method=" +
  60. "activity" +
  61. "&timestamp=" +
  62. getApp().globalData.globalTimestamp +
  63. "&secret=" +
  64. getApp().globalData.secret
  65. );
  66. let url =
  67. getApp().globalData.shareUrl +
  68. "api/api.php" +
  69. "?method=activity&source=activity&action=my_list&timestamp=" +
  70. getApp().globalData.globalTimestamp +
  71. "&sign=" +
  72. md5Sign;
  73. let postData = {
  74. // page: 1,
  75. // page_size: 15,
  76. openId:getApp().globalData.open_id
  77. };
  78. uni.request({
  79. url: url,
  80. method: "POST",
  81. header: {
  82. "content-type": "application/x-www-form-urlencoded",
  83. },
  84. data: postData,
  85. success: (res) => {
  86. // console.log(res);
  87. if (res.data.code === 200) {
  88. }
  89. },
  90. fail: () => {
  91. console.log("连接失败");
  92. },
  93. });
  94. },
  95. },
  96. };
  97. </script>
  98. <style lang="scss" scoped>
  99. .content {
  100. display: flex;
  101. flex-direction: column;
  102. align-items: center;
  103. width: 100%;
  104. .fix-content-box {
  105. width: 90%;
  106. display: flex;
  107. padding: 30rpx 20rpx 30rpx 20rpx;
  108. background-color: #ffffff;
  109. box-shadow: 0px 4rpx 32rpx rgba(0, 0, 0, 0.1);
  110. border-radius: 32rpx;
  111. margin-top: 20rpx;
  112. justify-content: space-between;
  113. .notice-content-font {
  114. font-size: 32rpx;
  115. color: #0d1937;
  116. font-weight: 600;
  117. }
  118. .notice-content-time {
  119. font-size: 26rpx;
  120. letter-spacing: 0.02em;
  121. color: #a7adba;
  122. }
  123. }
  124. }
  125. .active {
  126. color: $uni-color-primary;
  127. }
  128. .color {
  129. background-color: #589cff !important;
  130. }
  131. </style>