259 lines
7.1 KiB
HTML
259 lines
7.1 KiB
HTML
|
|
<!DOCTYPE html>
|
||
|
|
<html lang="zh-CN">
|
||
|
|
<head>
|
||
|
|
<meta charset="UTF-8">
|
||
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||
|
|
<title>选择身份 - 大妈集市商家端</title>
|
||
|
|
<style>
|
||
|
|
* {
|
||
|
|
margin: 0;
|
||
|
|
padding: 0;
|
||
|
|
box-sizing: border-box;
|
||
|
|
}
|
||
|
|
|
||
|
|
body {
|
||
|
|
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
|
||
|
|
background-color: #f5f5f5;
|
||
|
|
min-height: 100vh;
|
||
|
|
display: flex;
|
||
|
|
flex-direction: column;
|
||
|
|
align-items: center;
|
||
|
|
padding: 40px 20px;
|
||
|
|
}
|
||
|
|
|
||
|
|
.container {
|
||
|
|
width: 100%;
|
||
|
|
max-width: 500px;
|
||
|
|
margin: 0 auto;
|
||
|
|
}
|
||
|
|
|
||
|
|
.header {
|
||
|
|
text-align: center;
|
||
|
|
margin-bottom: 60px;
|
||
|
|
margin-top: 80px;
|
||
|
|
}
|
||
|
|
|
||
|
|
.title {
|
||
|
|
font-size: 28px;
|
||
|
|
font-weight: bold;
|
||
|
|
color: #333;
|
||
|
|
margin-bottom: 20px;
|
||
|
|
}
|
||
|
|
|
||
|
|
.subtitle {
|
||
|
|
font-size: 16px;
|
||
|
|
color: #999;
|
||
|
|
font-weight: normal;
|
||
|
|
}
|
||
|
|
|
||
|
|
.selection-area {
|
||
|
|
display: flex;
|
||
|
|
flex-direction: column;
|
||
|
|
gap: 20px;
|
||
|
|
margin-bottom: 40px;
|
||
|
|
}
|
||
|
|
|
||
|
|
.identity-option {
|
||
|
|
background-color: #fff;
|
||
|
|
border-radius: 12px;
|
||
|
|
padding: 30px 24px;
|
||
|
|
cursor: pointer;
|
||
|
|
transition: all 0.3s ease;
|
||
|
|
border: 2px solid transparent;
|
||
|
|
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
|
||
|
|
}
|
||
|
|
|
||
|
|
.identity-option:hover {
|
||
|
|
transform: translateY(-2px);
|
||
|
|
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
|
||
|
|
}
|
||
|
|
|
||
|
|
.identity-option.selected {
|
||
|
|
border-color: #1a6b3a;
|
||
|
|
background-color: #f0f7f3;
|
||
|
|
}
|
||
|
|
|
||
|
|
.option-title {
|
||
|
|
font-size: 20px;
|
||
|
|
font-weight: bold;
|
||
|
|
color: #333;
|
||
|
|
margin-bottom: 12px;
|
||
|
|
display: flex;
|
||
|
|
align-items: center;
|
||
|
|
justify-content: space-between;
|
||
|
|
}
|
||
|
|
|
||
|
|
.option-description {
|
||
|
|
font-size: 14px;
|
||
|
|
color: #666;
|
||
|
|
line-height: 1.6;
|
||
|
|
}
|
||
|
|
|
||
|
|
.radio-icon {
|
||
|
|
width: 24px;
|
||
|
|
height: 24px;
|
||
|
|
border: 2px solid #ddd;
|
||
|
|
border-radius: 50%;
|
||
|
|
position: relative;
|
||
|
|
transition: all 0.3s ease;
|
||
|
|
}
|
||
|
|
|
||
|
|
.identity-option.selected .radio-icon {
|
||
|
|
border-color: #1a6b3a;
|
||
|
|
background-color: #1a6b3a;
|
||
|
|
}
|
||
|
|
|
||
|
|
.identity-option.selected .radio-icon::after {
|
||
|
|
content: '';
|
||
|
|
position: absolute;
|
||
|
|
top: 50%;
|
||
|
|
left: 50%;
|
||
|
|
transform: translate(-50%, -50%);
|
||
|
|
width: 8px;
|
||
|
|
height: 8px;
|
||
|
|
background-color: white;
|
||
|
|
border-radius: 50%;
|
||
|
|
}
|
||
|
|
|
||
|
|
.confirm-button {
|
||
|
|
width: 100%;
|
||
|
|
padding: 18px;
|
||
|
|
background-color: #1a6b3a;
|
||
|
|
color: white;
|
||
|
|
font-size: 18px;
|
||
|
|
font-weight: 500;
|
||
|
|
border: none;
|
||
|
|
border-radius: 50px;
|
||
|
|
cursor: pointer;
|
||
|
|
transition: all 0.3s ease;
|
||
|
|
margin-top: 20px;
|
||
|
|
}
|
||
|
|
|
||
|
|
.confirm-button:hover {
|
||
|
|
background-color: #145230;
|
||
|
|
}
|
||
|
|
|
||
|
|
.confirm-button:active {
|
||
|
|
transform: scale(0.98);
|
||
|
|
}
|
||
|
|
|
||
|
|
.confirm-button:disabled {
|
||
|
|
background-color: #ccc;
|
||
|
|
cursor: not-allowed;
|
||
|
|
}
|
||
|
|
|
||
|
|
.icon-wrapper {
|
||
|
|
width: 50px;
|
||
|
|
height: 50px;
|
||
|
|
background-color: #e8f5e9;
|
||
|
|
border-radius: 12px;
|
||
|
|
display: flex;
|
||
|
|
align-items: center;
|
||
|
|
justify-content: center;
|
||
|
|
margin-bottom: 16px;
|
||
|
|
font-size: 24px;
|
||
|
|
}
|
||
|
|
|
||
|
|
.identity-option.selected .icon-wrapper {
|
||
|
|
background-color: #1a6b3a;
|
||
|
|
color: white;
|
||
|
|
}
|
||
|
|
|
||
|
|
@media (max-width: 480px) {
|
||
|
|
.header {
|
||
|
|
margin-top: 40px;
|
||
|
|
margin-bottom: 40px;
|
||
|
|
}
|
||
|
|
|
||
|
|
.title {
|
||
|
|
font-size: 24px;
|
||
|
|
}
|
||
|
|
|
||
|
|
.subtitle {
|
||
|
|
font-size: 14px;
|
||
|
|
}
|
||
|
|
|
||
|
|
.identity-option {
|
||
|
|
padding: 24px 20px;
|
||
|
|
}
|
||
|
|
|
||
|
|
.option-title {
|
||
|
|
font-size: 18px;
|
||
|
|
}
|
||
|
|
}
|
||
|
|
</style>
|
||
|
|
</head>
|
||
|
|
<body>
|
||
|
|
<div class="container">
|
||
|
|
<div class="header">
|
||
|
|
<h1 class="title">欢迎加入大妈集市!</h1>
|
||
|
|
<p class="subtitle">请选择您的店铺类型</p>
|
||
|
|
</div>
|
||
|
|
|
||
|
|
<div class="selection-area">
|
||
|
|
<div class="identity-option" data-type="independent" onclick="selectIdentity(this)">
|
||
|
|
<div class="icon-wrapper">🏪</div>
|
||
|
|
<div class="option-title">
|
||
|
|
<span>自主经营的店主</span>
|
||
|
|
<div class="radio-icon"></div>
|
||
|
|
</div>
|
||
|
|
<div class="option-description">
|
||
|
|
自行备货、自行配送、拥有完整的管理权限
|
||
|
|
</div>
|
||
|
|
</div>
|
||
|
|
|
||
|
|
<div class="identity-option" data-type="market-managed" onclick="selectIdentity(this)">
|
||
|
|
<div class="icon-wrapper">🏬</div>
|
||
|
|
<div class="option-title">
|
||
|
|
<span>菜市场统一管理下的店主</span>
|
||
|
|
<div class="radio-icon"></div>
|
||
|
|
</div>
|
||
|
|
<div class="option-description">
|
||
|
|
在菜市场统一管理体系下经营,享受市场提供的统一服务和支持
|
||
|
|
</div>
|
||
|
|
</div>
|
||
|
|
</div>
|
||
|
|
|
||
|
|
<button class="confirm-button" id="confirmBtn" disabled onclick="confirmSelection()">
|
||
|
|
确认选择
|
||
|
|
</button>
|
||
|
|
</div>
|
||
|
|
|
||
|
|
<script>
|
||
|
|
let selectedType = null;
|
||
|
|
|
||
|
|
function selectIdentity(element) {
|
||
|
|
// 移除所有选中状态
|
||
|
|
document.querySelectorAll('.identity-option').forEach(option => {
|
||
|
|
option.classList.remove('selected');
|
||
|
|
});
|
||
|
|
|
||
|
|
// 添加当前选中状态
|
||
|
|
element.classList.add('selected');
|
||
|
|
selectedType = element.getAttribute('data-type');
|
||
|
|
|
||
|
|
// 启用确认按钮
|
||
|
|
document.getElementById('confirmBtn').disabled = false;
|
||
|
|
}
|
||
|
|
|
||
|
|
function confirmSelection() {
|
||
|
|
if (!selectedType) {
|
||
|
|
alert('请先选择店铺类型');
|
||
|
|
return;
|
||
|
|
}
|
||
|
|
|
||
|
|
console.log('选择的身份类型:', selectedType);
|
||
|
|
|
||
|
|
// 这里可以添加跳转逻辑或提交数据到后端
|
||
|
|
if (selectedType === 'independent') {
|
||
|
|
alert('您选择了:自主经营的店主');
|
||
|
|
// window.location.href = 'independent-register.html';
|
||
|
|
} else if (selectedType === 'market-managed') {
|
||
|
|
alert('您选择了:菜市场统一管理下的店主');
|
||
|
|
// window.location.href = 'market-managed-register.html';
|
||
|
|
}
|
||
|
|
}
|
||
|
|
</script>
|
||
|
|
</body>
|
||
|
|
</html>
|