Browse Source

完善报名接口, 修改后台退款

15954078560 2 years ago
parent
commit
66d25d6e4d

+ 2 - 2
application/admin/view/activerefund/edit.html

@@ -47,13 +47,13 @@
     <div class="form-group">
         <label class="control-label col-xs-12 col-sm-2">{:__('Transaction_id')}:</label>
         <div class="col-xs-12 col-sm-8">
-            <input id="c-transaction_id" data-rule="required" readonly  class="form-control" name="row[transaction_id]" type="text" value="{$row.transaction_id|htmlentities}">
+            <input id="c-transaction_id" data-rule="" readonly  class="form-control" name="row[transaction_id]" type="text" value="{$row.transaction_id|htmlentities}">
         </div>
     </div>
     <div class="form-group">
         <label class="control-label col-xs-12 col-sm-2">{:__('Refund_no')}:</label>
         <div class="col-xs-12 col-sm-8">
-            <input id="c-refund_no" data-rule="required" readonly class="form-control" name="row[refund_no]" type="text" value="{$row.refund_no|htmlentities}">
+            <input id="c-refund_no" data-rule="" readonly class="form-control" name="row[refund_no]" type="text" value="{$row.refund_no|htmlentities}">
         </div>
     </div>
     <div class="form-group">

+ 5 - 5
application/api/controller/Index.php

@@ -313,7 +313,7 @@ class Index extends Api
                         }
                         $discount = $vip_info['vipdiscount'];
                     }
-                    $vipprice = $info['price'] * $discount / 100; //会员价
+                    $vipprice = number_format($info['price'] * $discount / 100, 2, '.', ''); //会员价
                     //查询优惠券
                     if ($v['coupon_id']) {
                         $user_coupon_info = $user_coupon->where(['id' => $v['coupon_id'], 'user_id' => $this->auth->id])->find();
@@ -358,10 +358,10 @@ class Index extends Api
                             }
                             if ($user_coupon_info['type'] == 1) {
                                 //打折券
-                                $price = $info['price'] * $user_coupon_info['money'] / 100;
+                                $price = number_format($info['price'] * $user_coupon_info['money'] / 100, 2, '.', '');
                             } else {
                                 //抵扣券
-                                $price = $info['price'] - $user_coupon_info['money'];
+                                $price = number_format($info['price'] - $user_coupon_info['money'], 2, '.', '');
                             }
                         } else {
                             $price = $vipprice;
@@ -374,10 +374,10 @@ class Index extends Api
                         if ($v['coupon_id']) { //使用优惠券
                             if ($user_coupon_info['type'] == 1) {
                                 //打折券
-                                $price = $vipprice * $user_coupon_info['money'] / 100;
+                                $price = number_format($vipprice * $user_coupon_info['money'] / 100, 2, '.', '');
                             } else {
                                 //抵扣券
-                                $price = $vipprice - $user_coupon_info['money'];
+                                $price = number_format($vipprice - $user_coupon_info['money'], 2, '.', '');
                             }
                         } else {
                             $price = $vipprice;