更新 'mcbbs/vending-machine.user.js'
This commit is contained in:
parent
f66501b36f
commit
310a76d51d
@ -12,6 +12,7 @@
|
|||||||
let store = window.localStorage
|
let store = window.localStorage
|
||||||
const lastOrderKey = 'circlebox:lastorder'
|
const lastOrderKey = 'circlebox:lastorder'
|
||||||
let checkTimes = 0
|
let checkTimes = 0
|
||||||
|
let stock = 0
|
||||||
async function sleep(time) {
|
async function sleep(time) {
|
||||||
return new Promise((resolve, reject) => setTimeout(resolve, time))
|
return new Promise((resolve, reject) => setTimeout(resolve, time))
|
||||||
}
|
}
|
||||||
@ -25,6 +26,7 @@
|
|||||||
await shopAction(params)
|
await shopAction(params)
|
||||||
break
|
break
|
||||||
case "mybox":
|
case "mybox":
|
||||||
|
stock = updateStock()
|
||||||
await myboxAction(params)
|
await myboxAction(params)
|
||||||
break
|
break
|
||||||
case "log":
|
case "log":
|
||||||
@ -79,7 +81,6 @@
|
|||||||
let messagetext = document.getElementById('messagetext')
|
let messagetext = document.getElementById('messagetext')
|
||||||
updateStatus(messagetext && messagetext.innerText || '')
|
updateStatus(messagetext && messagetext.innerText || '')
|
||||||
let count = 0
|
let count = 0
|
||||||
let stock = updateStock()
|
|
||||||
let result = await fetch('https://reward.yumc.pw/mcbbs/needSendOrder').then(r => r.json())
|
let result = await fetch('https://reward.yumc.pw/mcbbs/needSendOrder').then(r => r.json())
|
||||||
if (result.code != 200) {
|
if (result.code != 200) {
|
||||||
if (++checkTimes > 30 || back) {
|
if (++checkTimes > 30 || back) {
|
||||||
|
Loading…
Reference in New Issue
Block a user