index.vue 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218
  1. <template>
  2. <view class="">
  3. <view class="application-record" v-if="listData.length">
  4. <view class="card-list" v-for="item in listData" :key="item.mer_intention_id">
  5. <view class="card-top">
  6. <view class="title">{{item.mer_name}}</view>
  7. <view class="time">提交时间:{{item.create_time}}</view>
  8. <view v-if="item.fail_msg" class="reason">原因:{{item.fail_msg}}</view>
  9. </view>
  10. <view class="line"></view>
  11. <view class="card-bottom">
  12. <view class="card-status">
  13. <image class="status-icon" v-if="item.status === 0" src="../static/images/pending.png" mode=""></image>
  14. <image class="status-icon" v-else-if="item.status === 1" src="../static/images/passed.png" mode=""></image>
  15. <image class="status-icon" v-else-if="item.status === 2" src="../static/images/not-pass.png" mode=""></image>
  16. <text class="status-text">{{statusText(item.status)}}</text>
  17. </view>
  18. <view class="status-btn" @click="jump(item)">{{statusBtn(item.status)}}</view>
  19. </view>
  20. </view>
  21. </view>
  22. <view class='no-shop' v-if="!listData.length && !loading">
  23. <view class='pictrue' style="margin: 0 auto;">
  24. <image src='http://ygs.hqgjsmc.com/baseimg/noCart.png'></image>
  25. <text>暂无申请记录,快去申请入驻吧!</text>
  26. </view>
  27. </view>
  28. </view>
  29. </template>
  30. <script>
  31. // +----------------------------------------------------------------------
  32. // | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
  33. // +----------------------------------------------------------------------
  34. // | Copyright (c) 2016~2021 https://www.crmeb.com All rights reserved.
  35. // +----------------------------------------------------------------------
  36. // | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
  37. // +----------------------------------------------------------------------
  38. // | Author: CRMEB Team <admin@crmeb.com>
  39. // +----------------------------------------------------------------------
  40. import {
  41. getApplicationRecordList
  42. } from '@/api/store.js'
  43. export default {
  44. data() {
  45. return {
  46. loading: false,
  47. listData: [],
  48. pageData: {
  49. page: 1,
  50. limit: 10,
  51. }
  52. }
  53. },
  54. onLoad() {
  55. this.getListData()
  56. },
  57. // 滚动到底部
  58. onReachBottom() {
  59. if (this.count == this.listData.length) {
  60. uni.showToast({
  61. title: '没有更多啦',
  62. icon: 'none',
  63. duration: 1000
  64. });
  65. } else {
  66. this.pageData.page += 1
  67. this.getListData()
  68. }
  69. },
  70. methods: {
  71. getListData() {
  72. this.loading = true
  73. uni.showLoading({
  74. title: '数据加载中',
  75. });
  76. getApplicationRecordList(this.pageData).then(res => {
  77. console.log(res)
  78. this.count = res.data.count
  79. this.listData = this.listData.concat(res.data.list)
  80. uni.hideLoading();
  81. this.loading = false
  82. })
  83. },
  84. // 跳转逻辑
  85. jump(item) {
  86. console.log(item)
  87. if ([0, 2].includes(item.status)) {
  88. uni.navigateTo({
  89. url: `/pages/store/settled/index?mer_i_id=${item.mer_intention_id}`
  90. })
  91. } else if (item.status === 1) {
  92. uni.navigateTo({
  93. url: `/pages/store/merchantDetails/index?mer_i_id=${item.mer_intention_id}&mer_id=${item.mer_id}`
  94. })
  95. }
  96. },
  97. //状态判断
  98. statusText(number) {
  99. // 使用对象
  100. let statusData = {
  101. 0: "待审核",
  102. 1: "审核通过",
  103. 2: "审核未通过",
  104. };
  105. return statusData[number]
  106. },
  107. // button显示文字
  108. statusBtn(number) {
  109. // 使用对象
  110. let statusData = {
  111. 0: "编辑",
  112. 1: "查看",
  113. 2: "重新提交",
  114. };
  115. return statusData[number]
  116. },
  117. }
  118. }
  119. </script>
  120. <style lang="scss" scoped>
  121. .main {}
  122. .application-record {
  123. display: flex;
  124. flex-direction: column;
  125. align-items: center;
  126. background-color: #F5F5F5;
  127. padding: 20rpx 30rpx;
  128. .card-list {
  129. width: 100%;
  130. background-color: #fff;
  131. padding: 20rpx 24rpx;
  132. margin: 10rpx 20rpx;
  133. border-radius: 12rpx;
  134. .card-top {
  135. height: 140rpx;
  136. .title {
  137. font-size: 28rpx;
  138. font-weight: bold;
  139. color: #333333;
  140. }
  141. .time {
  142. color: #999999;
  143. font-size: 24rpx;
  144. padding: 5rpx 0;
  145. }
  146. .reason {
  147. color: #E93323;
  148. font-weight: bold;
  149. font-size: 24rpx;
  150. }
  151. }
  152. .line {
  153. height: 2rpx;
  154. margin: 20rpx 0 20rpx 0;
  155. background-color: #EEEEEE;
  156. }
  157. .card-bottom {
  158. display: flex;
  159. justify-content: space-between;
  160. align-items: center;
  161. color: #333;
  162. .card-status {
  163. display: flex;
  164. align-items: center;
  165. .status-icon {
  166. width: 30rpx;
  167. height: 30rpx;
  168. margin: 10rpx;
  169. }
  170. .status-text {
  171. font-size: 28rpx;
  172. font-weight: 500;
  173. }
  174. }
  175. .status-btn {
  176. font-size: 26rpx;
  177. color: #555;
  178. border: 1px solid #999999;
  179. padding: 8rpx 32rpx;
  180. border-radius: 40rpx;
  181. }
  182. }
  183. }
  184. }
  185. .no-shop {
  186. width: 100%;
  187. background-color: #fff;
  188. height: 100vh;
  189. .pictrue {
  190. display: flex;
  191. flex-direction: column;
  192. align-items: center;
  193. color: $uni-nothing-text;
  194. image {
  195. width: 414rpx;
  196. height: 380rpx;
  197. }
  198. }
  199. }
  200. </style>