|
|
|
@ -27,7 +27,10 @@ const loginFunc = (res, userInfo) => { |
|
|
|
data: res.data.data.userInfo, |
|
|
|
}) |
|
|
|
this.userInfo = res.data.data.userInfo; |
|
|
|
|
|
|
|
uni.setStorageSync({ |
|
|
|
key: 'platform', |
|
|
|
data: res.data.data.platform, |
|
|
|
}) |
|
|
|
} else { |
|
|
|
uni.showToast({ |
|
|
|
title: res.data.msg, |
|
|
|
@ -129,6 +132,10 @@ service.interceptors.request.use( |
|
|
|
if (token) { |
|
|
|
config.headers["TiktokAuthorization"] = token; |
|
|
|
} |
|
|
|
const platform = uni.getStorageSync('platform'); |
|
|
|
if (platform) { |
|
|
|
config.headers["platform"] = platform; |
|
|
|
} |
|
|
|
config.headers['Content-Type'] = 'application/json' |
|
|
|
return config; |
|
|
|
}, |
|
|
|
|