diff --git a/yohobuy/m.yohobuy.com/application/models/Index/Cart.php b/yohobuy/m.yohobuy.com/application/models/Index/Cart.php index 37af3cd..05a2a26 100644 --- a/yohobuy/m.yohobuy.com/application/models/Index/Cart.php +++ b/yohobuy/m.yohobuy.com/application/models/Index/Cart.php @@ -636,15 +636,15 @@ class CartModel } $yohoCoinData = [ - 'totalYohoCoinNum' => intval($orderCompute['total_yoho_coin_num']), - 'yohoCoin' => Helpers::transPrice($orderCompute['yoho_coin']), - 'useYohoCoin' => Helpers::transPrice($orderCompute['use_yoho_coin']), + 'totalYohoCoinNum' => isset($orderCompute['total_yoho_coin_num']) ? intval($orderCompute['total_yoho_coin_num']) : 0, + 'yohoCoin' => isset($orderCompute['yoho_coin']) ? Helpers::transPrice($orderCompute['yoho_coin']) : 0, + 'useYohoCoin' => isset($orderCompute['use_yoho_coin']) ? Helpers::transPrice($orderCompute['use_yoho_coin']) : 0, 'yohoCoinClick' => 0, 'yohoCoinMsg' => '' ]; if ($yohoCoinData['totalYohoCoinNum'] < 100) { - $yohoCoinData['yohoCoinMsg'] = "共{$yohoCoinCompute['totalYohoCoinNum']}有币币,满100可用"; + $yohoCoinData['yohoCoinMsg'] = "共{$yohoCoinData['totalYohoCoinNum']}有货币,满100可用"; } else if ($yohoCoinData['useYohoCoin'] > 0 || $yohoCoinData['yohoCoin'] > 0) { $yohoCoinData['yohoCoinMsg'] = '可抵¥' . ($yohoCoinData['useYohoCoin'] > 0 ? $yohoCoinData['useYohoCoin'] : $yohoCoinData['yohoCoin']); $yohoCoinData['yohoCoinClick'] = 1;