index.vue 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158
  1. <template>
  2. <view class="content">
  3. <div class="banner">
  4. <img :src="bannerSrc" alt="banner" />
  5. </div>
  6. <div class="menus flex">
  7. <div class="menu">
  8. <navigator url="/pages/appeal/myAppeal">
  9. <p class="logo">
  10. <img src="/static/appeal/myappeal.png" />
  11. </p>
  12. <div class="desc">我的诉求</div>
  13. </navigator>
  14. </div>
  15. <div class="menu">
  16. <navigator url="/pages/appeal/putAppeal">
  17. <p class="logo">
  18. <img src="/static/appeal/putappeal.png" />
  19. </p>
  20. <div class="desc">提出诉求</div>
  21. </navigator>
  22. </div>
  23. </div>
  24. <div class="otherAppealList">
  25. <div
  26. v-for="(otherAppeal, index) in otherAppealList"
  27. :key="index"
  28. @tap="toDetail(otherAppeal.id)"
  29. style="border-bottom: 1rpx solid #e6e6e6;"
  30. >
  31. <appealCard :otherAppeal="otherAppeal" :isOther='true'></appealCard>
  32. </div>
  33. </div>
  34. </view>
  35. </template>
  36. <script>
  37. import md5 from "@/common/md5.js";
  38. import appealCard from "./appealCard.vue";
  39. export default {
  40. components: {
  41. appealCard,
  42. },
  43. data() {
  44. return {
  45. bannerSrc: "/static/appeal/banner.png",
  46. otherAppealList: [
  47. // {
  48. // title: "航投大厦餐厅服务建议",
  49. // name: "市场服务与监督管理局",
  50. // msg: "尊敬的市民您好!空港市场监管分局已与餐厅负责人取得了电话联系,根据您所提出的建议,餐厅将有针对性的进行整改,加强……",
  51. // image: "/static/appeal/avator.png",
  52. // },
  53. // {
  54. // title: "拉土车夜间噪音问题整改诉求",
  55. // name: "市场服务与监督管理局",
  56. // msg: "尊敬的市民您好!收到您的留言,我们十分重视!正平大街开展拉土作业的车辆为西安(咸阳)机场三期扩建工程建设项目运输……",
  57. // image: "/static/appeal/avator.png",
  58. // },
  59. ],
  60. };
  61. },
  62. onLoad() {
  63. },
  64. onShow() {
  65. this.getList()
  66. },
  67. methods: {
  68. getList(){
  69. let md5Sign = md5(
  70. "method=" +
  71. "consult" +
  72. "&timestamp=" +
  73. getApp().globalData.globalTimestamp +
  74. "&secret=" +
  75. getApp().globalData.secret
  76. );
  77. let url =
  78. getApp().globalData.shareUrl +
  79. "api/api.php" +
  80. "?method=consult&source=consult&action=list&timestamp=" +
  81. getApp().globalData.globalTimestamp +
  82. "&sign=" +
  83. md5Sign;
  84. uni.request({
  85. url: url,
  86. method: "POST",
  87. header: {
  88. "content-type": "application/x-www-form-urlencoded",
  89. },
  90. data: {
  91. },
  92. success: (res) => {
  93. if (res.data.code === 200) {
  94. this.otherAppealList = res.data.data.list
  95. console.log(res.data.data.list[0]);
  96. }
  97. },
  98. fail: () => {
  99. console.log("连接失败");
  100. },
  101. });
  102. },
  103. toDetail(id) {
  104. uni.navigateTo({
  105. url: "/pages/appeal/appeal_detail?id=" + id,
  106. });
  107. },
  108. },
  109. };
  110. </script>
  111. <style lang="scss" scoped>
  112. .flex {
  113. display: flex;
  114. }
  115. .content {
  116. width: 100%;
  117. height: 100vh;
  118. .banner {
  119. height: 25%;
  120. img {
  121. width: 100%;
  122. height: 100%;
  123. }
  124. }
  125. .menus {
  126. width: 80%;
  127. height: 15%;
  128. justify-content: space-evenly;
  129. align-items: center;
  130. margin: 0 auto;
  131. background-color: #fff;
  132. border-radius: 25rpx;
  133. transform: translateY(-60%);
  134. box-shadow: 0rpx 10rpx 5rpx rgb(212, 212, 212);
  135. .menu {
  136. .desc {
  137. // font-weight: bolder;
  138. text-align: center;
  139. font-size: 28rpx;
  140. }
  141. .logo {
  142. text-align: center;
  143. img {
  144. width: 100rpx;
  145. height: 100rpx;
  146. }
  147. }
  148. }
  149. }
  150. .otherAppealList {
  151. transform: translateY(-15%);
  152. }
  153. }
  154. </style>