Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
token
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wallet
token
Commits
3a7d8b17
Commit
3a7d8b17
authored
Nov 18, 2019
by
shajiaiming
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' into feature/issue_coin
parents
1ba6191d
fe9d9836
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
1 deletion
+16
-1
ExploreApp.php
common/models/psources/ExploreApp.php
+14
-0
ExploreAppCategory.php
common/models/psources/ExploreAppCategory.php
+2
-1
No files found.
common/models/psources/ExploreApp.php
View file @
3a7d8b17
...
@@ -32,10 +32,24 @@ class ExploreApp extends BaseActiveRecord
...
@@ -32,10 +32,24 @@ class ExploreApp extends BaseActiveRecord
return
[
return
[
[[
'name'
,
'icon'
,
'app_url'
,
'slogan'
,
'type'
,
'sort'
,
'status'
,
'platform_id'
,
'app_category_id'
],
'required'
],
[[
'name'
,
'icon'
,
'app_url'
,
'slogan'
,
'type'
,
'sort'
,
'status'
,
'platform_id'
,
'app_category_id'
],
'required'
],
[[
'type'
,
'sort'
,
'status'
,
'platform_id'
,
'app_category_id'
],
'integer'
],
[[
'type'
,
'sort'
,
'status'
,
'platform_id'
,
'app_category_id'
],
'integer'
],
[
'slogan'
,
'string'
,
'max'
=>
50
],
[[
'icon'
],
'url'
]
[[
'icon'
],
'url'
]
];
];
}
}
public
function
attributeLabels
()
{
return
[
'name'
=>
'应用名称'
,
'icon'
=>
'应用图标'
,
'app_url'
=>
'H5链接'
,
'slogan'
=>
'应用宣传语'
,
'type'
=>
'应用类型'
,
'sort'
=>
'应用排序'
,
'status'
=>
'应用状态'
];
}
public
function
scenarios
()
public
function
scenarios
()
{
{
$scenarios
=
[
$scenarios
=
[
...
...
common/models/psources/ExploreAppCategory.php
View file @
3a7d8b17
...
@@ -59,7 +59,7 @@ class ExploreAppCategory extends BaseActiveRecord
...
@@ -59,7 +59,7 @@ class ExploreAppCategory extends BaseActiveRecord
public
function
getApplications
()
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
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment