|
@@ -419,18 +419,28 @@ export default {
|
|
|
// this.$message.error(err)
|
|
|
// })
|
|
|
try {
|
|
|
- const result = await externalSSO({
|
|
|
+ // const result = await externalSSO({
|
|
|
+ // baseURL: item.appUrl,
|
|
|
+ // url: url.length ? '?' + url.join('&') : '',
|
|
|
+ // method,
|
|
|
+ // headers,
|
|
|
+ // data: item.bodyType === 'application/json' ? params : qs.stringify(params)
|
|
|
+ // })
|
|
|
+ const result = await axios({
|
|
|
baseURL: item.appUrl,
|
|
|
url: url.length ? '?' + url.join('&') : '',
|
|
|
method,
|
|
|
headers,
|
|
|
data: item.bodyType === 'application/json' ? params : qs.stringify(params)
|
|
|
+ }).catch(error => {
|
|
|
+ throw new Error(error)
|
|
|
})
|
|
|
- if (result.code === 0) {
|
|
|
- result.data && window.open(result.data)
|
|
|
+ if (result.status === 200) {
|
|
|
+ result?.data.data && window.open(result.data.data)
|
|
|
// result.data && window.open(window.location.href.split('#')[0] + '#/transferPage?url=' + result.data)
|
|
|
} else {
|
|
|
- this.$message.error(result.message)
|
|
|
+ throw new Error('错误')
|
|
|
+ // this.$message.error(result.message)
|
|
|
}
|
|
|
} catch (error) {
|
|
|
console.log('网络错误:', error)
|