desWithCode.vue 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161
  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. break;
  37. case 'peixun':
  38. // 企业培训
  39. result = Object.assign({
  40. title,
  41. p1
  42. }, {topClass: 'jingli'}, {topStyle: `background: url(${this.bg1})`}, {imgUrl: this.imgUrl2});
  43. case 'education':
  44. // 解决方案 -> 教育机构
  45. case 'bitAnsSup':
  46. // 解决方案 -> 食品餐饮
  47. case 'erupt':
  48. // 解决方案 -> 万人高并发
  49. case 'transportation':
  50. // 解决方案 -> 交通运输
  51. case 'financial':
  52. // 解决方案 -> 金融保险
  53. case 'medical':
  54. // 解决方案 -> 医疗行业
  55. case 'privatization':
  56. // 解决方案 -> 私有化部署
  57. case 'government':
  58. // 解决方案 -> 政府机构
  59. case 'news':
  60. // 客户案例
  61. case 'energy':
  62. // 解决方案 -> 能源化工
  63. result = Object.assign({
  64. title,
  65. p2
  66. }, {topClass: 'kefu_level2'}, {topStyle: `background: url(${this.bg2})`}, {imgUrl: this.imgUrl});
  67. break;
  68. }
  69. return result;
  70. },
  71. }
  72. }
  73. </script>
  74. <style lang="scss" scoped>
  75. .client-zixun-code {
  76. width: 100%;
  77. background: green;
  78. text-align: center;
  79. box-sizing: border-box;
  80. overflow: hidden;
  81. h4 {
  82. text-align: center;
  83. font-size: 30px;
  84. height: 30px;
  85. }
  86. img {
  87. text-align: center;
  88. margin: 0 auto;
  89. width: 142px;
  90. height: 142px;
  91. }
  92. p {
  93. text-align: center;
  94. height: 18px;
  95. }
  96. // 客服
  97. &.kefu {
  98. height: 440px;
  99. h4 {
  100. color: #333;
  101. margin-top: 62px;
  102. margin-bottom: 43px;
  103. }
  104. p.p2 {
  105. font-size: 18px;
  106. color: #333;
  107. margin-bottom: 81px;
  108. margin-top: 24px;
  109. }
  110. }
  111. // 经理
  112. &.jingli {
  113. height: 360px;
  114. h4 {
  115. color: #fff;
  116. margin-top: 62px;
  117. margin-bottom: 30px;
  118. }
  119. p.p1 {
  120. font-size: 18px;
  121. color: #fff;
  122. margin-bottom: 16px;
  123. }
  124. img {
  125. margin-bottom: 60px;
  126. }
  127. }
  128. &.kefu_level2 {
  129. height: 360px;
  130. h4 {
  131. color: #fff;
  132. margin-top: 62px;
  133. margin-bottom: 43px;
  134. }
  135. p.p2 {
  136. font-size: 18px;
  137. color: #fff;
  138. margin-bottom: 81px;
  139. margin-top: 24px;
  140. }
  141. }
  142. }
  143. </style>