param(); $con = []; $this->validate($params, ['banner_location|轮播图位置' => 'require', 'locale' => 'require']); $con = Tool::getOptionalQuery( ['c.i18n_lang_type_code', '=', 'locale'] //i18n, ); $query = ModelBanner::where($con) ->alias('a') ->leftjoin('i18n_lang_type c', 'a.i18n_lang_type_guid = c.i18n_lang_type_guid') //i18n ->field([ 'a.banner_img', 'a.banner_location', 'a.banner_link', 'c.i18n_lang_type_code', 'a.i18n_lang_type_guid', ]) ->where('a.banner_location', $params['banner_location']) ->order('a.banner_order', 'asc') ->select(); return msg(0, "获取轮播图列表成功!", [ 'data' => $query, 'count' => count($query) ]); } }