Ejemplo n.º 1
0
 public function actionIndex()
 {
     $bannerList = Material::find()->where(['materialId' => Variable::$materialId_proBanner])->orderBy('sort ASC')->all();
     $model = Material::findOne(['materialId' => Variable::$materialId_productVideo]);
     $list = Material::findAll(['materialId' => Variable::$materialId_auth]);
     return $this->render(FVariable::$productIndex_view, ['model' => $model, 'list' => $list, 'bannerList' => $bannerList]);
 }
Ejemplo n.º 2
0
 public function findByProductId($id)
 {
     $MaterialAll = Material::find()->where(array('useId' => $id))->all();
     if (!$MaterialAll) {
         return false;
     }
     return $MaterialAll;
 }
Ejemplo n.º 3
0
 public function actionIndex()
 {
     $bannerList = Material::find()->where(['materialId' => Variable::$materialId_banner])->orderBy('sort ASC')->all();
     $articleList = Article::find()->where(['categoryId' => Variable::$articleCat_type_news]);
     $articleList->orderBy('isIndexShow DESC');
     $articleList = $articleList->limit(4)->all();
     //        print_r($bannerList);
     return $this->render(FVariable::$home_view, ['bannerList' => $bannerList, 'articleList' => $articleList]);
 }
 public function actionTeadetailsrate()
 {
     $material = new Material();
     $product = new Product();
     $MaterialList = $material->findByProductId(GlobalArray::$productIdArray['0']);
     $ProductList = $product->findByProductId(GlobalArray::$productIdArray['0']);
     $pagination = new Pagination(['defaultPageSize' => 15, 'totalCount' => count((new Comment())->findByProductIdAll(GlobalArray::$commentTypeConstantArray['product'], GlobalArray::$productIdArray['0'], 0, 0))]);
     $commentList = (new Comment())->findByProductIdAll(GlobalArray::$commentTypeConstantArray['product'], GlobalArray::$productIdArray['0'], $pagination->offset, $pagination->limit);
     $product->UpdateByLookCount(GlobalArray::$productIdArray['0']);
     return $this->render(FVariable::$productTeadetailsrate_view, ['MaterialList' => $MaterialList, 'ProductList' => $ProductList, 'commentList' => $commentList, 'pagination' => $pagination]);
 }