desWithCode.vue 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159
  1. <template>
  2. <!-- 立即咨询 -->
  3. <div class="client-zixun-code mta-hidden-xs" :class="pageData.topClass" :style="pageData.topStyle">
  4. <h4>{{ pageData.title }}</h4>
  5. <p v-if="pageData.p1" class="p1">{{ pageData.p1 }}</p>
  6. <img :src="imgUrl" alt="">
  7. <p v-if="pageData.p2" class="p2">{{ pageData.p2 }}</p>
  8. </div>
  9. </template>
  10. <script>
  11. export default {
  12. name: "desWithCode",
  13. props: {
  14. source: {
  15. type: String,
  16. }
  17. },
  18. data() {
  19. return {
  20. imgUrl: require('static/codeImage/code_kefu.png'), // 客服二维码
  21. imgUrl2: require('static/codeImage/code_jingli.png'), // 经理二维码
  22. bg1: require('static/codeImage/bg01.png'), // 企业培训
  23. bg2: require('static/codeImage/bg01.png'), // 教育机构+食品餐饮
  24. }
  25. },
  26. computed: {
  27. pageData() {
  28. const title = '立即扫码资讯,领取您的专属解决方案';
  29. const p1 = '马上扫码添加客户经理';
  30. const p2 = '扫码添加客服微信';
  31. let result = {};
  32. switch (this.source) {
  33. case 'exam':
  34. // 严肃考试
  35. result = Object.assign({title, p2}, {topClass: 'kefu'}, {topStyle: 'background: none'}, {imgUrl: this.imgUrl});
  36. case 'peixun':
  37. // 企业培训
  38. result = Object.assign({
  39. title,
  40. p1
  41. }, {topClass: 'jingli'}, {topStyle: `background: url(${this.bg1})`}, {imgUrl: this.imgUrl2});
  42. case 'education':
  43. // 解决方案 -> 教育机构
  44. case 'bitAnsSup':
  45. // 解决方案 -> 食品餐饮
  46. case 'erupt':
  47. // 解决方案 -> 万人高并发
  48. case 'transportation':
  49. // 解决方案 -> 交通运输
  50. case 'financial':
  51. // 解决方案 -> 金融保险
  52. case 'medical':
  53. // 解决方案 -> 医疗行业
  54. case 'privatization':
  55. // 解决方案 -> 私有化部署
  56. case 'government':
  57. // 解决方案 -> 政府机构
  58. case 'news':
  59. // 客户案例
  60. case 'energy':
  61. // 解决方案 -> 能源化工
  62. result = Object.assign({
  63. title,
  64. p2
  65. }, {topClass: 'kefu_level2'}, {topStyle: `background: url(${this.bg2})`}, {imgUrl: this.imgUrl});
  66. }
  67. return result;
  68. },
  69. }
  70. }
  71. </script>
  72. <style lang="scss" scoped>
  73. .client-zixun-code {
  74. width: 100%;
  75. background: green;
  76. text-align: center;
  77. box-sizing: border-box;
  78. overflow: hidden;
  79. h4 {
  80. text-align: center;
  81. font-size: 30px;
  82. height: 30px;
  83. }
  84. img {
  85. text-align: center;
  86. margin: 0 auto;
  87. width: 142px;
  88. height: 142px;
  89. }
  90. p {
  91. text-align: center;
  92. height: 18px;
  93. }
  94. // 客服
  95. &.kefu {
  96. height: 440px;
  97. h4 {
  98. color: #333;
  99. margin-top: 62px;
  100. margin-bottom: 43px;
  101. }
  102. p.p2 {
  103. font-size: 18px;
  104. color: #333;
  105. margin-bottom: 81px;
  106. margin-top: 24px;
  107. }
  108. }
  109. // 经理
  110. &.jingli {
  111. height: 360px;
  112. h4 {
  113. color: #fff;
  114. margin-top: 62px;
  115. margin-bottom: 30px;
  116. }
  117. p.p1 {
  118. font-size: 18px;
  119. color: #fff;
  120. margin-bottom: 16px;
  121. }
  122. img {
  123. margin-bottom: 60px;
  124. }
  125. }
  126. &.kefu_level2 {
  127. height: 360px;
  128. h4 {
  129. color: #fff;
  130. margin-top: 62px;
  131. margin-bottom: 43px;
  132. }
  133. p.p2 {
  134. font-size: 18px;
  135. color: #fff;
  136. margin-bottom: 81px;
  137. margin-top: 24px;
  138. }
  139. }
  140. }
  141. </style>