|
@@ -94,7 +94,6 @@ class member_bonusControl extends mbMemberControl
|
|
|
}
|
|
|
|
|
|
$rate_moneys = [];
|
|
|
-
|
|
|
if($type->isFixedAmount()) {
|
|
|
$item['amount'] = $type->fixed_money();
|
|
|
} else {
|
|
@@ -114,24 +113,30 @@ class member_bonusControl extends mbMemberControl
|
|
|
$type_sn = $ret['type_sn'];
|
|
|
$relay_id = $_SESSION['member_id'];
|
|
|
$url = BASE_SITE_URL . "/mobile/index.php?act=bonusex&op=open&client_type=wap&type_sn={$type_sn}&relay_id={$relay_id}";
|
|
|
- $share = bonus_helper::get_share($type->share_id());
|
|
|
|
|
|
$title = $type->bless();
|
|
|
- if(empty($title) || $title == '特权红包,内购正品行货美妆') {
|
|
|
- $title = $share['title'];
|
|
|
- }
|
|
|
-
|
|
|
- $sub_title = $share['sub_title'];
|
|
|
- $img_url = $share['img_url'];
|
|
|
+ $this->share_info($type->share_id(),$title,$sub_title,$img_url);
|
|
|
|
|
|
return self::outsuccess(array('type_sn' => $ret,
|
|
|
'url' => "{$url}",
|
|
|
'title' => $title,
|
|
|
- 'sub_title' => $sub_title . "\n\n点击领取",
|
|
|
+ 'sub_title' => $sub_title,
|
|
|
'img_url' => $img_url));
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ private function share_info($share_id,&$title,&$sub_title,&$img_url)
|
|
|
+ {
|
|
|
+ $share = bonus_helper::get_share($share_id);
|
|
|
+
|
|
|
+ if(empty($title) || $title == '特权红包,内购正品行货美妆') {
|
|
|
+ $title = $share['title'];
|
|
|
+ }
|
|
|
+
|
|
|
+ $sub_title = $share['sub_title'] . "\n\n点击领取";
|
|
|
+ $img_url = $share['img_url'];
|
|
|
+ }
|
|
|
+
|
|
|
public function match_goodsOp()
|
|
|
{
|
|
|
$bonus_rate = $this->mPred->bonus_rate();
|
|
@@ -155,7 +160,7 @@ class member_bonusControl extends mbMemberControl
|
|
|
$cids = $result['cids'];
|
|
|
$model_goods = Model('goods');
|
|
|
$items = $model_goods->getGoodsListByColorDistinct(array('goods_commonid' => array('in',$cids)),goods_helper::fieldstr,'','');
|
|
|
- $page_count = $result['page_count'];
|
|
|
+ $page_count = intval($result['page_count']);
|
|
|
|
|
|
if(empty($items))
|
|
|
{
|
|
@@ -247,19 +252,14 @@ class member_bonusControl extends mbMemberControl
|
|
|
$type_sn = $ret['type_sn'];
|
|
|
$relay_id = $_SESSION['member_id'];
|
|
|
$url = BASE_SITE_URL . "/mobile/index.php?act=bonusex&op=open&client_type=wap&type_sn={$type_sn}&relay_id={$relay_id}";
|
|
|
- $share = bonus_helper::get_share($type->share_id());
|
|
|
|
|
|
$title = $type->bless();
|
|
|
- if(empty($title) || $title == '特权红包,内购正品行货美妆') {
|
|
|
- $title = $share['title'];
|
|
|
- }
|
|
|
- $sub_title = $share['sub_title'];
|
|
|
- $img_url = $share['img_url'];
|
|
|
+ $this->share_info($type->share_id(),$title,$sub_title,$img_url);
|
|
|
|
|
|
return self::outsuccess(array('type_sn' => $ret,
|
|
|
'url' => "{$url}",
|
|
|
'title' => $title,
|
|
|
- 'sub_title' => $sub_title . "\n\n点击领取",
|
|
|
+ 'sub_title' => $sub_title,
|
|
|
'img_url' => $img_url));
|
|
|
}
|
|
|
}
|
|
@@ -275,19 +275,19 @@ class member_bonusControl extends mbMemberControl
|
|
|
$relay_id = $_SESSION['member_id'];
|
|
|
$url = BASE_SITE_URL . "/mobile/index.php?act=bonusex&op=open&client_type=wap&type_sn={$type_sn}&relay_id={$relay_id}";
|
|
|
$type = bonus_helper::create_type_sn($type_sn);
|
|
|
+ $title = $type->bless();
|
|
|
+ $this->share_info($type->share_id(),$title,$sub_title,$img_url);
|
|
|
|
|
|
- $share = bonus_helper::get_share($type->share_id());
|
|
|
- $sub_title = $share['sub_title'];
|
|
|
- $img_url = $share['img_url'];
|
|
|
-
|
|
|
- return self::outsuccess(array('type_sn' => $type_sn, 'url' => "{$url}",
|
|
|
- 'title' => $type->bless(),'sub_title' => $sub_title,'img_url' => $img_url));
|
|
|
+ return self::outsuccess(array('type_sn' => $type_sn,
|
|
|
+ 'url' => "{$url}",
|
|
|
+ 'title' => $title,
|
|
|
+ 'sub_title' => $sub_title,
|
|
|
+ 'img_url' => $img_url));
|
|
|
}
|
|
|
}
|
|
|
public function invite_pageOp()
|
|
|
{
|
|
|
$mem_no = $this->member_no();
|
|
|
-
|
|
|
return self::outsuccess(array('member_no' => $mem_no),"bonus/invite",'wap');
|
|
|
}
|
|
|
|
|
@@ -317,19 +317,16 @@ class member_bonusControl extends mbMemberControl
|
|
|
}
|
|
|
$type_sn = $_GET['type_sn'];
|
|
|
$type = \bonus\type::create_by_sn($type_sn);
|
|
|
- $share = bonus_helper::get_share($type->share_id());
|
|
|
$relay_id = $_SESSION['member_id'];
|
|
|
|
|
|
$title = $type->bless();
|
|
|
- if(empty($title) || $title == '特权红包,内购正品行货美妆') {
|
|
|
- $title = $share['title'];
|
|
|
- }
|
|
|
- $sub_title = $share['sub_title'] ."\n\n点击领取";
|
|
|
- $img_url = $share['img_url'];
|
|
|
+ $this->share_info($type->share_id(),$title,$sub_title,$img_url);
|
|
|
|
|
|
$url = BASE_SITE_URL . "/mobile/index.php?act=bonusex&op=open&client_type=wap&type_sn={$type_sn}&relay_id={$relay_id}";
|
|
|
return self::outsuccess(array('type_sn' => $type_sn, 'url' => "{$url}",
|
|
|
- 'title' => $title,'sub_title' => $sub_title,'img_url' => $img_url));
|
|
|
+ 'title' => $title,
|
|
|
+ 'sub_title' => $sub_title,
|
|
|
+ 'img_url' => $img_url));
|
|
|
}
|
|
|
|
|
|
public function send_listexOp()
|