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
f5bde594
Commit
f5bde594
authored
Jun 27, 2019
by
shajiaiming
Browse files
Options
Browse Files
Download
Plain Diff
merge other branch
parents
19ca082c
428af9b3
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
28 additions
and
7 deletions
+28
-7
ApplicationController.php
backend/controllers/ApplicationController.php
+2
-2
CoinApplicationForm.php
backend/models/coin/CoinApplicationForm.php
+4
-2
add.php
backend/views/application/add.php
+10
-1
edit.php
backend/views/application/edit.php
+10
-0
ApplicationBusiness.php
common/business/ApplicationBusiness.php
+2
-2
No files found.
backend/controllers/ApplicationController.php
View file @
f5bde594
...
...
@@ -56,7 +56,7 @@ class ApplicationController extends BaseController
if
(
Yii
::
$app
->
request
->
isPost
){
Yii
::
$app
->
response
->
format
=
'json'
;
$category_id
=
Yii
::
$app
->
request
->
get
(
'category_id'
);
$fields
=
[
'category_id'
,
'h5_icon'
,
'official_url'
,
'introduce_image'
,
'show_width'
,
'show_height'
,
'open_type'
,
'open_type_app'
,
'name'
,
'sort'
,
'icon'
,
'type'
,
'native_url'
,
'native_login_url'
,
'h5_url'
,
'android_url'
,
'ios_url'
,
'app_store_url'
,
'advertise'
,
'description'
,
'redirect_type'
,
'platform_id'
];
$fields
=
[
'category_id'
,
'h5_icon'
,
'official_url'
,
'introduce_image'
,
'show_width'
,
'show_height'
,
'open_type'
,
'open_type_app'
,
'
platform_type'
,
'
name'
,
'sort'
,
'icon'
,
'type'
,
'native_url'
,
'native_login_url'
,
'h5_url'
,
'android_url'
,
'ios_url'
,
'app_store_url'
,
'advertise'
,
'description'
,
'redirect_type'
,
'platform_id'
];
$data
=
Yii
::
$app
->
request
->
post
();
$data
[
'open_type_app'
]
=
(
0
==
$data
[
'open_type_app'
])
?
1
:
$data
[
'open_type_app'
];
$params
=
array_merge
(
$data
,[
'category_id'
=>
$category_id
,
'platform_id'
=>
Yii
::
$app
->
user
->
identity
->
platform_id
]);
...
...
@@ -82,7 +82,7 @@ class ApplicationController extends BaseController
{
if
(
Yii
::
$app
->
request
->
isPost
)
{
Yii
::
$app
->
response
->
format
=
'json'
;
$fields
=
[
'category_id'
,
'id'
,
'h5_icon'
,
'official_url'
,
'introduce_image'
,
'show_width'
,
'show_height'
,
'open_type'
,
'open_type_app'
,
'name'
,
'sort'
,
'icon'
,
'type'
,
'native_url'
,
'native_login_url'
,
'h5_url'
,
'android_url'
,
'ios_url'
,
'app_store_url'
,
'advertise'
,
'description'
,
'redirect_type'
,
'platform_id'
];
$fields
=
[
'category_id'
,
'id'
,
'h5_icon'
,
'official_url'
,
'introduce_image'
,
'show_width'
,
'show_height'
,
'open_type'
,
'open_type_app'
,
'platform_type'
,
'name'
,
'sort'
,
'icon'
,
'type'
,
'native_url'
,
'native_login_url'
,
'h5_url'
,
'android_url'
,
'ios_url'
,
'app_store_url'
,
'advertise'
,
'description'
,
'redirect_type'
,
'platform_id'
];
$data
=
Yii
::
$app
->
request
->
post
();
$data
[
'open_type_app'
]
=
(
0
==
$data
[
'open_type_app'
])
?
1
:
$data
[
'open_type_app'
];
$params
=
array_merge
(
$data
,[
'platform_id'
=>
Yii
::
$app
->
user
->
identity
->
platform_id
]);
...
...
backend/models/coin/CoinApplicationForm.php
View file @
f5bde594
...
...
@@ -40,13 +40,14 @@ class CoinApplicationForm extends BaseForm
public
$show_height
;
public
$open_type
;
public
$open_type_app
;
public
$platform_type
;
public
$platform_id
;
public
function
scenarios
()
{
return
[
self
::
SCENARIO_ADD
=>
[
'category_id'
,
'name'
,
'h5_icon'
,
'official_url'
,
'introduce_image'
,
'show_width'
,
'show_height'
,
'open_type'
,
'open_type_app'
,
'sort'
,
'icon'
,
'type'
,
'native_url'
,
'native_login_url'
,
'h5_url'
,
'android_url'
,
'ios_url'
,
'app_store_url'
,
'advertise'
,
'description'
,
'redirect_type'
,
'platform_id'
],
self
::
SCENARIO_EDIT
=>
[
'category_id'
,
'id'
,
'h5_icon'
,
'official_url'
,
'introduce_image'
,
'show_width'
,
'show_height'
,
'open_type'
,
'open_type_app'
,
'name'
,
'sort'
,
'icon'
,
'type'
,
'native_url'
,
'native_login_url'
,
'h5_url'
,
'android_url'
,
'ios_url'
,
'app_store_url'
,
'advertise'
,
'description'
,
'redirect_type'
,
'platform_id'
],
self
::
SCENARIO_ADD
=>
[
'category_id'
,
'name'
,
'h5_icon'
,
'official_url'
,
'introduce_image'
,
'show_width'
,
'show_height'
,
'open_type'
,
'open_type_app'
,
'platform_type'
,
'sort'
,
'icon'
,
'type'
,
'native_url'
,
'native_login_url'
,
'h5_url'
,
'android_url'
,
'ios_url'
,
'app_store_url'
,
'advertise'
,
'description'
,
'redirect_type'
,
'platform_id'
],
self
::
SCENARIO_EDIT
=>
[
'category_id'
,
'id'
,
'h5_icon'
,
'official_url'
,
'introduce_image'
,
'show_width'
,
'show_height'
,
'open_type'
,
'open_type_app'
,
'platform_type'
,
'name'
,
'sort'
,
'icon'
,
'type'
,
'native_url'
,
'native_login_url'
,
'h5_url'
,
'android_url'
,
'ios_url'
,
'app_store_url'
,
'advertise'
,
'description'
,
'redirect_type'
,
'platform_id'
],
];
}
...
...
@@ -76,6 +77,7 @@ class CoinApplicationForm extends BaseForm
'show_height'
=>
'显示高度'
,
'open_type'
=>
'H5打开方式 PC版'
,
'open_type_app'
=>
'H5打开方式 APP版'
,
'platform_type'
=>
'所属平台'
,
'platform_id'
=>
'平台Id'
];
}
...
...
backend/views/application/add.php
View file @
f5bde594
...
...
@@ -180,7 +180,16 @@
</select>
</div>
</div>
<div
class=
"layui-form-item"
>
<label
class=
"layui-form-label"
>
所属类型
</label>
<div
class=
"layui-input-block"
>
<select
name=
"platform_type"
>
<option
value=
"1"
>
币钱包
</option>
<option
value=
"2"
>
托管账户
</option>
<option
value=
"3"
>
通用
</option>
</select>
</div>
</div>
<div
class=
"layui-form-item"
>
<button
class=
"layui-btn"
>
提交
</button>
</div>
...
...
backend/views/application/edit.php
View file @
f5bde594
...
...
@@ -182,6 +182,16 @@
</select>
</div>
</div>
<div
class=
"layui-form-item"
>
<label
class=
"layui-form-label"
>
所属类型
</label>
<div
class=
"layui-input-block"
>
<select
name=
"platform_type"
>
<option
value=
"1"
<?php
if
(
$item
[
'platform_type'
]
==
1
)
echo
"selected"
?>
>
币钱包
</option>
<option
value=
"2"
<?php
if
(
$item
[
'platform_type'
]
==
2
)
echo
"selected"
?>
>
托管账户
</option>
<option
value=
"3"
<?php
if
(
$item
[
'platform_type'
]
==
3
)
echo
"selected"
?>
>
通用
</option>
</select>
</div>
</div>
</form>
</div>
</div>
...
...
common/business/ApplicationBusiness.php
View file @
f5bde594
...
...
@@ -97,12 +97,12 @@ class ApplicationBusiness
$app_cate_Model
=
CoinAppCate
::
find
();
if
(
array_key_exists
(
'platform_id'
,
$condition
)){
$query
=
$app_cate_Model
->
JoinWith
([
'application'
],
false
)
->
select
(
'cate_id,app_id,name,icon,type,native_url,native_login_url,h5_url,android_url,ios_url,app_store_url,advertise,redirect_type,open_type_app,'
.
CoinAppCate
::
tableName
()
.
'.sort'
)
->
select
(
'cate_id,app_id,name,icon,type,native_url,native_login_url,h5_url,android_url,ios_url,app_store_url,advertise,redirect_type,open_type_app,
platform_type,
'
.
CoinAppCate
::
tableName
()
.
'.sort'
)
->
where
(
$condition
)
->
orderBy
(
CoinAppCate
::
tableName
()
.
'.sort asc'
);
}
else
{
$query
=
$app_cate_Model
->
JoinWith
([
'application'
],
false
)
->
select
(
'cate_id,app_id,name,icon,type,native_url,native_login_url,h5_url,android_url,ios_url,app_store_url,advertise,redirect_type,open_type_app,'
.
CoinAppCate
::
tableName
()
.
'.sort'
)
->
select
(
'cate_id,app_id,name,icon,type,native_url,native_login_url,h5_url,android_url,ios_url,app_store_url,advertise,redirect_type,open_type_app,
platform_type,
'
.
CoinAppCate
::
tableName
()
.
'.sort'
)
->
orderBy
(
CoinAppCate
::
tableName
()
.
'.sort asc'
);
}
...
...
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