Skip to content

Commit

Permalink
fix: sync cookie parse
Browse files Browse the repository at this point in the history
  • Loading branch information
qiin2333 committed Mar 18, 2022
1 parent e4fe7cd commit 3abb186
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion main.js
Original file line number Diff line number Diff line change
Expand Up @@ -928,7 +928,7 @@ export default class MonkeyMaster {
const payload = {
serInfo: {
area: this.areaId,
'user-key': getCookie(this.headers.get('Cookie'), 'user-key'),
// 'user-key': getCookie(this.headers.get('Cookie'), 'user-key'),
},
cartExt: {
specialId: 1,
Expand Down
1 change: 1 addition & 0 deletions util/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ export function getCookie(cookieStr, key) {
const match = cookieStr.match(reg);
if (!match) {
console.error('cookie解析出错,删除users目录对应cookie文件后重试');
return '';
}
return cookieStr.match(reg)[1];
}
Expand Down

0 comments on commit 3abb186

Please sign in to comment.