|
@@ -1,5 +1,5 @@
|
|
<script setup>
|
|
<script setup>
|
|
-import { onMounted, ref, getCurrentInstance } from 'vue'
|
|
|
|
|
|
+import { onMounted, ref, getCurrentInstance, defineProps } from 'vue'
|
|
import copy from 'copy-to-clipboard'
|
|
import copy from 'copy-to-clipboard'
|
|
import { get, post } from '../../utils/request'
|
|
import { get, post } from '../../utils/request'
|
|
import { userStore } from '@/store/userInfo'
|
|
import { userStore } from '@/store/userInfo'
|
|
@@ -101,18 +101,33 @@ const upLoadChange = (value) => {
|
|
const formData = new FormData()
|
|
const formData = new FormData()
|
|
formData.append("keyFile", file.value)
|
|
formData.append("keyFile", file.value)
|
|
post('/pdf-tech/vppKeyFile/parseKeyFile', formData)
|
|
post('/pdf-tech/vppKeyFile/parseKeyFile', formData)
|
|
- .then((res) => {
|
|
|
|
|
|
+ .then(async (res) => {
|
|
if (res.data.code === 200) {
|
|
if (res.data.code === 200) {
|
|
proxy.$message({
|
|
proxy.$message({
|
|
duration: 5000,
|
|
duration: 5000,
|
|
message: 'Upload Successfully',
|
|
message: 'Upload Successfully',
|
|
type: 'success'
|
|
type: 'success'
|
|
})
|
|
})
|
|
|
|
+ if (!userStore().getInit) {
|
|
|
|
+ await userStore().getInitorUpdate()
|
|
|
|
+ }
|
|
pagingQuery()
|
|
pagingQuery()
|
|
|
|
+ } else if (res.data.msg === 'Server ID Error. Please check your Key File.') {
|
|
|
|
+ proxy.$message({
|
|
|
|
+ duration: 5000,
|
|
|
|
+ message: 'Server ID Error. Please check your Key File.',
|
|
|
|
+ type: 'error'
|
|
|
|
+ })
|
|
|
|
+ } else if (res.data.msg === 'Signature invalid. Please check your Key File.') {
|
|
|
|
+ proxy.$message({
|
|
|
|
+ duration: 5000,
|
|
|
|
+ message: 'Signature invalid. Please check your Key File.',
|
|
|
|
+ type: 'error'
|
|
|
|
+ })
|
|
} else {
|
|
} else {
|
|
proxy.$message({
|
|
proxy.$message({
|
|
duration: 5000,
|
|
duration: 5000,
|
|
- message: 'Verify Failed, please try again',
|
|
|
|
|
|
+ message: 'Verily Failed, please try again.',
|
|
type: 'error'
|
|
type: 'error'
|
|
})
|
|
})
|
|
}
|
|
}
|