Commit d6c0f65e authored by ZhuChunYang's avatar ZhuChunYang

update

parent 3e593713
......@@ -109,10 +109,11 @@ class ApplicationController extends BaseController
{
$request = Yii::$app->request;
$name = $request->get('name','');
$cate_app_items = [];
if($name){
$appItems = CoinApplication::getAppItemsByName($name);
if($appItems){
$appIds = array_column($appItems,'id');
$appIds = array_column($appItems,'app_id');
$icon_Items = array_column($appItems,'icon');
$icon_Infos = CoinImage::getItemsByIds($icon_Items);
foreach($appItems as &$value){
......
......@@ -46,7 +46,7 @@ class CoinApplicateRank extends BaseActiveRecord
{
$applicate_rank_model = self::find();
$data = $applicate_rank_model->JoinWith(['application'], false)
->select('relate_id as id,sort,name,icon,advertise,'.self::tableName().".type")
->select('relate_id as app_id,sort,name,icon,advertise,native_url,native_login_url,h5_url,android_url,ios_url,app_store_url,redirect_type,'.CoinApplication::tableName().".type")
->orderBy(self::tableName().'.sort asc')->where([self::tableName().'.type' => $type])->asArray()->all();
return $data;
}
......
......@@ -151,7 +151,8 @@ class CoinApplication extends BaseActiveRecord
public static function getAppItemsByName($name)
{
return array_column(self::find()->select('id,name,icon')->where(['like','name',$name])->asArray()->all(),null,'id');
return array_column(self::find()->select('id as app_id,name,icon,advertise,native_url,native_login_url,h5_url,android_url,ios_url,app_store_url,redirect_type,type')
->where(['like','name',$name])->asArray()->all(),null,'app_id');
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment