Selaa lähdekoodia

修改组合支付的隐藏和显示的状态

chengzhiyixia 1 vuosi sitten
vanhempi
commit
5f10a5839c
1 muutettua tiedostoa jossa 15 lisäystä ja 10 poistoa
  1. 15 10
      app/common/repositories/store/order/StoreOrderRepository.php

+ 15 - 10
app/common/repositories/store/order/StoreOrderRepository.php

@@ -2236,13 +2236,10 @@ class StoreOrderRepository extends BaseRepository
2236 2236
                
2237 2237
                 //throw new ValidateException($user_datas['vr']);
2238 2238
                 if($uid == 7){
2239
-                //如果选择组合支付,查询当前用户名下的VR
2240
-                $user_datas = Db::name('user')->where('uid',$uid)->find();
2239
+                    //如果选择组合支付,查询当前用户名下的VR
2240
+                    $user_datas = Db::name('user')->where('uid',$uid)->find();
2241 2241
 
2242 2242
                 
2243
-
2244
-
2245
-
2246 2243
                     // 初始化VR支付金额和现金支付金额
2247 2244
                     $vr_payment = 0;
2248 2245
                     $cash_payment = 0;
@@ -2254,17 +2251,25 @@ class StoreOrderRepository extends BaseRepository
2254 2251
                         //$cash_payment = 0;
2255 2252
                     }
2256 2253
              
2254
+                    if( $user_datas['vr'] <= 0){
2255
+                        $cartInfo['list'][$_k]['fzone_paytype']= [
2257 2256
 
2257
+                            ['type'=>'a2','price'=>$orderpri,'other'=>0,'note'=>"现金"],//现金支付
2258
+                         
2259
+                        ];
2260
+                    }else{
2261
+                        $cartInfo['list'][$_k]['fzone_paytype']= [
2258 2262
 
2263
+                            ['type'=>'a1','price'=>$orderpri,'other'=>0,'note'=>"VR"],//VR支付
2264
+                            ['type'=>'a2','price'=>$orderpri,'other'=>0,'note'=>"现金"],//现金支付
2265
+                            ['type'=>'a3','price'=>$vr_payment,'other'=> $cash_payment,'note'=>"现金+VR"],//现金支付
2266
+                        ];
2267
+                    }
2259 2268
 
2260 2269
 
2261 2270
 
2262
-                    $cartInfo['list'][$_k]['fzone_paytype']= [
2263 2271
 
2264
-                        ['type'=>'a1','price'=>$orderpri,'other'=>0,'note'=>"VR"],//VR支付
2265
-                        ['type'=>'a2','price'=>$orderpri,'other'=>0,'note'=>"现金"],//现金支付
2266
-                         ['type'=>'a3','price'=>$vr_payment,'other'=> $cash_payment,'note'=>"现金+VR"],//现金支付
2267
-                    ];
2272
+                   
2268 2273
                 }else{
2269 2274
                     $cartInfo['list'][$_k]['fzone_paytype']= [
2270 2275