更新 'mcbbs/vending-machine.user.js'

This commit is contained in:
502647092 2020-12-10 16:12:05 +00:00
parent 6c9b29e076
commit f66501b36f

View File

@ -81,7 +81,7 @@
let count = 0
let stock = updateStock()
let result = await fetch('https://reward.yumc.pw/mcbbs/needSendOrder').then(r => r.json())
if (result.code != 200 && result.data.order_id) {
if (result.code != 200) {
if (++checkTimes > 30 || back) {
location.href = '/home.php?mod=magic&action=mybox'
}
@ -90,6 +90,7 @@
}
try { openFn() } catch (ex) { }
let order = result.data
if (!order || !order.order_id) { return setTimeout(() => sendOrderAction(openFn), 2000) }
console.log(`开始发送订单 ${order.order_id}`)
let username = undefined
while ((username = jq('#selectedusername')[0]) == undefined) {