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
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
46 additions
and
0 deletions
+46
-0
admin/themes/simplebootx/User/belong.html
+15
-0
application/User/Controller/IndexadminController.class.php
+31
-0
No files found.
admin/themes/simplebootx/User/belong.html
View file @
428b6b38
...
@@ -69,6 +69,21 @@
...
@@ -69,6 +69,21 @@
}
}
},
'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
();
...
...
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