|
|
@ -246,6 +246,20 @@ class UserInfo { |
|
|
|
|
|
|
|
//打扫房间
|
|
|
|
async houseClean () { |
|
|
|
let furnitureId = await this.houseGetCleanId(); |
|
|
|
while (furnitureId != '0') { |
|
|
|
url = `https://lovely-house.58.com/housework/clean` |
|
|
|
body = `furnitureId=${index}` |
|
|
|
urlObject = populateUrlObject(url, this.cookie, body) |
|
|
|
await httpRequest('post', urlObject) |
|
|
|
result = httpResult; |
|
|
|
//if(result.code == 0)
|
|
|
|
//break;
|
|
|
|
furnitureId = await houseGetCleanId(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
async houseGetCleanId () { |
|
|
|
let url = `https://lovely-house.58.com/housework/get` |
|
|
|
let body = `` |
|
|
|
let urlObject = populateUrlObject(url, this.cookie, body) |
|
|
@ -255,19 +269,11 @@ class UserInfo { |
|
|
|
//console.log(result)
|
|
|
|
if (result.code == 0) { |
|
|
|
if (!result.result || !result.result.houseworkTaskVOList || result.result.houseworkTaskVOList.length == 0) |
|
|
|
return; |
|
|
|
for (let index = 1; index < 10; index++) { |
|
|
|
url = `https://lovely-house.58.com/housework/clean` |
|
|
|
body = `furnitureId=${index}` |
|
|
|
urlObject = populateUrlObject(url, this.cookie, body) |
|
|
|
await httpRequest('post', urlObject) |
|
|
|
result = httpResult; |
|
|
|
//if(result.code == 0)
|
|
|
|
//break;
|
|
|
|
} |
|
|
|
} else { |
|
|
|
console.log(`账号[${this.index}]查询打扫房间状态失败: ${result.message}`) |
|
|
|
return '0'; |
|
|
|
console.log(`账号[${this.index}] 清理房间 ${result.result.houseworkTaskVOList[0].tip}`); |
|
|
|
return result.result.houseworkTaskVOList[0].furnitureId; |
|
|
|
} |
|
|
|
return '0'; |
|
|
|
} |
|
|
|
|
|
|
|
async houseWithdrawPage () { |
|
|
|