加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
me-shop-after.html 5.17 KB
一键复制 编辑 原始数据 按行查看 历史
liushang233 提交于 2017-08-16 09:15 . 2017*/8*/16
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=0">
<meta name="apple-mobile-web-app-capable" content="yes">
<title>申请售后</title>
<link rel="stylesheet" href="./css/same-css.css">
<link rel="stylesheet" href="./css/me-shop-after-css.css">
<script src="./js/jquery-3.1.0.min.js"></script>
<script src="./js/lrz.bundle.js"></script>
</head>
<body>
<!--售后类型-->
<div class="head">售后类型<span class="light">*</span></div>
<div class="type">
<ul>
<li class="active">
<span>&nbsp;申请退款(无需退货)</span> <i class="action"></i>
</li>
<li>
<span>&nbsp;申请退货</span> <i></i>
</li>
</ul>
</div>
<!--退款原因-->
<div class="head">退款原因<span class="light">*</span></div>
<div class="reason">
<div class="reason-head">退款原因</div><i></i>
<div class="reason-view" style="display: none;">
<ul>
<li>未收到货1</li>
<li>未收到货2</li>
<li>未收到货3</li>
</ul>
</div>
</div>
<!--退款金额-->
<div class="head">退款金额<span class="light">*</span><span class="note">不超过¥29.9</span></div>
<div class="money">
<div>
<input type="text" placeholder="请输入退款金额">
</div>
</div>
<!--退款说明-->
<div class="head">退款说明</div>
<div class="explain">
<div>
<input type="text" placeholder="请输入退款说明">
</div>
</div>
<!--退款凭证-->
<div class="head">退款凭证</div>
<div class="upload">
<div class="upload-main">
<input type="file" id="uploadphoto1" name="uploadfile" value="请点击上传图片" style="display:none;" />
<div class="img-list"></div>
<a href="javascript:void(0);" onclick="uploadphoto1.click()" class="uploadbtn"></a>
</div>
<div class="upload-main">
<input type="file" id="uploadphoto2" name="uploadfile" value="请点击上传图片" style="display:none;" />
<div class="img-list"></div>
<a href="javascript:void(0);" onclick="uploadphoto2.click()" class="uploadbtn"></a>
</div>
<div class="upload-main">
<input type="file" id="uploadphoto3" name="uploadfile" value="请点击上传图片" style="display:none;" />
<div class="img-list"></div>
<a href="javascript:void(0);" onclick="uploadphoto3.click()" class="uploadbtn"></a>
</div>
</div>
<button>提交申请</button>
<script>
$(document).ready(function(){
$('.type ul li').click(function(){
removeAll();
$(this).addClass('active');
$(this).find('i').addClass('action');
});
function removeAll(){
$('.type ul li').removeClass('active');
$('.type ul li i').removeClass('action');
}
$('.reason-head').click(function(){
$('.reason-view').slideToggle(100);
});
$('.reason-view ul li').click(function(){
$('.reason-view').hide();
$('.reason-head').text($(this).text());
});
$('input[name=uploadfile]').on('change', function(){
var $this = $(this);
lrz(this.files[0], {width: 220}).then(function (rst) {
console.log(rst);
var attrSrc = '<img src="'+rst.base64+'" alt="" />';
$this.parent().find('.img-list').append(attrSrc);
$this.parent().find('.img-list img').on('load', function () {
var picWidth = $this.parent().find('.img-list img').width();
var picHeight = $this.parent().find('.img-list img').height();
// console.log('高:'+ picHeight + ';' + '宽:' + picWidth );
if(picWidth >= picHeight){
$this.parent().find('.img-list img').css('height','100%');
} else if(picHeight > picWidth){
$this.parent().find('.img-list img').css('width','100%');
}
});
$this.parent().find('.img-list').show();
$this.parent().find('a').hide();
/*$.ajax({
url: '',
type: 'post',
data: {img: rst.base64},
dataType: 'json',
timeout: 200000,
success: function (response) {
if (response.ecd == '0') {
alert('成功');
return true;
} else {
return alert(response.msg);
}
},
error: function (jqXHR, textStatus, errorThrown) {
if (textStatus == 'timeout') {
alert('请求超时');
return false;
}
alert(jqXHR.responseText);
}
});*/
})
.catch(function (err) {
})
.always(function () {
});
});
});
</script>
</body>
</html>
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化