<template>
  <div class="pop">
    <img class="close" @click="cancel" src="/img/home/nav/close.png" alt="极度证券">
    <img class="img" src="/img/fit/img.png" alt="极度证券">
    <div class="title">
      <!-- 是否清除缓存? -->
      {{ $t('about.l6') }}
    </div>
    <div class="btn-box flex">
      <div class="btn ltn" @click="cancel">
        <!-- 取消 -->
        {{ $t('common.l2') }}
      </div>
      <div class="btn rtn" @click="submit">
        <!-- 确认 -->
        {{ $t('common.l3') }}
      </div>
    </div>
  </div>
</template>
<script>
import { delStorage } from "@/utils/localStorage";
export default {
  data () {
    return {
      
    }
  },
  methods: {
    cancel() {
      this.$emit('cancel')
    },
    submit() {
      var list = ['exchangeType', 'accountH5', 'loginTypeH5', 'phoneCountryH5', 'showAccountList', 'showChart', 'findShowTab1', 'findHideTab1', 'marketShowTab1', 'marketHideTab1', 'optionShowTab', 'optionHideTab', 'searchList', 'productShowTab1', 'productHideTab1', 'openPopShowSign'];
      list.forEach(item => {
        delStorage(item)
      })
      this.$notify({
        // message: '清除成功',
        message: this.$t('about.l7'),
        type: 'success'
      });
      this.cancel()
    }
  }
}
</script>
<style lang="less" scoped>
.pop {
  line-height: 1;
  text-align: center;
  position: relative;
  padding: 35px 21px 20px;
  .img {
    display: block;
    margin: 0 auto 14px;
    width: 95px;
  }
}
.close {
  position: absolute;
  top: 17px;
  right: 10px;
  cursor: pointer;
  width: 15px;
}
.title {
  font-size: 20px;
  font-weight: 500;
}
.btn-box {
  margin-top: 34px;
  .btn {
    flex: 1;
    line-height: 42px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    &+.btn {
      margin-left: 12px;
    }
  }
  .ltn {
    border: 1px solid #DEDEDE;
  }
  .rtn {
    background-color: var(--color-);
    border: 1px solid var(--color-);
    color: #FEFFFF;
  }
}
</style>