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,189 @@
<!DOCTYPE html>
<html>
<!--[1.6.48]-->
<head>
<meta charset="utf-8" />
<title>码上有酒</title>
<link href="/Public/logo.ico" type="image/x-icon" rel="shortcut icon">
<link rel="stylesheet" type="text/css" href="__PUBLIC__/paper/css/index.css"/>
<link rel="stylesheet" type="text/css" href="__PUBLIC__/vue/element-ui.css">
<link rel="stylesheet" href="__PUBLIC__/css/system-gallery.css?v=1.0.3">
<script src="__PUBLIC__/jquery/js/jquery-3.2.1.min.js"></script>
<script type="text/javascript" charset="utf-8" src="__PUBLIC__/vue/js/vue2.5.16.js"></script>
<script type="text/javascript" charset="utf-8" src="__PUBLIC__/vue/element-ui.js"></script>
<script charset="utf-8" src="__PUBLIC__/js/system-gallery.js?v=1.0.3"></script>
<style>
body,html{
width:100%;
height: 100%;
overflow-x: hidden;
}
.container{
width:80%;
padding: 20px;
margin: 0 auto;
box-sizing: border-box;
}
.tips{
font-size: 12px;
color: #666;
}
</style>
</head>
<body>
<div class="container" id="app" v-cloak>
<div class='content'>
<el-form label-width="100px" id="form">
<input type="hidden" name="id" value="{$id}">
<el-form-item label="标题" required>
<el-input type="text" name="title" v-model="ruleForm.title" auto-complete="off"
placeholder="请输入标题"></el-input>
</el-form-item>
<el-form-item label="描述" required>
<el-input type="text" name="describe" v-model="ruleForm.describe" auto-complete="off"
placeholder="请输入描述"></el-input>
</el-form-item>
<el-form-item label="赠送积分" required>
<el-input type="number" name="integral" v-model="ruleForm.integral" auto-complete="off"
placeholder="请输入分享并注册成功后赠送的积分"></el-input>
</el-form-item>
<el-form-item label="等级图片" required>
<div style="display: flex;align-items: flex-start">
<label class="file_label" style="margin-right: 10px;display: block">
<input type="hidden" name="image_id" value="{$info['image_id']}"/>
<input type="file" name="image" placeholder="选择图片" accept="image/png,image/jpeg" d-value="$info['image']"/>
<img style="max-width: 200px" src="{$info['image']}" onerror="this.error=null;this.src='__PUBLIC__/paper/images/wx_add.png'">
</label>
<el-button plain size="small" @click="selectImage('image')"
>图库图片<el-tooltip class="item" effect="dark" content="点击图片选择本地图片,点击按钮选择图库图片" placement="top-start">
<i class="el-icon-question"></i>
</el-tooltip>
</el-button>
</div>
<p class="tips">建议尺寸113 * 109</p>
</el-form-item>
</el-form>
<div class="center" style="margin-top: 50px">
<el-button type="primary" size="medium" @click="save">保存</el-button>
</div>
<el-dialog title="选择图片" :modal-append-to-body="false" :visible.sync="showSelectImage" custom-class="select-image-el-dialog" :top="'10px'">
<template-select-image :can-select-num="1" @selectfile="selectFile"></template-select-image>
</el-dialog>
</div>
</div>
</body>
<script>
var app = new Vue({
el: '#app',
data: function () {
return {
showSelectImage: false,
actFileName: '',
ruleForm: {
title: "{$info['title']}",
describe: "{$info['describe']}",
integral: "{$info['integral']}"
},
}
},
methods: {
selectFile: function (item) {
this.showSelectImage = false;
if (item.length) {
$("input[name='" + this.actFileName + "']").val('');
$("input[name='" + this.actFileName + "_id']").val(item[0].id);
$("input[name='" + this.actFileName + "']").next('img').attr('src', item[0].path);
}
},
selectImage: function (actName) {
this.actFileName = actName;
this.showSelectImage = true;
},
save: function () {
var image_id = $("input[name='image_id']").val();
var image = $("input[name='image']").val() || $("input[name='image']").attr('d-value');
if (!image_id && !image) {
this.$message({
type: 'warning',
message: '请完善图片设置',
duration: 1000
});
return false;
}
if (!this.ruleForm.title || !this.ruleForm.describe || !this.ruleForm.integral) {
this.$message({
type: 'warning',
message: '请完善信息',
duration: 1000
});
return false;
}
var that = this;
that.$loading({
lock: true,
text: '数据获取中,请等待',
spinner: 'el-icon-loading',
background: 'rgba(255, 255, 255, 0.7)'
});
var fd = new FormData(document.getElementById('form'));
$.ajax({
url: "{:U('adds')}",
type: "POST",
data: fd,
processData: false, // jQuery不要去处理发送的数据
contentType: false, // jQuery不要去设置Content-Type请求头
success: function (res) {
if (res.status == 1) {
that.$message({
type: 'success',
message: res.msg,
duration: 1000,
onClose: function () {
that.$loading().close();
var index = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
parent.layer.close(index); //再执行关闭
}
});
} else {
that.$message({
type: 'error',
message: res.msg,
duration: 1000
});
}
},
error:function () {
that.$loading().close();
}
})
}
},
mounted: function () {
$("input[type='file']").on('change', function () {
if (this.files.length) {
var that = this;
var imgObj = this.files[0];
var imgType = ['image/jpeg', 'image/jpg', 'image/png'];
if (jQuery.inArray(imgObj.type, imgType) != -1) {
//是图片
var reader = new FileReader();
reader.readAsDataURL(imgObj);
reader.onload = function () {
$(that).next('img').attr('src', this.result);
}
}else{
$("input[name='image']").val('')
}
}
})
},
created: function () {
}
});
</script>
</html>

查看文件

@@ -0,0 +1,144 @@
<!--[1.5.22]-->
<style>
table {
border: 1px solid #f1f1f1;
margin-top: 40px;
}
.layui-table-cell {
height: 45px;
line-height: 45px;
padding: 0 15px;
position: relative;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
box-sizing: border-box;
}
</style>
<div class="goodsBox">
<div style="margin:10px;">1.会员卡分享设置只能保留一条规则,支持修改和删除后添加</div>
<if condition="$state eq 2">
<div class="goods_edit">
<if condition="$authArr['addshare'] eq true">
<button type="button" class="layui-btn" id="add">添加</button>
</if>
</div>
</if>
<table class="layui-hide" id="test" lay-filter="demo"></table>
</div>
<script type="text/html" id="barDemo">
<if condition="$authArr['addshare'] eq true">
<a class="layui-btn layui-btn-sm edit" lay-event="edit">编辑</a>
</if>
<if condition="$authArr['delinfo'] eq true">
<a class="layui-btn layui-btn-sm edit" lay-event="delete">删除</a>
</if>
</script>
<script>
layui.use(['form', 'layedit', 'laydate', 'table'], function () {
// 日期
var laydate = layui.laydate;
var table = layui.table;
var form = layui.form
//展示已知数据
table.render({
elem: '#test',
url: "{:U('vipshare')}",
method: 'post',
cols: [
[ //标题栏
{
field: 'id',
title: '序号',
width: 60
},
{
field: 'title',
title: '名片名称',
align: 'center',
}, {
field: 'describe',
title: '描述',
align: 'center',
}, {
field: 'image',
title: '头像',
align: 'center',
width: 160,
style: 'height:100%;',
templet: '<div><img src="{{ d.image}}" style="width: 80px;height: 100%;"></div>'
}, {
fixed: 'right',
title: '操作',
align: 'center',
toolbar: '#barDemo',
width: 300
}
]
],
page: {
layout: ['count', 'prev', 'page', 'next', 'skip'] //自定义分页布局
}, //是否开启分页
});
table.on('tool(demo)', function (obj) { //注:tool是工具条事件名,test是table原始容器的属性 lay-filter="对应的值"
var data = obj.data; //获得当前行数据
if (obj.event === 'edit') { //编辑
layer.open({
type: 2,
content: "{:U('addshare')}?id=" + data.id,
title: "编辑信息",
area: ['calc(100% - 160px)', 'calc(100% - 65px)'],
shade: 0,
offset: 'rb',
end: function () {
table.reload('test', {});
}
})
} else if (obj.event === 'delete') {
layer.confirm("确认删除?", function (index) {
var id = data.id
$.ajax({
url: "{:U('delinfo')}",
type: "post",
data: {id: id},
success: function (res) {
if (res.status == 1) {
layer.msg(res.msg, function () {
MenuApp.refreshWindow();
//window.location.reload();
})
} else {
layer.msg(res.msg, function () {
window.location.reload();
})
}
}
})
});
}
});
$('#add').click(function () {
layer.open({
type: 2,
content: "{:U('addshare')}",
title: "添加信息",
area: ['calc(100% - 160px)', 'calc(100% - 65px)'],
shade: 0,
offset: 'rb',
end: function () {
MenuApp.refreshWindow();
}
})
})
function checkPwd(pwd) {
var reg = /^[a-zA-Z0-9]{1,}$/;
if (reg.test(pwd) == false) {
return false;
}
return true;
}
})
</script>