...
|
...
|
@@ -49,7 +49,12 @@ class GradeModel |
|
|
//今年总消费
|
|
|
$result['vipGrade']['costOfThisYear'] = $data['costInfo']['yearTotal'];
|
|
|
//升级下一等级会员的进度;
|
|
|
$result['vipGrade']['percent'] = 100 * (round($data['costInfo']['total'] / $data['nextVipInfo']['needCost'], 2));
|
|
|
if($data['nextVipInfo']['needCost'] == 0){
|
|
|
//当vip等级升至顶级时,进度条满格
|
|
|
$result['vipGrade']['percent'] = 100;
|
|
|
}else{
|
|
|
$result['vipGrade']['percent'] = 100 * (round($data['costInfo']['total'] / $data['nextVipInfo']['needCost'], 2));
|
|
|
}
|
|
|
//距离升级所需消费金额
|
|
|
|
|
|
if ($data['curVipInfo']['curLevel'] != 3) {
|
...
|
...
|
|