You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
164 lines
7.9 KiB
164 lines
7.9 KiB
<?php /*a:2:{s:59:"E:\waibao\ahbcqz\server\app\admin\view\footprint\index.html";i:1679478874;s:51:"E:\waibao\ahbcqz\server\app\admin\view\layout1.html";i:1679478874;}*/ ?>
|
|
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<title><?php echo url(); ?></title>
|
|
<meta name="renderer" content="webkit">
|
|
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
|
|
<link rel="stylesheet" href="/static/lib/layui/css/layui.css?v=<?php echo htmlentities($front_version); ?>">
|
|
<link rel="stylesheet" href="/static/admin/css/app.css?v=<?php echo htmlentities($front_version); ?>">
|
|
<link rel="stylesheet" href="/static/admin/css/like.css?v=<?php echo htmlentities($front_version); ?>">
|
|
<script src="/static/lib/layui/layui.js?v=<?php echo htmlentities($front_version); ?>"></script>
|
|
<script src="/static/admin/js/app.js"></script>
|
|
</head>
|
|
|
|
<body>
|
|
<?php echo $js_code; ?>
|
|
<script src="/static/admin/js/jquery.min.js"></script>
|
|
<script src="/static/admin/js/function.js"></script>
|
|
|
|
|
|
<style>
|
|
.bubble { display: flex;justify-content: start;flex-wrap: wrap; }
|
|
.bubble .layui-card { background:#eee; width:19%; min-width:155px; height:100px; margin-right:10px; }
|
|
.bubble-content { padding-top: 10px; font-size: 14px; display: flex; justify-content: space-between;}
|
|
</style>
|
|
|
|
<div class="wrapper">
|
|
<div class="layui-card">
|
|
<!-- 操作提示 -->
|
|
<div class="layui-card-body">
|
|
<div class="layui-collapse" style="border:1px dashed #c4c4c4">
|
|
<div class="layui-colla-item">
|
|
<h2 class="layui-colla-title like-layui-colla-title">操作提示</h2>
|
|
<div class="layui-colla-content layui-show">
|
|
<p>*设置商城首页,商品详情页显示足迹气泡。营造活动氛围,增强气氛。</p>
|
|
<p>*注意:需在设置中开启,并且把对应的场景也开启才可以使用。</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- 选项卡 -->
|
|
<div class="layui-tab layui-tab-card">
|
|
<ul class="layui-tab-title">
|
|
<li data-type="1" class="layui-this">足迹气泡</li>
|
|
<li data-type="2">设置</li>
|
|
</ul>
|
|
<div class="layui-tab-content">
|
|
<!-- 足迹气泡 -->
|
|
<div class="layui-tab-item layui-show" style="padding: 0 15px;">
|
|
<div class="bubble">
|
|
<?php if(is_array($footprint) || $footprint instanceof \think\Collection || $footprint instanceof \think\Paginator): $i = 0; $__LIST__ = $footprint;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;?>
|
|
<div class="layui-card">
|
|
<div class="layui-card-header"><?php echo htmlentities($vo['name']); ?></div>
|
|
<div class="layui-card-body">
|
|
<div class="bubble-content">
|
|
<button type="button" data-id="1"
|
|
class="layui-btn layui-btn-normal layui-btn-sm edit-bubble">
|
|
编辑
|
|
</button>
|
|
<span>已开启</span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<?php endforeach; endif; else: echo "" ;endif; ?>
|
|
</div>
|
|
</div>
|
|
<!-- 设置模块 -->
|
|
<div class="layui-tab-item">
|
|
<form class="layui-form">
|
|
<div class="layui-form-item">
|
|
<label for="duration" class="layui-form-label" style="width:110px;">足迹气泡时长:</label>
|
|
<div class="layui-input-inline" style="width:220px;">
|
|
<input type="number" id="duration" name="duration" value="<?php echo htmlentities($config['footprint_duration']); ?>" autocomplete="off" class="layui-input">
|
|
<p style="color:#ccc;font-size: 13px;">查询多长时间范围内的足迹信息</p>
|
|
</div>
|
|
<div class="layui-input-inline" style="line-height: 38px;">分钟</div>
|
|
</div>
|
|
<div class="layui-form-item">
|
|
<label class="layui-form-label" style="width:110px;">足迹气泡状态:</label>
|
|
<div class="layui-input-inline" style="width:220px;">
|
|
<input type="radio" name="status" value="1" title="开启" <?php if($config['footprint_status']==1): ?>checked<?php endif; ?>>
|
|
<input type="radio" name="status" value="0" title="关闭" <?php if($config['footprint_status']==0): ?>checked<?php endif; ?>>
|
|
<p style="color:#ccc;font-size: 13px;">开启还是关闭足迹气泡</p>
|
|
</div>
|
|
</div>
|
|
<div class="layui-form-item ">
|
|
<div class="layui-input-block">
|
|
<a class="layui-btn layui-btn-normal" lay-submit lay-filter="update-set-submit">确定</a>
|
|
</div>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<script>
|
|
layui.use(["form"], function () {
|
|
var form = layui.form;
|
|
|
|
/**
|
|
* 编辑足迹气泡
|
|
*/
|
|
$(document).on('click', '.edit-bubble', function () {
|
|
var that = $(this);
|
|
var id = $(this).attr('data-id');
|
|
layer.open({
|
|
type: 2
|
|
,title: "编辑足迹气泡"
|
|
,content: "<?php echo url('Footprint/edit'); ?>?id="+id
|
|
,area: ["400px", "340px"]
|
|
,btn: ["确定", "取消"]
|
|
,yes: function(index, layero){
|
|
var iframeWindow = window["layui-layer-iframe" + index];
|
|
var submit = layero.find("iframe").contents().find("#addSubmit");
|
|
iframeWindow.layui.form.on("submit(addSubmit)", function(data){
|
|
data.field["id"] = id;
|
|
like.ajax({
|
|
url: "<?php echo url('Footprint/edit'); ?>",
|
|
data: data.field,
|
|
type: "POST",
|
|
success:function(res) {
|
|
if(res.code === 1) {
|
|
layui.layer.msg(res.msg);
|
|
layer.close(index);
|
|
|
|
|
|
var status = data.field['status'] === '0' ? '关闭' : '已开启';
|
|
that.next().html(status)
|
|
}
|
|
}
|
|
});
|
|
});
|
|
submit.trigger("click");
|
|
}
|
|
});
|
|
});
|
|
|
|
/**
|
|
* 更新设置
|
|
*/
|
|
form.on('submit(update-set-submit)', function(data){
|
|
like.ajax({
|
|
url:'<?php echo url("footprint/set"); ?>',
|
|
data:data.field,
|
|
type:"post",
|
|
success:function(res) {
|
|
if(res.code === 1) {
|
|
layui.layer.msg(res.msg, {offset:'15px', icon:1, time: 1000});
|
|
} else {
|
|
layui.layer.msg(res.msg, {offset:'15px', icon:2, time: 1000});
|
|
}
|
|
}
|
|
});
|
|
return false;
|
|
});
|
|
})
|
|
</script>
|
|
</body>
|
|
</html>
|