contact-we.vue 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  1. <template>
  2. <div class="contact-we">
  3. <div class="btn" v-on:click='show()'>
  4. <i class="iconfont icon-kefu3"></i>
  5. <span>联<br>系<br>客<br>服</span>
  6. </div>
  7. <div class="content" v-show='isActive'>
  8. <div class="wechat">
  9. <img src="../assets/img/weichatKefu.png">
  10. </div>
  11. <div class="phone">
  12. <p>电话咨询</p>
  13. <i class="iconfont icon-dianhua"></i>
  14. <p>+8617354718363</p>
  15. </div>
  16. </div>
  17. </div>
  18. </template>
  19. <script>
  20. export default {
  21. name: 'contactWe',
  22. data () {
  23. return {
  24. isActive: false
  25. }
  26. },
  27. methods:{
  28. show(){
  29. this.isActive=!this.isActive
  30. }
  31. }
  32. }
  33. </script>
  34. <!-- Add "scoped" attribute to limit CSS to this component only -->
  35. <style scoped>
  36. .contact-we{
  37. position: fixed;
  38. top: 28%;
  39. right: 0;
  40. z-index: 999;
  41. .btn{
  42. width: 36px;
  43. height: 120px;
  44. background: #20a0ff;
  45. position: absolute;
  46. margin-left: -36px;
  47. border-top-left-radius: 10px;
  48. border-bottom-left-radius: 10px;
  49. cursor: pointer;
  50. margin-top: 108px;
  51. text-align: center;
  52. i{
  53. font-size: 24px;
  54. color: white;
  55. }
  56. span{
  57. color: yellow;
  58. font-size: 14px;
  59. line-height: 1;
  60. }
  61. }
  62. .content{
  63. box-shadow: 0 3px 5px 2px rgba(26,0,0,.4);
  64. width: 150px;
  65. background: #20a0ff;
  66. border-top-left-radius: 10px;
  67. border-bottom-left-radius: 10px;
  68. padding-top: 10px;
  69. padding-bottom: 10px;
  70. .wechat{
  71. background: white;
  72. width: 130px;
  73. margin: 0 auto;
  74. border-radius: 10px;
  75. overflow: hidden;
  76. height: 140px;
  77. }
  78. .phone{
  79. height: 130px;
  80. width: 130px;
  81. margin: 0 auto;
  82. border-radius: 10px;
  83. padding: 10px 5px;
  84. margin-top: 10px;
  85. background: white;
  86. text-align: center;
  87. p:nth-child(1){
  88. border-bottom: 1px solid #e5e5e5;
  89. font-size: 14px;
  90. color: #333;
  91. font-weight: 700;
  92. line-height: 30px;
  93. text-align: left;
  94. margin-left: 10px;
  95. }
  96. i{
  97. font-size: 32px;
  98. color: #1eb8ff;
  99. }
  100. p:nth-child(3){
  101. color: #333;
  102. font-weight: 700;
  103. font-size: 13px;
  104. line-height: 30px;
  105. }
  106. }
  107. }
  108. }
  109. </style>