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
c6ace7d4
Commit
c6ace7d4
authored
Jun 21, 2018
by
rlgy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bugfixed
parent
88e10852
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
137 additions
and
152 deletions
+137
-152
add.php
backend/views/coin/add.php
+137
-3
form.php
backend/views/coin/form.php
+0
-149
No files found.
backend/views/coin/add.php
View file @
c6ace7d4
...
...
@@ -6,6 +6,141 @@
* Time: 下午3:31
*/
?>
<h4>
添加币种
</h4>
<h4>
添加币种
</h4>
<style>
.layui-form-label
{
width
:
100px
;
}
</style>
<div
class=
"layui-row"
style=
"padding: 5px;"
>
<div
class=
"layui-col-md6"
>
<form
class=
"layui-form"
method=
"post"
action=
""
>
<input
name=
"_csrf"
type=
"hidden"
value=
"
<?=
Yii
::
$app
->
request
->
getCsrfToken
()
?>
"
>
<input
name=
"id"
type=
"hidden"
value=
"
<?=
$model
->
id
?>
"
>
<div
class=
"layui-inline"
>
<label
class=
"layui-form-label"
>
名称
</label>
<div
class=
"layui-input-block"
>
<input
class=
"layui-input"
name=
"name"
value=
"
<?=
$model
->
name
?>
"
lay-verify=
"required"
>
</div>
</div>
<div
class=
"layui-inline"
>
<label
class=
"layui-form-label"
>
别称
</label>
<div
class=
"layui-input-block"
>
<input
class=
"layui-input"
name=
"nickname"
value=
"
<?=
$model
->
nickname
?>
"
>
</div>
</div>
<div
class=
"layui-form-item"
>
<label
class=
"layui-form-label"
>
官网
</label>
<div
class=
"layui-input-block"
>
<input
class=
"layui-input"
name=
"official"
value=
"
<?=
$model
->
official
?>
"
>
</div>
</div>
<div
class=
"layui-form-item"
>
<label
class=
"layui-form-label"
>
白皮书
</label>
<div
class=
"layui-input-block"
>
<input
class=
"layui-input"
name=
"paper"
value=
"
<?=
$model
->
paper
?>
"
>
</div>
</div>
<div
class=
"layui-form-item"
>
<label
class=
"layui-form-label"
>
众筹价格
</label>
<div
class=
"layui-input-block"
>
<input
class=
"layui-input"
name=
""
placeholder=
"¥"
value=
"
<?=
$model
->
price
?>
"
>
</div>
</div>
<div
class=
"layui-form-item"
>
<label
class=
"layui-form-label"
>
发行时间
</label>
<div
class=
"layui-input-block"
style=
"width: 200px"
>
<input
type=
"text"
class=
"layui-input"
id=
"time1"
value=
"
<?=
$model
->
release
?>
"
>
</div>
</div>
<div
class=
"layui-form-item"
>
<label
class=
"layui-form-label"
>
推介该币种
</label>
<div
class=
"layui-input-block"
>
<select
name=
"recommend"
>
<option
value=
"0"
>
否
</option>
<option
value=
"1"
>
首页推荐
</option>
<option
value=
"2"
>
次页推荐
</option>
</select>
</div>
</div>
<div
class=
"layui-form-item"
>
<label
class=
"layui-form-label"
>
区块查询
</label>
<div
class=
"layui-input-block"
>
<input
type=
"text"
class=
"layui-input"
value=
""
name=
"area_search"
>
</div>
</div>
<div
class=
"layui-form-item"
>
<label
class=
"layui-form-label"
>
发行总量
</label>
<div
class=
"layui-input-block"
>
<input
type=
"text"
class=
"layui-input"
value=
""
name=
"publish_count"
>
</div>
</div>
<div
class=
"layui-form-item"
>
<label
class=
"layui-form-label"
>
流通总量
</label>
<div
class=
"layui-input-block"
>
<input
type=
"text"
class=
"layui-input"
value=
""
name=
"circulate_count"
>
</div>
</div>
<div
class=
"layui-form-item"
>
<label
class=
"layui-form-label"
>
平台
</label>
<div
class=
"layui-input-block"
>
<input
class=
"layui-input"
name=
"platform"
value=
"
<?=
$model
->
platform
?>
"
>
</div>
</div>
<div
class=
"layui-form-item"
>
<label
class=
"layui-form-label"
>
类型
</label>
<div
class=
"layui-input-block"
>
<input
class=
"layui-input"
name=
"chain"
value=
"
<?=
$model
->
chain
?>
"
>
</div>
</div>
<div
class=
"layui-form-item"
>
<label
class=
"layui-form-label"
>
介绍
</label>
<div
class=
"layui-input-block"
>
<textarea
class=
"layui-textarea"
>
<?=
$model
->
introduce
?>
</textarea>
</div>
</div>
<div
class=
"layui-inline"
>
<label
class=
"layui-form-label"
>
图标
</label>
<div
class=
"layui-input-block"
>
<img
src=
"
<?=
$model
->
icon
?>
"
style=
"margin-top: 11px; max-width: 32px; max-height: 32px"
id=
"icon1"
>
</div>
<input
type=
"hidden"
name=
"icon"
value=
"
<?=
$model
->
icon
?>
"
>
</div>
<?=
$this
->
render
(
'form'
,
[
'model'
=>
$model
])
?>
\ No newline at end of file
<div
class=
"layui-inline"
style=
"margin-left: 50px;"
>
<button
type=
"button"
class=
"layui-btn"
id=
"upload1"
style=
""
>
<i
class=
"layui-icon"
>

</i>
上传新图片
</button>
</div>
<div
class=
"layui-form-item"
>
<button
class=
"layui-btn"
>
提交
</button>
</div>
</form>
</div>
</div>
<script>
var
laydate
=
layui
.
laydate
;
laydate
.
render
({
elem
:
"#time1"
});
//图片上传
var
uploader
=
layui
.
upload
;
$_csrf
=
$
(
"input[name='_csrf']"
).
val
();
uploader
.
render
({
elem
:
"#upload1"
,
url
:
'/admin/coin/upload'
,
data
:
{
_csrf
:
$_csrf
},
done
:
function
(
res
)
{
console
.
log
(
res
.
data
.
src
);
$
(
"input[name='icon']"
).
val
(
res
.
data
.
src
);
$
(
"#icon1"
).
attr
(
'src'
,
res
.
data
.
src
);
},
error
:
function
(
res
)
{
}
});
//form render
var
form
=
layui
.
form
;
form
.
render
();
</script>
backend/views/coin/form.php
deleted
100644 → 0
View file @
88e10852
<?php
/**
* Created by PhpStorm.
* User: rlgyzhcn
* Date: 18-5-31
* Time: 下午3:28
*/
/**
* @var $model backend\models\coin\CoinForm;
*/
?>
<style>
.layui-form-label
{
width
:
100px
;
}
</style>
<div
class=
"layui-row"
style=
"padding: 5px;"
>
<div
class=
"layui-col-md6"
>
<form
class=
"layui-form"
method=
"post"
action=
""
>
<input
name=
"_csrf"
type=
"hidden"
value=
"
<?=
Yii
::
$app
->
request
->
getCsrfToken
()
?>
"
>
<input
name=
"id"
type=
"hidden"
value=
"
<?=
$model
->
id
?>
"
>
<div
class=
"layui-inline"
>
<label
class=
"layui-form-label"
>
名称
</label>
<div
class=
"layui-input-block"
>
<input
class=
"layui-input"
name=
"name"
value=
"
<?=
$model
->
name
?>
"
lay-verify=
"required"
>
</div>
</div>
<div
class=
"layui-inline"
>
<label
class=
"layui-form-label"
>
别称
</label>
<div
class=
"layui-input-block"
>
<input
class=
"layui-input"
name=
"nickname"
value=
"
<?=
$model
->
nickname
?>
"
>
</div>
</div>
<div
class=
"layui-form-item"
>
<label
class=
"layui-form-label"
>
官网
</label>
<div
class=
"layui-input-block"
>
<input
class=
"layui-input"
name=
"official"
value=
"
<?=
$model
->
official
?>
"
>
</div>
</div>
<div
class=
"layui-form-item"
>
<label
class=
"layui-form-label"
>
白皮书
</label>
<div
class=
"layui-input-block"
>
<input
class=
"layui-input"
name=
"paper"
value=
"
<?=
$model
->
paper
?>
"
>
</div>
</div>
<div
class=
"layui-form-item"
>
<label
class=
"layui-form-label"
>
众筹价格
</label>
<div
class=
"layui-input-block"
>
<input
class=
"layui-input"
name=
""
placeholder=
"¥"
value=
"
<?=
$model
->
price
?>
"
>
</div>
</div>
<div
class=
"layui-form-item"
>
<label
class=
"layui-form-label"
>
发行时间
</label>
<div
class=
"layui-input-block"
style=
"width: 200px"
>
<input
type=
"text"
class=
"layui-input"
id=
"time1"
value=
"
<?=
$model
->
release
?>
"
>
</div>
</div>
<div
class=
"layui-form-item"
>
<label
class=
"layui-form-label"
>
推介该币种
</label>
<div
class=
"layui-input-block"
>
<select
name=
"recommend"
>
<option
value=
"0"
>
否
</option>
<option
value=
"1"
>
首页推荐
</option>
<option
value=
"2"
>
次页推荐
</option>
</select>
</div>
</div>
<div
class=
"layui-form-item"
>
<label
class=
"layui-form-label"
>
区块查询
</label>
<div
class=
"layui-input-block"
>
<input
type=
"text"
class=
"layui-input"
value=
""
name=
"area_search"
>
</div>
</div>
<div
class=
"layui-form-item"
>
<label
class=
"layui-form-label"
>
发行总量
</label>
<div
class=
"layui-input-block"
>
<input
type=
"text"
class=
"layui-input"
value=
""
name=
"publish_count"
>
</div>
</div>
<div
class=
"layui-form-item"
>
<label
class=
"layui-form-label"
>
流通总量
</label>
<div
class=
"layui-input-block"
>
<input
type=
"text"
class=
"layui-input"
value=
""
name=
"circulate_count"
>
</div>
</div>
<div
class=
"layui-form-item"
>
<label
class=
"layui-form-label"
>
平台
</label>
<div
class=
"layui-input-block"
>
<input
class=
"layui-input"
name=
"platform"
value=
"
<?=
$model
->
platform
?>
"
>
</div>
</div>
<div
class=
"layui-form-item"
>
<label
class=
"layui-form-label"
>
类型
</label>
<div
class=
"layui-input-block"
>
<input
class=
"layui-input"
name=
"chain"
value=
"
<?=
$model
->
chain
?>
"
>
</div>
</div>
<div
class=
"layui-form-item"
>
<label
class=
"layui-form-label"
>
介绍
</label>
<div
class=
"layui-input-block"
>
<textarea
class=
"layui-textarea"
>
<?=
$model
->
introduce
?>
</textarea>
</div>
</div>
<div
class=
"layui-inline"
>
<label
class=
"layui-form-label"
>
图标
</label>
<div
class=
"layui-input-block"
>
<img
src=
"
<?=
$model
->
icon
?>
"
style=
"margin-top: 11px; max-width: 32px; max-height: 32px"
id=
"icon1"
>
</div>
<input
type=
"hidden"
name=
"icon"
value=
"
<?=
$model
->
icon
?>
"
>
</div>
<div
class=
"layui-inline"
style=
"margin-left: 50px;"
>
<button
type=
"button"
class=
"layui-btn"
id=
"upload1"
style=
""
>
<i
class=
"layui-icon"
>

</i>
上传新图片
</button>
</div>
<div
class=
"layui-form-item"
>
<button
class=
"layui-btn"
>
提交
</button>
</div>
</form>
</div>
</div>
<script>
var
laydate
=
layui
.
laydate
;
laydate
.
render
({
elem
:
"#time1"
});
//图片上传
var
uploader
=
layui
.
upload
;
$_csrf
=
$
(
"input[name='_csrf']"
).
val
();
uploader
.
render
({
elem
:
"#upload1"
,
url
:
'/admin/coin/upload'
,
data
:
{
_csrf
:
$_csrf
},
done
:
function
(
res
)
{
console
.
log
(
res
.
data
.
src
);
$
(
"input[name='icon']"
).
val
(
res
.
data
.
src
);
$
(
"#icon1"
).
attr
(
'src'
,
res
.
data
.
src
);
},
error
:
function
(
res
)
{
}
});
//form render
var
form
=
layui
.
form
;
form
.
render
();
</script>
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