365 行
12 KiB
HTML
可执行文件
365 行
12 KiB
HTML
可执行文件
<!DOCTYPE html>
|
||
<html>
|
||
<!--[1.1.96]-->
|
||
<head>
|
||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||
<title>服务商管理后台</title>
|
||
<link href="__PUBLIC__/user/css/base.css" rel="stylesheet">
|
||
<script src="__PUBLIC__/user/js/jquery-2.0.3.min.js"></script>
|
||
<!--上传图片-->
|
||
<link rel="stylesheet" href="__PUBLIC__/bootstrap/css/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>
|
||
<link href="__PUBLIC__/layui/css/layui.css" rel="stylesheet">
|
||
<script src="__PUBLIC__/layui/layui.js" charset="utf-8"></script>
|
||
<link href="__PUBLIC__/user/css/store.css" rel="stylesheet">
|
||
<style>
|
||
.form-control {
|
||
background-color: #fff;
|
||
height: 34px;
|
||
line-height: 30px;
|
||
width: 220px;
|
||
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);
|
||
color: #666;
|
||
font-size: 12px;
|
||
}
|
||
|
||
.box-content2 > label {
|
||
vertical-align: middle;
|
||
line-height: 35px;
|
||
}
|
||
|
||
.box-content2 div {
|
||
overflow: hidden;
|
||
}
|
||
|
||
.box-content2 input {
|
||
height: 34px;
|
||
}
|
||
|
||
.radio input {
|
||
vertical-align: middle;
|
||
}
|
||
|
||
.box-content2 .img_upload_wrp span {
|
||
width: auto;
|
||
}
|
||
|
||
.box-content2 .img_upload_wrp div {
|
||
margin: 0;
|
||
}
|
||
|
||
.box-content2 .img_upload_wrp {
|
||
display: flex;
|
||
align-items: center;
|
||
}
|
||
|
||
.form-actions input {
|
||
line-height: normal;
|
||
}
|
||
|
||
.box-content2 input[type=checkbox] {
|
||
width: 16px;
|
||
height: 16px;
|
||
margin-right: 10px;
|
||
}
|
||
|
||
.box-content2 {
|
||
padding-bottom: 20px;
|
||
}
|
||
|
||
.checkbox-box label {
|
||
height: auto;
|
||
margin-right: 10px;
|
||
line-height: 16px;
|
||
margin-bottom: 0px;
|
||
}
|
||
|
||
.myueditor div {
|
||
margin: 0;
|
||
}
|
||
|
||
.myueditor span {
|
||
width: auto;
|
||
}
|
||
|
||
.textarea {
|
||
resize: none;
|
||
line-height: 16px;
|
||
font-size: 14px;
|
||
padding: 5px;
|
||
border-color: #dddddd;
|
||
border-radius: 5px;
|
||
}
|
||
|
||
.hover {
|
||
position: relative;
|
||
display: inline-block;
|
||
width: auto;
|
||
max-width: 250px;
|
||
}
|
||
.hover>img{
|
||
height: auto;
|
||
width: auto;
|
||
max-width: 100%;
|
||
max-height: 100%;
|
||
}
|
||
|
||
.hoverbg {
|
||
width: 100%;
|
||
height: 100%;
|
||
position: absolute;
|
||
top: 0;
|
||
left: 0;
|
||
background-color: rgba(0, 0, 0, 0.3);
|
||
color: white;
|
||
font-size: 12px;
|
||
line-height: 14px;
|
||
justify-content: center;
|
||
align-items: center;
|
||
text-align: center;
|
||
cursor: pointer;
|
||
display: none;
|
||
}
|
||
|
||
.hover:hover > .hoverbg {
|
||
display: flex;
|
||
}
|
||
|
||
.update {
|
||
width: 1px;
|
||
height: 1px;
|
||
opacity: 0;
|
||
position: absolute;
|
||
top: 0;
|
||
left: 0;
|
||
}
|
||
.filebtn{
|
||
border: 1px solid #ddd;
|
||
border-radius: 13px;
|
||
background-color: white;
|
||
color: #333;
|
||
height: 26px;
|
||
font-size: 12px;
|
||
line-height: 26px !important;
|
||
padding: 0 10px;
|
||
cursor: pointer;
|
||
}
|
||
.hminx{
|
||
line-height: 42px;
|
||
height: 42px;
|
||
font-size: 16px;
|
||
width: 100%;
|
||
background: #f9f9f9;
|
||
padding: 0 30px;
|
||
margin: 0px;
|
||
margin-bottom: 25px;
|
||
}
|
||
</style>
|
||
</head>
|
||
<body class="hold-transition skin-blue sidebar-mini" style="cursor: pointer;padding-top: 30px;padding-bottom: 30px;">
|
||
<div class="box-content2" style="width: 100%;max-width: 1200px">
|
||
<h3 class="hminx">更新安装包信息</h3>
|
||
<div>
|
||
<span><i>*</i>名称:</span>
|
||
<input data-val="true" type="text" value="{$info.name}" name="name" id="plugname">
|
||
</div>
|
||
<div>
|
||
<span><i>*</i>分类:</span>
|
||
<input disabled data-val="true" type="text" value="{$unitname}" name="name" id="unitname">
|
||
</div>
|
||
<div>
|
||
<span><i>*</i>服务端:</span>
|
||
<select disabled class="form-control" name="classid" id="serverid">
|
||
<option>
|
||
<if condition="$info.type eq 1">PC端</if>
|
||
<if condition="$info.type eq 2">小程序</if>
|
||
<if condition="$info.type eq 3">APP-IOS</if>
|
||
<if condition="$info.type eq 4">安卓</if>
|
||
</option>
|
||
</select>
|
||
</div>
|
||
<div>
|
||
<span><i>*</i>logo:</span>
|
||
<div class="img_upload_wrp group" style="max-width: 250px;margin: 3px 0 0 140px;">
|
||
<div class="hover" style="overflow: visible;">
|
||
<img src="{$info.logo_url}">
|
||
<input class="update" id="logo" type="button" name="logo">
|
||
<label class="hoverbg" for="logo">点击更换<br/>更换将不能撤回<br/>请谨慎操作</label>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<if condition="$info.type eq 1">
|
||
<div>
|
||
<span><i>*</i>七牛云链接:</span>
|
||
<input data-val="true" type="text" style="width: 400px;" name="baiduyun" id="baiduyun" value="{$info.down_url}">
|
||
</div>
|
||
<!--<div>-->
|
||
<!--<span><i>*</i>百度云提取密码:</span>-->
|
||
<!--<input data-val="true" type="text" name="baiduyunpass" id="baiduyunpass" value="{$info.bd_pass}">-->
|
||
<!--</div>-->
|
||
<elseif condition="$info.type eq 2"/>
|
||
<div>
|
||
<span><i>*</i>小程序预览二维码:</span>
|
||
<div class="img_upload_wrp group" style="max-width: 250px;margin: 3px 0 0 140px;">
|
||
<div class="hover">
|
||
<img src="{$info.experience_url}">
|
||
<input class="update" id="ylogo" type="button" name="ylogo">
|
||
<label class="hoverbg" for="ylogo">点击更换<br/>更换将不能撤回<br/>请谨慎操作</label>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<elseif condition="$info.type eq 3"/>
|
||
<div class="iosurl">
|
||
<span><i>*</i>APPStore地址:</span>
|
||
<input data-val="true" type="text" style="width: 400px;font-size: 12px;" name="iosurl" id="iosurl" value="{$info.down_url}">
|
||
</div>
|
||
<else/>
|
||
<div>
|
||
<span><i>*</i>APP安装包:</span>
|
||
<div class="img_upload_wrp group" style="max-width: 250px;margin: 3px 0 0 140px;">
|
||
<input class="update" id="app" type="button" name="file_app">
|
||
<label class="filebtn" for="app">选择安装包并上传</label>
|
||
</div>
|
||
</div>
|
||
</if>
|
||
|
||
<div>
|
||
<span><i>*</i>版本:</span>
|
||
<input data-val="true" type="text" value="{$info.version}" name="version" id="version">
|
||
</div>
|
||
<div>
|
||
<span><i>*</i>版本介绍:</span>
|
||
<textarea name="version_info" cols="30" rows="8" class="textarea" id="info">{$info.information}</textarea>
|
||
</div>
|
||
<center class="form-actions">
|
||
<a href="javacript:void(0);" onclick="back()" class="historyback">返回</a>
|
||
<input type="button" class="submit" style="margin-top: 0;background-color: #009688" value="保 存">
|
||
</center>
|
||
</div>
|
||
<script>
|
||
var layer = layui.use(['layer', 'form', 'laydate', 'upload'], function () {
|
||
//文件上传
|
||
var upload = layui.upload;
|
||
//执行实例
|
||
upload.render({
|
||
elem: '#logo', //绑定元素
|
||
url: '{:U("App/uploadLogo")}', //上传接口
|
||
data: {
|
||
id: "<php>echo I('get.id');</php>"
|
||
},
|
||
before:function () {
|
||
layer.load();
|
||
},
|
||
done: function (res, index, upload) {
|
||
//上传完毕回调
|
||
layer.closeAll('loading');
|
||
if (res.status == 1) {
|
||
$('#logo').prev().attr('src', res.imgurl);
|
||
top.layer.msg(res.msg);
|
||
} else {
|
||
top.layer.msg(res.msg);
|
||
}
|
||
}
|
||
});
|
||
upload.render({
|
||
elem: '#ylogo', //绑定元素
|
||
url: '{:U("App/uploadYLogo")}', //上传接口
|
||
data: {
|
||
id: "<php>echo I('get.id');</php>"
|
||
},
|
||
before:function () {
|
||
layer.load();
|
||
},
|
||
done: function (res, index, upload) {
|
||
//上传完毕回调
|
||
layer.closeAll('loading');
|
||
if (res.status == 1) {
|
||
$('#ylogo').prev().attr('src', res.imgurl);
|
||
top.layer.msg(res.msg);
|
||
} else {
|
||
top.layer.msg(res.msg);
|
||
}
|
||
}
|
||
});
|
||
upload.render({
|
||
elem: '#app', //绑定元素
|
||
url: '{:U("App/uploadApp")}', //上传接口
|
||
exts:'apk|exe',
|
||
data: {
|
||
id: "<php>echo I('get.id');</php>"
|
||
},
|
||
before:function () {
|
||
layer.load();
|
||
},
|
||
done: function (res, index, upload) {
|
||
//上传完毕回调
|
||
layer.closeAll('loading');
|
||
top.layer.msg(res.msg);
|
||
}
|
||
});
|
||
});
|
||
function back(){
|
||
var index = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
|
||
parent.layer.close(index); //再执行关闭
|
||
}
|
||
$('.submit').click(function () {
|
||
if (!$('#plugname').val() || !$('#plugname').val().trim()) {
|
||
top.layer.msg('请输入插件名称');
|
||
return false;
|
||
}
|
||
<if condition="$info.type eq 1">
|
||
if (!$('#baiduyun').val() || !$('#baiduyun').val().trim()) {
|
||
top.layer.msg('请输入千牛云下载地址');
|
||
return false;
|
||
}
|
||
// if (!$('#baiduyunpass').val() || !$('#baiduyunpass').val().trim()) {
|
||
// top.layer.msg('请输入百度云提取密码');
|
||
// return false;
|
||
// }
|
||
<elseif condition="$info.type eq 3"/>
|
||
if (!$('#iosurl').val() || !$('#iosurl').val().trim()) {
|
||
top.layer.msg('请输入插件名称');
|
||
return false;
|
||
}
|
||
</if>
|
||
if (!$('#version').val() || !$('#version').val().trim()) {
|
||
top.layer.msg('请输入版本');
|
||
return false;
|
||
}
|
||
if (!$('#info').val() || !$('#info').val().trim()) {
|
||
top.layer.msg('请输入更新简介');
|
||
return false;
|
||
}
|
||
$.post("{:U('App/updateplug')}", {
|
||
id: "<php>echo I('get.id');</php>",
|
||
name: $('#plugname').val(),
|
||
version: $('#version').val(),
|
||
version_info: $('#info').val(),
|
||
<if condition="$info.type eq 1">
|
||
baiduyun:$('#baiduyun').val(),
|
||
baiduyunpass:$('#baiduyunpass').val(),
|
||
<elseif condition="$info.type eq 3"/>
|
||
iosurl:$('#iosurl').val()
|
||
</if>
|
||
}, function (res) {
|
||
top.layer.msg(res.msg, {time: 1500}, function () {
|
||
if (res.status == 1) {
|
||
// window.location.href = "{:U('App/applist')}";
|
||
var index = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
|
||
parent.layer.close(index); //再执行关闭
|
||
}
|
||
});
|
||
})
|
||
})
|
||
</script>
|
||
</body>
|
||
</html>
|