Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
tl_estate
Project
Project
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
hujun
tl_estate
Commits
3479e4d2
Commit
3479e4d2
authored
Dec 18, 2017
by
hujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
测试用户列表
parent
15b1dd26
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
41 additions
and
21 deletions
+41
-21
consumer_list.html
application/index/view/member/consumer_list.html
+12
-11
Users.php
application/model/Users.php
+5
-5
user.js
public/resource/js/user.js
+0
-2
user_template_tpl.html
public/resource/template/user_template_tpl.html
+24
-3
No files found.
application/index/view/member/consumer_list.html
View file @
3479e4d2
...
@@ -42,15 +42,15 @@
...
@@ -42,15 +42,15 @@
</td>
</td>
</tr>
</tr>
<tr>
<tr>
<th>
注册时间
</th>
<th
class=
"text-center"
>
注册时间
</th>
<th>
用户ID
</th>
<th
class=
"text-center"
>
用户ID
</th>
<th>
昵称和头像
</th>
<th
class=
"text-center"
>
昵称和头像
</th>
<th>
手机号
</th>
<th
class=
"text-center"
>
手机号
</th>
<th>
邀请人
</th>
<th
class=
"text-center"
>
邀请人
</th>
<th>
操作
</th>
<th
class=
"text-center"
>
操作
</th>
</tr>
</tr>
</thead>
</thead>
<tbody
id=
"users_list"
>
<tbody
id=
"users_list"
class=
"text-center"
>
</tbody>
</tbody>
<!-- <tbody>
<!-- <tbody>
...
@@ -102,10 +102,7 @@
...
@@ -102,10 +102,7 @@
</tbody>-->
</tbody>-->
</table>
</table>
</div>
</div>
</div>
<!-- /#page-content-wrapper -->
</div>
</div>
<!-- /#page-content-wrapper -->
<div
class=
"page-cla"
>
<div
class=
"page-cla"
>
<ul
class=
"pagination"
>
<ul
class=
"pagination"
>
<li><a
href=
"#"
>
«
</a></li>
<li><a
href=
"#"
>
«
</a></li>
...
@@ -117,6 +114,10 @@
...
@@ -117,6 +114,10 @@
<li><a
href=
"#"
>
»
</a></li>
<li><a
href=
"#"
>
»
</a></li>
</ul>
</ul>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
...
...
application/model/Users.php
View file @
3479e4d2
...
@@ -41,11 +41,11 @@ class Users extends Model
...
@@ -41,11 +41,11 @@ class Users extends Model
->
limit
(
$pageSize
)
->
limit
(
$pageSize
)
->
page
(
$pageNo
)
->
page
(
$pageNo
)
->
select
();
->
select
();
// dump($result);die;
//
foreach ($result as $k=>$v) {
foreach
(
$result
as
$k
=>
$v
)
{
//
$data[$k] = $v->toArray();
$data
[
$k
]
=
$v
->
toArray
();
//
}
}
return
$
result
;
return
$
data
;
}
}
}
}
public/resource/js/user.js
View file @
3479e4d2
...
@@ -31,11 +31,9 @@ define (['doT', 'text!temp/user_template_tpl.html','ckfinder','ckfinderStart', '
...
@@ -31,11 +31,9 @@ define (['doT', 'text!temp/user_template_tpl.html','ckfinder','ckfinderStart', '
data
:
{},
data
:
{},
dataType
:
'json'
,
dataType
:
'json'
,
success
:
function
(
data
)
{
success
:
function
(
data
)
{
console
.
log
(
data
);
var
temp
=
document
.
getElementById
(
'user_list_tpl'
).
innerHTML
;
var
temp
=
document
.
getElementById
(
'user_list_tpl'
).
innerHTML
;
var
doTtmpl
=
doT
.
template
(
temp
);
var
doTtmpl
=
doT
.
template
(
temp
);
console
.
log
(
doTtmpl
);
$
(
"#users_list"
).
append
(
doTtmpl
(
data
));
$
(
"#users_list"
).
append
(
doTtmpl
(
data
));
}
}
});
});
...
...
public/resource/template/user_template_tpl.html
View file @
3479e4d2
<script
id=
"user_list_tpl"
type=
"text/template"
>
<script
id=
"user_list_tpl"
type=
"text/template"
>
[
%=
it
.
data
.
length
%
]
[
%
if
(
it
.
data
)
{
%
]
[
%
for
(
var
item
in
it
.
data
){
%
]
[
%=
it
.
data
[
0
][
"id"
]
%
]
<
tr
>
<
td
>
[
%=
item
[
"create_time"
]
%
]
<
/td
>
<
td
>
[
%=
item
[
"id"
]
%
]
<
/td
>
<
td
>
[
%=
item
[
"user_nick"
]
%
][
%=
item
[
"user_pic"
]
%
]
<
/td
>
<
td
>
[
%=
item
[
"user_phone"
]
%
]
<
/td
>
<
td
><
/td
>
<
td
>
<
a
class
=
"btn1 btn-success "
href
=
"#modal-do"
data
-
toggle
=
"modal"
>
编辑
<
/a
>
<
a
class
=
"btn1 btn-danger "
href
=
"#modal-delete"
data
-
toggle
=
"modal"
>
删除
<
/a
>
<
/td
>
<
/tr
>
[
%
}
%
]
[
%
}
else
{
%
]
<
tr
>
<
td
colspan
=
"7"
style
=
"text-align:center;"
>
暂无数据
<
/td
>
<
/tr
>
[
%
}
%
]
</script>
</script>
\ No newline at end of file
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