修复下载按钮失效game
This commit is contained in:
		
							parent
							
								
									ec36a22fa4
								
							
						
					
					
						commit
						3ab5787c26
					
				| @ -202,12 +202,19 @@ | ||||
|                             'X-Requested-With': 'XMLHttpRequest' | ||||
|                         } | ||||
|                     }) | ||||
|                     .then(response => response.json()) | ||||
|                     .then(response => { | ||||
|                         if (!response.ok) { | ||||
|                             throw new Error('网络响应失败'); | ||||
|                         } | ||||
|                         return response.json(); | ||||
|                     }) | ||||
|                     .then(data => { | ||||
|                         if (data.code === 1) { | ||||
|                             const downloadsElement = document.getElementById('gameDownloads'); | ||||
|                             if (downloadsElement) { | ||||
|                                 let downloads = parseInt(downloadsElement.textContent); | ||||
|                                 downloadsElement.textContent = downloads + 1; | ||||
|                             } | ||||
| 
 | ||||
|                             // 直接使用返回的URL
 | ||||
|                             if (data.data && data.data.url) { | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user