<style>
  .order-buy {
    display: flex;
    flex-wrap: wrap;
    padding: 30px 20px 50px;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
  }

  .order-buy .tab-list {
    width: 100%;
    margin-bottom: 30px;
    text-align: center;
    border-bottom: 1px solid #eee;
  }

  .order-buy .tab-list li {
    position: relative;
    padding: 0 20px;
    height: 70px;
    line-height: 70px;
    color: #666;
    font-size: 16px;
    list-style-type: none;
    display: inline-block;
    vertical-align: middle;
  }

  .order-buy .is-checked {
    color: #3ba4ff
  }

  .order-buy .is-checked::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    z-index: 1;
    width: 100%;
    height: 2px;
    background-color: #00afff;
  }

  .clearfix:after {
    content: "\0020";
    display: block;
    height: 0;
    clear: both;
  }

  .Order_content {
    width: 100%;
    display: flex;
    justify-content: space-between;
  }

  .order-info {
    margin-right: 20px;
    /* float: left; */
    width: calc(100% - 300px - 20px);
  }

  .order-right {
    padding: 30px;
    width: 300px;
    height: 320px;
    font-size: 15px;
    background-color: #fff;
    border: 1px solid #e5e5e5;
  }

  .order-info-block {
    margin-bottom: 30px;
    padding: 40px 30px;
    background-color: #fff;
    border: 1px solid #e5e5e5;
  }

  .order_tour_title {
    width: 100%;
    margin-bottom: 15px;
    font-size: 22px;
    font-weight: bold;
    word-break: break-all;
  }

  .tour-desc {
    margin-bottom: 0;
    display: flex;
    flex-wrap: wrap;
  }

  .tour-cover {
    margin-right: 20px;
    width: 320px;
  }

  @media only screen and (max-width: 1080px) {
    .order-buy .tour-desc .tour-cover {
      width: 280px;
    }

    .tour-desc .tour_content {
      width: calc(100% - 280px - 20px);
    }
  }

  .tour-cover .tour_img {
    padding-bottom: 60%;
    background-size: cover;
  }

  .tour-desc .tour_content {
    width: calc(100% - 320px - 20px);
  }

  .tour-detail-list {
    margin-bottom: 8px;
    font-size: 15px;
    color: #666;
    padding: 0;
    margin-top: 0;
  }

  .tour-detail-list li {
    margin-bottom: 2px;
    display: flex;
    line-height: 2;
    list-style-type: none;
  }

  .tour-detail-list li span {
    font-weight: bold;
    padding-right: 15px;
    color: #333;
    white-space: nowrap;
  }

  .warning-bar {
    margin-bottom: 20px;
    padding: 15px 20px;
    font-weight: 700;
    background-color: #fffde7;
    font-size: 14px;
    color: #ff9800;
    display: flex;
    /* align-items: center; */
  }

  .order-info-block .buy-title {
    margin-bottom: 35px;
    font-size: 20px;
    font-weight: bold;
  }

  .dot_list {
    font-size: 15px;
    line-height: 1.8;
    padding-left: 20px;
    list-style-type: disc;
  }

  .order-buy .q-field--with-bottom {
    padding-bottom: 0 !important;
    margin-bottom: 20px;
  }

  .account_labelName {
    margin: 20px 0 10px 0;
    font-size: 15px;
  }

  .order-buy .q-field__control {
    height: 46px;
  }

  .order-buy .q-field__control {
    min-height: 46px;
  }

  .otherBeizhu .q-field__control {
    min-height: auto;
    height: auto;
  }

  .order-buy .q-field__native {
    min-height: 46px;
  }

  .order-buy .q-field__marginal {
    height: 46px;
  }

  .aside-title {
    font-size: 18px;
    margin-bottom: 10px;
    font-weight: bold;
  }

  .passRadio {
    padding: 0 4px;
    border-bottom: 1px solid #eee;
  }

  .passRadio:last-child {
    border: 0;
  }

  .member-data {
    margin: 15px 0;
    border: 1px solid #eee;
    min-height: 62px;
  }

  .data-header {
    position: relative;
    padding: 0 20px;
    line-height: 60px;
    background-color: #fafafa;
    cursor: pointer;
  }

  .data-header .gustNum {
    font-size: 20px;
    font-weight: bold;
  }

  .data-header i {
    position: absolute;
    top: 0;
    right: 20px;
    font-size: 23px;
  }

  .order-buy .data-content {
    padding: 30px;
  }

  .remind-question {
    margin: 20px 0 10px 0;
    font-size: 16px;
  }

  .tip-text {
    margin-bottom: 10px;
    font-size: 14px;
    color: #999;
  }

  .warning-bar2 {
    margin: 10px 0 20px 0;
    padding: 15px 20px;
    font-weight: 700;
    background-color: #fffde7;
    color: #ff9800;
  }

  .isShowDiv {
    visibility: hidden;
    height: 0;
    padding: 0 !important;
  }

  @media only screen and (max-width: 980px) {
    .order-info {
      margin-right: 0;
      width: 100%;
    }

    .order-right {
      display: none;
    }
  }

  @media only screen and (max-width: 768px) {
    .order-buy .tour-desc .tour-cover {
      width: 100%;
      margin: 0 0 20px 0;
    }

    .order-buy .tour_content {
      width: 100%;
      padding-bottom: 15px;
      border-bottom: 1px dashed #ddd;
    }

    .order-buy .row .col-6 {
      width: 100%;
    }

    .order-buy .row .account_labelName {
      margin-top: 10px;
    }

    .order-buy .data-content .q-col-gutter-y-lg {
      margin-top: 5px;
    }

    .order-buy .row .account-group {
      padding-top: 0 !important;
    }

    .order-buy .data-content {
      padding-top: 5px;
    }

    .isFixed {
      position: fixed;
      top: 60px;
      right: 0;
      z-index: 9999;
    }
  }

  .order-buy .Order_content .q-gutter-md {
    margin-left: 0;
  }

</style>
<template>
  <q-page>
    <div class="order-buy">
      <ul class="tab-list">
        <!-- <li>01. 填寫訂購單</li>
        <li>02. 付款方式</li> -->
        <li class="is-checked">01. 填寫旅客資料</li>
      </ul>
      <div class="Order_content">
        <div class="order-info">
          <div class="order-info-block">
            <div class="order_tour_title">
              【{{GuestObj.TCNUM}}({{GuestObj.TCID}})】{{GuestObj.Title}}
            </div>
            <div class="tour-desc">
              <div class="tour-cover">
                <div class="tour_img" :style="{backgroundImage:`url('${GuestObj.CoverImg}')`}"></div>
              </div>
              <div class="tour_content">
                <ul class="tour-detail-list">
                  <li>
                    <span>訂單編號</span>{{GuestObj.OrderId}}
                  </li>
                  <li>
                    <span>旅遊日期</span>{{GuestObj.GroupStartDateStr}}
                  </li>
                  <li>
                    <span>出發成員</span>{{GuestObj.ManNum}}位成人 (共{{GuestObj.GuestNum}}人)
                  </li>
                  <li>
                    <span>團費總計</span>{{GuestObj.PreferPrice}}
                  </li>
                </ul>
              </div>
            </div>
          </div>
          <div class="warning-bar">
            <q-icon name="warning" class="text-orange" style="font-size: 1.2rem;" />
            所有資料確認送出後將無法修改，如需修改資料請洽客服。
          </div>
          <!-- 旅客资料开始 -->
          <div class="order-info-block" v-if="shape==1">
            <div class="buy-title">旅客資料
              <q-btn color="amber" @click="getConnect()" id="home-tab" :class="{'isFixed':isFixed}" type="submit"
                style="float:right;font-size:17px;font-weight:bold;" label="儲存" />
            </div>
            <q-form ref="myForm" class="q-gutter-md">
              <div class="member-data" v-for="(item,index) in GuestObj.list" :key="index">
                <div class="data-header">
                  <div class="gustNum">旅客 {{index+1}}</div>
                  <i class="iconfont iconarrow-top" v-if="item.isShow" @click="getShow(item)"></i>
                  <i class="iconfont iconarrowdown" v-else @click="getShow(item)"></i>
                </div>
                <div class="data-content" :class="{'isShowDiv':!item.isShow}">
                  <div class="row q-col-gutter-x-xs q-col-gutter-y-lg">
                    <div class="account-group col-6">
                      <div class="account_labelName">中文姓</div>
                      <q-input outlined v-model="item.SurName" :rules="[ val => val && val.length > 0 || '请输入中文姓']"
                        class="bg-grey-1" />
                    </div>
                    <div class="account-group col-6">
                      <div class="account_labelName">中文名</div>
                      <q-input outlined v-model="item.Name" :rules="[ val => val && val.length > 0 || '请输入中文名']"
                        class="bg-grey-1" />
                    </div>
                  </div>
                  <div class="row q-col-gutter-x-xs q-col-gutter-y-lg">
                    <div class="account-group col-6">
                      <div class="account_labelName">護照姓 ( 英文 )</div>
                      <q-input outlined v-model="item.ESurName" :rules="[ val => val && val.length > 0 || '请输入護照姓']"
                        class="bg-grey-1" />
                    </div>
                    <div class="account-group col-6">
                      <div class="account_labelName">護照名 ( 英文 )</div>
                      <q-input outlined v-model="item.EName" :rules="[ val => val && val.length > 0 || '请输入護照名']"
                        class="bg-grey-1" />
                    </div>
                  </div>
                  <div class="row q-col-gutter-x-xs q-col-gutter-y-lg">
                    <div class="account-group col-6">
                      <div class="account_labelName">身分證字號</div>
                      <q-input outlined v-model="item.IdCard" :rules="[ val => val && val.length > 0 || '请输入身分證字號']"
                        class="bg-grey-1" />
                    </div>
                  </div>
                  <div class="row q-col-gutter-x-xs q-col-gutter-y-lg">
                    <div class="account-group col-6">
                      <div class="account_labelName">出生日期</div>
                      <q-input filled v-model="item.Birthday" mask="date"
                        :rules="[ val => val && val.length > 0 || '请选择出生日期']">
                        <template v-slot:append>
                          <q-icon name="event" class="cursor-pointer">
                            <q-popup-proxy :ref="'qDateProxy'+index" transition-show="scale" transition-hide="scale">
                              <q-date v-model="item.Birthday" @input="()=> $refs['qDateProxy'+index][0].hide()" />
                            </q-popup-proxy>
                          </q-icon>
                        </template>
                      </q-input>
                    </div>
                    <div class="account-group col-6">
                      <div class="account_labelName">性別</div>
                      <q-select filled v-model="item.Sex" :options="sexArray" emit-value map-options>
                      </q-select>
                    </div>
                  </div>
                  <div class="remind-question">
                    是否服役中、為役男身份或接近役齡？
                  </div>
                  <div class="tip-text">
                    *服役中包含替代役，役男身份指年滿18歲至服兵役前，接近役齡指年滿16歲至18歲，若為免役者請勾選否。
                  </div>
                  <div>
                    <div class="q-gutter-sm" style="margin-bottom:15px;">
                      <q-radio v-model="item.MilitaryServiceType" :val="1" label="否" />
                      <q-radio v-model="item.MilitaryServiceType" :val="2" label="服役中" />
                      <q-radio v-model="item.MilitaryServiceType" :val="3" label="役男身份" />
                      <q-radio v-model="item.MilitaryServiceType" :val="4" label="接近役齡" />
                    </div>
                  </div>
                  <div class="warning-bar2" v-if="item.MilitaryServiceType>1">
                    <div>請於出團前七天內上傳符合以下規定之護照畫面：</div>
                    <ol class="dot_list" style="font-size:14px;">
                      <li v-if="item.MilitaryServiceType==2">若您正在服役，出國必須蓋兩種章： 【持照人出國應經核准】【 年 月 日之前同意出國 字第 號核准】。</li>
                      <li v-if="item.MilitaryServiceType==3">
                        若您是役男者，出國前必須前往戶籍所在地之鄉鎮市區公所兵役科(課)蓋兩種章：【持照人出國應經核准尚未履行兵役義務】【役男出國核准 年 月
                        日前一次有效 縣 市公所】</li>
                      <li v-if="item.MilitaryServiceType==4">若您是役齡男子，出國前必須前往戶籍所在地之鄉鎮市區公所兵役科(課)一種章：【尚未履行兵役義務】。</li>
                    </ol>
                  </div>
                  <div class="row q-col-gutter-x-xs q-col-gutter-y-lg">
                    <div class="account-group col-6">
                      <div class="account_labelName">護照號碼</div>
                      <q-input outlined v-model="item.PassportNo" :rules="[ val => val && val.length > 0 || '请填写護照號碼']"
                        class="bg-grey-1" />
                    </div>
                    <div class="account-group col-6">
                      <div class="account_labelName">護照效期截止日期</div>
                      <q-input filled v-model="item.PassportExpiry" mask="date"
                        :rules="[ val => val && val.length > 0 || '请选择護照效期截止日期']">
                        <template v-slot:append>
                          <q-icon name="event" class="cursor-pointer">
                            <q-popup-proxy :ref="'huzhao'+index" transition-show="scale" transition-hide="scale">
                              <q-date v-model="item.PassportExpiry" @input="()=>$refs['huzhao'+index][0].hide()" />
                            </q-popup-proxy>
                          </q-icon>
                        </template>
                      </q-input>
                    </div>
                  </div>
                  <div class="row q-col-gutter-x-xs q-col-gutter-y-lg">
                    <div class="account-group col-12 otherBeizhu">
                      <div class="account_labelName">其他備註</div>
                      <q-input filled type="textarea" class="col" v-model="item.Remarks" />
                    </div>
                  </div>
                </div>
              </div>
            </q-form>
          </div>
          <!-- 旅客资料结束 -->
          <!-- 收件资料开始 -->
          <div class="order-info-block" v-if="shape==2">
            <div class="buy-title">收件資料</div>
            <ol class="dot_list">
              <li>請指定一位聯絡人並提供正確聯絡資訊，領隊將以電話聯絡做行前說明與重要事項通知。</li>
              <li>請提供可收掛號郵件之地址，以利資料郵遞。</li>
            </ol>
            <div class="row q-col-gutter-x-xs q-col-gutter-y-lg">
              <div class="account-group col-6">
                <div class="account_labelName">姓名</div>
                <q-input outlined v-model="receivedMsg.Name" class="bg-grey-1" />
              </div>
              <div class="account-group col-6">
                <div class="account_labelName">電子信箱</div>
                <q-input outlined v-model="receivedMsg.Email" class="bg-grey-1" />
              </div>
            </div>
            <div class="row q-col-gutter-x-xs q-col-gutter-y-lg">
              <div class="account-group col-6">
                <div class="account_labelName">手機號碼</div>
                <q-input outlined v-model="receivedMsg.Phone" />
              </div>
              <div class="account-group col-6">
                <div class="account_labelName">說明會資料寄送地址</div>
                <div class="row q-col-gutter-x-xs q-col-gutter-y-lg">
                  <div class="account-group col-4">
                    <q-input outlined v-model="receivedMsg.zipCode" class="bg-grey-1" />
                  </div>
                  <div class="account-group col-4">
                    <q-select filled v-model="receivedMsg.city" :options="cityArray" emit-value map-options>
                    </q-select>
                  </div>
                  <div class="account-group col-4">
                    <q-select filled v-model="receivedMsg.area" :options="areaArray" emit-value map-options>
                    </q-select>
                  </div>
                </div>
              </div>
            </div>
            <div class="row q-col-gutter-x-xs q-col-gutter-y-lg">
              <div class="account-group col-12">
                <div class="account_labelName">手機號碼</div>
                <q-input outlined placehoder="地址" v-model="receivedMsg.Address" />
              </div>
            </div>
            <div class="row q-col-gutter-x-xs q-col-gutter-y-lg">
              <div class="account-group col-12">
                <q-btn color="primary" style="width:100%;height:50px;margin-top:20px;" label="確認送出" />
              </div>
            </div>
          </div>
          <!-- 收件资料结束 -->
          <!-- 收据开立开始 -->
          <div class="order-info-block" v-if="shape==3">
            <div class="buy-title">收據開立</div>
            <ol class="dot_list">
              <li>據財政部規定，旅行業為特殊行業，因此使用的是【代收轉付收據】而不開立一般的【統一發票】。
                依台財稅字第10504544630號，以電子收據方式開立旅行業代收轉付收據，並透過電子郵件【旅行業代收轉付電子收據開立通知信】寄送給收據收件人，【電子代收轉付收據】一樣可以申請報帳，如需紙本收據，可直接經由電子郵件中的【代收轉付明細】連結查詢並列印，請注意！列印功能僅能使用一次。
              </li>
              <li>
                【代收轉付收據】若須「抬頭」、「統編」務請於規定時間內提供收據資料；團體行程(包含團體自由行)最遲請於出發前10個工作日主動提供，出發日在10天內的團體行程，請於付款後24小時內提供收據資料；其他商品請於付款後3個工作日內提供。未於期限內提供者，將以整筆訂單且無抬頭統編之方式開立。
              </li>
              <li>收據資料送出後如欲修改，請於收到收據後當月聯絡客服人員。</li>
            </ol>
            <div class="row q-col-gutter-x-xs q-col-gutter-y-lg">
              <div class="account-group col-6">
                <q-select filled v-model="receiptMsg.receipType" :options="recepArray" emit-value map-options>
                </q-select>
              </div>
            </div>
            <div class="row q-col-gutter-x-xs q-col-gutter-y-lg" v-if="receiptMsg.receipType==1">
              <div class="account-group col-6">
                <div class="account_labelName">抬頭</div>
                <q-input outlined v-model="receiptMsg.head" />
              </div>
              <div class="account-group col-6">
                <div class="account_labelName">統一編號</div>
                <q-input outlined v-model="receiptMsg.number" />
              </div>
            </div>
            <div class="row q-col-gutter-x-xs q-col-gutter-y-lg">
              <div class="account-group col-6">
                <div class="account_labelName">收件人</div>
                <q-input outlined v-model="receiptMsg.recipient" />
              </div>
              <div class="account-group col-6">
                <div class="account_labelName">電子信箱</div>
                <q-input outlined v-model="receiptMsg.email" />
              </div>
            </div>
            <div class="row q-col-gutter-x-xs q-col-gutter-y-lg">
              <div class="account-group col-12">
                <q-btn color="primary" style="width:100%;height:50px;margin-top:20px;" label="確認送出" />
              </div>
            </div>
          </div>
          <!-- 收据开立结束 -->
        </div>
        <div class="order-right">
          <div class="buy_aside">
            <div class="aside-title">資料填寫進度 (0/3)</div>
            <div class="q-gutter-sm">
              <div class="passRadio">
                <q-radio v-model="shape" :val="1" label="旅客資料" />
              </div>
              <div class="passRadio" style="display:none;">
                <q-radio v-model="shape" :val="2" label="收件資料" />
              </div>
              <div class="passRadio" style="display:none;">
                <q-radio v-model="shape" :val="3" label="收據開立" />
              </div>
            </div>
            <q-btn color="white" text-color="black" style="width:100%;height:40px;margin-top:10px;display:none;"
              label="回訂單明細" />
            <q-btn color="primary" style="width:100%;height:40px;margin-top:15px;" label="前往付款" />
          </div>
        </div>
      </div>
    </div>
  </q-page>
</template>
<script>
  export default {
    props: [],
    data() {
      return {
        orderId: 0,
        //收件资料msg
        receivedMsg: {
          Name: '', //聯絡人姓名
          Email: '', //電子信箱  
          Phone: '', //手機號碼
          zipCode: '', //邮政编码
          city: '', //市
          area: '', //区
          Address: '' //地址
        },
        //台湾市列表
        cityArray: [],
        //台湾区列表
        areaArray: [],
        //收據開立Msg
        receiptMsg: {
          receipType: 1, //是否需要抬头
          head: '', //抬頭
          number: '', //統一編號
          recipient: '', //收件人
          email: '' //電子信箱
        },
        //是否需要抬头下拉
        recepArray: [{
          value: 1,
          label: '需要有抬頭統編的收據'
        }, {
          value: 2,
          label: '一般收據'
        }],
        //单选显示哪个
        shape: 1,
        //性别
        sexArray: [{
            value: 1,
            label: "男"
          },
          {
            value: 2,
            label: "女"
          },
        ],
        //餐食
        airFood: [{
            value: 1,
            label: "葷食"
          },
          {
            value: 2,
            label: "素食"
          }
        ],
        GuestObj: {}, //旅客信息
        scrollTop: 0,
        tabOffsetTop: 0,
        isFixed: false
      };
    },
    created() {
      if (this.$route.params.id) {
        this.orderId = this.$route.params.id;
      }
    },
    mounted() {
      this.getTravelGuest();
      let tabEle = document.getElementById('home-tab');
      this.tabOffsetTop = tabEle.offsetTop
      window.addEventListener('scroll', this.handleScroll)
    },
    methods: {
      handleScroll() {
        this.scrollTop = window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop || document
          .scrollingElement.scrollTop || 0
        if (this.scrollTop > this.tabOffsetTop) {
          this.isFixed = true;
        } else {
          this.isFixed = false;
        }
      },
      getShow(item) {
        item.isShow = !item.isShow;
        this.$forceUpdate();
      },
      GetGuestObj() {
        var obj = {
          Id: 0, //旅客编号
          TCID: 0, //团期编号
          OrderId: 0, //订单编号
          VisaPlanId: 0, //申请表id
          SurName: '', //中文姓
          Name: '', //中文名
          Sex: 1, //性别 1-男 2-女
          ESurName: "", //英文姓
          EName: "", //英文名
          Birthday: "", //出生日期
          IdCard: "", //身份证号码
          PassportNo: "", //护照号
          PassportExpiry: "", //护照过期时间
          Remarks: "", //备注
          MilitaryServiceType: 1, //兵役类型
        };
        return obj;
      },
      //获取旅客信息
      getTravelGuest() {
        this.apipost("sellorder_get_GetTravelGuestList", {
          OrderId: this.orderId
        }, res => {
          if (res.data.resultCode == 1) {
            var tempObj = res.data.data;
            if (tempObj && tempObj.list) {
              if (tempObj.list.length == 0) {
                for (var i = 0; i < tempObj.GuestNum; i++) {
                  tempObj.list.push(this.GetGuestObj());
                }
              } else if (tempObj.list.length > 0) {
                var newArray = [];
                var tempArray = JSON.parse(JSON.stringify(tempObj.list));
                if (tempArray && tempArray.length > 0) {
                  tempArray.forEach(item => {
                    var obj = {
                      Id: item.Id, //旅客编号
                      TCID: item.TCID, //团期编号
                      OrderId: item.OrderId, //订单编号
                      VisaPlanId: item.VisaPlanId, //申请表id
                      SurName: item.SurName, //中文姓
                      Name: item.NameStr, //中文名
                      Sex: item.SexNum, //性别 1-男 2-女
                      ESurName: item.ESurName, //英文姓
                      EName: item.EName, //英文名
                      Birthday: item.Birthday, //出生日期
                      IdCard: item.IdCard, //身份证号码
                      PassportNo: item.PassportNo, //护照号
                      PassportExpiry: item.PassportExpiry, //护照过期时间
                      Remarks: item.Remarks, //备注
                      MilitaryServiceType: 1, //兵役类
                    };
                    newArray.push(obj);
                  });
                }
                if (tempObj.list.length < tempObj.GuestNum) {
                  for (var i = tempObj.list.length; i < tempObj.GuestNum; i++) {
                    newArray.push(this.GetGuestObj());
                  }
                }
                tempObj.list = [];
                tempObj.list = newArray;
              }
            }
            this.GuestObj = tempObj;
            this.GuestObj.list.forEach(x => {
              x.isShow = true;
            })
          } else if (res.data.resultCode == 10000 || res.data.resultCode == 10001) {
            localStorage.removeItem("b2bUser");
            this.CommonJump('/login', {})
          }
        });
      },
      getConnect() {
        this.$refs.myForm.validate().then(success => {
          if (success) {
            this.SavePassenger();
          }

        })
      },
      //保存旅客信息
      SavePassenger() {
        var that = this;
        if (that.GuestObj.list && that.GuestObj.list.length > 0) {
          that.GuestObj.list.forEach(item => {
            item.IsB2B = 1;
            item.TCID = that.GuestObj.TCID;
            item.OrderId = that.GuestObj.OrderId;
          });
          this.apipost(
            "sellorder_post_SetTravelGuestList", this.GuestObj.list,
            res => {
              if (res.data.resultCode == 1) {
                this.$q.notify({
                  type: 'negative',
                  message: res.data.message,
                  position: 'top',
                  color: 'secondary',
                  timeout: 2000, // 以毫秒为单位; 0意味着没有超时
                })
                this.getTravelGuest();
              } else if (res.data.resultCode == 10000 || res.data.resultCode == 10001) {
                localStorage.removeItem("b2bUser");
                this.CommonJump('/login', {})
              } else {
                this.$q.notify({
                  type: 'negative',
                  message: res.data.message,
                  position: 'top',
                  timeout: 2000, // 以毫秒为单位; 0意味着没有超时
                })
              }
            },
            err => {}
          );
        }
      }
    },
  };

</script>
