更新 'mcbbs/vending-machine.user.js'
This commit is contained in:
		@@ -51,6 +51,9 @@
 | 
			
		||||
        }
 | 
			
		||||
        return stock
 | 
			
		||||
    }
 | 
			
		||||
    async function updateStatus(message) {
 | 
			
		||||
        await fetch(`https://reward.yumc.pw/mcbbs/updateStatus/message/${message}`).then(r => r.json())
 | 
			
		||||
    }
 | 
			
		||||
    async function lowStockNotify(stock, order_id, goods_amount) {
 | 
			
		||||
        await fetch(`https://reward.yumc.pw/mcbbs/lowStockNotify/stock/${stock}/order_id/${order_id}/goods_amount/${goods_amount}`).then(r => r.json())
 | 
			
		||||
    }
 | 
			
		||||
@@ -72,7 +75,9 @@
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
    async function sendOrderAction(openFn, back = false) {
 | 
			
		||||
        let timeoutTask = setTimeout(() => { location.href = '/home.php?mod=magic&action=mybox' }, 90000)
 | 
			
		||||
        let timeoutTask = setTimeout(() => { location.href = '/home.php?mod=magic&action=mybox' }, 120000)
 | 
			
		||||
        let messagetext = document.getElementById('messagetext')
 | 
			
		||||
        updateStatus(messagetext && messagetext.innerText || '')
 | 
			
		||||
        let count = 0
 | 
			
		||||
        let stock = updateStock()
 | 
			
		||||
        let result = await fetch('https://reward.yumc.pw/mcbbs/needSendOrder').then(r => r.json())
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user