新增
@@ -330,7 +334,7 @@ export default {
},
methods: {
downloadExcel1() {
- this.$axios({
+ this.$http({
method: 'get',
url: '/scenario/battleConsume/statistic/downloadExcel1',
responseType: 'blob'
diff --git a/src/views/user/ThirdLogin.vue b/src/views/user/ThirdLogin.vue
index 9092932..be360ba 100644
--- a/src/views/user/ThirdLogin.vue
+++ b/src/views/user/ThirdLogin.vue
@@ -63,24 +63,26 @@ export default {
return this.isAdmin || this.isInstructor || this.isTrainer
},
},
- async created() {
+ created() {
const searchParams = new URLSearchParams(window.location.search)
const searchCode = searchParams.get('code')
const localCode = window.localStorage.getItem('code')
+ console.log('----------',searchCode,localCode)
if (searchCode) {
window.localStorage.setItem('code', searchCode)
window.location.href = window.location.origin + window.location.pathname
} else if (localCode) {
try {
- const tokenRes = await this.$http({
+ const tokenRes = this.$http({
url: '/oauth2/thirdLogin',
method: 'get',
params: { code: localCode },
})
- this.$store.commit('SET_TOKEN', '123')
+ console.log(tokenRes.data.token)
storage.set(ACCESS_TOKEN, tokenRes.data.token, 7 * 24 * 60 * 60 * 1000)
+ console.log('--------')
this.$store.commit('SET_TOKEN', tokenRes.data.token)
- const res = await this.$http({
+ const res = this.$http({
url: '/auth/userInfo',
method: 'get',
})
@@ -93,7 +95,7 @@ export default {
}
} else {
try {
- const res = await this.$http({
+ const res = this.$http({
url: '/auth/userInfo',
method: 'get',
})
diff --git a/vue.config.js b/vue.config.js
index 8e4913a..ff82e17 100644
--- a/vue.config.js
+++ b/vue.config.js
@@ -56,6 +56,7 @@ const vueConfig = {
CESIUM_BASE_URL: JSON.stringify('./'),
}),
],
+
// en_US: `if prod, add externals`
// zh_CN: `这里是用来控制编译忽略外部依赖的,与 config.plugin('html') 配合可以编译时引入外部CDN文件依赖`
// externals: isProd ? assetsCDN.externals : {}