|
@@ -12,18 +12,21 @@ use mcard\user_mcards;
|
|
|
|
|
|
defined('InShopNC') or exit('Access Invalid!');
|
|
|
|
|
|
-require_once(BASE_ROOT_PATH . '/helper/goods_helper.php');
|
|
|
-require_once(BASE_ROOT_PATH . '/helper/special_helper.php');
|
|
|
-require_once(BASE_ROOT_PATH . '/helper/index_tab.php');
|
|
|
-require_once(BASE_ROOT_PATH . '/helper/util_helper.php');
|
|
|
-require_once(BASE_ROOT_PATH . '/helper/third_author/wxauthor.php');
|
|
|
require_once(BASE_ROOT_PATH . '/mobile/control/special.php');
|
|
|
-require_once(BASE_ROOT_PATH . '/helper/third_author/wxauthor.php');
|
|
|
-require_once(BASE_ROOT_PATH . '/helper/session_helper.php');
|
|
|
-require_once(BASE_ROOT_PATH . '/helper/url_helper.php');
|
|
|
-require_once(BASE_ROOT_PATH . '/helper/room/tpl_group_home.php');
|
|
|
-require_once(BASE_ROOT_PATH . '/helper/room/tpl_chatwo_home.php');
|
|
|
+
|
|
|
+require_once(BASE_HELPER_PATH . '/goods_helper.php');
|
|
|
+require_once(BASE_HELPER_PATH . '/special_helper.php');
|
|
|
+require_once(BASE_HELPER_PATH . '/index_tab.php');
|
|
|
+require_once(BASE_HELPER_PATH . '/util_helper.php');
|
|
|
+require_once(BASE_HELPER_PATH . '/third_author/wxauthor.php');
|
|
|
+require_once(BASE_HELPER_PATH . '/third_author/wxauthor.php');
|
|
|
+require_once(BASE_HELPER_PATH . '/session_helper.php');
|
|
|
+require_once(BASE_HELPER_PATH . '/url_helper.php');
|
|
|
+require_once(BASE_HELPER_PATH . '/room/tpl_group_home.php');
|
|
|
+require_once(BASE_HELPER_PATH . '/room/tpl_chatwo_home.php');
|
|
|
require_once(BASE_HELPER_PATH . '/mcard/mcard.php');
|
|
|
+require_once(BASE_HELPER_PATH . '/mtopcard/mtopcard.php');
|
|
|
+
|
|
|
|
|
|
class indexControl extends specialControl
|
|
|
{
|
|
@@ -160,18 +163,20 @@ class indexControl extends specialControl
|
|
|
public function card_goodsOp()
|
|
|
{
|
|
|
global $config;
|
|
|
- $card_type = $_GET['card_type'];
|
|
|
- if(empty($card_type)) {
|
|
|
+ $page_type = $_GET['page_type']; //oil or phone page.
|
|
|
+ if(empty($page_type)) {
|
|
|
return self::outerr(errcode::ErrParamter);
|
|
|
}
|
|
|
- $goods = $this->card_goods($card_type);
|
|
|
|
|
|
+ $goods = $this->card_goods($page_type);
|
|
|
$fVip = mcard\isVip(session_helper::memberid());
|
|
|
$ret = [];
|
|
|
|
|
|
$discount = 0.0;
|
|
|
if(session_helper::memberid() > 0)
|
|
|
{
|
|
|
+ $card_list = mtopcard\priority_cards(session_helper::memberid(),$page_type);
|
|
|
+ $ret['cards'] = mtopcard\topcard_format($card_list);
|
|
|
if($fVip)
|
|
|
{
|
|
|
if(session_helper::first_order()) {
|
|
@@ -186,6 +191,7 @@ class indexControl extends specialControl
|
|
|
}
|
|
|
else {
|
|
|
$ret['tips'] = $config['tips']['first_order'];
|
|
|
+ $ret['cards'] = [];
|
|
|
$discount = 0.02;
|
|
|
}
|
|
|
|
|
@@ -235,6 +241,5 @@ class indexControl extends specialControl
|
|
|
else {
|
|
|
return [];
|
|
|
}
|
|
|
-
|
|
|
}
|
|
|
}
|