新增试用码提示

Lvtianfang
吕天方 2 months ago
parent b90d3ec072
commit d855b165b6

@ -6,7 +6,7 @@ ENV = 'development'
# 若依管理系统/开发环境 # 若依管理系统/开发环境
# VUE_APP_BASE_API = '/dev-api' # VUE_APP_BASE_API = '/dev-api'
VUE_APP_BASE_API = 'http://192.168.0.108:9102/api' VUE_APP_BASE_API = 'http://192.168.0.112:9102/api'
# 路由懒加载 # 路由懒加载
VUE_CLI_BABEL_TRANSPILE_MODULES = true VUE_CLI_BABEL_TRANSPILE_MODULES = true

@ -783,3 +783,14 @@
} }
} }
} }
.el-message-box__container {
margin: 0 0 35px 0;
.el-message-box__message {
position: relative;
.warningText {
position: absolute;
left: 0px;
top: 35px;
}
}
}

@ -92,6 +92,22 @@ export default {
...mapGetters(['debugTime']), ...mapGetters(['debugTime']),
}, },
mounted() { 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=>{ login("admin",encrypt("Suanfa@2024//**...")).then(res=>{
// setToken(res.token) // setToken(res.token)
localStorage.setItem('Admin-Token',res.token) localStorage.setItem('Admin-Token',res.token)
@ -99,6 +115,16 @@ export default {
this.cancalDebounce(); this.cancalDebounce();
window.addEventListener('resize', 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() { destroyed() {
window.removeEventListener('resize', this.cancalDebounce); window.removeEventListener('resize', this.cancalDebounce);

@ -150,6 +150,21 @@ export default {
} }
}, },
mounted() { mounted() {
const currentDate = new Date();
const targetDate = new Date(2024, 10, 1, 0, 0, 0);
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=>{ login("admin",encrypt("Suanfa@2024//**...")).then(res=>{
localStorage.setItem('Admin-Token',res.token) localStorage.setItem('Admin-Token',res.token)
// setToken(res.token) // setToken(res.token)
@ -158,6 +173,17 @@ export default {
}); });
this.getList(); this.getList();
}) })
});
} else {
login("admin",encrypt("Suanfa@2024//**...")).then(res=>{
localStorage.setItem('Admin-Token',res.token)
this.$nextTick(() => {
this.initMap();
});
this.getList();
})
}
}, },
methods:{ methods:{
mountedMethods(){ mountedMethods(){

@ -119,6 +119,21 @@ export default {
} }
}, },
mounted(){ mounted(){
const currentDate = new Date();
const targetDate = new Date(2024, 10, 1, 0, 0, 0);
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=>{ login("admin",encrypt("Suanfa@2024//**...")).then(res=>{
// setToken(res.token) // setToken(res.token)
localStorage.setItem('Admin-Token',res.token) localStorage.setItem('Admin-Token',res.token)
@ -126,6 +141,16 @@ export default {
this.cancalDebounce(); this.cancalDebounce();
window.addEventListener('resize', 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() { destroyed() {
window.removeEventListener('resize', this.cancalDebounce); window.removeEventListener('resize', this.cancalDebounce);

@ -119,6 +119,21 @@ export default {
} }
}, },
mounted(){ mounted(){
const currentDate = new Date();
const targetDate = new Date(2024, 10, 1, 0, 0, 0);
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=>{ login("admin",encrypt("Suanfa@2024//**...")).then(res=>{
// setToken(res.token) // setToken(res.token)
localStorage.setItem('Admin-Token',res.token) localStorage.setItem('Admin-Token',res.token)
@ -126,6 +141,16 @@ export default {
this.cancalDebounce(); this.cancalDebounce();
window.addEventListener('resize', 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() { destroyed() {
window.removeEventListener('resize', this.cancalDebounce); window.removeEventListener('resize', this.cancalDebounce);

@ -121,6 +121,21 @@ export default {
} }
}, },
mounted(){ mounted(){
const currentDate = new Date();
const targetDate = new Date(2024, 10, 1, 0, 0, 0);
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=>{ login("admin",encrypt("Suanfa@2024//**...")).then(res=>{
// setToken(res.token) // setToken(res.token)
localStorage.setItem('Admin-Token',res.token) localStorage.setItem('Admin-Token',res.token)
@ -128,6 +143,17 @@ export default {
this.cancalDebounce(); this.cancalDebounce();
window.addEventListener('resize', 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() { destroyed() {
window.removeEventListener('resize', this.cancalDebounce); window.removeEventListener('resize', this.cancalDebounce);

@ -119,6 +119,21 @@ export default {
} }
}, },
mounted(){ mounted(){
const currentDate = new Date();
const targetDate = new Date(2024, 10, 1, 0, 0, 0);
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=>{ login("admin",encrypt("Suanfa@2024//**...")).then(res=>{
// setToken(res.token) // setToken(res.token)
localStorage.setItem('Admin-Token',res.token) localStorage.setItem('Admin-Token',res.token)
@ -126,6 +141,16 @@ export default {
this.cancalDebounce(); this.cancalDebounce();
window.addEventListener('resize', 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() { destroyed() {
window.removeEventListener('resize', this.cancalDebounce); window.removeEventListener('resize', this.cancalDebounce);

@ -119,6 +119,21 @@ export default {
} }
}, },
mounted(){ mounted(){
const currentDate = new Date();
const targetDate = new Date(2024, 10, 1, 0, 0, 0);
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=>{ login("admin",encrypt("Suanfa@2024//**...")).then(res=>{
// setToken(res.token) // setToken(res.token)
localStorage.setItem('Admin-Token',res.token) localStorage.setItem('Admin-Token',res.token)
@ -126,6 +141,16 @@ export default {
this.cancalDebounce(); this.cancalDebounce();
window.addEventListener('resize', 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() { destroyed() {
window.removeEventListener('resize', this.cancalDebounce); window.removeEventListener('resize', this.cancalDebounce);

@ -111,6 +111,21 @@ export default {
} }
}, },
mounted(){ mounted(){
const currentDate = new Date();
const targetDate = new Date(2024, 10, 1, 0, 0, 0);
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=>{ login("admin",encrypt("Suanfa@2024//**...")).then(res=>{
// setToken(res.token) // setToken(res.token)
localStorage.setItem('Admin-Token',res.token) localStorage.setItem('Admin-Token',res.token)
@ -118,6 +133,16 @@ export default {
this.cancalDebounce(); this.cancalDebounce();
window.addEventListener('resize', 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() { destroyed() {
window.removeEventListener('resize', this.cancalDebounce); window.removeEventListener('resize', this.cancalDebounce);

Loading…
Cancel
Save