public function indexAction() { $customerInfo = get_customer_info(get_openid()); $this->assign('customerType', $customerInfo['subscribe_state']); $this->assign('config_buy_max', $this->config_buy_max); $this->assign('config_buy_min', $this->config_buy_min); $this->assign('payNowUrl', U('OrderForm/Submit/index')); $addGoodsToCartUrl = U('Goods/GoodsDetail/add'); $this->assign('addGoodsToCartUrl', $addGoodsToCartUrl); $this->assign('footer', ''); $goods = new GoodsModel(); $goodsId = I('get.goodsId'); $goods->setGoodsId($goodsId); $res = $goods->getGoodsInf(); if ($res == false || $res['state'] != 1) { $this->assign('js', $this->fetch('indexJs')); $this->assign('css', $this->fetch('indexCss')); $detail2 = $this->fetch('error'); $this->assign('YZBody', $detail2); $this->display(YZ_TEMPLATE); return; } //计算运费 // if($res['logistics_mode'] == 0) // { // $logistic = new ConfigModel(); //运费配置 // $res['internation_transportation_expenses'] = $logistic->getFee($weightTotal); // } // //获取来源国信息 $source = new SourceModel(); $map['id'] = $res['source']; $res['source'] = $source->getSource($map); $res['source']['icon_url'] = __ROOT__ . "/" . $res['source']['icon_url']; $logistic = new LogisticsModel(); $key = 'logistics_mode'; $data[0] = $res; $data = $logistic->getLogisticInfo($data, $key); $res = $data[0]; $detail = $res; // var_dump($detail); $this->assign('goods', $detail); $this->assign('js', $this->fetch('indexJs')); $this->assign('css', $this->fetch('indexCss')); $detail2 = $this->fetch('index'); $this->assign('YZBody', $detail2); $this->display(YZ_TEMPLATE); }