373 行
13 KiB
HTML
可执行文件
373 行
13 KiB
HTML
可执行文件
<!DOCTYPE html>
|
||
<html>
|
||
<!--[1.1.84]-->
|
||
<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__/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;
|
||
}
|
||
|
||
.file {
|
||
height: 30px;
|
||
line-height: 30px;
|
||
border: 1px solid #ccc;
|
||
outline: 0;
|
||
width: 250px;
|
||
}
|
||
|
||
.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;
|
||
}
|
||
.baiduyun{
|
||
display: none;
|
||
}
|
||
.iosurl{
|
||
display: none;
|
||
}
|
||
.file-caption-name{
|
||
line-height: 12px;
|
||
}
|
||
/*.file-input{*/
|
||
/*overflow: visible!important;*/
|
||
/*}*/
|
||
.hminx{
|
||
line-height: 42px;
|
||
height: 42px;
|
||
font-size: 16px;
|
||
width: 100%;
|
||
background: #f9f9f9;
|
||
padding: 0 30px;
|
||
margin: 0px;
|
||
margin-bottom: 25px;
|
||
}
|
||
.file_box{
|
||
position: relative;
|
||
cursor: pointer;
|
||
display: flex;
|
||
align-items: center;
|
||
}
|
||
.file_btn{
|
||
padding: 8px 15px;
|
||
font-size: 12px;
|
||
color: #666;
|
||
line-height: 12px;
|
||
border: 1px solid #ddd;
|
||
border-radius: 5px;
|
||
transition: 0.3s;
|
||
font-weight: normal!important;
|
||
white-space: nowrap;
|
||
}
|
||
.file_img{
|
||
max-height: 70px;
|
||
margin-right: 10px;
|
||
}
|
||
.file_btn:active{
|
||
background-color: rgb(64, 158, 255);
|
||
color: white;
|
||
}
|
||
.file_box input{
|
||
width: 10px;
|
||
height: 10px;
|
||
opacity: 0;
|
||
position: absolute;
|
||
top: 0;
|
||
left: 0;
|
||
}
|
||
.file_name{
|
||
font-size: 12px;
|
||
color: #666;
|
||
line-height: 12px;
|
||
padding-left: 10px;
|
||
vertical-align: top;
|
||
font-weight: normal!important;
|
||
}
|
||
</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>
|
||
<form id="addform" class="mi-form" novalidate="novalidate" enctype="multipart/form-data"
|
||
action="{:U('Super/App/addApp')}" method="post">
|
||
<div>
|
||
<span><i>*</i>名称:</span>
|
||
<input data-val="true" type="text" name="name" id="plugname">
|
||
</div>
|
||
<div>
|
||
<span><i>*</i>分类:</span>
|
||
<select class="form-control" name="classtype" id="classid">
|
||
<option value="">请选择</option>
|
||
<volist name="list" id="list">
|
||
<option value="{$list.id}">{$list.uitname}</option>
|
||
</volist>
|
||
<!--<option value="1">互生活智慧系列产品</option>-->
|
||
<!--<option value="2">收款工具</option>-->
|
||
<!--<option value="3">店铺管理工具</option>-->
|
||
</select>
|
||
</div>
|
||
<div>
|
||
<span><i>*</i>服务端:</span>
|
||
<select class="form-control" name="servertype" id="serverid">
|
||
<option value="">请选择</option>
|
||
<option value="1">windows</option>
|
||
<option value="2">小程序</option>
|
||
<option value="3">IOS-APP</option>
|
||
<option value="4">安卓</option>
|
||
</select>
|
||
</div>
|
||
<div>
|
||
<span><i>*</i>logo:</span>
|
||
<div class="img_upload_wrp group" style="margin: 3px 0 0 120px;">
|
||
<div class="file_box">
|
||
<img class="file_img">
|
||
<label>
|
||
<input type="file" id="icon" name="uploadfile_icon" class="file">
|
||
<span class="file_btn">选择图片</span>
|
||
</label>
|
||
<span class="file_name"></span>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="iosurl">
|
||
<span><i>*</i>APPStore地址:</span>
|
||
<input data-val="true" type="text" style="width: 400px;font-size: 12px;" name="iosurl" id="iosurl">
|
||
</div>
|
||
<div class="baiduyun">
|
||
<span><i>*</i>七牛云链接:</span>
|
||
<input data-val="true" type="text" style="width: 400px;" name="baiduyun" id="baiduyun">
|
||
</div>
|
||
<!--<div class="baiduyun">-->
|
||
<!--<span><i>*</i>百度云提取密码:</span>-->
|
||
<!--<input data-val="true" type="text" name="baiduyunpass" id="baiduyunpass">-->
|
||
<!--</div>-->
|
||
<div class="version">
|
||
<span><i>*</i>版本:</span>
|
||
<input data-val="true" type="text" name="version" id="version">
|
||
</div>
|
||
<div>
|
||
<span><i>*</i>版本介绍:</span>
|
||
<textarea name="version_info" cols="30" rows="8" class="textarea" id="info"></textarea>
|
||
</div>
|
||
<center class="form-actions">
|
||
<a href="javascript:history.back(-1)" class="historyback">返回</a>
|
||
<input type="button" class="submit" style="margin-top: 0;background-color: rgb(64, 158, 255)" value="保 存">
|
||
</center>
|
||
</form>
|
||
</div>
|
||
<script>
|
||
$('#serverid').on('change',function () {
|
||
if($('#serverid>option:selected').val()==1){
|
||
$('.hide1').remove();
|
||
$('.hide2').remove();
|
||
$('.iosurl').hide();
|
||
$('.baiduyun').show();
|
||
}else if($('#serverid>option:selected').val()==2){
|
||
create1();
|
||
}else if($('#serverid>option:selected').val()==3){
|
||
$('.hide1').remove();
|
||
$('.hide2').remove();
|
||
$('.baiduyun').hide();
|
||
$('.iosurl').show();
|
||
}else if($('#serverid>option:selected').val()==4) {
|
||
create2();
|
||
}else if(!$('#serverid>option:selected').val()) {
|
||
$('.hide1').remove();
|
||
$('.hide2').remove();
|
||
$('.baiduyun').hide();
|
||
$('.iosurl').hide();
|
||
}
|
||
})
|
||
function create1() {
|
||
$('.hide2').remove();
|
||
$('.baiduyun').hide();
|
||
$('.iosurl').hide();
|
||
let elm = $(`<div class="hide1">
|
||
<span><i>*</i>小程序预览码:</span>
|
||
<div class="img_upload_wrp group" style="max-width: 250px;margin: 3px 0 0 120px;">
|
||
<div class="file_box">
|
||
<img class="file_img">
|
||
<label>
|
||
<input type="file" id="yicon" name="uploadfile_yicon" class="file" value="">
|
||
<span class="file_btn">选择图片</span>
|
||
</label>
|
||
<span class="file_name"></span>
|
||
</div>
|
||
</div>
|
||
</div>`);
|
||
$('.version').before(elm);
|
||
}
|
||
function create2() {
|
||
$('.hide1').remove();
|
||
$('.baiduyun').hide();
|
||
$('.iosurl').hide();
|
||
let elm = $(`<div class="hide2">
|
||
<span><i>*</i>APP安装包:</span>
|
||
<div class="img_upload_wrp group" style="max-width: 250px;margin: 3px 0 0 140px;">
|
||
<input type="file" id="downurl" name="uploadfile_download" class="file">
|
||
</div>
|
||
</div>`);
|
||
$('.version').before(elm);
|
||
}
|
||
|
||
$('.submit').click(function () {
|
||
if(!$('#plugname').val() || !$('#plugname').val().trim()){
|
||
top.layer.msg('请输入名称');
|
||
return false;
|
||
}
|
||
if(!$('#classid>option:selected').val()){
|
||
top.layer.msg('请选择类型');
|
||
return false;
|
||
}
|
||
if(!$('#serverid>option:selected').val()){
|
||
top.layer.msg('请选择服务端');
|
||
return false;
|
||
}
|
||
if(!$('#icon').val()){
|
||
top.layer.msg('请上传图标');
|
||
return false;
|
||
}
|
||
if($('#serverid>option:selected').val()==1){
|
||
if(!$('#baiduyun').val()){
|
||
top.layer.msg('请填写七牛云链接');
|
||
return false;
|
||
}
|
||
// if(!$('#baiduyunpass').val()){
|
||
// top.layer.msg('请填写百度云提取密码');
|
||
// return false;
|
||
// }
|
||
}else if($('#serverid>option:selected').val()==2){
|
||
if(!$('#yicon').val()){
|
||
top.layer.msg('请上传小程序预览码');
|
||
return false;
|
||
}
|
||
}else if($('#serverid>option:selected').val()==3) {
|
||
if(!$('#iosurl').val()){
|
||
top.layer.msg('请填写APPStore下载地址');
|
||
return false;
|
||
}
|
||
}else if($('#serverid>option:selected').val()==4) {
|
||
if(!$('#downurl').val()){
|
||
top.layer.msg('请选择APP安装包');
|
||
return false;
|
||
}
|
||
}else {
|
||
top.layer.msg('请选择服务端');
|
||
return false;
|
||
}
|
||
if(!$('#version').val() || !$('#version').val().trim()){
|
||
top.layer.msg('请输入版本');
|
||
return false;
|
||
}
|
||
if(!$('#info').val() || !$('#info').val().trim()){
|
||
top.layer.msg('请输入更新简介');
|
||
return false;
|
||
}
|
||
// layui.use('layer', function(){
|
||
// let layer = layui.layer;
|
||
// layer.load(1,{
|
||
// shade:[0.3,'#000000']
|
||
// })
|
||
// });
|
||
$('.mi-form').submit();
|
||
});
|
||
$(".box-content2").on('change',"input[type='file']",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).parent().prev('.file_img').attr('src', this.result);
|
||
$(that).parent().next('.file_name').html(imgObj.name);
|
||
}
|
||
}
|
||
}
|
||
})
|
||
</script>
|
||
</body>
|
||
</html>
|