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