|
@@ -468,9 +468,11 @@ module.exports = app => {
|
|
|
if (!result) {
|
|
|
throw new Error('请求失败')
|
|
|
}
|
|
|
- const { code = -1, data = {}, msg = '请求失败' } = result
|
|
|
- if ( code === 0 ) {
|
|
|
- response.data = data
|
|
|
+ const { code = -1, data: { token = ''} = { token: ''}, msg = '请求失败' } = result
|
|
|
+ if ( code === 0 && token) {
|
|
|
+ response.data = {
|
|
|
+ redirect: `${app.config.env === 'prod' ? 'http://pmqa.smartcost.com.cn' : 'http://pm.6jlzf.cn'}?token=${token}`
|
|
|
+ }
|
|
|
} else {
|
|
|
throw new Error(msg)
|
|
|
}
|