123456789101112131415161718192021222324252627282930313233343536373839 |
- <?php
- /**
- * Created by PhpStorm.
- * User: stanley-king
- * Date: 16/3/18
- * Time: 下午10:11
- */
- defined('InShopNC') or exit('Access Invalid!');
- class goodsControl extends mobileControl
- {
- public function __construct()
- {
- parent::__construct();
- }
- public function detailOp()
- {
- $commonid = 0;
- $goods_id = intval($_GET['goods_id']);
- if (empty($_GET['goods_id']) || $goods_id <= 0) {
- if (!empty($_GET['goods_commonid'])) {
- $commonid = intval($_GET['goods_commonid']);
- }
- } else {
- $info = Model('goods')->getGoodsInfoByID($goods_id, 'goods_commonid');
- $commonid = intval($info['goods_commonid']);
- }
- if ($commonid > 0) {
- $items = Model()->table('goods_common')->field('goods_body')->where(array('goods_commonid' => $commonid))->select();
- if (!empty($items) && count($items) > 0) {
- Tpl::output('goods_body', $items[0]['goods_body']);
- }
- }
- Tpl::showpage('goods_detail');
- }
- }
|