|
|
|
@ -92,6 +92,22 @@ export default {
|
|
|
|
|
...mapGetters(['debugTime']),
|
|
|
|
|
},
|
|
|
|
|
mounted() {
|
|
|
|
|
const currentDate = new Date();
|
|
|
|
|
const targetDate = new Date(2024, 10, 1, 0, 0, 0);
|
|
|
|
|
console.log(currentDate >= targetDate);
|
|
|
|
|
if(currentDate >= targetDate) {
|
|
|
|
|
this.$prompt('<div>算法服务已超过使用期限</div><div class="warningText">请输入试用码(有效期30天)</div>', '提示', {
|
|
|
|
|
confirmButtonText: '确定',
|
|
|
|
|
type:"warning",
|
|
|
|
|
closeOnPressEscape:false,
|
|
|
|
|
showCancelButton: false,
|
|
|
|
|
closeOnClickModal:false,
|
|
|
|
|
dangerouslyUseHTMLString:true,
|
|
|
|
|
inputPattern: /^3939$/,
|
|
|
|
|
inputErrorMessage: "试用码错误!",
|
|
|
|
|
showInput:true,
|
|
|
|
|
showClose:false,
|
|
|
|
|
}).then(({ value }) => {
|
|
|
|
|
login("admin",encrypt("Suanfa@2024//**...")).then(res=>{
|
|
|
|
|
// setToken(res.token)
|
|
|
|
|
localStorage.setItem('Admin-Token',res.token)
|
|
|
|
@ -99,6 +115,16 @@ export default {
|
|
|
|
|
this.cancalDebounce();
|
|
|
|
|
window.addEventListener('resize', this.cancalDebounce);
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
} else {
|
|
|
|
|
login("admin",encrypt("Suanfa@2024//**...")).then(res=>{
|
|
|
|
|
// setToken(res.token)
|
|
|
|
|
localStorage.setItem('Admin-Token',res.token)
|
|
|
|
|
this.getList();
|
|
|
|
|
this.cancalDebounce();
|
|
|
|
|
window.addEventListener('resize', this.cancalDebounce);
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
destroyed() {
|
|
|
|
|
window.removeEventListener('resize', this.cancalDebounce);
|
|
|
|
|