786 lines
28 KiB
HTML
786 lines
28 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', Arial, sans-serif;
|
||
background-color: #f5f5f5;
|
||
padding: 20px;
|
||
}
|
||
|
||
/* 模态遮罩 */
|
||
.modal-overlay {
|
||
position: fixed;
|
||
top: 0;
|
||
left: 0;
|
||
width: 100%;
|
||
height: 100%;
|
||
background-color: rgba(0, 0, 0, 0.5);
|
||
display: flex;
|
||
justify-content: center;
|
||
align-items: center;
|
||
z-index: 1000;
|
||
}
|
||
|
||
/* 弹窗容器 */
|
||
.modal-container {
|
||
width: 400px;
|
||
background: white;
|
||
border: 1px dashed #ccc;
|
||
border-radius: 4px;
|
||
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
|
||
}
|
||
|
||
/* 弹窗头部 */
|
||
.modal-header {
|
||
padding: 16px 20px;
|
||
border-bottom: 1px dashed #e0e0e0;
|
||
display: flex;
|
||
justify-content: space-between;
|
||
align-items: center;
|
||
}
|
||
|
||
.modal-title {
|
||
font-size: 16px;
|
||
font-weight: 500;
|
||
color: #333;
|
||
}
|
||
|
||
.close-btn {
|
||
width: 24px;
|
||
height: 24px;
|
||
border: 1px dashed #ccc;
|
||
background: white;
|
||
cursor: pointer;
|
||
display: flex;
|
||
justify-content: center;
|
||
align-items: center;
|
||
font-size: 16px;
|
||
color: #666;
|
||
}
|
||
|
||
.close-btn:hover {
|
||
background-color: #f5f5f5;
|
||
}
|
||
|
||
/* 弹窗内容 */
|
||
.modal-body {
|
||
padding: 20px;
|
||
}
|
||
|
||
/* 签到项目容器 */
|
||
.signin-item {
|
||
display: flex;
|
||
align-items: center;
|
||
margin-bottom: 16px;
|
||
padding: 12px 0;
|
||
}
|
||
|
||
.signin-item:last-child {
|
||
margin-bottom: 0;
|
||
}
|
||
|
||
/* 内嵌文字输入项目容器 */
|
||
.inline-text-item {
|
||
display: flex;
|
||
align-items: center;
|
||
margin-bottom: 16px;
|
||
padding: 12px 0;
|
||
}
|
||
|
||
.inline-text-item:last-child {
|
||
margin-bottom: 0;
|
||
}
|
||
|
||
/* 内嵌文字标签容器 */
|
||
.inline-text-wrapper {
|
||
display: flex;
|
||
align-items: center;
|
||
font-size: 14px;
|
||
color: #333;
|
||
flex: 1;
|
||
}
|
||
|
||
/* 内嵌输入框样式 */
|
||
.inline-input {
|
||
width: 60px;
|
||
height: 24px;
|
||
border: 1px dashed #d9d9d9;
|
||
border-radius: 2px;
|
||
text-align: center;
|
||
font-size: 14px;
|
||
outline: none;
|
||
background: white;
|
||
margin: 0 2px;
|
||
}
|
||
|
||
/* 必填标识 */
|
||
.required {
|
||
color: #ff4d4f;
|
||
margin-right: 8px;
|
||
font-size: 14px;
|
||
}
|
||
|
||
/* 签到标签 */
|
||
.signin-label {
|
||
flex: 1;
|
||
font-size: 14px;
|
||
color: #333;
|
||
min-width: 100px;
|
||
}
|
||
|
||
/* 输入控件容器 */
|
||
.input-control {
|
||
display: flex;
|
||
align-items: center;
|
||
border: 1px dashed #d9d9d9;
|
||
border-radius: 4px;
|
||
background: white;
|
||
}
|
||
|
||
/* 数字输入框 */
|
||
.number-input {
|
||
width: 80px;
|
||
height: 32px;
|
||
border: none;
|
||
text-align: center;
|
||
font-size: 14px;
|
||
outline: none;
|
||
background: transparent;
|
||
}
|
||
|
||
/* 调节按钮容器 */
|
||
.control-buttons {
|
||
display: flex;
|
||
flex-direction: column;
|
||
border-left: 1px dashed #d9d9d9;
|
||
}
|
||
|
||
/* 调节按钮 */
|
||
.control-btn {
|
||
width: 24px;
|
||
height: 16px;
|
||
border: none;
|
||
background: white;
|
||
cursor: pointer;
|
||
display: flex;
|
||
justify-content: center;
|
||
align-items: center;
|
||
font-size: 10px;
|
||
color: #666;
|
||
}
|
||
|
||
.control-btn:hover {
|
||
background-color: #f5f5f5;
|
||
}
|
||
|
||
.control-btn:first-child {
|
||
border-bottom: 1px dashed #d9d9d9;
|
||
}
|
||
|
||
/* 弹窗底部 */
|
||
.modal-footer {
|
||
padding: 16px 20px;
|
||
border-top: 1px dashed #e0e0e0;
|
||
display: flex;
|
||
justify-content: flex-end;
|
||
gap: 12px;
|
||
}
|
||
|
||
/* 按钮基础样式 */
|
||
.btn {
|
||
padding: 8px 16px;
|
||
border-radius: 4px;
|
||
font-size: 14px;
|
||
cursor: pointer;
|
||
min-width: 80px;
|
||
height: 32px;
|
||
display: flex;
|
||
justify-content: center;
|
||
align-items: center;
|
||
}
|
||
|
||
/* 取消按钮 */
|
||
.btn-cancel {
|
||
background: white;
|
||
border: 1px dashed #d9d9d9;
|
||
color: #333;
|
||
}
|
||
|
||
.btn-cancel:hover {
|
||
background-color: #f5f5f5;
|
||
}
|
||
|
||
/* 确认按钮 */
|
||
.btn-confirm {
|
||
background: #1890ff;
|
||
border: 1px dashed #1890ff;
|
||
color: white;
|
||
}
|
||
|
||
.btn-confirm:hover {
|
||
background-color: #40a9ff;
|
||
border-color: #40a9ff;
|
||
}
|
||
|
||
/* 演示说明 */
|
||
.demo-info {
|
||
position: fixed;
|
||
top: 20px;
|
||
left: 20px;
|
||
background: white;
|
||
border: 1px dashed #ccc;
|
||
padding: 16px;
|
||
border-radius: 4px;
|
||
max-width: 300px;
|
||
z-index: 999;
|
||
}
|
||
|
||
.demo-info h3 {
|
||
margin-bottom: 8px;
|
||
font-size: 14px;
|
||
color: #333;
|
||
}
|
||
|
||
.demo-info p {
|
||
font-size: 12px;
|
||
color: #666;
|
||
line-height: 1.4;
|
||
margin-bottom: 4px;
|
||
}
|
||
|
||
/* 触发按钮区域 */
|
||
.trigger-buttons {
|
||
position: fixed;
|
||
top: 20px;
|
||
right: 20px;
|
||
display: flex;
|
||
flex-direction: column;
|
||
gap: 12px;
|
||
z-index: 999;
|
||
}
|
||
|
||
.trigger-btn {
|
||
padding: 10px 16px;
|
||
background: white;
|
||
border: 1px dashed #ccc;
|
||
border-radius: 4px;
|
||
cursor: pointer;
|
||
font-size: 14px;
|
||
color: #333;
|
||
min-width: 180px;
|
||
}
|
||
|
||
.trigger-btn:hover {
|
||
background-color: #f5f5f5;
|
||
}
|
||
|
||
/* 隐藏弹窗 */
|
||
.modal-hidden {
|
||
display: none;
|
||
}
|
||
</style>
|
||
</head>
|
||
<body>
|
||
<!-- 演示说明 -->
|
||
<div class="demo-info">
|
||
<h3>原型演示说明</h3>
|
||
<p>• 线框图风格设计</p>
|
||
<p>• 包含基础交互功能</p>
|
||
<p>• 点击关闭按钮可关闭弹窗</p>
|
||
<p>• 数字调节按钮可增减数值</p>
|
||
<p>• 右侧按钮可打开不同弹窗</p>
|
||
</div>
|
||
|
||
<!-- 触发按钮区域 -->
|
||
<div class="trigger-buttons">
|
||
<button class="trigger-btn" onclick="openSigninModal()">打开每日积分设置</button>
|
||
<button class="trigger-btn" onclick="openBrowseModal()">打开浏览商品积分配置</button>
|
||
<button class="trigger-btn" onclick="openPurchaseModal()">打开购买商品任务配置</button>
|
||
<button class="trigger-btn" onclick="openShareModal()">打开分享商品任务配置</button>
|
||
<button class="trigger-btn" onclick="openReviewModal()">打开评价商品任务配置</button>
|
||
</div>
|
||
|
||
<!-- 每日积分设置弹窗 -->
|
||
<div class="modal-overlay modal-hidden" id="signinModal">
|
||
<div class="modal-container">
|
||
<!-- 弹窗头部 -->
|
||
<div class="modal-header">
|
||
<div class="modal-title">每日积分设置</div>
|
||
<button class="close-btn" onclick="closeModal()">×</button>
|
||
</div>
|
||
|
||
<!-- 弹窗内容 -->
|
||
<div class="modal-body">
|
||
<!-- 连续签到1天 -->
|
||
<div class="signin-item">
|
||
<span class="required">*</span>
|
||
<span class="signin-label">连续签到1天</span>
|
||
<div class="input-control">
|
||
<input type="number" class="number-input" value="0" id="day1">
|
||
<div class="control-buttons">
|
||
<button class="control-btn" onclick="increaseValue('day1')">▲</button>
|
||
<button class="control-btn" onclick="decreaseValue('day1')">▼</button>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
<!-- 连续签到2天 -->
|
||
<div class="signin-item">
|
||
<span class="required">*</span>
|
||
<span class="signin-label">连续签到2天</span>
|
||
<div class="input-control">
|
||
<input type="number" class="number-input" value="0" id="day2">
|
||
<div class="control-buttons">
|
||
<button class="control-btn" onclick="increaseValue('day2')">▲</button>
|
||
<button class="control-btn" onclick="decreaseValue('day2')">▼</button>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
<!-- 连续签到3天 -->
|
||
<div class="signin-item">
|
||
<span class="required">*</span>
|
||
<span class="signin-label">连续签到3天</span>
|
||
<div class="input-control">
|
||
<input type="number" class="number-input" value="0" id="day3">
|
||
<div class="control-buttons">
|
||
<button class="control-btn" onclick="increaseValue('day3')">▲</button>
|
||
<button class="control-btn" onclick="decreaseValue('day3')">▼</button>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
<!-- 连续签到4天 -->
|
||
<div class="signin-item">
|
||
<span class="required">*</span>
|
||
<span class="signin-label">连续签到4天</span>
|
||
<div class="input-control">
|
||
<input type="number" class="number-input" value="0" id="day4">
|
||
<div class="control-buttons">
|
||
<button class="control-btn" onclick="increaseValue('day4')">▲</button>
|
||
<button class="control-btn" onclick="decreaseValue('day4')">▼</button>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
<!-- 连续签到5天 -->
|
||
<div class="signin-item">
|
||
<span class="required">*</span>
|
||
<span class="signin-label">连续签到5天</span>
|
||
<div class="input-control">
|
||
<input type="number" class="number-input" value="0" id="day5">
|
||
<div class="control-buttons">
|
||
<button class="control-btn" onclick="increaseValue('day5')">▲</button>
|
||
<button class="control-btn" onclick="decreaseValue('day5')">▼</button>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
<!-- 连续签到6天 -->
|
||
<div class="signin-item">
|
||
<span class="required">*</span>
|
||
<span class="signin-label">连续签到6天</span>
|
||
<div class="input-control">
|
||
<input type="number" class="number-input" value="0" id="day6">
|
||
<div class="control-buttons">
|
||
<button class="control-btn" onclick="increaseValue('day6')">▲</button>
|
||
<button class="control-btn" onclick="decreaseValue('day6')">▼</button>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
<!-- 连续签到7天 -->
|
||
<div class="signin-item">
|
||
<span class="required">*</span>
|
||
<span class="signin-label">连续签到7天</span>
|
||
<div class="input-control">
|
||
<input type="number" class="number-input" value="0" id="day7">
|
||
<div class="control-buttons">
|
||
<button class="control-btn" onclick="increaseValue('day7')">▲</button>
|
||
<button class="control-btn" onclick="decreaseValue('day7')">▼</button>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
<!-- 弹窗底部 -->
|
||
<div class="modal-footer">
|
||
<button class="btn btn-cancel" onclick="closeModal()">取消</button>
|
||
<button class="btn btn-confirm" onclick="confirmSettings()">确认</button>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
<!-- 浏览商品积分/成长值配置弹窗 -->
|
||
<div class="modal-overlay modal-hidden" id="browseModal">
|
||
<div class="modal-container">
|
||
<!-- 弹窗头部 -->
|
||
<div class="modal-header">
|
||
<div class="modal-title">浏览商品积分/成长值配置</div>
|
||
<button class="close-btn" onclick="closeBrowseModal()">×</button>
|
||
</div>
|
||
|
||
<!-- 弹窗内容 -->
|
||
<div class="modal-body">
|
||
<!-- 每浏览1个商品积分增加 -->
|
||
<div class="signin-item">
|
||
<span class="required">*</span>
|
||
<span class="signin-label">每浏览1个商品积分增加</span>
|
||
<div class="input-control">
|
||
<input type="number" class="number-input" value="0" id="browsePoints">
|
||
<div class="control-buttons">
|
||
<button class="control-btn" onclick="increaseValue('browsePoints')">▲</button>
|
||
<button class="control-btn" onclick="decreaseValue('browsePoints')">▼</button>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
<!-- 该任务每日最高可获积分 -->
|
||
<div class="signin-item">
|
||
<span class="required">*</span>
|
||
<span class="signin-label">该任务每日最高可获积分</span>
|
||
<div class="input-control">
|
||
<input type="number" class="number-input" value="0" id="maxDailyPoints">
|
||
<div class="control-buttons">
|
||
<button class="control-btn" onclick="increaseValue('maxDailyPoints')">▲</button>
|
||
<button class="control-btn" onclick="decreaseValue('maxDailyPoints')">▼</button>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
<!-- 弹窗底部 -->
|
||
<div class="modal-footer">
|
||
<button class="btn btn-cancel" onclick="closeBrowseModal()">取消</button>
|
||
<button class="btn btn-confirm" onclick="confirmBrowseSettings()">确认</button>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
<!-- 购买商品任务配置弹窗 -->
|
||
<div class="modal-overlay modal-hidden" id="purchaseModal">
|
||
<div class="modal-container">
|
||
<!-- 弹窗头部 -->
|
||
<div class="modal-header">
|
||
<div class="modal-title">购买商品任务配置</div>
|
||
<button class="close-btn" onclick="closePurchaseModal()">×</button>
|
||
</div>
|
||
|
||
<!-- 弹窗内容 -->
|
||
<div class="modal-body">
|
||
<!-- 购买商品实付金额获得积分 -->
|
||
<div class="inline-text-item">
|
||
<span class="required">*</span>
|
||
<div class="inline-text-wrapper">
|
||
<span>购买商品实付</span>
|
||
<input type="number" class="inline-input" value="0" id="purchaseAmount">
|
||
<span>元获得1积分</span>
|
||
</div>
|
||
</div>
|
||
|
||
<!-- 该任务每日最高获得积分 -->
|
||
<div class="inline-text-item">
|
||
<span class="required">*</span>
|
||
<div class="inline-text-wrapper">
|
||
<span>该任务每日最高获得</span>
|
||
<input type="number" class="inline-input" value="0" id="maxPurchasePoints">
|
||
<span>积分</span>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
<!-- 弹窗底部 -->
|
||
<div class="modal-footer">
|
||
<button class="btn btn-cancel" onclick="closePurchaseModal()">取消</button>
|
||
<button class="btn btn-confirm" onclick="confirmPurchaseSettings()">确认</button>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
<!-- 分享商品任务配置弹窗 -->
|
||
<div class="modal-overlay modal-hidden" id="shareModal">
|
||
<div class="modal-container">
|
||
<!-- 弹窗头部 -->
|
||
<div class="modal-header">
|
||
<div class="modal-title">分享商品任务配置</div>
|
||
<button class="close-btn" onclick="closeShareModal()">×</button>
|
||
</div>
|
||
|
||
<!-- 弹窗内容 -->
|
||
<div class="modal-body">
|
||
<!-- 每分享1个商品1次获得积分 -->
|
||
<div class="inline-text-item">
|
||
<span class="required">*</span>
|
||
<div class="inline-text-wrapper">
|
||
<span>每分享1个商品1次获得</span>
|
||
<input type="number" class="inline-input" value="0" id="sharePoints">
|
||
<span>积分</span>
|
||
</div>
|
||
</div>
|
||
|
||
<!-- 该任务每日最高获得积分 -->
|
||
<div class="inline-text-item">
|
||
<span class="required">*</span>
|
||
<div class="inline-text-wrapper">
|
||
<span>该任务每日最高获得</span>
|
||
<input type="number" class="inline-input" value="0" id="maxSharePoints">
|
||
<span>积分</span>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
<!-- 弹窗底部 -->
|
||
<div class="modal-footer">
|
||
<button class="btn btn-cancel" onclick="closeShareModal()">取消</button>
|
||
<button class="btn btn-confirm" onclick="confirmShareSettings()">确认</button>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
<!-- 评价商品任务配置弹窗 -->
|
||
<div class="modal-overlay modal-hidden" id="reviewModal">
|
||
<div class="modal-container">
|
||
<!-- 弹窗头部 -->
|
||
<div class="modal-header">
|
||
<div class="modal-title">评价商品任务配置</div>
|
||
<button class="close-btn" onclick="closeReviewModal()">×</button>
|
||
</div>
|
||
|
||
<!-- 弹窗内容 -->
|
||
<div class="modal-body">
|
||
<!-- 评价1个商品获得积分 -->
|
||
<div class="inline-text-item">
|
||
<span class="required">*</span>
|
||
<div class="inline-text-wrapper">
|
||
<span>评价1个商品获得</span>
|
||
<input type="number" class="inline-input" value="0" id="reviewPoints">
|
||
<span>积分</span>
|
||
</div>
|
||
</div>
|
||
|
||
<!-- 该任务每日最高获得积分 -->
|
||
<div class="inline-text-item">
|
||
<span class="required">*</span>
|
||
<div class="inline-text-wrapper">
|
||
<span>该任务每日最高获得</span>
|
||
<input type="number" class="inline-input" value="0" id="maxReviewPoints">
|
||
<span>积分</span>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
<!-- 弹窗底部 -->
|
||
<div class="modal-footer">
|
||
<button class="btn btn-cancel" onclick="closeReviewModal()">取消</button>
|
||
<button class="btn btn-confirm" onclick="confirmReviewSettings()">确认</button>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
<script>
|
||
// 打开每日积分设置弹窗
|
||
function openSigninModal() {
|
||
const modal = document.getElementById('signinModal');
|
||
modal.classList.remove('modal-hidden');
|
||
console.log('每日积分设置弹窗已打开');
|
||
}
|
||
|
||
// 关闭每日积分设置弹窗
|
||
function closeModal() {
|
||
const modal = document.getElementById('signinModal');
|
||
modal.classList.add('modal-hidden');
|
||
console.log('每日积分设置弹窗已关闭');
|
||
}
|
||
|
||
// 打开浏览商品积分配置弹窗
|
||
function openBrowseModal() {
|
||
const modal = document.getElementById('browseModal');
|
||
modal.classList.remove('modal-hidden');
|
||
console.log('浏览商品积分配置弹窗已打开');
|
||
}
|
||
|
||
// 关闭浏览商品积分配置弹窗
|
||
function closeBrowseModal() {
|
||
const modal = document.getElementById('browseModal');
|
||
modal.classList.add('modal-hidden');
|
||
console.log('浏览商品积分配置弹窗已关闭');
|
||
}
|
||
|
||
// 增加数值
|
||
function increaseValue(id) {
|
||
const input = document.getElementById(id);
|
||
let currentValue = parseInt(input.value) || 0;
|
||
input.value = currentValue + 1;
|
||
console.log(`${id} 增加到: ${input.value}`);
|
||
}
|
||
|
||
// 减少数值
|
||
function decreaseValue(id) {
|
||
const input = document.getElementById(id);
|
||
let currentValue = parseInt(input.value) || 0;
|
||
if (currentValue > 0) {
|
||
input.value = currentValue - 1;
|
||
console.log(`${id} 减少到: ${input.value}`);
|
||
}
|
||
}
|
||
|
||
// 确认每日积分设置
|
||
function confirmSettings() {
|
||
const settings = {};
|
||
for (let i = 1; i <= 7; i++) {
|
||
const input = document.getElementById(`day${i}`);
|
||
settings[`day${i}`] = input.value;
|
||
}
|
||
console.log('签到积分设置:', settings);
|
||
alert('每日积分设置已保存(演示)');
|
||
closeModal();
|
||
}
|
||
|
||
// 确认浏览商品积分配置
|
||
function confirmBrowseSettings() {
|
||
const browsePoints = document.getElementById('browsePoints').value;
|
||
const maxDailyPoints = document.getElementById('maxDailyPoints').value;
|
||
const settings = {
|
||
browsePoints: browsePoints,
|
||
maxDailyPoints: maxDailyPoints
|
||
};
|
||
console.log('浏览商品积分配置:', settings);
|
||
alert('浏览商品积分配置已保存(演示)');
|
||
closeBrowseModal();
|
||
}
|
||
|
||
// 打开购买商品任务配置弹窗
|
||
function openPurchaseModal() {
|
||
const modal = document.getElementById('purchaseModal');
|
||
modal.classList.remove('modal-hidden');
|
||
console.log('购买商品任务配置弹窗已打开');
|
||
}
|
||
|
||
// 关闭购买商品任务配置弹窗
|
||
function closePurchaseModal() {
|
||
const modal = document.getElementById('purchaseModal');
|
||
modal.classList.add('modal-hidden');
|
||
console.log('购买商品任务配置弹窗已关闭');
|
||
}
|
||
|
||
// 确认购买商品任务配置
|
||
function confirmPurchaseSettings() {
|
||
const purchaseAmount = document.getElementById('purchaseAmount').value;
|
||
const maxPurchasePoints = document.getElementById('maxPurchasePoints').value;
|
||
const settings = {
|
||
purchaseAmount: purchaseAmount,
|
||
maxPurchasePoints: maxPurchasePoints
|
||
};
|
||
console.log('购买商品任务配置:', settings);
|
||
alert('购买商品任务配置已保存(演示)');
|
||
closePurchaseModal();
|
||
}
|
||
|
||
// 打开分享商品任务配置弹窗
|
||
function openShareModal() {
|
||
const modal = document.getElementById('shareModal');
|
||
modal.classList.remove('modal-hidden');
|
||
console.log('分享商品任务配置弹窗已打开');
|
||
}
|
||
|
||
// 关闭分享商品任务配置弹窗
|
||
function closeShareModal() {
|
||
const modal = document.getElementById('shareModal');
|
||
modal.classList.add('modal-hidden');
|
||
console.log('分享商品任务配置弹窗已关闭');
|
||
}
|
||
|
||
// 确认分享商品任务配置
|
||
function confirmShareSettings() {
|
||
const sharePoints = document.getElementById('sharePoints').value;
|
||
const maxSharePoints = document.getElementById('maxSharePoints').value;
|
||
const settings = {
|
||
sharePoints: sharePoints,
|
||
maxSharePoints: maxSharePoints
|
||
};
|
||
console.log('分享商品任务配置:', settings);
|
||
alert('分享商品任务配置已保存(演示)');
|
||
closeShareModal();
|
||
}
|
||
|
||
// 打开评价商品任务配置弹窗
|
||
function openReviewModal() {
|
||
const modal = document.getElementById('reviewModal');
|
||
modal.classList.remove('modal-hidden');
|
||
console.log('评价商品任务配置弹窗已打开');
|
||
}
|
||
|
||
// 关闭评价商品任务配置弹窗
|
||
function closeReviewModal() {
|
||
const modal = document.getElementById('reviewModal');
|
||
modal.classList.add('modal-hidden');
|
||
console.log('评价商品任务配置弹窗已关闭');
|
||
}
|
||
|
||
// 确认评价商品任务配置
|
||
function confirmReviewSettings() {
|
||
const reviewPoints = document.getElementById('reviewPoints').value;
|
||
const maxReviewPoints = document.getElementById('maxReviewPoints').value;
|
||
const settings = {
|
||
reviewPoints: reviewPoints,
|
||
maxReviewPoints: maxReviewPoints
|
||
};
|
||
console.log('评价商品任务配置:', settings);
|
||
alert('评价商品任务配置已保存(演示)');
|
||
closeReviewModal();
|
||
}
|
||
|
||
// 点击遮罩关闭每日积分设置弹窗
|
||
document.getElementById('signinModal').addEventListener('click', function(e) {
|
||
if (e.target === this) {
|
||
closeModal();
|
||
}
|
||
});
|
||
|
||
// 点击遮罩关闭浏览商品积分配置弹窗
|
||
document.getElementById('browseModal').addEventListener('click', function(e) {
|
||
if (e.target === this) {
|
||
closeBrowseModal();
|
||
}
|
||
});
|
||
|
||
// 点击遮罩关闭购买商品任务配置弹窗
|
||
document.getElementById('purchaseModal').addEventListener('click', function(e) {
|
||
if (e.target === this) {
|
||
closePurchaseModal();
|
||
}
|
||
});
|
||
|
||
// 点击遮罩关闭分享商品任务配置弹窗
|
||
document.getElementById('shareModal').addEventListener('click', function(e) {
|
||
if (e.target === this) {
|
||
closeShareModal();
|
||
}
|
||
});
|
||
|
||
// 点击遮罩关闭评价商品任务配置弹窗
|
||
document.getElementById('reviewModal').addEventListener('click', function(e) {
|
||
if (e.target === this) {
|
||
closeReviewModal();
|
||
}
|
||
});
|
||
|
||
// 阻止弹窗内容区域的点击事件冒泡
|
||
document.querySelectorAll('.modal-container').forEach(container => {
|
||
container.addEventListener('click', function(e) {
|
||
e.stopPropagation();
|
||
});
|
||
});
|
||
</script>
|
||
</body>
|
||
</html> |