index.vue 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123
  1. <template>
  2. <!-- 商品审核 -->
  3. <view>
  4. <view class="select">
  5. <view class="text font-color4" :class="{active1:shows === 1}" @click="active('001')">
  6. 未审核
  7. </view>
  8. <view class="text font-color4" :class="{active:shows === 2}" @click="active('002')">
  9. 审核未通过
  10. </view>
  11. <view class="text font-color4" :class="{active2:shows === 3}" @click="active('003')">
  12. 审核通过
  13. </view>
  14. </view>
  15. <view>
  16. <view v-if="shows === 1">
  17. <notApproved ref="notApproved"></notApproved>
  18. </view>
  19. <view v-if="shows === 2">
  20. <noPass ref="noPass"></noPass>
  21. </view>
  22. <view v-if="shows === 3">
  23. <Pass ref="Pass"></Pass>
  24. </view>
  25. </view>
  26. <u-tabbar :list="tabBarList" :active-color="activeColor" :inactive-color="inactiveColor"
  27. :border-top="borderTop"></u-tabbar>
  28. </view>
  29. </template>
  30. <script>
  31. import notApproved from '@/pages/manage/merchant/notApproved.vue'
  32. import noPass from '@/pages/manage/merchant/noPass.vue'
  33. import Pass from '@/pages/manage/merchant/Pass.vue'
  34. import { mapGetters } from 'vuex'
  35. export default {
  36. components:{
  37. notApproved,
  38. noPass,
  39. Pass
  40. },
  41. data() {
  42. return {
  43. shows: 1,
  44. borderTop: false,
  45. inactiveColor: '#ccc',
  46. activeColor: '#2E4F1C',
  47. }
  48. },
  49. computed: {
  50. ...mapGetters([
  51. 'tabBarList',
  52. 'role'
  53. ])
  54. },
  55. onLoad() {
  56. this.shows = 1;
  57. },
  58. methods: {
  59. show(){
  60. if(this.shows === 1){
  61. this.$refs.notApproved.showMOdel();
  62. }else if(this.shows === 2){
  63. this.$refs.noPass.showMOdel();
  64. }else if(this.shows === 3){
  65. this.$refs.Pass.showMOdel();
  66. }
  67. },
  68. active(type) {
  69. if (type === '001') {
  70. this.shows = 1;
  71. } else if (type === '002') {
  72. this.shows = 2;
  73. } else {
  74. this.shows = 3;
  75. }
  76. }
  77. }
  78. }
  79. </script>
  80. <style lang="scss">
  81. page {
  82. background-color: #F9F9F9;
  83. }
  84. .header{
  85. width: 100%;
  86. height: 176rpx;
  87. background: #2E4F1C;
  88. text-align: center;
  89. color: #FFFFFF;
  90. padding-top: 116rpx;
  91. font-size: 26rpx;
  92. }
  93. .select {
  94. border: 2rpx solid #2E4F1C;
  95. border-radius: 48rpx;
  96. margin: 30rpx 36rpx 0;
  97. display: flex;
  98. justify-content: space-between;
  99. .text {
  100. padding: 22rpx 60rpx;
  101. text-align: center;
  102. }
  103. }
  104. .text:nth-child(3) {
  105. border: none;
  106. }
  107. .active {
  108. background-color: #2E4F1C;
  109. color: #ffffff;
  110. }
  111. .active1 {
  112. background-color: #2E4F1C;
  113. color: #ffffff;
  114. border-radius: 48rpx 0rpx 0rpx 48rpx;
  115. }
  116. .active2 {
  117. background-color: #2E4F1C;
  118. color: #ffffff;
  119. border-radius: 0rpx 48rpx 48rpx 0rpx;
  120. }
  121. </style>