|
|
@ -937,8 +937,8 @@ |
|
|
overflow: hidden; |
|
|
overflow: hidden; |
|
|
"> |
|
|
"> |
|
|
<button class="type-btn" id="managementBtn" style="border-right: 1px solid rgba(0, 0, 0, 0.1);" onclick="window.location.href='Management.html'">货源管理</button> |
|
|
<button class="type-btn" id="managementBtn" style="border-right: 1px solid rgba(0, 0, 0, 0.1);" onclick="window.location.href='Management.html'">货源管理</button> |
|
|
<button class="type-btn" onclick="window.location.href='supply.html'">我的货源</button> |
|
|
|
|
|
<button class="type-btn active" style="border-left: 1px solid rgba(0, 0, 0, 0.1);">供应商审核</button> |
|
|
<button class="type-btn active" style="border-left: 1px solid rgba(0, 0, 0, 0.1);">供应商审核</button> |
|
|
|
|
|
<button class="type-btn" onclick="window.location.href='supply.html'">我的货源</button> |
|
|
</div> |
|
|
</div> |
|
|
|
|
|
|
|
|
<div class="search-bar"> |
|
|
<div class="search-bar"> |
|
|
@ -1470,18 +1470,11 @@ |
|
|
throw new Error('服务器响应异常'); |
|
|
throw new Error('服务器响应异常'); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
// 直接使用Text格式先获取原始响应,确保正确解析 |
|
|
// 直接解析为JSON |
|
|
const responseText = await response.text(); |
|
|
|
|
|
console.log('原始响应文本:', responseText); |
|
|
|
|
|
|
|
|
|
|
|
// 然后再解析为JSON |
|
|
|
|
|
let data; |
|
|
let data; |
|
|
try { |
|
|
try { |
|
|
data = JSON.parse(responseText); |
|
|
data = await response.json(); |
|
|
console.log('成功解析JSON数据'); |
|
|
|
|
|
} catch (parseError) { |
|
|
} catch (parseError) { |
|
|
console.error('JSON解析失败:', parseError); |
|
|
|
|
|
console.error('原始响应:', responseText); |
|
|
|
|
|
throw new Error('返回数据格式错误'); |
|
|
throw new Error('返回数据格式错误'); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
@ -1546,7 +1539,6 @@ |
|
|
<div class="empty-icon">⚠️</div> |
|
|
<div class="empty-icon">⚠️</div> |
|
|
<h3>加载失败</h3> |
|
|
<h3>加载失败</h3> |
|
|
<p>${errorMessage}</p> |
|
|
<p>${errorMessage}</p> |
|
|
<p class="error-details">详细错误: ${error.message}</p> |
|
|
|
|
|
<button class="btn-primary" onclick="loadSuppliers()">重新加载</button> |
|
|
<button class="btn-primary" onclick="loadSuppliers()">重新加载</button> |
|
|
</div>`; |
|
|
</div>`; |
|
|
} |
|
|
} |
|
|
|