displayCard.vue 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  1. <template>
  2. <div class="display-card">
  3. <span @click="cardClose" v-if="cardShow" class="cardClose"><img src="/images/all/close.png"></span>
  4. <div class="content" v-if="cardShow">
  5. <div>
  6. <count-box></count-box>
  7. </div>
  8. <div>
  9. <p><span v-text="all"></span></p>
  10. </div>
  11. <div>
  12. <p><span v-text="payMoney"></span></p>
  13. </div>
  14. <div>
  15. <p><span v-text="inquirySheet"></span></p>
  16. </div>
  17. <a class="enter" @click="onRegisterClick"><img src="/images/all/enter.png"></a>
  18. </div>
  19. </div>
  20. </template>
  21. <script>
  22. import CountBox from '../main/count/Box.vue'
  23. export default {
  24. name: 'display-card',
  25. data () {
  26. return {
  27. cardShow: true
  28. }
  29. },
  30. components: {
  31. CountBox
  32. },
  33. methods: {
  34. cardClose () {
  35. this.cardShow = false
  36. },
  37. onRegisterClick () {
  38. this.$http.get('/register/page').then(response => {
  39. if (response.data) {
  40. window.location.href = response.data.content
  41. }
  42. })
  43. }
  44. },
  45. computed: {
  46. payMoney () {
  47. let count = this.$store.state.count.payMoney.data
  48. let supplierCount = count.content ? count.totalElements + '' : '0'
  49. return supplierCount
  50. },
  51. inquirySheet () {
  52. let count = this.$store.state.count.inquirySheet.data
  53. let supplierCount = count.content ? count.totalElements + '' : '0'
  54. return supplierCount
  55. },
  56. all () {
  57. let count = this.$store.state.supplier.merchant.merchantAll.data
  58. let supplierCount = count.content ? count.totalElements + '' : '0'
  59. return supplierCount
  60. }
  61. }
  62. }
  63. </script>
  64. <style lang="scss" scoped>
  65. .display-card{
  66. position: fixed;
  67. right: 100px;
  68. top: 115px;
  69. width: 144px;
  70. height: 527px;
  71. z-index: 100;
  72. .cardClose{
  73. position: absolute;
  74. right: 0px;
  75. top: 0px;
  76. opacity: 0.8;
  77. }
  78. .content{
  79. margin-top: 10px;
  80. width: 143px;
  81. height: 517px;
  82. background: url('/images/all/displayCard.png') no-repeat;
  83. div{
  84. height: 110px;
  85. padding-top: 55px;
  86. &:first-child{
  87. height: 110px;
  88. padding-top: 1px;
  89. }
  90. p{
  91. width: 100%;
  92. text-align: center;
  93. font-size: 26px;
  94. color: #fff;
  95. }
  96. }
  97. .enter{
  98. width: 100%;
  99. display: inline-block;
  100. position: absolute;
  101. bottom: 48px;
  102. left: -4px;
  103. text-align: center;
  104. }
  105. }
  106. }
  107. </style>