|
@@ -21,7 +21,8 @@ require_once(BASE_ROOT_PATH . '/helper/search_param.php');
|
|
|
require_once(BASE_ROOT_PATH . '/helper/goods_helper.php');
|
|
|
require_once(BASE_ROOT_PATH . '/helper/session_helper.php');
|
|
|
require_once(BASE_ROOT_PATH . '/helper/login_helper.php');
|
|
|
-require_once (BASE_ROOT_PATH . '/helper/third_author/wxauthor.php');
|
|
|
+require_once(BASE_ROOT_PATH . '/helper/third_author/wxauthor.php');
|
|
|
+require_once(BASE_ROOT_PATH . '/helper/fcode/present_manager.php');
|
|
|
|
|
|
|
|
|
class bonusexControl extends mobileControl
|
|
@@ -673,6 +674,43 @@ function bonus_output_type($output)
|
|
|
echo '</div>';
|
|
|
}
|
|
|
|
|
|
+function bonus_output_present($output)
|
|
|
+{
|
|
|
+ if(session_helper::first_order() == false) return;
|
|
|
+
|
|
|
+ $fcode = fcode\present_manager::instance()->fetch($_SESSION['member_mobile']);
|
|
|
+ if($fcode == false) return;
|
|
|
+
|
|
|
+ $common_id = $fcode['common_id'];
|
|
|
+ $batch_code = $fcode['batch_code'];
|
|
|
+ $fcode_url = BASE_SITE_URL . "/mobile/index.php?act=fcode&op=index&common_id={$common_id}&batch_code={$batch_code}";
|
|
|
+
|
|
|
+ $model_goods = Model('goods');
|
|
|
+ $items = $model_goods->getGoodsListByColorDistinct(array('goods_commonid' => $common_id),goods_helper::fieldstr,'','');
|
|
|
+ if(empty($items)) return;
|
|
|
+
|
|
|
+ $helper = new goods_helper();
|
|
|
+ $ret = $helper->summary($items,$related_goods);
|
|
|
+ $summary = $ret['summary'][0];
|
|
|
+
|
|
|
+ $str = "<div class=\"prompt text_left\">
|
|
|
+ <p class=\"prompt pro\">丽人亲友首单福利</p>
|
|
|
+ </div>";
|
|
|
+
|
|
|
+ $str.= "<div class=\"first_goods_box overflow_h text_left\">
|
|
|
+ <div class=\"first_goods_img f_left\">
|
|
|
+ <img src=\"{$summary['goods_image_url']}\">
|
|
|
+ </div>
|
|
|
+ <div class=\"first_goods_msg f_right\">
|
|
|
+ <p class=\"p first_goods_name\">{$summary['goods_mobile_name']}</p>
|
|
|
+ <p class=\"p first_goods_desc\">{$summary['goods_jingle']}</p>
|
|
|
+ <p class=\"p first_goods_price bonus_price\"><span class=\"bonus_icon\"></span>{$summary['goods_promotion_price']}元<span class=\"desc\">专柜价 {$summary['goods_price']}</span></p>
|
|
|
+ <p><a href=\"{$fcode_url}\" class=\"center\">查看详情</a></p>
|
|
|
+ </div>
|
|
|
+ </div>";
|
|
|
+ echo $str;
|
|
|
+}
|
|
|
+
|
|
|
function bonus_output_mine($output)
|
|
|
{
|
|
|
if($_SESSION['is_app']) {
|
|
@@ -681,12 +719,13 @@ function bonus_output_mine($output)
|
|
|
$show_down = true;
|
|
|
}
|
|
|
$relay_id = intval($output['relay_id']);
|
|
|
-
|
|
|
$mine_bonus = $output['mine_bonus'];
|
|
|
- if(!empty($mine_bonus)) {
|
|
|
+ if(!empty($mine_bonus))
|
|
|
+ {
|
|
|
+ $mshop_url = BASE_SITE_URL . "/mshop";
|
|
|
$bonus = \bonus\user_bonus::create_by_param($mine_bonus);
|
|
|
echo('<div class="price">');
|
|
|
- echo('<p><span>' . $bonus->bonus_value() . '</span>元</p>');
|
|
|
+ echo('<p><span>' . $bonus->bonus_value() . "</span>元<a class=\"link_mshop\" href=\"{$mshop_url}\"></a ></p>");
|
|
|
echo('</div>');
|
|
|
echo('<input type="hidden" id="mine_bonus" value=' ."{$bonus->bonus_sn()}>");
|
|
|
echo('<input type="hidden" id="relay_id" value=' ."{$relay_id}>");
|