Commit 6dcb6030 by liang ce

token过多问题

parent f2edd76b
......@@ -2,6 +2,7 @@ import * as dd from 'dingtalk-jsapi'
import axios from 'axios'
import qs from 'qs'
import { MINGPAY_CONSTANT } from './constant'
axios.defaults.headers['Authorization'] = `Bearer ${localStorage.getItem('token')}`
const config = {
ddconfig: () => {
return new Promise((resolve, reject) => {
......@@ -62,13 +63,7 @@ const config = {
code: info.code,
orgId: localStorage.getItem('orgId')
})
return axios.post(`http://139.196.213.18:8300/v1/auth/token?${senddate}`,
{
headers: {
'Authorization': `Bearer ${localStorage.getItem('token')}`
}
}
).then((res) => {
return axios.post(`http://139.196.213.18:8300/v1/auth/token?${senddate}`).then((res) => {
if (res.data.resultCode === '0') {
localStorage.setItem('token', res.data.data.accessToken.access_token)
localStorage.setItem('userId', res.data.data.oapiUser.userid)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment