init: import production code mss.nahaichuan.com (exclude Runtime/Uploads/backups/logs)

这个提交包含在:
Developer
2026-10-30 10:18:50 +08:00
当前提交 1f3e0ce2f6
共有 9291 个文件被更改,包括 1776674 次插入 和 0 次删除

查看文件

@@ -0,0 +1,144 @@
<!doctype html>
<html>
<!--[1.1.96]-->
<head>
<meta charset="UTF-8">
<meta name="viewport"
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>新增通知</title>
<style>
.box{
border: 1px solid #bbb;
border-radius: 5px;
background-color: white;
padding-bottom: 20px;
}
.list{
display: flex;
flex-direction: row;
align-items: flex-start;
margin: 10px 0;
}
.title{
background-color: #f5f5f5;
color: black;
font-size: 18px;
border-bottom: 1px solid #e6e6e6;
line-height: 60px;
border-radius: 5px 5px 0 0;
text-indent: 15px;
}
.left_name{
width: 100px;
text-align: right;
font-size: 14px;
line-height: 56px;
color: #666;
margin-right: 20px;
}
.list>input{
margin: 10px 0;
width: 300px;
border: 1px solid #ccc;
padding: 10px;
border-radius: 5px;
outline: none;
}
.list>select{
width: 322px;
margin: 10px 0;
padding: 10px;
border: 1px solid #ccc;
border-radius: 5px;
outline: none;
font-size: 14px;
color: #333;
}
.list>textarea{
resize: none;
width: 300px;
height: 100px;
padding: 10px;
border: 1px solid #ccc;
border-radius: 5px;
outline: none;
font-size: 14px;
color: #333;
}
.save{
font-size: 16px;
width: 50px;
background-color: #009688;
color: white;
text-align: center;
padding: 8px 10px;
border-radius: 5px;
margin: 50px 200px;
cursor: pointer;
}
.save:hover{
background-color: #099688;
}
</style>
</head>
<body style="padding: 50px">
<form id="form">
<!-- <div class="box">-->
<!-- <div class="title">新增通知</div>-->
<div class="list">
<div class="left_name">通知内容:</div>
<input type="text" id="content" name="content" placeholder="通知内容">
</div>
<div class="list">
<div class="left_name">通知类型:</div>
<select name="notice_type" id="notice_type">
<option value="0">其他类型</option>
<volist name="plugList" id="vo">
<option value="{$vo['id']}">{$vo['plug_name']}</option>
</volist>
</select>
</div>
<div class="list notice_url">
<div class="left_name">通知链接:</div>
<input type="text" id="url" name="url" placeholder="选择填写">
</div>
<div class="save">创建</div>
<!-- </div>-->
</form>
</body>
<script src="__PUBLIC__/jquery/js/jquery-3.2.1.min.js"></script>
<script src="__PUBLIC__/js/tips.js"></script>
<script>
$('#notice_type').on('change',function () {
if($('#notice_type>option:selected').val()==0){
$('.notice_url').show();
}else {
$('.notice_url').hide();
}
})
$('.save').click(function () {
if(!$('#content').val().trim()){
showTips('请输入通知内容');
return;
}
$.ajax({
url: "{:U('doAddNotice')}",
type: "POST",
data: $('#form').serialize(),
success: function (res) {
if(res.status==1){
showTips(res.msg,function () {
var index = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
parent.layer.close(index); //再执行关闭
//top.layer.closeAll();
})
}else {
showTips(res.msg);
}
}
})
})
</script>
</html>

查看文件

@@ -0,0 +1,177 @@
<!--[1.8.91]-->
<link rel="stylesheet" type="text/css" href="__PUBLIC__/Retail/css/goodsList.css"/>
<link rel="stylesheet" type="text/css" href="__PUBLIC__/Retail/css/myscroll.css"/>
<style>
* {
margin: 0;
padding: 0;
}
table {
border: 1px solid #f1f1f1;
margin-top: 40px;
}
.layui-table-cell {
height: auto;
}
#exchange {
margin: 0 0 0 20px;
}
</style>
<div class="goodsBox">
<div class="goods_title">
<div class="goods_title_inner">
会员卡通知
</div>
</div>
<div class="goods_edit">
<form action="#" class="form-inline PromotionForm">
<if condition="$authArr['add_notice'] eq true">
<button type="button" class="layui-btn" id="add">新增通知</button>
</if>
</form>
</div>
<script type="text/html" id="switchTpl">
<input type="checkbox"
<if condition="$authArr['doChangeNotice'] neq true"> disabled
</if> name="status" date-value="{{d.status}}" data-id="{{d.id}}" value="{{d.status}}"
lay-skin="switch" lay-text="启用|禁用" lay-filter="sexDemo" {{ d.status== 1 ? 'checked' : '' }}>
</script>
<div class="goods_edit">
<table class="layui-hide" id="test" lay-filter="demo"></table>
<script type="text/html" id="barDemo">
<if condition="$authArr['edit_notice'] eq true">
<button class="layui-btn layui-btn-xs" lay-event="edit">编辑</button>
</if>
<if condition="$authArr['del_notice'] eq true">
<button class="layui-btn layui-btn-xs layui-btn-danger" lay-event="del">删除</button>
</if>
</script>
</div>
</div>
<script>
layui.use(['form', 'layedit', 'laydate', 'table'], function () {
// 日期
var laydate = layui.laydate, form = layui.form;
var table = layui.table;
//展示已知数据
table.render({
elem: '#test',
url: "{:U('notice_getNotice')}",
method: 'post',
cols: [
[{
field: 'index',
title: '序号',
width: 60
}, {
field: 'content',
title: '标题',
align: 'center'
}, {
field: 'url',
title: '浏览路径',
align: 'center'
}, {
field: 'addtime',
title: '添加时间',
align: 'center'
}, {
field: 'status',
title: '状态',
templet: '#switchTpl',
align: 'center'
}, {
field: 'right',
title: '操作',
align: 'center',
toolbar: '#barDemo'
}]
],
page: {
layout: ['count', 'prev', 'page', 'next', 'skip'] //自定义分页布局
}, //是否开启分页
});
$('#Preservation').click(function () {
table.reload('test', {
page: {
curr: 1 //重新从第 1 页开始
}
, where: {
keyword: $('#keyword').val()
}
});
})
form.on('switch(sexDemo)', function (obj) {
var status = this.value;
var id = $(obj.elem).attr('data-id');
console.log(status);
console.log(id);
$.post("{:U('doChangeNotice')}", {
status: status,
id: id
}, function (res) {
console.log(res);
$(obj.elem).val(res.value);
if (res.value == 1) {
top.layer.msg(res.msg, {time: 1000});
$(obj.elem).parent().find('div').addClass('layui-form-onswitch');
$(obj.elem).parent().find('em').html('启用');
} else {
top.layer.msg(res.msg, {time: 1500});
$(obj.elem).parent().find('div').removeClass('layui-form-onswitch');
$(obj.elem).parent().find('em').html('禁用');
}
})
});
table.on('tool(demo)', function (obj) {
var data = obj.data;
var layEvent = obj.event;
var tr = obj.tr;
if (layEvent === 'del') { //删除
layer.confirm('确定删除这个通知吗?', function (index) {
layer.close(index);
$.post("{:U('del_notice')}", {
id: data.id
}, function (res) {
if (res.status == 1) {
obj.del();
} else {
top.layer.msg(res.msg, {time: 1000})
}
})
});
} else if (layEvent === 'edit') { //编辑
top.layer.open({
type: 2,
content: "{:U('edit_notice')}?id=" + data.id,
title: "编辑通知",
area: ["600px", '450px'],
btnAlign: 'c',
end: function () {
table.reload('test')
}
})
}
});
$('#add').click(function () {
console.log(111);
top.layer.open({
type: 2,
content: "{:U('add_notice')}",
title: "新增通知",
area: ["600px", '450px'],
btnAlign: 'c',
end: function () {
table.reload('test')
}
})
});
})
</script>

查看文件

@@ -0,0 +1,141 @@
<!doctype html>
<html>
<!--[1.1.96]-->
<head>
<meta charset="UTF-8">
<meta name="viewport"
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>新增通知</title>
<style>
.box{
border: 1px solid #bbb;
border-radius: 5px;
background-color: white;
padding-bottom: 20px;
}
.list{
display: flex;
flex-direction: row;
align-items: flex-start;
margin: 10px 0;
}
.title{
background-color: #f5f5f5;
color: black;
font-size: 18px;
border-bottom: 1px solid #e6e6e6;
line-height: 60px;
border-radius: 5px 5px 0 0;
text-indent: 15px;
}
.left_name{
width: 100px;
text-align: right;
font-size: 14px;
line-height: 56px;
color: #666;
margin-right: 20px;
}
.list>input{
margin: 10px 0;
width: 300px;
border: 1px solid #ccc;
padding: 10px;
border-radius: 5px;
outline: none;
}
.list>select{
width: 322px;
margin: 10px 0;
padding: 10px;
border: 1px solid #ccc;
border-radius: 5px;
outline: none;
font-size: 14px;
color: #333;
}
.list>textarea{
resize: none;
width: 300px;
height: 100px;
padding: 10px;
border: 1px solid #ccc;
border-radius: 5px;
outline: none;
font-size: 14px;
color: #333;
}
.save{
font-size: 16px;
width: 50px;
background-color: #009688;
color: white;
text-align: center;
padding: 8px 10px;
border-radius: 5px;
margin: 50px 200px;
cursor: pointer;
}
.save:hover{
background-color: #099688;
}
</style>
</head>
<body style="padding: 50px">
<form id="form">
<input type="hidden" name="id" value="{$notice['id']}">
<div class="list">
<div class="left_name">通知内容:</div>
<input type="text" id="content" name="content" value="{$notice['content']}" placeholder="通知内容">
</div>
<div class="list">
<div class="left_name">通知类型:</div>
<select name="notice_type" id="notice_type">
<option value="0">其他类型</option>
<volist name="plugList" id="vo">
<option value="{$vo['id']}" <if condition="$notice['plug_id'] eq $vo['id']">selected</if>>{$vo['plug_name']}</option>
</volist>
</select>
</div>
<div class="list notice_url">
<div class="left_name">通知链接:</div>
<input type="text" id="url" name="url" value="{$notice['url']}" placeholder="选择填写">
</div>
<div class="save">提交</div>
</form>
</body>
<script src="__PUBLIC__/jquery/js/jquery-3.2.1.min.js"></script>
<script src="__PUBLIC__/js/tips.js"></script>
<script>
$('#notice_type').on('change',function () {
if($('#notice_type>option:selected').val()==0){
$('.notice_url').show();
}else {
$('.notice_url').hide();
}
})
$('.save').click(function () {
if(!$('#content').val().trim()){
showTips('请输入通知内容');
return;
}
$.ajax({
url: "{:U('editNotice')}",
type: "POST",
data: $('#form').serialize(),
success: function (res) {
if(res.status==1){
showTips(res.msg,function () {
var index = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
parent.layer.close(index); //再执行关闭
})
}else {
showTips(res.msg);
}
}
})
})
</script>
</html>

查看文件

@@ -0,0 +1,145 @@
<!--[1.1.96]-->
<link rel="stylesheet" href="__PUBLIC__/css/css-comment.css">
<link rel="stylesheet" type="text/css" href="__PUBLIC__/layui/css/layui.css"/>
<style>
.template {
border: 1px solid #f1f1f1;
box-sizing: border-box;
margin: 30px;
}
.templateTitle {
background: #F5F5F5;
height: 40px;
line-height: 40px;
box-sizing: border-box;
padding-left: 10px;
}
.templateWrap {
display: flex;
box-sizing: border-box;
padding: 10px;
margin-bottom: 20px;
}
.template-item {
margin: 0 30px;
text-align: center;
position: relative;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
}
.label_radio {
height: 18px;
align-items: center;
font-size: 14px;
position: relative;
cursor: pointer;
line-height: 19px;
color: #313131;
}
.label_radio > input {
width: 16px;
height: 16px;
opacity: 0;
margin-right: 4px;
}
.label_radio > span {
width: 20px;
height: 20px;
border-radius: 50%;
border: 2px solid #ccc;
position: absolute;
top: 0;
left: 0;
cursor: pointer;
box-sizing: border-box;
}
.label_radio > input:checked + span:after {
background-color: #009688 !important;
}
.label_radio > input:checked + span {
border-color: #009688 !important;
}
.label_radio > span::after {
position: absolute;
content: "";
width: 8px;
height: 8px;
border-radius: 50%;
background-color: #ddd;
top: 4px;
left: 4px;
transition: .5s;
}
.save {
width: 100px;
height: 36px;
color: white;
background-color: #009688;
margin: 20px auto;
text-align: center;
line-height: 36px;
font-size: 16px;
cursor: pointer;
}
.save:hover {
background-color: #409688;
}
</style>
<div id="app">
<div class="template">
<p class="templateTitle">模板选择</p>
<div class="templateWrap">
<div class="template-item">
<img class="templateInput" src="__PUBLIC__/images/tempalte1.png">
<label class="label_radio" for="model1">
<input id='model1' type="radio" name="status" <if condition="$status eq 1">checked</if> value="1">模板一(默认)
<span></span>
</label>
</div>
<div class="template-item">
<img class="templateInput" src="__PUBLIC__/images/tempalte3.png">
<label class="label_radio" for="model2">
<input id='model2' type="radio" name="status" <if condition="$status eq 2">checked</if> value="2">模板二
<span></span>
</label>
</div>
<div class="template-item">
<img class="templateInput" style="width: 158px;margin-bottom: 7px;" src="__PUBLIC__/images/tempalte2.png">
<label class="label_radio" for="model3">
<input id='model3' type="radio" name="status" <if condition="$status eq 3">checked</if> value="3">模板三
<span></span>
</label>
</div>
</div>
</div>
<if condition="$authArr['setVipModel'] eq true">
<div class="save">保存</div>
</if>
</div>
<script>
layui.use(['layer'], function () {
$('.save').click(function () {
if(!$("input[name='status']:checked").val()){
layer.msg('请选择模板',{time:1000});
return;
}
$.post("{:U('setVipModel')}",{
status:$("input[name='status']:checked").val()
},function (res) {
layer.msg(res.msg,{time:1000});
})
})
})
</script>