rightHelper.vue 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124
  1. <template>
  2. <div class="helper-container" :class="{'extend':isExtend}">
  3. <div @click="handleShowDetail" class="button">
  4. <i class="icon iconfont">&#xe618;</i>
  5. <p class="btn-text">在线客服</p>
  6. </div>
  7. <div class="helper-detail">
  8. <div class="detail-top">
  9. <img class="qw-img" :src="require('../assets/contant.png')"/>
  10. </div>
  11. <div class="detail-bottom">
  12. <h1 class="hot-line-title">电话咨询</h1>
  13. <hr class="divider"/>
  14. <i class="icon phone"></i>
  15. <p class="hot-line">400-1565-899</p>
  16. </div>
  17. </div>
  18. </div>
  19. </template>
  20. <script>
  21. export default {
  22. name: "rightHelper",
  23. data(){
  24. return{
  25. isExtend:false
  26. }
  27. },
  28. methods:{
  29. handleShowDetail(){
  30. this.isExtend=!this.isExtend;
  31. }
  32. }
  33. }
  34. </script>
  35. <style scoped lang="less">
  36. @import "../assets/less/_variable.less";
  37. @lightBlue:#0485d8;
  38. .helper-container{
  39. z-index: 10;
  40. transition: all 0.25s ease;
  41. &.extend{
  42. left: 100%;
  43. transform: translate(-100%,-50%);
  44. }
  45. position: fixed;
  46. top: 50%;
  47. left: calc(100% - 32px);
  48. transform: translateY(-50%);
  49. & .button{
  50. position: absolute;
  51. top:50%;
  52. transform: translateY(-50%);
  53. padding: 1px;
  54. width: 32px;
  55. height: 120px;
  56. background-color: @lightBlue;
  57. border-radius:10px 0 0 10px;
  58. box-shadow: 2px 0 2px #4f4f4f;
  59. & .icon{
  60. display: inline-block;
  61. margin-top: 5px;
  62. width: 22px;
  63. height: 22px;
  64. color: white;
  65. }
  66. & .btn-text{
  67. font-size: 14px;
  68. line-height: 1.2;
  69. width: 14px;
  70. margin: 10px auto 0;
  71. color: #fffc00;
  72. }
  73. }
  74. & .helper-detail{
  75. padding: 1px;
  76. border-radius:10px 0 0 10px;
  77. margin-left: 32px;
  78. background-color: @lightBlue;
  79. & .detail-top{
  80. border-radius: 10px;
  81. width: 128px;
  82. height: 290px;
  83. background-color: white;
  84. margin: 6px;
  85. & .qw-img{
  86. margin-top: 12px;
  87. }
  88. }
  89. & .detail-bottom{
  90. padding: 1px;
  91. border-radius: 10px;
  92. width: 128px;
  93. height: 122px;
  94. background-color: white;
  95. margin: 6px;
  96. & .hot-line-title{
  97. margin-top: 10px;
  98. font-size: 13px;
  99. color:@lightBlack;
  100. font-weight: 700;
  101. }
  102. & .divider{
  103. margin: 0 5px;
  104. }
  105. & .icon.phone{
  106. display: inline-block;
  107. width: 31px;
  108. height: 37px;
  109. margin-top: 10px;
  110. background: url(../assets/phone.png) 50% 50% no-repeat;
  111. }
  112. & .hot-line{
  113. font-size: 14px;
  114. color: @lightBlack;
  115. font-weight: 700;
  116. }
  117. }
  118. }
  119. }
  120. </style>