提交 54e01502 编写于 作者: Q qiang

Merge branch 'master' of https://github.com/zuluoaaa/uni-app into dev

# Conflicts:
#	src/platforms/app-plus/service/api/network/request.js
......@@ -16,7 +16,7 @@ const publishStateChange = res => {
delete requestTasks[requestTaskId]
}
const cookiesPrase = header => {
const cookiesParse = header => {
let cookiesStr = header['Set-Cookie'] || header['set-cookie']
let cookiesArr = []
if (!cookiesStr) {
......@@ -27,7 +27,7 @@ const cookiesPrase = header => {
}
const handleCookiesArr = cookiesStr.split(';')
for (let i = 0; i < handleCookiesArr.length; i++) {
if (handleCookiesArr[i].indexOf('Expires=') !== -1) {
if (handleCookiesArr[i].indexOf('Expires=') !== -1 || handleCookiesArr[i].indexOf('expires=') !== -1) {
cookiesArr.push(handleCookiesArr[i].replace(',', ''))
} else {
cookiesArr.push(handleCookiesArr[i])
......@@ -109,7 +109,7 @@ export function createRequestTaskById (requestTaskId, {
ok,
status,
data,
headers,
headers,
errorMsg
}) => {
if (aborted) {
......@@ -126,12 +126,12 @@ export function createRequestTaskById (requestTaskId, {
data: ok && responseType === 'arraybuffer' ? base64ToArrayBuffer(data) : data,
statusCode,
header: headers,
cookies: cookiesPrase(headers)
cookies: cookiesParse(headers)
})
} else {
let errMsg = 'abort statusCode:' + statusCode
if (errorMsg) {
errMsg = errMsg + ' ' + errorMsg
} else {
let errMsg = 'abort statusCode:' + statusCode
if (errorMsg) {
errMsg = errMsg + ' ' + errorMsg
}
publishStateChange({
requestTaskId,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册