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
0a446ba4cc512a1edf13500165cf3d7b926fb1e7
Authored by
u123231312
2018-08-29 15:22:53 +0800
1 parent
a968461a
build: skipped
运营人员管理(二维码调取、运营人员list)
Changes
4
Builds
0
Inline
Side-by-side
Showing
4 changed files
with
108 additions
and
0 deletions
application/admin/controller/Auth.php
application/admin/lang/zh-cn.php
application/admin/view/auth/operate_Add.html
application/admin/view/auth/operate_List.html
application/admin/controller/Auth.php
View file @
0a446ba
...
...
@@ -308,4 +308,37 @@ class Auth extends Common
return
$this
->
fetch
();
}
}
//小饕点餐运营人员管理
public
function
operateList
(){
if
(
Request
::
isAjax
()){
//获取运营人员列表
$list
=
file_get_contents
(
'http://xt04.colorcun.com/index.php?service=App.User.GetOperateList'
);
$array
=
json_decode
(
$list
,
TRUE
);
foreach
(
$array
[
'data'
]
as
$key
=>
$val
){
if
(
$val
[
'status'
]
==
1
){
$array
[
'data'
][
$key
][
'status'
]
=
"运营人员"
;
}
$array
[
'data'
][
$key
][
'cdate'
]
=
date
(
"Y-m-d H:i:s"
,
$val
[
'cdate'
]);
}
if
(
$array
[
'ret'
]
==
200
){
$result
=
[
'code'
=>
0
,
'msg'
=>
'获取成功!'
,
'data'
=>
$array
[
'data'
],
'rel'
=>
1
];
}
return
$result
;
}
return
view
();
}
//增加运营管理人员
public
function
operateAdd
(){
//缓存60秒 不请求。
$arr
=
cache
(
'qrcod_url'
);
if
(
!
$arr
){
$arr
=
file_get_contents
(
"http://xt.colorcun.com/WechatApi/WechatApi/CreateOperateQrcode/"
);
$arr
=
json_decode
(
$arr
,
TRUE
);
cache
(
'qrcod_url'
,
$arr
,
50
);
}
$this
->
assign
(
'qrcode_path'
,
$arr
[
'data'
]);
return
view
();
}
}
\ No newline at end of file
...
...
application/admin/lang/zh-cn.php
View file @
0a446ba
...
...
@@ -19,6 +19,7 @@ return [
'companyAddress'
=>
'公司地址'
,
'admin'
=>
'管理员'
,
'operate'
=>
'运营人员'
,
'module'
=>
'模型'
,
'user'
=>
'会员'
,
...
...
application/admin/view/auth/operate_Add.html
0 → 100644
View file @
0a446ba
{include file="common/head"/}
<div
class=
"admin-main fadeInUp animated"
ng-app=
"hd"
ng-controller=
"ctrl"
>
<fieldset
class=
"layui-elem-field layui-field-title"
>
<legend>
请扫描二维码完成操作
</legend>
</fieldset>
<form
class=
"layui-form layui-form-pane"
>
<div
class=
"layui-form-item"
>
<label
class=
"layui-form-label"
style=
"height: 465px;width: 500px;"
><img
style=
"margin: 20px;height: 400px;width: 400px;"
src=
"{$qrcode_path}"
/></label>
</div>
<div
class=
"layui-form-item"
>
<div
class=
"layui-input-block"
>
<a
href=
"{:url('operateList')}"
style=
"margin-left: 95px"
class=
"layui-btn"
>
{:lang('back')}
</a>
</div>
</div>
</form>
</div>
{include file="common/foot"/}
\ No newline at end of file
...
...
application/admin/view/auth/operate_List.html
0 → 100644
View file @
0a446ba
{include file="common/head"/}
<div
class=
"admin-main layui-anim layui-anim-upbit"
>
<fieldset
class=
"layui-elem-field layui-field-title"
>
<legend>
{:lang('operate')}{:lang('list')}
</legend>
</fieldset>
<blockquote
class=
"layui-elem-quote"
>
<a
href=
"{:url('operateAdd')}"
class=
"layui-btn layui-btn-sm"
>
{:lang('add')}{:lang('operate')}
</a>
</blockquote>
<table
class=
"layui-table"
id=
"list"
lay-filter=
"list"
></table>
</div>
{include file="common/foot"/}
<script
type=
"text/html"
id=
"barDemo"
>
<
a
class
=
"layui-btn layui-btn-danger layui-btn-xs"
lay
-
event
=
"del"
>
{:
lang
(
'del'
)}
<
/a
>
</script>
<script>
layui
.
use
([
'table'
,
'form'
],
function
()
{
var
table
=
layui
.
table
,
form
=
layui
.
form
,
$
=
layui
.
jquery
;
var
tableIn
=
table
.
render
({
elem
:
'#list'
,
url
:
'{:url("operateList")}'
,
method
:
'post'
,
cols
:
[[
{
field
:
'id'
,
title
:
'主键ID'
,
width
:
80
,
fixed
:
true
}
,{
field
:
'openid'
,
title
:
'运营授权ID'
,
width
:
280
,
fixed
:
true
}
,{
field
:
'seller_openid'
,
title
:
'微信openid'
,
width
:
270
}
,{
field
:
'seller_nickname'
,
title
:
'微信昵称'
,
width
:
120
}
,{
field
:
'status'
,
title
:
'用户身份'
,
width
:
120
}
,{
field
:
'cdate'
,
title
:
'加入时间'
,
width
:
180
}
,{
width
:
160
,
title
:
'操作'
,
align
:
'center'
,
toolbar
:
'#barDemo'
}
]]
});
//删除运营人员
table
.
on
(
'tool(list)'
,
function
(
obj
){
var
data
=
obj
.
data
;
if
(
obj
.
event
===
'del'
){
layer
.
confirm
(
'{:lang("Are you sure you want to delete it")}'
,
function
(
index
){
$
.
post
(
"{:url('operateDel')}"
,{
admin_id
:
data
.
admin_id
},
function
(
res
){
if
(
res
.
code
==
1
){
layer
.
msg
(
res
.
msg
,{
time
:
1000
,
icon
:
1
});
obj
.
del
();
}
else
{
layer
.
msg
(
res
.
msg
,{
time
:
1000
,
icon
:
2
});
}
});
layer
.
close
(
index
);
});
}
});
});
</script>
</body>
</html>
\ No newline at end of file
...
...
Please
register
or
login
to post a comment