Commit 36f43574 by 叶明星

优化福利中心已完成显示问题

parent 5eecf0d8
Showing with 24 additions and 4 deletions
...@@ -28,10 +28,20 @@ class IntegralService ...@@ -28,10 +28,20 @@ class IntegralService
foreach ($result['data'] as $key => $value) { foreach ($result['data'] as $key => $value) {
switch ($value['id']) { switch ($value['id']) {
case self::INTEGRAL_TYPE_INVITE_FRIEND: case self::INTEGRAL_TYPE_INVITE_FRIEND:
$result['data'][$key]['button_text'] = '去邀请'; if(!empty($value['operated_count']) && !empty($value['operated_count']) &&
$value['operated_count'] < $value['operated_count']){
$result['data'][$key]['button_text'] = '去邀请';
}else{
$result['data'][$key]['button_text'] = '已完成';
}
break; break;
case self::INTEGRAL_TYPE_UPLOAD_GOODS: case self::INTEGRAL_TYPE_UPLOAD_GOODS:
$result['data'][$key]['button_text'] = '去上传'; if(!empty($value['operated_count']) && !empty($value['operated_count']) &&
$value['operated_count'] < $value['operated_count']){
$result['data'][$key]['button_text'] = '去上传';
}else{
$result['data'][$key]['button_text'] = '已完成';
}
break; break;
case self::INTEGRAL_TYPE_INTEGRAL_CODE: case self::INTEGRAL_TYPE_INTEGRAL_CODE:
$result['data'][$key]['button_text'] = '去兑换'; $result['data'][$key]['button_text'] = '去兑换';
...@@ -41,10 +51,20 @@ class IntegralService ...@@ -41,10 +51,20 @@ class IntegralService
$result['data'][$key]['code_exchanged'] = $exchanged; $result['data'][$key]['code_exchanged'] = $exchanged;
break; break;
case self::INTEGRAL_TYPE_SHARE: case self::INTEGRAL_TYPE_SHARE:
$result['data'][$key]['button_text'] = '去分享'; if(!empty($value['operated_count']) && !empty($value['operated_count']) &&
$value['operated_count'] < $value['operated_count']){
$result['data'][$key]['button_text'] = '去分享';
}else{
$result['data'][$key]['button_text'] = '已完成';
}
break; break;
case self::INTEGRAL_TYPE_OFFER: case self::INTEGRAL_TYPE_OFFER:
$result['data'][$key]['button_text'] = '去报价'; if(!empty($value['operated_count']) && !empty($value['operated_count']) &&
$value['operated_count'] < $value['operated_count']){
$result['data'][$key]['button_text'] = '去报价';
}else{
$result['data'][$key]['button_text'] = '已完成';
}
break; break;
case self::INTEGRAL_TYPE_CHECK_IN: case self::INTEGRAL_TYPE_CHECK_IN:
//去判断是否已经签到了,同时去修改文字还有返回签到状态 //去判断是否已经签到了,同时去修改文字还有返回签到状态
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment