chanPinTiYan.vue 8.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214
  1. <template>
  2. <div>
  3. <ul class="experience-ul-box mta-hidden-xs">
  4. <li>
  5. <div>
  6. <h5>手机学员端</h5>
  7. <i></i>
  8. <p>用手机扫描二维码,考生30秒体验答卷</p>
  9. <a style="cursor: default">扫码试用</a>
  10. <span ref="codeBtn" v-if="youkeFlag"><em></em></span>
  11. <div ref="codeBtn" v-if="!youkeFlag">系统升级中...</div>
  12. </div>
  13. </li>
  14. <li><div><h5>电脑管理端</h5><i></i>
  15. <p v-if="curType === 'kaoshi'">欢迎体验青谷系统后台,三步轻松组织一场考试</p>
  16. <p v-if="curType === 'peixun'">学练考试一站式培训系统,支持市面各种主流浏览器</p>
  17. <a @click="KsTyBtn('https://youkeksc.mtavip.com/c/youke')">立即体验</a></div></li>
  18. <li><div><h5>电脑学员端</h5><i></i>
  19. <p v-if="curType === 'kaoshi'">支持市面各种主流浏览器,支持十万量级的考试并发</p>
  20. <p v-if="curType === 'peixun'">欢迎体验青谷系统后台,三步轻松组织一场培训</p>
  21. <a @click="KsTyBtn('https://youkeksa.mtavip.com/a/youke')">免费体验</a></div></li>
  22. </ul>
  23. <!-- 手机轮播 -->
  24. <div class="experience-phone-box mta-hidden-sm">
  25. <div v-swiper:mySwiper="swiperOption" class="swiper-container">
  26. <div class="swiper-wrapper">
  27. <div class="swiper-slide">
  28. <div class="experience-content-box">
  29. <h5>手机学员端</h5>
  30. <i class="sjxyd-icon"></i>
  31. <p>用手机扫描二维码,考生30秒体验答卷</p>
  32. <a style="cursor: default" @click="ykFreeTrial">立即体验</a>
  33. </div>
  34. </div>
  35. <div class="swiper-slide">
  36. <div class="experience-content-box">
  37. <h5>电脑管理端</h5>
  38. <i class="dnxyd-icon"></i>
  39. <p v-if="curType === 'kaoshi'">欢迎体验青谷系统后台,三步轻松组织一场考试</p>
  40. <p v-if="curType === 'peixun'">学练考试一站式培训系统,支持市面各种主流浏览器</p>
  41. <a @click="KsTyBtn('https://youkeksc.mtavip.com/c/youke')">立即体验</a>
  42. </div>
  43. </div>
  44. <div class="swiper-slide">
  45. <div class="experience-content-box">
  46. <i class="dngld-icon"></i>
  47. <h5>电脑学员端</h5>
  48. <p v-if="curType === 'kaoshi'">支持市面各种主流浏览器,支持十万量级的考试并发</p>
  49. <p v-if="curType === 'peixun'">欢迎体验青谷系统后台,三步轻松组织一场培训</p>
  50. <a @click="KsTyBtn('https://youkeksa.mtavip.com/a/youke')">后台体验</a></div>
  51. </div>
  52. </div>
  53. <div class="swiper-pagination swiper-pagination-style"></div>
  54. <p class="experience-swiper-tip">←左右滑动查看更多→</p>
  55. </div>
  56. </div>
  57. <!-- 系统维护 -->
  58. <el-dialog :close-on-click-modal="false" :visible.sync="systemMaintainDl" class="system-maintain-dialog"></el-dialog>
  59. </div>
  60. </template>
  61. <script>
  62. export default {
  63. name: "chanPinTiYan",
  64. props: {
  65. curType: {
  66. type: String,
  67. default: 'kaoshi'
  68. }
  69. },
  70. data() {
  71. return {
  72. youkeFlag:false,// 控制游客系统是否维护中
  73. systemMaintainDl: false,
  74. swiperOption: {
  75. pagination: {
  76. el: '.swiper-pagination',
  77. bulletClass: 'my-bullet-swiper', // 自定义设置默认类名
  78. bulletActiveClass: 'my-bullet-active-swiper', // 自定义滑块活跃类名
  79. clickable: true, // 点击当前滑块切换到对应的轮播图片
  80. },
  81. autoplay: {
  82. delay: 5000,
  83. },
  84. paginationClickable: true,
  85. speed: 800,
  86. loop: true,
  87. observer: true,
  88. observeParents: true,
  89. },
  90. }
  91. },
  92. methods: {
  93. ykFreeTrial() {
  94. if(this.youkeFlag){
  95. // 没升级
  96. window.open('https://youkeksc.mtavip.com/kscmdist/#/youke')
  97. }else{
  98. // 升级中
  99. this.$message({customClass:'phone-message-box',type: 'warning',message: '系统升级中,请稍后再试...'});
  100. }
  101. },
  102. // 判断是否为移动端
  103. isH5(){
  104. var browserWidth=document.documentElement.clientWidth;
  105. if(browserWidth <= 768){
  106. return true;
  107. }else{
  108. return false;
  109. }
  110. },
  111. KsTyBtn(btnUrl) {
  112. if(this.youkeFlag) {
  113. if(this.isH5()){
  114. this.$router.push({ name: 'copyUrl', query: { url: btnUrl, } });
  115. }else {
  116. window.open(btnUrl);
  117. }
  118. }else{
  119. if(this.isH5()){
  120. // 升级中
  121. this.$message({customClass:'phone-message-box',type: 'warning',message: '系统升级中,请稍后再试...'});
  122. }else{
  123. this.systemMaintainDl = true;
  124. }
  125. }
  126. },
  127. },
  128. created() {
  129. // 页面初始化
  130. this.$axios.$post('/home/youke/stop').then(res=>{
  131. if (res.data === '1') {
  132. this.youkeFlag = false;
  133. }else{
  134. this.youkeFlag = true;
  135. }
  136. });
  137. },
  138. }
  139. </script>
  140. <style lang="scss">
  141. .experience-ul-box{
  142. margin: 0 -60px;text-align: center;
  143. li{
  144. width:33.33%;display: inline-block;text-align: center;font-size: 16px;
  145. >div{
  146. height: 476px;margin: 0 60px;padding:46px 36px;border: 1px solid #eaeaea;
  147. border-radius: 10px;position: relative;overflow: hidden;box-sizing: border-box;
  148. div{font-size:20px;color:#fff;position: absolute;right: 0;left: 0;top: 0;bottom: 0;box-sizing: border-box;transition: 0.5s;overflow: hidden;border-radius: 10px;line-height: 476px;background: rgba(0,0,0,.6);cursor: default;}
  149. i{display: inline-block;width: 200px;height: 180px;background-repeat: no-repeat;background-size: contain;margin-bottom: 24px;background-position: center;}
  150. h5{font-size: 20px;color: #565656;margin-bottom: 24px;}
  151. p{min-height: 52px;font-size: 14px;padding: 0;margin: 0;color: #565656;line-height: 24px;}
  152. a{width: 180px;height: 45px;line-height: 45px;display: inline-block;margin-top: 24px;text-align: center;background-color: #00B96B;
  153. border-color: rgba(255, 0, 0, 0);border-width: 1px;border-style: solid;color: rgb(255, 255, 255);border-radius:4px;font-weight: normal;cursor: pointer}
  154. span{display: none;transition: 0.5s;position: absolute;top: 0;bottom: 0;left: 0;right: 0;overflow: hidden;}
  155. em{width:200px;height:200px;display: block;margin: 90px auto;background-image:url("~static/images/client/exam/exam-code-img.png");background-size: cover;}
  156. em.px-img-box{background-image:url("~static/images/client/train/train-code-img.png")}
  157. }
  158. >div:after{
  159. content: "";width: 100%;height: 4px;position: absolute;bottom: 0;background: #00b96b;left: 0;
  160. }
  161. >div:hover{
  162. padding:0;box-shadow: 0 0 13px 0 rgba(223,223,223,0.60);
  163. h5{background: #00b96b;color: #fff;padding: 27px 0 17px;}
  164. p{padding: 0 36px;}
  165. span{display: block;}
  166. }
  167. }
  168. li:nth-child(1) i{background-image:url("~static/images/client/exam/exam-tel-icon.png")}
  169. li:nth-child(2) i{background-image:url("~static/images/client/exam/exam-pc-icon.png")}
  170. li:nth-child(3) i{background-image:url("~static/images/client/exam/exam-xy-icon.png")}
  171. }
  172. /**************** 手机样式 ****************/
  173. .experience-phone-box {
  174. position: relative;
  175. // swiper--div
  176. .swiper-slide {width: 100%;}
  177. .swiper-pagination-style {
  178. width: 80px;position: absolute;bottom: 66px;left: 50%;margin-left: -30px;z-index: 99;
  179. // 小圆点
  180. .my-bullet-swiper {width: 10px;height: 10px;border-radius: 5px;display: inline-block;background: rgba(17,221,71, 0.2);margin-right: 14px;}
  181. // 分页active
  182. .my-bullet-active-swiper {background: #00B96B;}
  183. }
  184. // swiper 内容区
  185. .experience-content-box {
  186. height: 243px;display: flex;flex-direction: column;align-items: center;justify-content: center;
  187. margin: 5px 4% 40px;box-shadow: rgba(0, 0, 0, 0.4) 0 0 6px -1px;text-align: center;padding: 20px 0;
  188. i {width: 120px;height: 70px;background-repeat: no-repeat;background-size: contain;margin-bottom: 24px;display: inline-block;flex-shrink: 0;}
  189. h5 {font-weight: 700;font-size: 16px;color: rgb(16, 16, 16);margin-bottom: 30px;}
  190. p {font-weight: 400;font-size: 14px;color: rgb(16, 16, 16);margin: 0 48px;line-height: 24px;}
  191. a {width: 122px;height: 35px;line-height: 35px;background-color: #00B96B;color: rgb(255, 255, 255);border-radius: 5px;font-size: 14px;
  192. padding: 0;text-align: center;display: inline-block;margin-top: 16px;
  193. }
  194. }
  195. // swiper 提示
  196. .experience-swiper-tip {font-weight: 400;font-size: 14px;color: rgb(96, 96, 96);text-align: center;margin: 0 0 42px;}
  197. // 图片
  198. .sjxyd-icon {background-image:url("~static/images/client/exam/exam-tel-icon.png")}
  199. .dnxyd-icon {background-image:url("~static/images/client/exam/exam-pc-icon.png")}
  200. .dngld-icon {background-image:url("~static/images/client/exam/exam-xy-icon.png")}
  201. }
  202. </style>