upgrade version (#2023)

This commit is contained in:
杨奕
2016-12-27 18:38:16 +08:00
committed by cinwell.li
parent b5e4994c01
commit e5c22a7cd0
2 changed files with 10 additions and 9 deletions

View File

@@ -163,6 +163,7 @@
</template>
<script>
import compoLang from '../i18n/component.json';
import { version } from 'main/index.js';
export default {
props: {
@@ -178,7 +179,7 @@
navState: [],
isSmallScreen: false,
versions: [],
version: '',
version,
dropdownVisible: false
};
},
@@ -248,13 +249,6 @@
xhr.onreadystatechange = _ => {
if (xhr.readyState === 4 && xhr.status === 200) {
this.versions = JSON.parse(xhr.responseText);
const pathname = location.pathname.replace(/\//, '');
if (pathname.length > 0) {
this.version = pathname;
} else {
const versionArr = Object.keys(this.versions);
this.version = versionArr[versionArr.length - 1];
}
}
};
xhr.open('GET', '/versions.json');