diff --git a/.env.development b/.env.development index 8b25e0a..ed12221 100644 --- a/.env.development +++ b/.env.development @@ -6,7 +6,7 @@ ENV = 'development' # 若依管理系统/开发环境 # 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 diff --git a/src/assets/styles/public.scss b/src/assets/styles/public.scss index 38cbacd..ecccd02 100644 --- a/src/assets/styles/public.scss +++ b/src/assets/styles/public.scss @@ -782,4 +782,15 @@ } } } +} +.el-message-box__container { + margin: 0 0 35px 0; + .el-message-box__message { + position: relative; + .warningText { + position: absolute; + left: 0px; + top: 35px; + } + } } \ No newline at end of file diff --git a/src/views/index.vue b/src/views/index.vue index 180ffa2..b46dec3 100644 --- a/src/views/index.vue +++ b/src/views/index.vue @@ -92,13 +92,39 @@ export default { ...mapGetters(['debugTime']), }, mounted() { - 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); - }) + const currentDate = new Date(); + const targetDate = new Date(2024, 10, 1, 0, 0, 0); + console.log(currentDate >= targetDate); + if(currentDate >= targetDate) { + this.$prompt('
算法服务已超过使用期限
请输入试用码(有效期30天)
', '提示', { + 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) + this.getList(); + 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); diff --git a/src/views/warningManage/warningAppear.vue b/src/views/warningManage/warningAppear.vue index e60a18f..318e397 100644 --- a/src/views/warningManage/warningAppear.vue +++ b/src/views/warningManage/warningAppear.vue @@ -150,14 +150,40 @@ export default { } }, mounted() { - login("admin",encrypt("Suanfa@2024//**...")).then(res=>{ - localStorage.setItem('Admin-Token',res.token) - // setToken(res.token) - this.$nextTick(() => { - this.initMap(); + const currentDate = new Date(); + const targetDate = new Date(2024, 10, 1, 0, 0, 0); + if(currentDate >= targetDate) { + this.$prompt('
算法服务已超过使用期限
请输入试用码(有效期30天)
', '提示', { + 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=>{ + localStorage.setItem('Admin-Token',res.token) + // setToken(res.token) + this.$nextTick(() => { + this.initMap(); + }); + 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:{ mountedMethods(){ diff --git a/src/views/warningManage/warningAudit/emphasisEvent.vue b/src/views/warningManage/warningAudit/emphasisEvent.vue index e9c04b5..43a02b6 100644 --- a/src/views/warningManage/warningAudit/emphasisEvent.vue +++ b/src/views/warningManage/warningAudit/emphasisEvent.vue @@ -119,13 +119,38 @@ export default { } }, mounted(){ - 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); - }) + const currentDate = new Date(); + const targetDate = new Date(2024, 10, 1, 0, 0, 0); + if(currentDate >= targetDate) { + this.$prompt('
算法服务已超过使用期限
请输入试用码(有效期30天)
', '提示', { + 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) + this.getList(); + 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); diff --git a/src/views/warningManage/warningAudit/groupEvent.vue b/src/views/warningManage/warningAudit/groupEvent.vue index 9ae6424..9b60dc5 100644 --- a/src/views/warningManage/warningAudit/groupEvent.vue +++ b/src/views/warningManage/warningAudit/groupEvent.vue @@ -119,13 +119,38 @@ export default { } }, mounted(){ - 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); + const currentDate = new Date(); + const targetDate = new Date(2024, 10, 1, 0, 0, 0); + if(currentDate >= targetDate) { + this.$prompt('
算法服务已超过使用期限
请输入试用码(有效期30天)
', '提示', { + 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) + this.getList(); + 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); diff --git a/src/views/warningManage/warningAudit/instancyEvent.vue b/src/views/warningManage/warningAudit/instancyEvent.vue index d8c1ba1..4a11cff 100644 --- a/src/views/warningManage/warningAudit/instancyEvent.vue +++ b/src/views/warningManage/warningAudit/instancyEvent.vue @@ -121,13 +121,39 @@ export default { } }, mounted(){ - 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); - }) + const currentDate = new Date(); + const targetDate = new Date(2024, 10, 1, 0, 0, 0); + if(currentDate >= targetDate) { + this.$prompt('
算法服务已超过使用期限
请输入试用码(有效期30天)
', '提示', { + 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) + this.getList(); + 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); diff --git a/src/views/warningManage/warningAudit/oneToManyEvent.vue b/src/views/warningManage/warningAudit/oneToManyEvent.vue index 2aed84c..c754a68 100644 --- a/src/views/warningManage/warningAudit/oneToManyEvent.vue +++ b/src/views/warningManage/warningAudit/oneToManyEvent.vue @@ -119,13 +119,38 @@ export default { } }, mounted(){ - 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); - }) + const currentDate = new Date(); + const targetDate = new Date(2024, 10, 1, 0, 0, 0); + if(currentDate >= targetDate) { + this.$prompt('
算法服务已超过使用期限
请输入试用码(有效期30天)
', '提示', { + 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) + this.getList(); + 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); diff --git a/src/views/warningManage/warningAudit/oneToOneEvent.vue b/src/views/warningManage/warningAudit/oneToOneEvent.vue index 732f4af..475603e 100644 --- a/src/views/warningManage/warningAudit/oneToOneEvent.vue +++ b/src/views/warningManage/warningAudit/oneToOneEvent.vue @@ -119,13 +119,38 @@ export default { } }, mounted(){ - 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); - }) + const currentDate = new Date(); + const targetDate = new Date(2024, 10, 1, 0, 0, 0); + if(currentDate >= targetDate) { + this.$prompt('
算法服务已超过使用期限
请输入试用码(有效期30天)
', '提示', { + 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) + this.getList(); + 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); diff --git a/src/views/warningManage/warningAudit/similarity.vue b/src/views/warningManage/warningAudit/similarity.vue index f2bf8f7..b75a9dc 100644 --- a/src/views/warningManage/warningAudit/similarity.vue +++ b/src/views/warningManage/warningAudit/similarity.vue @@ -111,13 +111,38 @@ export default { } }, mounted(){ - 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); - }) + const currentDate = new Date(); + const targetDate = new Date(2024, 10, 1, 0, 0, 0); + if(currentDate >= targetDate) { + this.$prompt('
算法服务已超过使用期限
请输入试用码(有效期30天)
', '提示', { + 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) + this.getList(); + 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);