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
7dc699b5
Commit
7dc699b5
authored
Jun 19, 2019
by
shajiaiming
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加不同客户端的打开方式
parent
f39e20e4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
31 additions
and
7 deletions
+31
-7
ApplicationController.php
backend/controllers/ApplicationController.php
+2
-2
CoinApplicationForm.php
backend/models/coin/CoinApplicationForm.php
+5
-3
add.php
backend/views/application/add.php
+12
-1
edit.php
backend/views/application/edit.php
+12
-1
No files found.
backend/controllers/ApplicationController.php
View file @
7dc699b5
...
...
@@ -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'
,
'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'
,
'name'
,
'sort'
,
'icon'
,
'type'
,
'native_url'
,
'native_login_url'
,
'h5_url'
,
'android_url'
,
'ios_url'
,
'app_store_url'
,
'advertise'
,
'description'
,
'redirect_type'
,
'platform_id'
];
$params
=
array_merge
(
Yii
::
$app
->
request
->
post
(),[
'category_id'
=>
$category_id
,
'platform_id'
=>
Yii
::
$app
->
user
->
identity
->
platform_id
]);
$params
=
$this
->
initParams
(
$params
,
$fields
);
$coin_applicateion_form
=
new
CoinApplicationForm
();
...
...
@@ -80,7 +80,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'
,
'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'
,
'name'
,
'sort'
,
'icon'
,
'type'
,
'native_url'
,
'native_login_url'
,
'h5_url'
,
'android_url'
,
'ios_url'
,
'app_store_url'
,
'advertise'
,
'description'
,
'redirect_type'
,
'platform_id'
];
$params
=
array_merge
(
Yii
::
$app
->
request
->
post
(),[
'platform_id'
=>
Yii
::
$app
->
user
->
identity
->
platform_id
]);
$params
=
$this
->
initParams
(
$params
,
$fields
);
$coin_applicateion_form
=
new
CoinApplicationForm
();
...
...
backend/models/coin/CoinApplicationForm.php
View file @
7dc699b5
...
...
@@ -39,13 +39,14 @@ class CoinApplicationForm extends BaseForm
public
$show_width
;
public
$show_height
;
public
$open_type
;
public
$open_type_app
;
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'
,
'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'
,
'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'
,
'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'
],
];
}
...
...
@@ -73,7 +74,8 @@ class CoinApplicationForm extends BaseForm
'redirect_type'
=>
'跳转方式'
,
'show_width'
=>
'显示宽度'
,
'show_height'
=>
'显示高度'
,
'open_type'
=>
'H5打开方式'
,
'open_type'
=>
'H5打开方式 PC版'
,
'open_type_app'
=>
'H5打开方式 APP版'
,
'platform_id'
=>
'平台Id'
];
}
...
...
backend/views/application/add.php
View file @
7dc699b5
...
...
@@ -160,7 +160,7 @@
</div>
<div
class=
"layui-form-item"
>
<label
class=
"layui-form-label"
>
H5打开方式
</label>
<label
class=
"layui-form-label"
>
H5打开方式
(PC版)
</label>
<div
class=
"layui-input-block"
>
<select
name=
"open_type"
>
<option
value=
"0"
>
选择打开方式
</option>
...
...
@@ -171,6 +171,17 @@
</div>
<div
class=
"layui-form-item"
>
<label
class=
"layui-form-label"
>
H5打开方式(APP版)
</label>
<div
class=
"layui-input-block"
>
<select
name=
"open_type_app"
>
<option
value=
"0"
>
选择打开方式
</option>
<option
value=
"1"
>
钱包内打开
</option>
<option
value=
"2"
>
浏览器打开
</option>
</select>
</div>
</div>
<div
class=
"layui-form-item"
>
<button
class=
"layui-btn"
>
提交
</button>
</div>
</form>
...
...
backend/views/application/edit.php
View file @
7dc699b5
...
...
@@ -162,7 +162,7 @@
</div>
<div
class=
"layui-form-item"
>
<label
class=
"layui-form-label"
>
H5打开方式
</label>
<label
class=
"layui-form-label"
>
H5打开方式
(PC版)
</label>
<div
class=
"layui-input-block"
>
<select
name=
"open_type"
>
<option
value=
"0"
>
选择打开方式
</option>
...
...
@@ -171,6 +171,17 @@
</select>
</div>
</div>
<div
class=
"layui-form-item"
>
<label
class=
"layui-form-label"
>
H5打开方式(APP版)
</label>
<div
class=
"layui-input-block"
>
<select
name=
"open_type_app"
>
<option
value=
"0"
>
选择打开方式
</option>
<option
value=
"1"
<?php
if
(
$item
[
'open_type_app'
]
==
1
)
echo
"selected"
?>
>
钱包内打开
</option>
<option
value=
"2"
<?php
if
(
$item
[
'open_type_app'
]
==
2
)
echo
"selected"
?>
>
浏览器打开
</option>
</select>
</div>
</div>
</form>
</div>
</div>
...
...
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