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
c440c496
Commit
c440c496
authored
Jan 18, 2019
by
ZhuChunYang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
9c81f813
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
2 deletions
+27
-2
CoinReleaseMemberController.php
backend/controllers/CoinReleaseMemberController.php
+16
-0
list.js
backend/web/js/coin-release-member/list.js
+11
-2
No files found.
backend/controllers/CoinReleaseMemberController.php
View file @
c440c496
...
...
@@ -127,6 +127,8 @@ class CoinReleaseMemberController extends BaseController
$value
[]
=
$value
[
3
]
*
$present
/
100
;
$value
[]
=
$company_name
;
}
$data_json
=
json_encode
(
$data
);
Yii
::
$app
->
redis
->
set
(
'coin_release_member_data'
,
$data_json
,
'EX'
,
3600
);
foreach
(
$data
as
$key
=>
&
$value
){
$value
[
3
]
/=
1e8
;
unset
(
$value
[
4
]);
...
...
@@ -143,6 +145,20 @@ class CoinReleaseMemberController extends BaseController
}
}
public
function
actionDataUpdate
()
{
Yii
::
$app
->
response
->
format
=
'json'
;
if
(
Yii
::
$app
->
request
->
isAjax
){
$coin_release_member_data
=
Yii
::
$app
->
redis
->
get
(
'coin_release_member_data'
);
if
(
$coin_release_member_data
){
$coin_release_member_data
=
json_decode
(
$coin_release_member_data
);
CoinReleaseMember
::
implode
(
$coin_release_member_data
);
return
[
'code'
=>
0
,
'msg'
=>
'导入成功'
];
}
return
[
'code'
=>
0
,
'msg'
=>
'没有需要导入的数据'
];
}
}
/**
* 获取rule_id
*
...
...
backend/web/js/coin-release-member/list.js
View file @
c440c496
...
...
@@ -35,7 +35,6 @@ upload.render({
exts
:
'csv'
,
done
:
function
(
res
)
{
layer
.
closeAll
(
'loading'
);
console
.
log
(
res
);
var
data
=
res
.
data
;
var
tr_data
=
''
;
for
(
var
i
=
0
;
i
<
data
.
length
;
i
++
){
...
...
@@ -67,10 +66,20 @@ upload.render({
btn
:
[
'确认导入'
,
'取消'
]
,
btn1
:
function
(
index
,
layero
){
//按钮【按钮一】的回调
$
.
get
(
'/admin/coin-release-member/data-update'
,
{},
function
(
rev
)
{
layer
.
msg
(
rev
.
msg
);
if
(
0
==
rev
.
code
)
{
layer
.
close
(
index
);
table
.
reload
(
'table1'
,
{
page
:
{
curr
:
1
}
});
}
});
}
,
btn2
:
function
(
index
,
layero
){
//按钮【按钮二】的回调
alert
(
1
);
//return false 开启该代码可禁止点击该按钮关闭
}
,
cancel
:
function
(){
...
...
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