Commit 3a7d8b17 authored by shajiaiming's avatar shajiaiming

Merge branch 'master' into feature/issue_coin

parents 1ba6191d fe9d9836
......@@ -32,10 +32,24 @@ class ExploreApp extends BaseActiveRecord
return [
[['name', 'icon', 'app_url', 'slogan', 'type', 'sort', 'status', 'platform_id', 'app_category_id'], 'required'],
[['type', 'sort', 'status', 'platform_id', 'app_category_id'], 'integer'],
['slogan', 'string', 'max' => 50],
[['icon'], 'url']
];
}
public function attributeLabels()
{
return [
'name' => '应用名称',
'icon' => '应用图标',
'app_url' => 'H5链接',
'slogan' => '应用宣传语',
'type' => '应用类型',
'sort' => '应用排序',
'status' => '应用状态'
];
}
public function scenarios()
{
$scenarios = [
......
......@@ -59,7 +59,7 @@ class ExploreAppCategory extends BaseActiveRecord
public function getApplications()
{
return $this->hasMany(ExploreApp::className(), ['app_category_id' => 'id'])->select(['id', 'name', 'icon', 'app_url', 'slogan', 'type'])->orderBy('sort');
return $this->hasMany(ExploreApp::className(), ['app_category_id' => 'id'])->select(['id', 'name', 'icon', 'app_url', 'slogan', 'type'])->where(['status' => ExploreApp::STATUS_ON])->orderBy('sort');
}
}
\ No newline at end of file
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