?> ">登录</a><a class="reg" href="<?php echo IUrl::creatUrl("/simple/reg?callback=" . $callback . ""); ?> ">免费注册</a>] <?php } ?> </p> </div> <?php $seo_data = array(); $site_config = new Config('site_config'); $site_config = $site_config->getInfo(); $seo_data['title'] = "用户登录_" . $site_config['name']; seo::set($seo_data); ?> <div class="wrapper clearfix"> <div class="wrap_box"> <h3 class="notice">已注册用户,请登录</h3> <p class="tips">欢迎来到我们的网站,如果您已是本站会员请登录</p> <div class="box login_box clearfix"> <form action='<?php echo IUrl::creatUrl("/simple/login_act"); ?> ' method='post'> <input type="hidden" name='callback' /> <table width="515" class="form_table f_l"> <col width="120px" /> <col />
public function index() { $itemId = intval(input::get('item_id')); if (empty($itemId)) { return redirect::action('topc_ctl_default@index'); } if (userAuth::check()) { $pagedata['nologin'] = 1; } $pagedata['user_id'] = userAuth::id(); $pagedata['image_default_id'] = $this->__setting(); $params['item_id'] = $itemId; $params['fields'] = "*,item_desc.pc_desc,item_count,item_store,item_status,sku,item_nature,spec_index"; $detailData = app::get('topc')->rpcCall('item.get', $params); if (!$detailData) { $pagedata['error'] = "很抱歉,您查看的宝贝不存在,可能已下架或者被转移"; return $this->page('topc/items/error.html', $pagedata); } if (count($detailData['sku']) == 1) { $detailData['default_sku_id'] = array_keys($detailData['sku'])[0]; } $detailData['valid'] = $this->__checkItemValid($detailData); //判断此商品发布的平台,如果是wap端,跳转至wap链接 if ($detailData['use_platform'] == 2) { redirect::action('topm_ctl_item@index', array('item_id' => $itemId))->send(); exit; } //相册图片 if ($detailData['list_image']) { $detailData['list_image'] = explode(',', $detailData['list_image']); } //获取商品的促销信息 $promotionDetail = app::get('topc')->rpcCall('item.promotiontag.get', array('item_id' => $itemId)); if ($promotionDetail) { $promotionIds = explode(',', $promotionDetail['promotion_ids']); foreach ($promotionIds as $promotionId) { $basicPromotionInfo = app::get('topc')->rpcCall('promotion.promotion.get', array('promotion_id' => $promotionId, 'platform' => 'pc')); if ($basicPromotionInfo['valid'] === true) { $pagedata['promotionDetail'][$promotionId] = $basicPromotionInfo; } } } $pagedata['promotion_count'] = count($pagedata['promotionDetail']); // 活动促销(如名字叫团购) $activityDetail = app::get('topc')->rpcCall('promotion.activity.item.info', array('item_id' => $itemId, 'valid' => 1), 'buyer`'); if ($activityDetail) { $pagedata['activityDetail'] = $activityDetail; } $detailData['spec'] = $this->__getSpec($detailData['spec_desc'], $detailData['sku']); $detailData['qrCodeData'] = $this->__qrCode($itemId); $pagedata['item'] = $detailData; //获取商品详情页左侧店铺分类信息 $pagedata['shopCat'] = app::get('topc')->rpcCall('shop.cat.get', array('shop_id' => $pagedata['item']['shop_id'])); //获取该商品的店铺信息 $pagedata['shop'] = app::get('topc')->rpcCall('shop.get', array('shop_id' => $pagedata['item']['shop_id'])); //获取该商品店铺的DSR信息 $pagedata['shopDsrData'] = $this->__getShopDsr($pagedata['item']['shop_id']); $pagedata['next_page'] = url::action("topc_ctl_item@index", array('item_id' => $itemId)); if ($pagedata['user_id']) { //获取该用户的最近购买记录 $pagedata['buyerList'] = app::get('topc')->rpcCall('trade.user.buyerList', array('user_id' => $pagedata['user_id'])); } //设置此页面的seo $brand = app::get('topc')->rpcCall('category.brand.get.info', array('brand_id' => $detailData['brand_id'])); $cat = app::get('topc')->rpcCall('category.cat.get.info', array('cat_id' => $detailData['cat_id'])); $seoData = array('item_title' => $detailData['title'], 'shop_name' => $pagedata['shop']['shop_name'], 'item_brand' => $brand['brand_name'], 'item_bn' => $detailData['bn'], 'item_cat' => $cat[$detailData['cat_id']]['cat_name'], 'sub_title' => $detailData['sub_title']); seo::set('topc.item.detail', $seoData); //echo '<pre>';print_r($pagedata);exit(); return $this->page('topc/items/index.html', $pagedata); }