Toggle navigation
This project
Loading...
Sign in
najixian
/
xt_dc_admin
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
0
Members
Labels
Wiki
Forks
Network
Download as
Email Patches
Plain Diff
Browse Files
Commit
06b8783ab8dfd9328b2a67c7c1b7e2edd1403e78
Authored by
zhangximing
2020-02-06 16:27:00 +0800
1 parent
45bfe4aa
build: skipped
短信充值流水查询
Changes
2
Builds
0
Inline
Side-by-side
Showing
2 changed files
with
169 additions
and
0 deletions
application/admin/controller/Seller.php
application/admin/view/seller/getsellersmslist.html
application/admin/controller/Seller.php
View file @
06b8783
...
...
@@ -1286,4 +1286,69 @@ class Seller extends Common
}
return
view
();
}
/**
* 商家短信充值查询
*/
public
function
getsellersmslist
(){
if
(
Request
::
isAjax
()){
$data
=
Request
::
except
(
'file'
);
$time
=
(
isset
(
$data
[
'time'
])
&&
!
empty
(
$data
[
'time'
]))
?
explode
(
' - '
,
$data
[
'time'
])
:
(
strtotime
(
date
(
"Y-m-d 00:00:00"
))
.
'-'
.
strtotime
(
date
(
"Y-m-d 23:59:59"
)));
$newtime
=
is_array
(
$time
)
?
(
strtotime
(
date
(
$time
[
0
]))
.
'-'
.
strtotime
(
date
(
$time
[
1
])))
:
$time
;
$channel
=
(
!
isset
(
$data
[
'time'
]))
?
1
:
$data
[
'channel'
];
$name
=
(
!
isset
(
$data
[
'time'
]))
?
''
:
$data
[
'key'
];
$url
=
ON_LINE
.
'App.Seller.QuerySelllerSmsList&offset='
.
$data
[
'page'
]
.
'&size='
.
$data
[
'limit'
]
.
'&time='
.
$newtime
.
'&channel='
.
$channel
.
'&name='
.
$name
;
$list
=
$this
->
curl_get
(
$url
);
$array
=
json_decode
(
$list
,
TRUE
);
if
(
$array
){
foreach
(
$array
[
'data'
][
'list'
]
as
$key
=>
$value
)
{
$array
[
'data'
][
'list'
][
$key
][
'bdate'
]
=
date
(
"Y年m月d日 H时i分s秒"
,
$value
[
'bdate'
]);
$array
[
'data'
][
'list'
][
$key
][
'paystatus'
]
=
$value
[
'paystatus'
]
==
1
?
'成功'
:
'失败'
;
$array
[
'data'
][
'list'
][
$key
][
'channel'
]
=
$value
[
'channel'
]
==
NULL
?
'小程序'
:
$value
[
'channel'
];
$array
[
'data'
][
'list'
][
$key
][
'package_name'
]
=
$value
[
'package_name'
]
==
'other'
?
'其他'
:
$value
[
'package_name'
];
}
return
$result
=
[
'code'
=>
0
,
'msg'
=>
'获取成功!'
,
'data'
=>
$array
[
'data'
][
'list'
],
'count'
=>
$array
[
'data'
][
'total'
],
'rel'
=>
1
];
}
else
{
$result
[
'code'
]
=
0
;
$result
[
'msg'
]
=
'请求错误!'
;
}
return
$result
;
}
$this
->
assign
(
'title'
,
'商家短信日志查询'
);
return
view
();
}
/**
* post
*/
public
function
curl_get
(
$url
)
{
$info
=
curl_init
();
curl_setopt
(
$info
,
CURLOPT_RETURNTRANSFER
,
true
);
curl_setopt
(
$info
,
CURLOPT_HEADER
,
0
);
curl_setopt
(
$info
,
CURLOPT_NOBODY
,
0
);
curl_setopt
(
$info
,
CURLOPT_SSL_VERIFYPEER
,
false
);
curl_setopt
(
$info
,
CURLOPT_SSL_VERIFYPEER
,
false
);
curl_setopt
(
$info
,
CURLOPT_SSL_VERIFYHOST
,
false
);
curl_setopt
(
$info
,
CURLOPT_URL
,
$url
);
$output
=
curl_exec
(
$info
);
curl_close
(
$info
);
return
$output
;
}
}
...
...
application/admin/view/seller/getsellersmslist.html
0 → 100644
View file @
06b8783
{include file="common/head"/}
<div
class=
"admin-main layui-anim layui-anim-upbit"
>
<fieldset
class=
"layui-elem-field layui-field-title"
>
<legend>
{:$title}
</legend>
</fieldset>
<div
class=
"demoTable"
>
商家:
<div
class=
"layui-input-inline"
>
<input
class=
"layui-input"
name=
"key"
id=
"key"
placeholder=
"{:lang('pleaseEnter')}店铺名称"
autocomplete=
"off"
>
</div>
日期范围:
<div
class=
"layui-input-inline"
>
<input
type=
"text"
style =
"width:300px"
;
class=
"layui-input"
id=
"time"
placeholder=
"默认为当天的充值情况"
>
</div>
商家来源:
<div
class=
"layui-input-inline layui-form"
>
<div
class=
"layui-input-8"
>
<select
name=
"class"
id=
"channel"
lay-filter=
"myselect"
>
<option
value=
"-1"
>
全部
</option>
<option
value=
"1"
selected
>
合作
</option>
<option
value=
"2"
>
推广
</option>
<option
value=
"3"
>
测试
</option>
</select>
</div>
</div>
<button
class=
"layui-btn"
id=
"search"
data-type=
"reload"
>
查询统计
</button>
</div>
<table
class=
"layui-table"
id=
"list"
lay-filter=
"list"
></table>
</div>
<script
type=
"text/html"
id=
"toolbarDemo"
>
</script>
{include file="common/foot"/}
<script>
layui
.
use
([
'table'
,
'form'
,
'laydate'
],
function
()
{
var
table
=
layui
.
table
,
laydate
=
layui
.
laydate
,
$
=
layui
.
jquery
;
console
.
log
(
layui
);
var
tableIn
=
table
.
render
({
elem
:
'#list'
,
url
:
'{:url("getsellersmslist")}'
,
method
:
'post'
,
title
:
'短信充值流水'
,
page
:
true
,
toolbar
:
'#toolbarDemo'
,
cols
:
[[
{
field
:
'id'
,
title
:
'{:lang("id")}'
,
width
:
70
,
fixed
:
true
},
{
field
:
'sellername'
,
align
:
'center'
,
title
:
'店铺名字'
},
{
field
:
'package_name'
,
title
:
'套餐'
},
{
field
:
'total'
,
title
:
'充值总数'
},
{
field
:
'price'
,
title
:
'金额'
},
{
field
:
'channel'
,
align
:
'center'
,
title
:
'充值渠道'
},
{
field
:
'desc'
,
align
:
'center'
,
title
:
'充值备注'
},
{
field
:
'paystatus'
,
align
:
'center'
,
title
:
'充值状态'
},
{
field
:
'bdate'
,
align
:
'center'
,
title
:
'购买时间'
,
sort
:
true
},
{
field
:
'cdate'
,
align
:
'center'
,
title
:
'记录时间'
,
sort
:
true
},
]],
done
:
function
(
res
,
curr
,
count
){
}
,
id
:
'testReload'
,
page
:
true
,
limit
:
10
});
//日期时间范围
laydate
.
render
({
elem
:
'#time'
,
type
:
'datetime'
,
range
:
true
});
//搜索
$
(
'#search'
).
on
(
'click'
,
function
()
{
//关键字
var
key
=
$
(
'#key'
).
val
();
var
time
=
$
(
'#time'
).
val
();
console
.
log
(
time
);
//商家来源
var
channel
=
$
(
'#channel'
).
val
();
console
.
log
(
channel
);
//传参
tableIn
.
reload
({
page
:
{
page
:
1
},
where
:
{
key
:
key
,
time
:
time
,
channel
:
channel
}});
});
var
$
=
layui
.
$
,
active
=
{
reload
:
function
(){
var
key
=
$
(
'#key'
);
//执行重载
table
.
reload
(
'testReload'
,
{
page
:
{
curr
:
1
//重新从第 1 页开始
}
,
where
:
{
key
:
{
id
:
key
.
val
()
}
}
});
}
};
})
</script>
\ No newline at end of file
...
...
Please
register
or
login
to post a comment