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
3098add5
Commit
3098add5
authored
Jan 18, 2019
by
ZhuChunYang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
9a7e2e8f
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
66 additions
and
20 deletions
+66
-20
CoinReleaseMemberController.php
backend/controllers/CoinReleaseMemberController.php
+2
-5
list.php
backend/views/coin-release-member/list.php
+1
-2
list.js
backend/web/js/coin-release-member/list.js
+47
-6
CoinBusiness.php
common/business/CoinBusiness.php
+11
-4
CoinBTYService.php
common/service/coin/CoinBTYService.php
+1
-1
CoinService.php
common/service/coin/CoinService.php
+4
-2
No files found.
backend/controllers/CoinReleaseMemberController.php
View file @
3098add5
...
@@ -127,17 +127,14 @@ class CoinReleaseMemberController extends BaseController
...
@@ -127,17 +127,14 @@ class CoinReleaseMemberController extends BaseController
$value
[]
=
$value
[
3
]
*
$present
/
100
;
$value
[]
=
$value
[
3
]
*
$present
/
100
;
$value
[]
=
$company_name
;
$value
[]
=
$company_name
;
}
}
$result
=
CoinReleaseMember
::
implode
(
$data
);
//$result = CoinReleaseMember::implode($data);
if
(
$result
)
{
return
[
'code'
=>
0
,
'msg'
=>
'预览成功'
,
'data'
=>
$data
];
return
[
'code'
=>
0
,
'msg'
=>
'导入成功'
];
}
}
else
{
}
else
{
return
[
'code'
=>
-
1
,
'msg'
=>
'规则不存在'
];
return
[
'code'
=>
-
1
,
'msg'
=>
'规则不存在'
];
}
}
}
catch
(
\Exception
$e
)
{
}
catch
(
\Exception
$e
)
{
return
[
'code'
=>
$e
->
getCode
(),
'msg'
=>
$e
->
getMessage
()];
return
[
'code'
=>
$e
->
getCode
(),
'msg'
=>
$e
->
getMessage
()];
}
}
return
[
'code'
=>
0
,
'msg'
=>
'导入失败'
];
}
}
/**
/**
...
...
backend/views/coin-release-member/list.php
View file @
3098add5
...
@@ -17,4 +17,4 @@ IndexAsset::register($this);
...
@@ -17,4 +17,4 @@ IndexAsset::register($this);
<div
class=
"layui-col-md8"
>
<div
class=
"layui-col-md8"
>
<table
class=
"layui-table"
id=
"table1"
lay-filter=
"table1"
></table>
<table
class=
"layui-table"
id=
"table1"
lay-filter=
"table1"
></table>
</div>
</div>
</div>
</div>
\ No newline at end of file
backend/web/js/coin-release-member/list.js
View file @
3098add5
...
@@ -35,12 +35,53 @@ upload.render({
...
@@ -35,12 +35,53 @@ upload.render({
exts
:
'csv'
,
exts
:
'csv'
,
done
:
function
(
res
)
{
done
:
function
(
res
)
{
layer
.
closeAll
(
'loading'
);
layer
.
closeAll
(
'loading'
);
layer
.
msg
(
res
.
msg
);
console
.
log
(
res
);
table
.
reload
(
'table1'
,
{
var
data
=
res
.
data
;
page
:
{
var
tr_data
=
''
;
curr
:
1
for
(
var
i
=
0
;
i
<
data
.
length
;
i
++
){
}
tr_data
+=
'<tr><td>'
+
data
[
i
][
1
]
+
'</td><td>'
+
data
[
i
][
2
]
+
'</td><td>'
+
data
[
i
][
3
]
+
'</td></tr>'
;
});
}
if
(
res
.
code
==
0
){
var
html
=
'<table class="layui-table">'
+
'<colgroup>
\
n'
+
'<col width="150">'
+
'<col width="150">'
+
'<col width="200">'
+
'</colgroup>'
+
'<thead>'
+
'<tr>'
+
'<th>手机号</th>'
+
'<th>币种</th>'
+
'<th>数量</th>'
+
'</tr>'
+
'</thead>'
+
'<tbody>'
+
tr_data
+
'</tbody>'
+
'</table>'
;
layer
.
open
({
title
:
'导入数据预览'
,
content
:
html
,
area
:
[
'1000px'
,
'800px'
],
scrollbar
:
true
,
btn
:
[
'确认导入'
,
'取消'
]
,
btn1
:
function
(
index
,
layero
){
//按钮【按钮一】的回调
}
,
btn2
:
function
(
index
,
layero
){
//按钮【按钮二】的回调
alert
(
1
);
//return false 开启该代码可禁止点击该按钮关闭
}
,
cancel
:
function
(){
}
});
}
else
{
layer
.
msg
(
res
.
msg
);
}
},
},
before
:
function
(
obj
)
{
//obj参数包含的信息,跟 choose回调完全一致,可参见上文。
before
:
function
(
obj
)
{
//obj参数包含的信息,跟 choose回调完全一致,可参见上文。
layer
.
load
();
//上传loading
layer
.
load
();
//上传loading
...
...
common/business/CoinBusiness.php
View file @
3098add5
...
@@ -202,10 +202,17 @@ class CoinBusiness
...
@@ -202,10 +202,17 @@ class CoinBusiness
$row
[
'introduce'
]
=
''
;
$row
[
'introduce'
]
=
''
;
}
}
$row
[
'price'
]
=
sprintf
(
"%s"
,
(
double
)
$row
[
'price'
]);
$row
[
'price'
]
=
sprintf
(
"%s"
,
(
double
)
$row
[
'price'
]);
$coin
=
CoinFactory
::
createCoin
(
$row
[
'name'
],
$row
[
'id'
],
$row
[
'sid'
]);
$quotation
=
ExchangeBusiness
::
getquatation
(
$row
[
'name'
]);
$row
[
'quotation'
]
=
$coin
->
quotation
();
if
(
$quotation
){
$row
[
'exchange_count'
]
=
$coin
->
exchange_count
();
$tikerdata
[
'price'
]
=
$quotation
[
'rmb'
];
$coin
->
__destruct
();
$tikerdata
[
'dollar'
]
=
$quotation
[
'last'
];
}
else
{
$tikerdata
[
'price'
]
=
0
;
$tikerdata
[
'dollar'
]
=
0
;
}
$row
[
'quotation'
]
=
$tikerdata
;
$row
[
'quotation'
][
'publish_count'
]
=
$row
[
'publish_count'
];
$row
[
'quotation'
][
'circulate_count'
]
=
$row
[
'circulate_count'
];
}
}
return
$row
?
[
$row
]
:
[];
return
$row
?
[
$row
]
:
[];
}
}
...
...
common/service/coin/CoinBTYService.php
View file @
3098add5
...
@@ -51,7 +51,7 @@ class CoinBTYService extends Coin implements CoinInterface
...
@@ -51,7 +51,7 @@ class CoinBTYService extends Coin implements CoinInterface
$key
=
$this
->
cache_key_prifx
.
$this
->
sid
.
'all'
;
$key
=
$this
->
cache_key_prifx
.
$this
->
sid
.
'all'
;
$result
=
Yii
::
$app
->
cache
->
get
(
$key
);
$result
=
Yii
::
$app
->
cache
->
get
(
$key
);
if
(
$result
===
false
||
YII_ENV_DEV
)
{
if
(
$result
===
false
||
YII_ENV_DEV
)
{
$url
=
'http
://40.83.77.188
/api/data/Ticker?sort=cname'
;
$url
=
'http
s://zbapi.licai.cn
/api/data/Ticker?sort=cname'
;
$ch
=
new
Curl
();
$ch
=
new
Curl
();
$content
=
$ch
->
get
(
$url
,
false
);
$content
=
$ch
->
get
(
$url
,
false
);
if
(
is_array
(
$content
)
&&
isset
(
$content
[
'code'
])
&&
$content
[
'code'
]
==
200
)
{
if
(
is_array
(
$content
)
&&
isset
(
$content
[
'code'
])
&&
$content
[
'code'
]
==
200
)
{
...
...
common/service/coin/CoinService.php
View file @
3098add5
...
@@ -492,7 +492,7 @@ class CoinService extends Coin implements CoinInterface
...
@@ -492,7 +492,7 @@ class CoinService extends Coin implements CoinInterface
* @param string $sid
* @param string $sid
* @return object|string
* @return object|string
*/
*/
public
function
quotation
()
/*
public function quotation()
{
{
//使用缓存
//使用缓存
$key = [
$key = [
...
@@ -538,5 +538,6 @@ class CoinService extends Coin implements CoinInterface
...
@@ -538,5 +538,6 @@ class CoinService extends Coin implements CoinInterface
}
}
}
}
return $result;
return $result;
}
}*/
}
}
\ 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