作者 lihan
1 个管道 的构建 通过 耗费 0 秒

退货&退款

... ... @@ -282,7 +282,7 @@ class CenterController extends HomeBaseController
}
}
//退款
//填写退款申请
public function refundPay()
{
$request = request();
... ... @@ -290,7 +290,6 @@ class CenterController extends HomeBaseController
if ($request->isAjax()) {
$data = [
'id' => $request->param('oid'),
'cause' => $request->param('cause'),
'company' => $request->param('company'),
'com_order' => $request->param('com_order'),
'step' => 8
... ...
... ... @@ -64,13 +64,7 @@
<div class="reason">
<p class="reason_title">退款原因</p>
<div class="goodreason">
物品损坏无法食用
物品损坏无法食用
物品损坏无法食用
物品损坏无法食用
物品损坏无法食用
{$cause}
</div>
</div>
<!--客服电话-->
... ... @@ -79,15 +73,42 @@
</p>
<div class="express">
<span>快递方:</span>
<input type="text" placeholder="申通快递" style="width:5rem;border:none;outline:none;background: #F7F8FA">
<input type="text" id="company" placeholder="请填写快递公司名称" style="width:5rem;border:none;outline:none;background: #F7F8FA">
</div>
<div class="express_num">
<span>快递单号:</span>
<input type="text" placeholder="208093215648216" style="width:4.5rem;border:none;outline:none;background: #F7F8FA">
<input type="text" id="com_order" placeholder="请填写快递单号" style="width:4.5rem;border:none;outline:none;background: #F7F8FA">
</div>
<div class="sub">提交</div>
<div class="sub" data-id="{$oid}">提交</div>
</div>
<script type="text/javascript" src="__INDEX__/js/jquery.min.js"></script>
<script>
$(".sub").click(function () {
var oid = $(this).attr('data-id');
if(!window.confirm('是否提交退款申请?')) {
return false;
}else {
$.ajax({
url:"{:url('user/Center/refundPay')}",
data:{
oid: oid,
company:$("#company").val(),
com_order:$("#com_order").val()
},
type:"POST",
dataType:"JSON",
success: function (data) {
if(data.data === true) {
alert(data.msg);
window.location.href=data.url;
}else {
alert(data.msg);
}
}
})
}
})
</script>
</body>
</html>
... ...