Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
haishi
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
冷斌
haishi
Commits
428b6b38
Commit
428b6b38
authored
Apr 24, 2020
by
冷斌
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
cd5c97fe
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
53 additions
and
7 deletions
+53
-7
admin/themes/simplebootx/User/belong.html
+22
-7
application/User/Controller/IndexadminController.class.php
+31
-0
No files found.
admin/themes/simplebootx/User/belong.html
View file @
428b6b38
...
@@ -12,12 +12,12 @@
...
@@ -12,12 +12,12 @@
<div
class=
"controls"
style=
"margin-top: 15px;"
>
<div
class=
"controls"
style=
"margin-top: 15px;"
>
当前归属:{$proxy_str}
当前归属:{$proxy_str}
</div>
</div>
<div
class=
"controls"
style=
"margin-top: 15px;"
>
<div
class=
"controls"
style=
"margin-top: 15px;"
>
修改归属:
修改归属:
<select
id=
"one"
name=
"one_id"
><option
value=
"0"
>
请选择一级代理
</option><volist
name=
"ones"
id=
"one"
><option
value=
"{$one.id}"
>
{$one.user_nicename}({$one.id})
</option></volist></select>
<select
id=
"one"
name=
"one_id"
><option
value=
"0"
>
请选择一级代理
</option><volist
name=
"ones"
id=
"one"
><option
value=
"{$one.id}"
>
{$one.user_nicename}({$one.id})
</option></volist></select>
<select
id=
"two"
name=
"two_id"
disabled=
"true"
><option
value=
"0"
>
请选择二级代理
</option></select>
<select
id=
"two"
name=
"two_id"
disabled=
"true"
><option
value=
"0"
>
请选择二级代理
</option></select>
<if
condition=
"$ispu"
>
<if
condition=
"$ispu"
>
<br/>
<br/>
修改归属:
修改归属:
...
@@ -45,7 +45,7 @@
...
@@ -45,7 +45,7 @@
if
(
data
.
html
.
anchor
!=
''
){
if
(
data
.
html
.
anchor
!=
''
){
$
(
"#three"
).
prop
(
'disabled'
,
false
);
$
(
"#three"
).
prop
(
'disabled'
,
false
);
$
(
"#three"
).
html
(
data
.
html
.
anchor
);
$
(
"#three"
).
html
(
data
.
html
.
anchor
);
}
}
}
else
{
}
else
{
$
(
"#two"
).
html
(
'<option value="0">请选择二级代理</option>'
);
$
(
"#two"
).
html
(
'<option value="0">请选择二级代理</option>'
);
$
(
"#two"
).
prop
(
'disabled'
,
true
);
$
(
"#two"
).
prop
(
'disabled'
,
true
);
...
@@ -62,13 +62,28 @@
...
@@ -62,13 +62,28 @@
//console.log(data);
//console.log(data);
if
(
data
.
state
==
'success'
&&
data
.
status
==
1
){
if
(
data
.
state
==
'success'
&&
data
.
status
==
1
){
$
(
"#three"
).
prop
(
'disabled'
,
false
);
$
(
"#three"
).
prop
(
'disabled'
,
false
);
$
(
"#three"
).
html
(
data
.
html
);
$
(
"#three"
).
html
(
data
.
html
);
}
else
{
}
else
{
$
(
"#three"
).
html
(
'<option value="0">请选择主播</option>'
);
$
(
"#three"
).
html
(
'<option value="0">请选择主播</option>'
);
$
(
"#three"
).
prop
(
'disabled'
,
true
);
$
(
"#three"
).
prop
(
'disabled'
,
true
);
}
}
},
'json'
);
},
'json'
);
});
});
//查找主播下的推广员
$
(
"#three"
).
on
(
'change'
,
function
(
e
){
var
three_id
=
$
(
this
).
val
();
//查找二级代理
$
.
post
(
"{:U('indexadmin/get_tuiguang')}"
,{
three_id
:
three_id
},
function
(
data
){
//console.log(data);
if
(
data
.
state
==
'success'
&&
data
.
status
==
1
){
$
(
"#four"
).
prop
(
'disabled'
,
false
);
$
(
"#four"
).
html
(
data
.
html
);
}
else
{
$
(
"#four"
).
html
(
'<option value="0">请选择推广员</option>'
);
$
(
"#four"
).
prop
(
'disabled'
,
true
);
}
},
'json'
);
});
$
(
"#belong"
).
on
(
'click'
,
function
(){
$
(
"#belong"
).
on
(
'click'
,
function
(){
var
uid
=
$
(
"[name='uid']"
).
val
();
var
uid
=
$
(
"[name='uid']"
).
val
();
var
one_id
=
$
(
"#one"
).
val
();
var
one_id
=
$
(
"#one"
).
val
();
...
@@ -79,8 +94,8 @@
...
@@ -79,8 +94,8 @@
$
.
post
(
"{:U('indexadmin/belong_post')}"
,{
uid
:
uid
,
one_id
:
one_id
,
two_id
:
two_id
,
three_id
:
three_id
,
four_id
:
four_id
},
function
(
data
){
$
.
post
(
"{:U('indexadmin/belong_post')}"
,{
uid
:
uid
,
one_id
:
one_id
,
two_id
:
two_id
,
three_id
:
three_id
,
four_id
:
four_id
},
function
(
data
){
console
.
log
(
data
);
console
.
log
(
data
);
if
(
data
.
state
==
'success'
&&
data
.
status
==
1
){
if
(
data
.
state
==
'success'
&&
data
.
status
==
1
){
//alert("设置成功!");
//alert("设置成功!");
$
(
"#result"
).
html
(
data
.
info
);
$
(
"#result"
).
html
(
data
.
info
);
setTimeout
(
function
(){
setTimeout
(
function
(){
...
...
application/User/Controller/IndexadminController.class.php
View file @
428b6b38
...
@@ -899,5 +899,36 @@ class IndexadminController extends AdminbaseController {
...
@@ -899,5 +899,36 @@ class IndexadminController extends AdminbaseController {
}
}
echo
json_encode
(
$data
);
echo
json_encode
(
$data
);
}
}
//获取推广员
public
function
get_tuiguang
()
{
$data
[
'html'
]
=
'<option value="0">请选择推广员</option>'
;
$data
[
'state'
]
=
'error'
;
$data
[
'status'
]
=
0
;
$three_id
=
intval
(
$_POST
[
'three_id'
]);
$Proxy
=
M
(
'users_proxy'
);
$Users
=
M
(
'users'
);
$path
=
setpath
(
$three_id
);
//所有的推广员
$proxys
=
$Proxy
->
field
(
'uid'
)
->
where
(
"type=-1 and path like '%
{
$path
}
%'"
)
->
select
();
$html
=
''
;
if
(
$proxys
)
{
$data
[
'state'
]
=
'success'
;
$data
[
'status'
]
=
1
;
foreach
(
$proxys
as
$k
=>
$v
)
{
$user
=
$Users
->
where
(
"id=
{
$v
[
'uid'
]
}
and tg_type=5"
)
->
find
();
if
(
$user
)
{
$data
[
'html'
]
.=
'<option value="'
.
$user
[
'id'
]
.
'">'
.
$user
[
'user_nicename'
]
.
'('
.
$user
[
'id'
]
.
')</option>'
;
// $data['proxys'][$k]['uid'] = $user['id'];
// $data['proxys'][$k]['name'] = $user['user_nicename'];
}
}
//$data['html'] .= $html;
}
echo
json_encode
(
$data
);
}
}
}
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