fetch函数中带上 credentials: 'include'
getWatchHistory: function (version, spId, page, userId, callback, errorCallBack) {
let url = URL + '/dev/user/watchHistory/list?version=' + version + '&spId=' + spId + '&page=' + page + '&userId=' + userId;
fetch(url, {
method: 'POST',
credentials: "include"
}).then((response)=>response.json())
.then((responseJsonData)=> {
callback && callback(responseJsonData);
}).catch((error)=> {
errorCallBack && errorCallBack(error);
console.log("getWatchHistory error " + error);
});
},