|
@@ -82,22 +82,22 @@ export default {
|
|
}
|
|
}
|
|
},
|
|
},
|
|
mounted() {
|
|
mounted() {
|
|
- // if (Number(this.$store.getters.partId) > 0) {
|
|
|
|
- // API_Part.getExpire().then(res => {
|
|
|
|
- // if (res.timeout === 'nolimt') {
|
|
|
|
- // this.licence = '永久授权'
|
|
|
|
- // } else {
|
|
|
|
- // const days = Math.floor(((Number(res.timeout) * 1000) - new Date()) / (1000 * 60 * 60 * 24))
|
|
|
|
- // if (days > 30) {
|
|
|
|
- // this.licence = '授权有效期至: ' + new Date((Number(res.timeout) * 1000)).toLocaleString()
|
|
|
|
- // } else {
|
|
|
|
- // this.licence = '授权剩余有效期:' + days + '天,请联系售后获得授权'
|
|
|
|
- // }
|
|
|
|
- // }
|
|
|
|
- // }).catch(err => {
|
|
|
|
- // this.$message.error(err)
|
|
|
|
- // })
|
|
|
|
- // }
|
|
|
|
|
|
+ if (Number(this.$store.getters.partId) > 0) {
|
|
|
|
+ API_Part.getExpire().then(res => {
|
|
|
|
+ if (res.timeout === 'nolimit') {
|
|
|
|
+ this.licence = '永久授权'
|
|
|
|
+ } else {
|
|
|
|
+ const days = Math.floor(((Number(res.timeout) * 1000) - new Date()) / (1000 * 60 * 60 * 24))
|
|
|
|
+ if (days > 30) {
|
|
|
|
+ this.licence = '授权有效期至: ' + new Date((Number(res.timeout) * 1000)).toLocaleString()
|
|
|
|
+ } else {
|
|
|
|
+ this.licence = '授权剩余有效期:' + days + '天,请联系售后获得授权'
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }).catch(err => {
|
|
|
|
+ this.$message.error(err)
|
|
|
|
+ })
|
|
|
|
+ }
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
toggleSideBar() {
|
|
toggleSideBar() {
|