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

退货&退款

... ... @@ -188,9 +188,14 @@ class PayController extends HomeBaseController
private function wxPay($info)
{
require_once EXTEND_PATH . '/Payment.php';
$pay = new \Payment($info['attach'], $info['openid'], $info['body'], $info['total_fee'] * 100);
$this->success('ok', url('user/center/orderlist'), $pay->pay());
//只有未支付的订单才能唤起微信支付
if(Db::name('zj_order')->where(['id'=>$info['attach']])->value('step') == 1) {
require_once EXTEND_PATH . '/Payment.php';
$pay = new \Payment($info['attach'], $info['openid'], $info['body'], $info['total_fee'] * 100);
$this->success('ok', url('user/center/orderlist'), $pay->pay());
}else {
$this->success('该订单禁止支付', '', false);
}
}
public function notify()
... ...
... ... @@ -114,7 +114,21 @@
<in name="vo.step" value="5,6,7,8,9">
<div class="unpay">
<p class="pay eval" data-url="{:url('user/Center/evaluate',['oid'=>$vo['id']])}">评价</p>
<p class="cancelorder refund" data-url="{:url('user/Center/refund',['oid'=>$vo['id']])}">申请退款</p>
<if condition="$vo['step'] eq '5'">
<p class="cancelorder refund" data-url="{:url('user/Center/refund',['oid'=>$vo['id']])}">申请退货</p>
</if>
<if condition="$vo['step'] eq '6'">
<p class="cancelorder refund_detail" data-url="{:url('user/Center/refundDetail',['oid'=>$vo['id']])}">退货详情</p>
</if>
<if condition="$vo['step'] eq '7'">
<p class="cancelorder refund_detail" data-url="{:url('user/Center/refundPay',['oid'=>$vo['id']])}">申请退款</p>
</if>
<if condition="$vo['step'] eq '8'">
<p class="cancelorder refund_detail" data-url="{:url('user/Center/refundPayDetail',['oid'=>$vo['id']])}">退款详情</p>
</if>
<if condition="$vo['step'] eq '9'">
<p class="cancelorder">已退款</p>
</if>
</div>
</in>
... ...