...
|
...
|
@@ -420,9 +420,11 @@ |
|
|
var src = $(this).prev().attr('src');
|
|
|
var pos = $.inArray(src,img);
|
|
|
img.splice(pos,1);
|
|
|
$('#refundBox').val('');
|
|
|
console.log(img);
|
|
|
});
|
|
|
// 提交退款申请
|
|
|
var is_allow = true;
|
|
|
$('.refundBtn').click(function () {
|
|
|
var content = $('.refundReasonTextarea').val();
|
|
|
var images = img.join(',');
|
...
|
...
|
@@ -437,23 +439,29 @@ |
|
|
content: content,
|
|
|
images: images
|
|
|
};
|
|
|
$.ajax({
|
|
|
type: "post",
|
|
|
url: "{:url('refund_submit')}",
|
|
|
data: data,
|
|
|
dataType: "json",
|
|
|
success: function (e) {
|
|
|
if(e.code == 1) {
|
|
|
toast(e.msg);
|
|
|
} else {
|
|
|
toast(e.msg);
|
|
|
if(is_allow) {
|
|
|
is_allow = false;
|
|
|
$.ajax({
|
|
|
type: "post",
|
|
|
url: "{:url('refund_submit')}",
|
|
|
data: data,
|
|
|
dataType: "json",
|
|
|
success: function (e) {
|
|
|
if(e.code == 1) {
|
|
|
toast(e.msg);
|
|
|
} else {
|
|
|
toast(e.msg);
|
|
|
}
|
|
|
},
|
|
|
error: function (e) {
|
|
|
console.log(e);
|
|
|
toast('网络错误,请重试');
|
|
|
},
|
|
|
complete: function () {
|
|
|
is_allow = true;
|
|
|
}
|
|
|
},
|
|
|
error: function (e) {
|
|
|
console.log(e);
|
|
|
toast('网络错误,请重试');
|
|
|
}
|
|
|
});
|
|
|
});
|
|
|
}
|
|
|
});
|
|
|
//提示弹层
|
|
|
function toast(msg='玩命加载中~',time=2000, location = 0){
|
...
|
...
|
|