161 行
6.1 KiB
HTML
可执行文件
161 行
6.1 KiB
HTML
可执行文件
<!DOCTYPE html>
|
|
<html>
|
|
|
|
<head>
|
|
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
|
<title>服务商管理后台</title>
|
|
<link href="__PUBLIC__/user/css/base.css" rel="stylesheet">
|
|
<link href="__PUBLIC__/user/css/jquery.validate.unobtrusive.popstyle.css" rel="stylesheet">
|
|
<link rel="stylesheet" href="__PUBLIC__/user/css/yuangongguanli_edit/layer.css" id="layuicss-skinlayercss">
|
|
<script src="__PUBLIC__/user/js/jquery-2.0.3.min.js"></script>
|
|
<script src="__PUBLIC__/user/js/jquery.validate.js"></script>
|
|
<script src="__PUBLIC__/user/js/jquery.validate.unobtrusive.js"></script>
|
|
<script src="__PUBLIC__/user/js/jquery.form.js"></script>
|
|
<script src="__PUBLIC__/user/js/layer.js"></script>
|
|
<script src="__PUBLIC__/user/js/post.loading.js"></script>
|
|
<link href="__PUBLIC__/user/css/yuangongguanli_edit/store.css" rel="stylesheet">
|
|
<!--上传图片-->
|
|
<link rel="stylesheet" href="__THEME__/usertpl/common/bootstrap/bootstrap.min.css">
|
|
<link href="__PUBLIC__/plugin/file_upload/css/fileinput.min.css" media="all"
|
|
rel="stylesheet" type="text/css" />
|
|
<link href="__PUBLIC__/plugin/file_upload/css/default.css" media="all"
|
|
rel="stylesheet" type="text/css" />
|
|
<script src="__PUBLIC__/plugin/file_upload/js/fileinput.min.js"></script>
|
|
<script src="__PUBLIC__/plugin/file_upload/js/fileinput_locale_zh.js"></script>
|
|
<style>
|
|
.form-control{
|
|
margin-bottom: 20px;
|
|
background-color: #fff;
|
|
height: 34px;
|
|
line-height: 30px;
|
|
width: 100px;
|
|
border: 1px solid #ddd;
|
|
border-radius: 4px;
|
|
-webkit-box-shadow: 0 1px 1px rgba(0,0,0,.05);
|
|
box-shadow: 0 1px 1px rgba(0,0,0,.05);
|
|
text-indent: 1em;
|
|
color: #666;
|
|
font-size: 12px;
|
|
}
|
|
.alertimg{
|
|
float: right;
|
|
width:50px;
|
|
text-align: center;
|
|
line-height: 34px;
|
|
border-radius: 5px;
|
|
color:white;
|
|
height:34px;
|
|
background-color: #fc7f81;
|
|
}
|
|
.box-content2 .img_upload_wrp span {
|
|
width: 240px;
|
|
}
|
|
</style>
|
|
</head>
|
|
|
|
<body class="hold-transition skin-blue sidebar-mini" style="cursor: pointer;">
|
|
|
|
<div class="box-content2">
|
|
<h3>编辑关键字</h3>
|
|
<form id="addform" class="mi-form" novalidate="novalidate" >
|
|
<input type="hidden" value="{$one.id}" name="id">
|
|
<div>
|
|
<span><i>*</i>关键字:</span>
|
|
<input data-val="true" type="text" value="{$one.keyword}" name="keyword" id="addkeyword_keyword" >
|
|
</div>
|
|
<div>
|
|
<span><i>*</i>关键字描述:</span>
|
|
<input data-val="true" type="text" value="{$one.summary}" name="summary" id="addkeyword_summary" >
|
|
</div>
|
|
<div>
|
|
<span><i>*</i>回复标题:</span>
|
|
<input data-val="true" type="text" value="{$one.name}" name="name" id="addkeyword_name" >
|
|
</div>
|
|
<div style="overflow: auto" class="file_ipt_box">
|
|
<span><i>*</i>回复图片:</span>
|
|
<div class="img_upload_wrp group" style="max-width: 300px;margin-left: 150px;">
|
|
<input type="file" id="uploadfile" name="uploadfile" class="file" style="line-height: 28px">
|
|
<div class="alertimg" data-show="{$one.pic}">预览</div>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<span><i></i>超链接:</span>
|
|
<input data-val="true" type="text" value="{$one.url}" name="url" id="addkeyword_url" >
|
|
</div>
|
|
<input type="hidden" name="type" value="{$one.type}">
|
|
<center class="form-actions">
|
|
<a href="javascript:history.back(-1)" class="historyback" >返回</a>
|
|
<input type="button" class="submit" value="保 存">
|
|
</center>
|
|
</form>
|
|
</div>
|
|
<script>
|
|
$(".submit").click(function() {
|
|
if (!$("#addkeyword_keyword").val()) {
|
|
top.layer.msg('关键字',{icon:3,time:1000});
|
|
return;
|
|
}
|
|
if (!$("#addkeyword_name").val()) {
|
|
top.layer.msg('回复标题',{icon:3,time:1000});
|
|
return;
|
|
}
|
|
if (!$("#addkeyword_summary").val()) {
|
|
top.layer.msg('关键字描述',{icon:3,time:1000});
|
|
return;
|
|
}
|
|
if ($("#addkeyword_type").val()=="2") {
|
|
top.layer.msg('回复类型',{icon:3,time:1000});
|
|
return;
|
|
}
|
|
var fd = new FormData($('#addform')[0]);
|
|
$.ajax({
|
|
url: "{:U('/user/Wxconfig/editadkeyword')}",
|
|
type: 'POST',
|
|
data: fd,
|
|
async: false,
|
|
cache: false,
|
|
contentType: false,
|
|
processData: false,
|
|
success: function (data) {
|
|
if (data.status==1) {
|
|
layer.msg(data.msg,{icon:1,time: 1000}, function () {
|
|
window.location.href="{:U('/user/Wxconfig/keyword')}";
|
|
})
|
|
}
|
|
else {
|
|
layer.msg(data.msg,{icon:2});
|
|
}
|
|
}
|
|
})
|
|
});
|
|
</script>
|
|
<script>
|
|
$(function () {
|
|
$("#uploadfile").bind('change', function () {
|
|
var reader = new FileReader();
|
|
reader.readAsDataURL(this.files[0]);
|
|
reader.onload = function (e) {
|
|
var img = new Image;
|
|
$("#img").attr("src", this.result);
|
|
}
|
|
})
|
|
});
|
|
$('.alertimg').click(function (e) {
|
|
var src = $(this).attr('data-show');
|
|
top.layer.open({
|
|
type: 1,
|
|
title: '图片预览',
|
|
closeBtn: false,
|
|
offset: '220px',
|
|
area: '260px',
|
|
skin: 'white', //没有背景色
|
|
shadeClose: true,
|
|
content: `<div id="tong" style="padding: 16px 20px; ">
|
|
<img src="${src}" alt="" style="width:100%">
|
|
</div>`
|
|
});
|
|
})
|
|
</script>
|
|
</body>
|
|
</html>
|