examine.vue 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207
  1. <template>
  2. <view>
  3. <cu-custom bgColor="bg-gradual-blue1" :isBack="true">
  4. <block slot="content">审核查询</block>
  5. </cu-custom>
  6. <view class="eamine-tab flex justify-between">
  7. <text class="tab-title" v-for="(val, index) in tabData" :key="val" :class="{
  8. 'selected-background': current === index
  9. }" @tap="toggleSelection(index)">{{ val }}
  10. </text>
  11. </view>
  12. <mescroll-uni ref="mescrollRef" :top="top" @init="mescrollInit" @down="downCallback" @up="upCallback">
  13. <view class=" borderRadiu" v-for="(item, index) in msgList" :key="index">
  14. <view class="flex justify-between green-bg " style="padding:14upx 18upx;">
  15. <view class="status-title">
  16. <text class="green-button">{{
  17. item.status == 0 ? '待审核' : item.status == 1 ? '审核通过' :item.status==2?'审核驳回':'' }}</text>
  18. <text>基础信息</text>
  19. </view>
  20. <text>{{
  21. item.updateTime? item.updateTime:item.createTime }}</text>
  22. </view>
  23. <view style="padding:10upx 18upx">
  24. <view>提交信息:</view>
  25. <view style="margin-top: 9upx;">门店,门店名称,门店地址,门店面积,门店照片,地理...</view>
  26. </view>
  27. </view>
  28. </mescroll-uni>
  29. </view>
  30. </template>
  31. <script>
  32. import MescrollMixin from "@/components/mescroll-uni/mescroll-mixins.js";
  33. import { USER_INFO } from "@/common/util/constants"
  34. export default {
  35. mixins: [MescrollMixin], // 使用mixin
  36. computed: {
  37. top() {
  38. return this.CustomBar * 2 + 95
  39. },
  40. style() {
  41. var StatusBar = this.StatusBar;
  42. var CustomBar = this.CustomBar;
  43. var style = `height:${CustomBar}px;padding-top:${StatusBar}upx;`;
  44. return style
  45. },
  46. },
  47. data() {
  48. return {
  49. tabData: ['基础信息', '品牌信息', '经营资质', '经营信息'],
  50. current: 0,
  51. msgList: [], //列表数据
  52. upOption: {
  53. page: {
  54. num: 0, // 当前页码,默认0,回调之前会加1,即callback(page)会从1开始
  55. size: 10 // 每页数据的数量
  56. },
  57. noMoreSize: 4, //如果列表已无数据,可设置列表的总数量要大于半页才显示无更多数据;避免列表数据过少(比如只有一条数据),显示无更多数据会不好看; 默认5
  58. empty: {
  59. tip: '~ 暂无数据 ~', // 提示
  60. },
  61. loading: '',
  62. text: '全部',
  63. isShowNoMore: false,
  64. textNoMore: '我是有底线的 >_<'
  65. },
  66. announcement: [],
  67. }
  68. },
  69. onLoad() {
  70. if (this.mescroll) {
  71. this.mescroll.resetUpScroll()
  72. }
  73. },
  74. methods: {
  75. upCallback(page) {
  76. let data = {
  77. category: this.current !==0?this.current + 1:null,
  78. merchantId: uni.getStorageSync(USER_INFO).merchantId,
  79. pageNo: page.num,
  80. pageSize: page.size,
  81. }
  82. let interfaceData = this.current ==0 ? "/merchant/localMerchantService/queryList" : "/merchant/localMerchantService/queryAllList"
  83. this.$http.post(interfaceData, data).then(res => {
  84. if (res.data.success) {
  85. console.log(res.data.result.records, 888);
  86. this.announcement = res.data.result.records
  87. this.mescroll.endSuccess(this.announcement.length);
  88. for (let item of this.announcement) {
  89. this.msgList.push(item)
  90. }
  91. console.log(this.msgList, 88888);
  92. }
  93. if (page.num == 1) {
  94. this.msgList = []; //如果是第一页需手动制空列表
  95. this.msgList = this.msgList.concat(this.announcement); //追加新数据
  96. }
  97. }).catch(() => {
  98. //联网失败, 结束加载
  99. this.mescroll.endErr();
  100. })
  101. },
  102. // 切换标签的选中状态
  103. toggleSelection(index) {
  104. if (this.current === index) return
  105. this.current = index
  106. this.msgList = []// 先置空列表,显示加载进度
  107. this.mescroll.resetUpScroll() // 再刷新列表数据
  108. },
  109. }
  110. }
  111. </script>
  112. <style scoped lang="scss">
  113. page {
  114. background: #F8F8FA;
  115. }
  116. .eamine-tab {
  117. position: fixed;
  118. height: 85upx;
  119. width: 100%;
  120. z-index: 9999;
  121. background: #FFFFFF;
  122. padding: 18upx 26upx;
  123. .tab-title {
  124. font-size: 28upx;
  125. color: #888888;
  126. }
  127. .selected-background {
  128. font-weight: 700;
  129. font-size: 29upx;
  130. color: #333333;
  131. position: relative;
  132. }
  133. .selected-background ::after {
  134. content: '';
  135. position: absolute;
  136. bottom: 0;
  137. left: 23upx;
  138. width: 55upx;
  139. height: 10upx;
  140. background: #449AFF;
  141. border-radius: 7upx;
  142. }
  143. }
  144. .tab-top {
  145. margin-top: 85upx;
  146. padding: 26upx;
  147. }
  148. .borderRadiu {
  149. border-radius: 10upx 10upx 10upx 10upx;
  150. padding-bottom: 10px;
  151. background-color: #ffffff;
  152. font-size: 26upx;
  153. color: #999999;
  154. margin: 26upx;
  155. .status-title {
  156. text:first-child {
  157. color: #FFFFFF;
  158. padding: 8upx 14upx;
  159. border-radius: 4px 4px 4px 4px;
  160. margin-right: 14upx;
  161. }
  162. }
  163. .green-bg {
  164. background: linear-gradient(90deg, #FFFFFF 0%, #EDFCF3 100%);
  165. }
  166. .green-button {
  167. background: #54C666;
  168. }
  169. .blue-bg {
  170. background: linear-gradient(90deg, #FFFFFF 0%, #EBEEF6 100%);
  171. }
  172. .blue-button {
  173. background: #6E78A6;
  174. }
  175. .red-bg {
  176. background: linear-gradient(90deg, #FFFFFF 0%, #FFF7F8 100%);
  177. }
  178. .red-button {
  179. background: #F55D65;
  180. }
  181. }
  182. </style>