优化
This commit is contained in:
@@ -27,7 +27,7 @@ export function mpUpdate() {
|
||||
});
|
||||
}
|
||||
|
||||
export function showToast(title: string, icon: string = 'none', duration: number = 2000) {
|
||||
export function showToast(title: string, icon: 'none' | 'success' | 'loading' | 'error' | 'fail' | 'exception' | undefined, duration: number = 2000) {
|
||||
uni.showToast({
|
||||
title,
|
||||
icon,
|
||||
|
@@ -27,6 +27,8 @@ function requestInterceptors() {
|
||||
if(token && config.header) {
|
||||
config.header.token = token;
|
||||
config.header.companyid = getCompanyId();
|
||||
|
||||
// config.header.contentType = "x-www-form-urlencoded"
|
||||
}
|
||||
return config;
|
||||
},
|
||||
@@ -70,7 +72,7 @@ function responseInterceptors() {
|
||||
requestQueue.forEach(cb => cb());
|
||||
// 重试完了清空这个队列
|
||||
requestQueue = [];
|
||||
isRefreshing = false;
|
||||
// isRefreshing = false;
|
||||
// 重新执行本次请求
|
||||
return uni.$u.http.request(config);
|
||||
} else {
|
||||
|
Reference in New Issue
Block a user