<template>

  <div class="client-index-page">
    <div style="display: none">
      <a :href="`${baseUrl}/pcdituye.html`"></a>
      <a :href="`${baseUrl}/pcsitemap.xml`"></a>
    </div>

    <h1 style='display:none;'>在线考试系统在线培训系统在线答题系统在线学习系统</h1>
    <div style='display:none;'>
      大连栋科软件工程有限公司是专业的在线考试系统教育软件与在线培训系统数字化资源服务供应商，创立于2007年，总部位于大连软件园。在线考试系统公司凭借成熟的项目研发和管理经验，致力于为客户提供全方位的在线教育解决方案，实现移动化、平台化、知识化、智能化学习管理模式，让学习变得更轻松。“共同成长、相伴一生”是栋科软件始终不渝的核心价值观。栋科软件在线培训系统将一如既往，持续创新、创造价值，与客户、合作伙伴共享共赢。
      在线培训系统MTA是Master of Training Administration的缩写，含义是培训管理专家，麦塔在线答题系统致力于为客户提供专业的在线教育方案，打造企业核心竞争力。麦塔在线培训系统品牌诞生于2009年，在线考试系统公司创始团队多年来一直深耕在线教育领域，积累了丰富的行业经验。研发团队集结了来自互联网、科技、教育等多个领域专家级研发工程师，在线考试系统率先实现了移动化、平台化、知识化、智能化的学习管理模式。麦塔在线学习系统肩负着“改变互联网教育未来”的使命，持续创新、创造价值，在线答题系统与客户和合作伙伴共享共赢。
    </div>

    <!-- 首页banner栏 -->
    <div class="client-banner-box">
      <el-carousel trigger="click" v-if="bannerList.length>0">
        <el-carousel-item v-for="(item,index) in bannerList" :key="index">
            <div @click="clickBanner(item)" :style="{backgroundImage: 'url(' + item.pic + ')'}" class="index-carousel-box"></div>
        </el-carousel-item>
      </el-carousel>
    </div>

    <!-- 发展历程-移动端隐藏-->
    <div class="client-company-history mta-hidden-xs">
      <div class="client-container">
        <ul>
          <li><a @click="goExamPage"><i></i><div><span>在线考试系统</span><p>让考试变得更轻松</p></div></a></li>
          <li><a @click="goPeixun"><i></i><div><span>在线培训系统</span><p>为企业解决培训痛点</p></div></a></li>
          <li><a @click="goKechengPage"><i></i><div><span>课程定制开发</span><p>打造专业定制化服务</p></div></a></li>
          <li><a @click="goKechengZyPage"><i></i><div><span>通用课程资源</span><p>企业构建自主课程体系</p></div></a></li>
        </ul>
      </div>
    </div>

    <!-- 行业学习需求 -->
    <div class="client-demand-box">
      <div class="client-container">
        <h4 class="client-title">满足不同行业学习需求</h4>
          <ul class="demand-list-box">
            <li><div><span><i></i></span><p>企事业单位</p></div></li>
            <li><div><span><i></i></span><p>信息产业</p></div></li>
            <li><div><span><i></i></span><p>能源化工</p></div></li>
            <li><div><span><i></i></span><p>金融保险</p></div></li>
            <li><div><span><i></i></span><p>交通运输</p></div></li>
            <li><div><span><i></i></span><p>教育培训</p></div></li>
            <li><div><span><i></i></span><p>食品餐饮</p></div></li>
            <li><div><span><i></i></span><p>医疗卫生</p></div></li>
          </ul>
          <!--<div rel="nofollow" class="free-trial-default-btn" @click="FreeTrial(1)">免费试用</div>-->
      </div>
    </div>

    <!-- 产品和服务 -->
    <div class="client-products-services">
      <div class="client-container">
        <h4 class="client-title">产品和服务</h4>
        <div class="products-services-box products-contrary-box">
          <el-carousel arrow="never" indicator-position="none">
            <el-carousel-item v-for="(item,index) in cpfwKaoshiList" :key="index">
              <div :style="{backgroundImage: 'url(' + item.imgUrl + ')'}" class="cpfw-img-box"></div>
            </el-carousel-item>
          </el-carousel>
          <div class="products-services-content">
              <h5>智能稳定的在线考试系统</h5>
              <p class="p-before-circle">人员管理：支持手动、批量导入人员及部门多层级管理功能，解决企业人员多且分散的问题</p>
              <p class="p-before-circle">智能组卷：六大常用题型，批量导入；固定组卷，随机组卷，固定+随机综合组卷，涵盖错题，按难易程度抽题</p>
              <p class="p-before-circle">节约成本：支持客观题自动判分，主观题后台人工阅卷。有效减少人力成本，提升时间效率，降低费用成本</p>
              <div class="client-btn-box"><div rel="nofollow" class="client-default-Btn" @click="FreeTrial('ks')">免费试用</div><span  class="client-default-Btn" @click="onlineFun">在线咨询</span></div>
          </div>
        </div>
        <div class="products-services-box">
          <el-carousel arrow="never" indicator-position="none">
            <el-carousel-item v-for="(item,index) in cpfwPeixunList" :key="index">
              <div :style="{backgroundImage: 'url(' + item.imgUrl + ')'}" class="cpfw-img-box"></div>
            </el-carousel-item>
          </el-carousel>
            <div class="products-services-content">
              <h5>一站式高效的在线培训系统</h5>
              <p class="p-before-circle">多平台学习：支持电脑端、移动端随时随地在线培训学习、考试，从而不再受时间地点的约束</p>
              <p class="p-before-circle">标准化学习：支持课程、学时、学分、考试、练习、证书等，让企业培训标准化统一</p>
              <p class="p-before-circle">大数据分析：深层分析学情，帮助企业实现人才发掘、测评、培养、考核、任用一体化</p>
              <div class="client-btn-box"><div rel="nofollow" class="client-default-Btn" @click="FreeTrial('px')">免费试用</div><span class="client-default-Btn" @click="onlineFun">在线咨询</span></div>
            </div>
        </div>
        <div class="products-services-box products-contrary-box">
          <el-carousel arrow="never" indicator-position="none">
            <el-carousel-item v-for="(item,index) in cpfwSzkfList" :key="index">
              <div :style="{backgroundImage: 'url(' + item.imgUrl + ')'}" class="cpfw-img-box"></div>
            </el-carousel-item>
          </el-carousel>
            <div class="products-services-content">
              <h5>数字内容定制开发服务</h5>
              <p>企业需要定制适合自己的个性化课程，将隐性、零散的企业知识显性化和系统化，使企业多年积累的经验得以有效沉淀和传承。久创锐康，凭借创新的技术、高效的服务响应和强大的战略执行，为客户打造专业优质的课程定制服务</p>
              <div class="client-btn-box"><div class="client-default-Btn" @click="applyFun">申请方案</div><span class="client-default-Btn" @click="onlineFun">在线咨询</span></div>
            </div>
        </div>
        <div class="products-services-box" style="margin-bottom: 0;">
          <el-carousel arrow="never" indicator-position="none">
            <el-carousel-item v-for="(item,index) in cpfwKczyList" :key="index">
              <div :style="{backgroundImage: 'url(' + item.imgUrl + ')'}" class="cpfw-img-box"></div>
            </el-carousel-item>
          </el-carousel>
          <div class="products-services-content">
            <h5>企业通用课程资源方案</h5>
            <p>基于岗位胜任力模型，久创锐康提供职业素养、领导能力、人力资源、市场营销、行政管理、财务管理、客服服务、产品运营、生产采购，9大模块通用岗位培训方案，满足企业对培训课程资源的应用需求</p>
            <div class="client-btn-box"><div rel="nofollow" class="client-default-Btn" @click="applyFun">申请方案</div><span class="client-default-Btn" @click="onlineFun">在线咨询</span></div>
          </div>
        </div>
      </div>
    </div>

    <!-- 我们的客户 -->
    <div class="client-customer-box">
      <div class="client-container">
        <h4 class="client-title">我们的客户</h4>
        <img :src="customerImgAll" alt="我们的客户" />
        <!--<ul class="customer-img-box">
          <li><img :src="customerImg1" alt="中国人民银行" /></li>
          <li><img :src="customerImg2" alt="汇丰" /></li>
          <li><img :src="customerImg3" alt="中国银行" /></li>
          <li><img :src="customerImg4" alt="中信银行" /></li>
          <li><img :src="customerImg5" alt="中国民生银行" /></li>
          <li><img :src="customerImg6" alt="astellas" /></li>
          <li><img :src="customerImg7" alt="今日头条" /></li>
          <li><img :src="customerImg8" alt="华图教育" /></li>
          <li><img :src="customerImg9" alt="步步高" /></li>
          <li><img :src="customerImg10" alt="小天才" /></li>
          <li><img :src="customerImg11" alt="华发股份" /></li>
          <li><img :src="customerImg12" alt="上海航空" /></li>
          <li><img :src="customerImg13" alt="中国国际航空公司" /></li>
          <li><img :src="customerImg14" alt="中国东方航空" /></li>
          <li><img :src="customerImg15" alt="深圳航空" /></li>
          <li><img :src="customerImg16" alt="中建八局" /></li>
          <li><img :src="customerImg17" alt="SANOFI" /></li>
          <li><img :src="customerImg18" alt="大连海事大学" /></li>
          <li><img :src="customerImg19" alt="南京银行" /></li>
          <li><img :src="customerImg20" alt="中国人民银行" /></li>
        </ul>-->
      </div>
    </div>

    <!-- 新闻资讯 PC-->
    <div class="client-news-information mta-hidden-xs">
      <h4 class="client-title">新闻资讯</h4>
      <div class="client-container">
          <div class="industry-information-box" v-if="topCarousels.length>0">
            <div class="industry-information-left">
                <img :src="topCarousels[0].pic" alt="新闻资讯" />
                <h4 @click="checkInfo(topCarousels[0])">{{ topCarousels[0].title }}<i></i></h4>
                <div><b>{{ topCarousels[0].yyyy }}</b><span>{{ topCarousels[0].mmdd }}</span></div>
                <p>{{ topCarousels[0].intro }}</p>
            </div>
            <div class="industry-information-right">
              <ul>
                <li v-for="(item, index) in topCarousels" v-if="index >= 1">
                  <h4 @click="checkInfo(item)">
                    <span>{{ item.yyyy }}</span>{{ item.title }}
                  </h4>
                  <p><span>{{ item.mmdd}}</span>{{ item.intro }}</p>
                </li>
              </ul>
            </div>
          </div>
      </div>

    </div>

    <!-- 新闻资讯 手机-->
    <div class="client-newsInfo-phone mta-hidden-sm">
      <h4 class="client-title">新闻资讯</h4>
      <el-carousel :interval="5000" v-if="topCarousels.length>0" type="card" height="300px" indicator-position="none" arrow="never">
        <el-carousel-item v-for="(item,index) in topCarousels" :key="index" class="el-row">
          <img :src="item.pic" alt="新闻资讯"  @click="checkInfo(item)"/>
          <div class="newsInfo-card-content"  @click="checkInfo(item)">
            <h4>{{ item.title }}<i></i></h4>
            <span>{{ item.yyyy }}-{{ item.mmdd }}</span>
            <p>{{ item.intro }}</p>
          </div>

        </el-carousel-item>
      </el-carousel>

    </div>

    <!-- 申请方案弹窗-->
    <el-dialog
      :close-on-click-modal="false"
      :visible.sync="sqfaDl"
      @close="sqfaDlClose"
      class="application-scheme-dialog"
      center>
      <i></i>
      <p>免费获得课程开发解决方案</p>
      <el-form :model="sqfaDialogDate" status-icon :rules="sqfaTelRules" ref="ruleTelForm" class="application-scheme-form">
        <el-form-item  prop="tel">
          <el-input v-model="sqfaDialogDate.tel" placeholder="请输入手机号" class="dialog-input-tel"></el-input>
        </el-form-item>
        <div id="your-dom-id" class="nc-container"></div>
        <el-form-item prop="verification">
          <div class="verification">
            <el-input v-model="sqfaDialogDate.verification" placeholder="请输入验证码" class="dialog-input-code"></el-input>
            <el-button  @click="checkVerification" :disabled="sqfaBtnDisabled" class="dialog-code-btn">{{sqfaBtnText}}</el-button>
          </div>
        </el-form-item>
      </el-form>
      <div class="application-scheme-btn" @click="dialogSave">申请方案</div>
      <span>免费热线：15842668230</span><a href="https://p.qiao.baidu.com/cps/chat?siteId=11735491&userId=10530011" target="_blank">在线客服</a>
    </el-dialog>

    <!-- 免费试用弹窗-->
    <reg-dialog :dialogVisible="regDialogFlag"  :systemType="systemCode" @changeShow="showRegDialogUpdate"></reg-dialog>
  </div>
</template>

<script>
  import regDialog from '~/components/registerDialog';
  import { mapGetters } from 'vuex';
  export default {
    name:       'index',
    layout:     'templateA',
    components: {
      regDialog,
    },
    watchQuery: true,
    async fetch({ $axios, store, query }) {
      try {
        const { data } = await $axios.post('/home/links/list');
        store.commit('SetFooterYouQingLianJie', data.data.data);
      } catch (e) {

      }

    },
    async asyncData({ $axios, store }) {
      // 设置选中菜单
      store.commit('setActiveNav', '/');

      let [res1, res2] = await Promise.all([
                                             await $axios.$post(`/home/news/carousel`, { 'newsClassifyId': 0 }).then(res => {
                                               return res;
                                             }),
                                             await $axios.$post(`/home/banner/list`, { 'code': 1 }).then(res => {
                                               return res;
                                             }),
                                           ]);
      return {

         topCarousels: res1.data.data||[],
         bannerList: res2.data.data||[],

      };
    },
    data() {
      return {
        systemCode:'ksClient',
        SystemWidthFlag:false,// 判断是否是手机端，默认为false，默认为PC端
        topCarousels2:  [],
        // 产品和服务
        cpfwKaoshiList: [
        { imgUrl: require(`~/static/images/client/index/kpfw-ks-img1.png`)},
        { imgUrl: require(`~/static/images/client/index/kpfw-ks-img2.png`) },
        { imgUrl: require(`~/static/images/client/index/kpfw-ks-img3.png`) },
      ],
        cpfwPeixunList: [
          { imgUrl: require(`~/static/images/client/index/kpfw-px-img1.png`)},
          { imgUrl: require(`~/static/images/client/index/kpfw-px-img2.png`) },
          { imgUrl: require(`~/static/images/client/index/kpfw-px-img3.png`) },
        ],
        cpfwSzkfList: [
          { imgUrl: require(`~/static/images/client/index/kpfw-szkf-img1.png`)},
          { imgUrl: require(`~/static/images/client/index/kpfw-szkf-img2.png`) },
          { imgUrl: require(`~/static/images/client/index/kpfw-szkf-img3.png`) },
        ],
        cpfwKczyList: [
          { imgUrl: require(`~/static/images/client/index/kpfw-ks-img1.png`)},
          { imgUrl: require(`~/static/images/client/index/kpfw-ks-img2.png`) },
          { imgUrl: require(`~/static/images/client/index/kpfw-ks-img3.png`) },
        ],
        // 客户logo
        customerImgAll:   require(`~/static/images/client/index/index-customer-imgAll.png`),
        customerImg1:   require(`~/static/images/client/index/index-customer-img1.png`),
        customerImg2:   require(`~/static/images/client/index/index-customer-img2.png`),
        customerImg3:   require(`~/static/images/client/index/index-customer-img3.png`),
        customerImg4:   require(`~/static/images/client/index/index-customer-img4.png`),
        customerImg5:   require(`~/static/images/client/index/index-customer-img5.png`),
        customerImg6:   require(`~/static/images/client/index/index-customer-img6.png`),
        customerImg7:   require(`~/static/images/client/index/index-customer-img7.png`),
        customerImg8:   require(`~/static/images/client/index/index-customer-img8.png`),
        customerImg9:   require(`~/static/images/client/index/index-customer-img9.png`),
        customerImg10:  require(`~/static/images/client/index/index-customer-img10.png`),
        customerImg11:  require(`~/static/images/client/index/index-customer-img11.png`),
        customerImg12:  require(`~/static/images/client/index/index-customer-img12.png`),
        customerImg13:  require(`~/static/images/client/index/index-customer-img13.png`),
        customerImg14:  require(`~/static/images/client/index/index-customer-img14.png`),
        customerImg15:  require(`~/static/images/client/index/index-customer-img15.png`),
        customerImg16:  require(`~/static/images/client/index/index-customer-img16.png`),
        customerImg17:  require(`~/static/images/client/index/index-customer-img17.png`),
        customerImg18:  require(`~/static/images/client/index/index-customer-img18.png`),
        customerImg19:  require(`~/static/images/client/index/index-customer-img19.png`),
        customerImg20:  require(`~/static/images/client/index/index-customer-img20.png`),
        activeIndex:    '首页',
        activeName:     'first',// tab页签
        regDialogFlag:false,
        sqfaDl:false,// 申请方案弹窗
        sqfaDialogDate:   {},

        sqfaBtnDisabled: false,
        sqfaBtnText:         '获取验证码',
        sqfaCountdown:       60, // 60秒倒计时
        sqfaSliderData:      {},
        sqfaAppKey:          'FFFF0N00000000007EC0',
        sqfaTelRules:        {
          tel:          [
            { trigger: 'blur', required: true, message: '请输入手机号' },
          ],
          verification: [
            { trigger: 'blur', required: true, message: '请输入验证码' },
          ],
        },
      };


    },

    head(){
      return {
        title: '在线考试系统_在线培训系统_在线答题系统_大连栋科软件工程有限公司',
        meta: [
          {
            name: 'description',
            content: '麦塔在线考试系统和在线培训系统是由大连栋科软件工程有限公司历经多年独立研发,有完全自主知识产权的在线考试系统、在线培训系统。麦塔在线答题系统、在线学习系统全面支持移动端，栋科10年教育软件开发经验，10大功能模块，365天实时跟踪服务。麦塔无纸化考试系统节省30%的考试成本，跨平台支持手机端考试、练习！'
          },
          {
            name: 'keywords',
            content: '在线考试系统,考试系统,在线培训系统,培训系统,在线答题系统,答题系统,在线学习系统,学习系统,答题软件'
          },
        /*  {
            name: 'mobile-agent',
            content: 'format=html5;url=https://m.mtavip.com'
          },*/
          {
            name: 'bytedance-verification-code',
            content: 'EoTQ4NuK4pxkCu7efFJH'
          },
          {
            'http-equiv': 'Cache-Control',
            content: 'no-transform'
          },
        ],
        link:[
         /* {
            rel:'alternate',
            media:'only screen and(max-width: 640px)',
            href:'https://m.mtavip.com'
          },*/
          {
            rel:'canonical',
            href:'https://www.mtavip.com/'
          }
        ]
      }
    },
    methods:    {
      // 弹窗关闭
      showRegDialogUpdate(data){
        this.regDialogFlag  = !data
        if(data === 'false'){
          this.regDialogFlag = false
        }else{
          this.regDialogFlag = true
        }
      },
      // 免费试用
      FreeTrial(data){
        this.regDialogFlag = true;
        if(data === 'ks'){
          this.systemCode = 'ksClient'
        }else{
          this.systemCode = 'pxClient'
        }
      },

      dialogSave(){
        this.$refs.ruleTelForm.validate((valid) => {
          if (valid) {
            // 请求后台
            const options = {
              phone:  this.sqfaDialogDate.tel,
              code: this.sqfaDialogDate.verification,
            };

            this.$axios.$post('/develop/add',options).then(res=>{
              if (res.code === 0 && res.data) {
                this.sqfaDl = false;
                this.$message.success('申请成功');
              } else {
                this.$message.error('申请失败');
              }
            });
          }
        });

      },


      sqfaDlClose(){
        this.sqfaCountdown = -1;
        this.sqfaSliderData.sqfaAppKey=undefined;
        this.sqfaDl = false;
        this.$refs.ruleTelForm.resetFields();
        __nc.reset();
      },

      /**
       * 串联加载指定的脚本
       * 串联加载[异步]逐个加载，每个加载完成后加载下一个
       * 全部加载完成后执行回调
       * @param array|string 指定的脚本们
       * @param function 成功后回调的函数
       * @return array 所有生成的脚本元素对象数组
       * 异步加载js后运行回调函数callback / scripts 为数组或字符串
       */
      seriesLoadScripts(scripts, callback) {
        if (typeof (scripts) != 'object') {
          var scripts = [scripts];
        }
        var HEAD = document.getElementsByTagName('head').item(0) || document.documentElement;
        var s = new Array(), last = scripts.length - 1, recursiveLoad = function (i) { //递归
          s[i] = document.createElement('script');
          s[i].setAttribute('type', 'text/javascript');
          s[i].onload = s[i].onreadystatechange = function () { //Attach handlers for all browsers
            if (!/*@cc_on!@*/0 || this.readyState == 'loaded' || this.readyState == 'complete') {
              this.onload = this.onreadystatechange = null;
              this.parentNode.removeChild(this);
              if (i != last) {
                recursiveLoad(i + 1);
              } else if (typeof (callback) == 'function') {
                callback();
              }
            }
          };
          s[i].setAttribute('src', scripts[i]);
          HEAD.appendChild(s[i]);
        };
        recursiveLoad(0);
      },
      // 滑块
      sliderFun() {
        const nc_token = [this.sqfaAppKey, (new Date()).getTime(), Math.random()].join(':');
        console.log(nc_token);
        const NC_Opt = {
          //声明滑动验证需要渲染的目标元素ID。
          renderTo:    '#your-dom-id',
          //应用类型标识。它和使用场景标识（scene字段）一起决定了滑动验证的业务场景与后端对应使用的策略模型。您可以在人机验证控制台的配置管理页签找到对应的appkey字段值，请务必正确填写。
          appkey:      this.sqfaAppKey,
          //使用场景标识。它和应用类型标识（appkey字段）一起决定了滑动验证的业务场景与后端对应使用的策略模型。您可以在人机验证控制台的配置管理页签找到对应的scene值，请务必正确填写。
          scene:       'nc_message',
          //滑动验证码的主键，请勿将该字段定义为固定值。确保每个用户每次打开页面时，其token值都是不同的。系统默认的格式为：”您的appkey”+”时间戳”+”随机数”。
          token:       nc_token,
          //滑动条的宽度。
          customWidth: 300,
          //业务键字段，可为空。为便于线上问题的排查，建议您按照线上问题定位文档中推荐的方法配置该字段值。
          trans:       { 'key1': 'code0' },
          //通过Dom的ID属性自动填写trans业务键，可为空。建议您按照线上问题定位文档中推荐的方法配置该字段值。
          elementID:   ['usernameID'],
          //是否自定义配置底层采集组件。如无特殊场景，请使用默认值（0），即不自定义配置底层采集组件。
          is_Opt:      0,
          //语言。PC端Web页面场景默认支持18国语言，详细配置方法请参见自定义文案与多语言文档。
          language:    'cn',
          //是否启用。一般情况，保持默认值（true）即可。
          isEnabled:   true,
          //内部网络请求的超时时间。一般情况建议保持默认值（3000ms）。
          timeout:     3000,
          //允许服务器超时重复次数，默认5次。超过重复次数后将触发报错。
          times:       5,
          //用于自定义滑动验证各项请求的接口地址。一般情况，请勿配置该参数。
          apimap:      {
            // 'analyze': '//a.com/nocaptcha/analyze.jsonp',
            // 'get_captcha': '//b.com/get_captcha/ver3',
            // 'get_captcha': '//pin3.aliyun.com/get_captcha/ver3'
            // 'get_img': '//c.com/get_img',
            // 'checkcode': '//d.com/captcha/checkcode.jsonp',
            // 'umid_Url': '//e.com/security/umscript/3.2.1/um.js',
            // 'uab_Url': '//aeu.alicdn.com/js/uac/909.js',
            // 'umid_serUrl': 'https://g.com/service/um.json'
          },
          //前端滑动验证通过时会触发该回调参数。您可以在该回调参数中将请求标识（token）、会话ID（sessionid）、签名串（sig）字段记录下来，随业务请求一同发送至您的服务端调用验签。
          callback:    (data) => {
            this.sqfaSliderData = Object.assign({}, data, {
              sqfaAppKey: NC_Opt.appkey,
              scene:  NC_Opt.scene,
            });
            console.log( this.sqfaSliderData);
          },
        };
        let date11 = () => {

          let _date = new Date();
          let year = _date.getFullYear().toString();
          let month = _date.getMonth().toString();
          let day = _date.getDate().toString();
          let a = _date.getHours().toString();
          let b = _date.getMinutes().toString();
          let c = _date.getSeconds().toString();

          return year + month + day + a + b + c;
        };
        let c = date11();
        const scripts = [
          `https://g.alicdn.com/sd/ncpc/nc.js?t=${c}`,
        ];
        this.seriesLoadScripts(scripts, function () {
          var nc = new noCaptcha(NC_Opt);
          nc.upLang('cn', {
            _startTEXT:    '请按住滑块，拖动到最右边',
            _yesTEXT:      '验证通过',
            _error300:     '哎呀，出错了，点击<a href="javascript:__nc.reset()">刷新</a>再来一次',
            _errorNetwork: '网络不给力，请<a href="javascript:__nc.reset()">点击刷新</a>',
          });
        });

      },

      // 倒计时60秒
      setTime() {
        if (this.sqfaCountdown === 0) {
          this.sqfaBtnDisabled = false;
          this.sqfaBtnText = '获取验证码';
          this.sqfaCountdown = 60;
        } else if(this.sqfaCountdown === -1){
          this.sqfaBtnDisabled = false;
          this.sqfaBtnText = '获取验证码';
          this.sqfaCountdown = 60;
        }else {
          this.sqfaBtnDisabled = true;
          this.sqfaBtnText = '重新发送(' + this.sqfaCountdown + 's)';
          this.sqfaCountdown--;
          setTimeout(() => {
            this.setTime();
          }, 1000);
        }
      },
      // 验证码
      checkVerification() {
        if (this.sqfaDialogDate.tel === undefined) {
          this.$message.error('请输入手机号');
          return;
        }
        if (this.sqfaSliderData.sqfaAppKey === undefined) {
          this.$message.error('请先进行滑块校验');
          return;
        }
        this.$axios.$post(`/develop/exists`,{  phone: this.sqfaDialogDate.tel}).then(res=>{

          if (res.code === 0 && res.data) {

            let req = {
              'appkey':    this.sqfaSliderData.sqfaAppKey,
              'phone':     this.sqfaDialogDate.tel,
              'scene':     this.sqfaSliderData.scene,
              'sessionid': this.sqfaSliderData.csessionid,
              'sig':       this.sqfaSliderData.sig,
              'token':     this.sqfaSliderData.token,
              'type':      0,
            }
            this.$axios.$post('/sendCode',req).then(res=>{
              if (res.code === 0 && res.data) {
                this.setTime();
              }else {
                this.$message.error(res.msg||'手机号已存在');
              }
            })
          } else {
            this.$message.error('手机号已存在');
            return false;
          }

        })
      },

      // 判断是否为移动端
      getSystemWidth(){
        var browserWidth=document.documentElement.clientWidth;
        if(browserWidth <= 768){
          this.SystemWidthFlag = true;
        }else{
          this.SystemWidthFlag = false;
        }

      },
      clickBanner(data){
      /*  console.log(data);

*/      if(data.url){
          window.open(data.url)
        }
        // this.$router.push({ name: 'indexEducation' });
      },

      // 申请方案
      applyFun() {
        this.sqfaDl = true;
        this.sliderFun();
      },

      goExamPage(){
        this.$router.push({ name: 'examsystem' });
      },
      goPeixun(){
        this.$router.push({ name: 'trainsystem' });
      },
      goKechengPage(){
        this.$router.push({ name: 'courseware' });
      },
      goKechengZyPage(){
        this.$router.push({ name: 'courseResource' });
      },

      onlineFun(){
        window.open('https://p.qiao.baidu.com/cps/chat?siteId=11735491&userId=10530011')
      },

      checkInfo(data) {
        const opt = {
          id: data.code,
        };
        this.$router.push({ name: 'news-id', params: opt });
      },
    },
    computed: {
      baseUrl() {
        return this.getBaseUrl;
      },
      ...mapGetters(['getBaseUrl']),
    },
    mounted() {
      this.getSystemWidth();
    }
  };
</script>

<style></style>
