Browse Source

添加跳转到supply.html和Management.html页面的按钮

Boss3
Default User 1 month ago
parent
commit
5d705fb513
  1. 16
      SupplierReview.html

16
SupplierReview.html

@ -936,7 +936,9 @@
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
overflow: hidden; overflow: hidden;
"> ">
<button class="type-btn active">供应商审核</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>
</div> </div>
<div class="search-bar"> <div class="search-bar">
@ -1066,7 +1068,17 @@
window.location.href = 'login.html'; window.location.href = 'login.html';
}); });
// 根据角色控制货源管理按钮的显示
const managementBtnEl = document.getElementById('managementBtn');
if (managementBtnEl) {
if (parsedUserInfo.projectName === '管理员') {
// 管理员显示按钮
managementBtnEl.style.display = 'block';
} else {
// 非管理员隐藏按钮
managementBtnEl.style.display = 'none';
}
}
return true; return true;
} }

Loading…
Cancel
Save