|
@@ -40,6 +40,7 @@ export function _request({
|
|
|
data: Object.assign(data, {
|
|
|
userId: app.globalData.ywtUserId || "",
|
|
|
appId: app.globalData.appId || "",
|
|
|
+ alipayUid: app.globalData.alipayUid,
|
|
|
terminal,
|
|
|
}),
|
|
|
headers: {
|
|
@@ -118,6 +119,7 @@ export function _ywtRequest({
|
|
|
data: Object.assign(data, {
|
|
|
userId: app.globalData.ywtUserId || "",
|
|
|
appId: app.globalData.appId || "",
|
|
|
+ alipayUid: app.globalData.alipayUid,
|
|
|
terminal,
|
|
|
}),
|
|
|
headers: {
|
|
@@ -222,13 +224,15 @@ export default async function request(options) {
|
|
|
const [err, res] = await _request(options);
|
|
|
if (err) return [err, null];
|
|
|
const code = +getIn(res, ["code"], "");
|
|
|
- if (code === 20001 || code === 20002 || code === 20008) {
|
|
|
+ if (code === 20001 || code === 20002 || code === 20008 || code === 401) {
|
|
|
const [error] = await setTicket();
|
|
|
if (!error) {
|
|
|
const result = await request(options);
|
|
|
return result;
|
|
|
}
|
|
|
return [error, null];
|
|
|
+ } else if (code === 401) {
|
|
|
+ // 手动发起请求
|
|
|
}
|
|
|
const data = res.data || null;
|
|
|
return [null, data];
|