You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

24 lines
593 B

12 months ago
import axios from 'axios'
const isNewVersion = () => {
let updae_url = getApp().globalData.text;
let url = updae_url+ `/static/version.json?t=${new Date().getTime()}`
axios.get(url).then(res => {
if (res.status === 200) {
let vueVersion = res.data.version;
let localVueVersion = localStorage.getItem('vueVersion');
if (localVueVersion && localVueVersion != vueVersion) {
localStorage.setItem('vueVersion', vueVersion);
window.location.reload();
return;
} else {
localStorage.setItem('vueVersion', vueVersion);
}
}
})
}
export default {
isNewVersion
}