<template>
  <div class="root_container">
    <div class="header">
      <div class="title_tips">下载Java运行环境</div>
      <el-link
        target="_blank"
        :href="info.jdk_path"
        :underline="false"
        style="margin-top: 15px; mrigin-bottom: 15px"
      >
        <el-button type="info">下载 JDK1.8</el-button>
      </el-link>
      <div class="title_tips">下载翻译工具</div>
      <el-link
        target="_blank"
        :href="info.translate_tools_path"
        :underline="false"
        style="margin-top: 15px; mrigin-bottom: 15px"
      >
        <el-button type="info">下载翻译同步助手</el-button>
      </el-link>
    </div>
  </div>
</template>
<script>
import Editor from "vue2-ace-editor";
import { translateDownloadTools } from "../../api/log/translate";
import { Message } from "element-ui";
export default {
  components: {
    Editor,
  },
  data() {
    return {
      info: {
        jdk_path: "http://mobile.bcmcdn.com/android_tools/jdk-8u241-macosx-x64.dmg",
        translate_tools_path: "http://mobile.bcmcdn.com/android_tools/%E7%BF%BB%E8%AF%91%E5%90%8C%E6%AD%A5%E5%B7%A5%E5%85%B7V1.jar",
      }
    };
  },
  watch: {},
  mounted: function () {
    this.getData()
  },
  methods: {
    getData() {
      translateDownloadTools()
        .then((result) => {
          console.log(result);
          if(result.data.code == 200){
            this.info = result.data.data
          }
        })
        .catch((err) => {});
    },
  },
};
</script>
<style lang="scss" scoped>
.title_tips {
  padding-top: 15px;
}
.header {
  padding-left: 20px;
}
</style>