activityList(); return $this->renderSuccess('', compact('list')); } /** * 砍价商品 */ public function product($bargain_activity_id) { $detail = ActiveModel::detailWithTrans($bargain_activity_id); $detail['start_time'] =strtotime($detail['start_time']); $detail['end_time'] =strtotime($detail['end_time']); $list = (new ProductModel())->getActivityList($bargain_activity_id); return $this->renderSuccess('', compact('detail','list')); } /** * 砍价商品详情 */ public function detail($bargain_product_id, $url = '') { $model = new ProductModel(); //详情 $detail = $model->getBargainDetail($bargain_product_id); //活动 $active = ActiveModel::detailWithTrans($detail['bargain_activity_id']); $active['start_time'] =strtotime($active['start_time']); $active['end_time'] =strtotime($active['end_time']); //规格 $specData = BaseProductService::getSpecData($detail['product']); // 砍价规则 $setting = SettingModel::getBargain(); // 微信公众号分享参数 $share = $this->getShareParams($url, $detail['product']['product_name'], $detail['product']['product_name'], '/pages/plus/assemble/detail/detail', $detail['product']['image'][0]['file_path']); return $this->renderSuccess('', compact('detail', 'active', 'specData', 'setting', 'share')); } }