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
86ee5458
Commit
86ee5458
authored
Jun 04, 2018
by
hujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
客户昵称和名字
parent
0902a28b
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
56 additions
and
26 deletions
+56
-26
Member.php
application/index/controller/Member.php
+1
-5
Remark.php
application/index/controller/Remark.php
+2
-1
users_list.html
application/index/view/member/users_list.html
+16
-7
Users.php
application/model/Users.php
+28
-7
user.js
public/resource/js/user.js
+5
-2
user_template_tpl.html
public/resource/template/user_template_tpl.html
+4
-4
No files found.
application/index/controller/Member.php
View file @
86ee5458
...
@@ -176,7 +176,7 @@ class Member extends Basic{
...
@@ -176,7 +176,7 @@ class Member extends Basic{
$type
=
3
;
$type
=
3
;
}
}
$fields
=
'a.id,a.user_nick,a.user_phone,a.user_pic,a.create_time,a.user_pswd,a.referrer_id,a.registration_time,a.user_name,a.last_login_ip,a.status'
;
$fields
=
'a.id,a.user_nick,a.user_
name,a.user_
phone,a.user_pic,a.create_time,a.user_pswd,a.referrer_id,a.registration_time,a.user_name,a.last_login_ip,a.status'
;
$data
[
'list'
]
=
$this
->
user
->
getUserAgent
(
$pageNo
,
$pageSize
,
'a.id DESC'
,
$fields
,
$where
,
$type
);
$data
[
'list'
]
=
$this
->
user
->
getUserAgent
(
$pageNo
,
$pageSize
,
'a.id DESC'
,
$fields
,
$where
,
$type
);
$data
[
'total'
]
=
$this
->
user
->
getUserAgentTotal
(
$where
,
$type
);
$data
[
'total'
]
=
$this
->
user
->
getUserAgentTotal
(
$where
,
$type
);
$return
=
$this
->
response
(
$data
[
'status'
],
$data
[
'msg'
],
$data
);
$return
=
$this
->
response
(
$data
[
'status'
],
$data
[
'msg'
],
$data
);
...
@@ -291,10 +291,6 @@ class Member extends Basic{
...
@@ -291,10 +291,6 @@ class Member extends Basic{
public
function
pcEditClient
()
{
public
function
pcEditClient
()
{
$data
=
[];
$data
=
[];
if
(
empty
(
$this
->
params
[
'user_nick'
])
||
empty
(
$this
->
params
[
'user_phone'
]))
{
return
$this
->
response
(
101
,
'user_nick or user_phone or id is null'
);
}
if
(
$this
->
request
->
isPost
())
{
if
(
$this
->
request
->
isPost
())
{
//编辑用户
//编辑用户
...
...
application/index/controller/Remark.php
View file @
86ee5458
...
@@ -156,8 +156,9 @@ class Remark extends Basic
...
@@ -156,8 +156,9 @@ class Remark extends Basic
}
}
$user
=
new
Users
();
$user
=
new
Users
();
$user_res
=
$user
->
useraction_search_user_res
(
$user_id
);
$user_res
=
$user
->
useraction_search_user_res
(
$user_id
,
1
);
$user_res
[
'user_pic'
]
=
HEADERIMGURL
.
$user_res
[
'user_pic'
];
$user_res
[
'user_pic'
]
=
HEADERIMGURL
.
$user_res
[
'user_pic'
];
$table
=
new
AAgents
();
$table
=
new
AAgents
();
$Agents_res
=
$table
->
Agents_res
(
$user_res
[
'agent_id'
]);
$Agents_res
=
$table
->
Agents_res
(
$user_res
[
'agent_id'
]);
...
...
application/index/view/member/users_list.html
View file @
86ee5458
...
@@ -336,13 +336,7 @@
...
@@ -336,13 +336,7 @@
<input
class=
"form-control btn4 ld-Marheight"
value=
""
data-rule-phoneus=
"false"
data-rule-required=
"false"
id=
""
name=
"name"
type=
"number"
><span
class=
"fore-span ld-Marheight"
>
元
</span>
<input
class=
"form-control btn4 ld-Marheight"
value=
""
data-rule-phoneus=
"false"
data-rule-required=
"false"
id=
""
name=
"name"
type=
"number"
><span
class=
"fore-span ld-Marheight"
>
元
</span>
<span
class=
"fore-span ld-Marheight"
>
面积:
</span>
<span
class=
"fore-span ld-Marheight"
>
面积:
</span>
<input
class=
"form-control btn4 ld-Marheight"
value=
""
data-rule-phoneus=
"false"
data-rule-required=
"false"
id=
""
name=
"name"
type=
"number"
><span
class=
"fore-span ld-Marheight"
>
元
</span>
<input
class=
"form-control btn4 ld-Marheight"
value=
""
data-rule-phoneus=
"false"
data-rule-required=
"false"
id=
""
name=
"name"
type=
"number"
><span
class=
"fore-span ld-Marheight"
>
元
</span>
<span
class=
"fore-span ld-Marheight"
>
电话:
</span>
<span
class=
"fore-span ld-Marheight"
>
电话:
</span>
<span
class=
"fore-span ld-Marheight"
id=
"cus_phone"
></span>
<span
class=
"fore-span ld-Marheight"
id=
"cus_phone"
></span>
<div
class=
"row"
>
<div
class=
"row"
>
...
@@ -352,6 +346,21 @@
...
@@ -352,6 +346,21 @@
<span
class=
"fore-span ld-Marheight"
id=
"cus_date"
></span>
<span
class=
"fore-span ld-Marheight"
id=
"cus_date"
></span>
<div
class=
"row"
>
<div
class=
"row"
>
</div>
<span
class=
"fore-span ld-Marheight"
>
邀请人:
</span>
<span
class=
"fore-span ld-Marheight"
id=
"referrer_user"
></span>
<div
class=
"row"
>
</div>
<span
class=
"fore-span ld-Marheight"
>
昵称:
</span>
<span
class=
"fore-span ld-Marheight"
id=
"cus_nick"
></span>
<div
class=
"row"
>
</div>
<span
class=
"fore-span ld-Marheight"
>
注册时间:
</span>
<span
class=
"fore-span ld-Marheight"
id=
"registration_time"
></span>
<div
class=
"row"
>
</div>
</div>
<div
class=
"form-group"
>
<div
class=
"form-group"
>
...
...
application/model/Users.php
View file @
86ee5458
...
@@ -205,8 +205,8 @@ class Users extends Model
...
@@ -205,8 +205,8 @@ class Users extends Model
*/
*/
public
function
edit
(
$data
,
$id
=
0
)
public
function
edit
(
$data
,
$id
=
0
)
{
{
if
(
!
empty
(
$data
[
'user_n
ick
'
]))
{
if
(
!
empty
(
$data
[
'user_n
ame
'
]))
{
$insert_data
[
'user_n
ick'
]
=
$data
[
'user_nick
'
];
$insert_data
[
'user_n
ame'
]
=
$data
[
'user_name
'
];
}
}
if
(
!
empty
(
$data
[
'user_phone'
]))
{
if
(
!
empty
(
$data
[
'user_phone'
]))
{
$insert_data
[
'user_phone'
]
=
$data
[
'user_phone'
];
$insert_data
[
'user_phone'
]
=
$data
[
'user_phone'
];
...
@@ -300,17 +300,38 @@ class Users extends Model
...
@@ -300,17 +300,38 @@ class Users extends Model
/**
/**
* @param $user_id
* @param $user_id
* @param int $referrer 是否查询邀请人
* @return mixed
* @return mixed
* @throws \think\db\exception\DataNotFoundException
* @throws \think\Exception
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
* @throws \think\exception\DbException
*/
*/
public
function
useraction_search_user_res
(
$user_id
)
public
function
useraction_search_user_res
(
$user_id
,
int
$referrer
=
0
)
{
{
return
db
(
'u_users'
)
$field
=
'id as user_id,agent_id,sex,user_nick,user_name,user_pic,user_status,user_phone,create_time,
referrer_source,referrer_id,registration_time'
;
$data
=
db
(
'u_users'
)
->
where
(
'id'
,
$user_id
)
->
where
(
'id'
,
$user_id
)
->
field
(
'id as user_id,agent_id,sex,user_nick,user_pic,user_status,user_phone,create_time'
)
->
field
(
$field
)
->
find
();
->
find
();
if
(
$referrer
!=
0
)
{
if
(
$data
[
'referrer_source'
]
==
10
)
{
$referrer_user
=
$data
[
'referrer_user'
]
=
db
(
'u_users'
)
->
where
(
'id'
,
$data
[
'referrer_id'
])
->
field
(
'user_phone,user_name'
)
->
find
();
$referrer_user_string
=
$referrer_user
[
'user_name'
]
.
'-'
.
$referrer_user
[
'user_phone'
];
}
else
{
$referrer_user
=
$data
[
'referrer_user'
]
=
db
(
'a_agents'
)
->
where
(
'id'
,
$data
[
'referrer_id'
])
->
field
(
'name,phone'
)
->
find
();
$referrer_user_string
=
$referrer_user
[
'name'
]
.
'-'
.
$referrer_user
[
'phone'
];
}
$data
[
'referrer_user'
]
=
$referrer_user_string
;
}
return
$data
;
}
}
/*public function user_search($phone_or_name,$Two_days_ago,$user_id,$pagesize,$pagenum) {
/*public function user_search($phone_or_name,$Two_days_ago,$user_id,$pagesize,$pagenum) {
...
...
public/resource/js/user.js
View file @
86ee5458
...
@@ -229,7 +229,7 @@ define (['doT', 'text!temp/user_template_tpl.html','ckfinder','ckfinderStart', '
...
@@ -229,7 +229,7 @@ define (['doT', 'text!temp/user_template_tpl.html','ckfinder','ckfinderStart', '
Submit_follow
:
function
()
{
//提交
Submit_follow
:
function
()
{
//提交
var
params
=
{};
var
params
=
{};
params
.
id
=
user
.
user_id
;
params
.
id
=
user
.
user_id
;
params
.
user_n
ick
=
$
(
"#cus_name"
).
val
();
params
.
user_n
ame
=
$
(
"#cus_name"
).
val
();
params
.
user_phone
=
$
(
"#cus_phone"
).
html
()
params
.
user_phone
=
$
(
"#cus_phone"
).
html
()
params
.
agents_id
=
user
.
agent_id2
;
params
.
agents_id
=
user
.
agent_id2
;
params
.
sex
=
$
(
"#sex"
).
val
();
params
.
sex
=
$
(
"#sex"
).
val
();
...
@@ -329,10 +329,13 @@ define (['doT', 'text!temp/user_template_tpl.html','ckfinder','ckfinderStart', '
...
@@ -329,10 +329,13 @@ define (['doT', 'text!temp/user_template_tpl.html','ckfinder','ckfinderStart', '
if
(
data
.
code
==
200
){
if
(
data
.
code
==
200
){
if
(
data
.
data
)
{
if
(
data
.
data
)
{
$
(
"#cus_id"
).
html
(
data
.
data
.
user_info
.
user_id
);
//客户编号
$
(
"#cus_id"
).
html
(
data
.
data
.
user_info
.
user_id
);
//客户编号
$
(
"#cus_name"
).
val
(
data
.
data
.
user_info
.
user_nick
);
//姓名
$
(
"#cus_name"
).
val
(
data
.
data
.
user_info
.
user_name
);
//姓名
$
(
"#cus_nick"
).
html
(
data
.
data
.
user_info
.
user_nick
);
//昵称
$
(
"#registration_time"
).
html
(
data
.
data
.
user_info
.
registration_time
);
//昵称
$
(
"#sex"
).
val
(
data
.
data
.
user_info
.
sex
);
//性别
$
(
"#sex"
).
val
(
data
.
data
.
user_info
.
sex
);
//性别
$
(
"#cus_phone"
).
html
(
data
.
data
.
user_info
.
user_phone
);
//电话
$
(
"#cus_phone"
).
html
(
data
.
data
.
user_info
.
user_phone
);
//电话
$
(
"#cus_date"
).
html
(
data
.
data
.
user_info
.
create_time
);
//上传时间
$
(
"#cus_date"
).
html
(
data
.
data
.
user_info
.
create_time
);
//上传时间
$
(
"#referrer_user"
).
html
(
data
.
data
.
user_info
.
referrer_user
);
//上传时间
$
(
"#cus_fang"
).
val
(
data
.
data
.
user_info
.
agentinfo
);
//客方
$
(
"#cus_fang"
).
val
(
data
.
data
.
user_info
.
agentinfo
);
//客方
var
caozuo_table
=
""
;
var
caozuo_table
=
""
;
$
.
each
(
data
[
'data'
][
'user_date'
],
function
(
i
,
item
)
{
$
.
each
(
data
[
'data'
][
'user_date'
],
function
(
i
,
item
)
{
...
...
public/resource/template/user_template_tpl.html
View file @
86ee5458
...
@@ -4,8 +4,8 @@
...
@@ -4,8 +4,8 @@
<
tr
>
<
tr
>
<
td
>
[
%=
it
[
item
][
'id'
]
%
]
<
/td
>
<
td
>
[
%=
it
[
item
][
'id'
]
%
]
<
/td
>
<
td
>
<
td
>
[
%
if
(
it
[
item
][
"user_n
ick
"
]
!=
null
)
{
%
]
[
%
if
(
it
[
item
][
"user_n
ame
"
]
!=
null
)
{
%
]
[
%=
it
[
item
][
"user_n
ick
"
]
%
]
[
%=
it
[
item
][
"user_n
ame
"
]
%
]
[
%
}
%
]
[
%
}
%
]
<
/td
>
<
/td
>
<
td
>
[
%=
it
[
item
][
"user_phone"
]
%
]
<
/td
>
<
td
>
[
%=
it
[
item
][
"user_phone"
]
%
]
<
/td
>
...
@@ -32,8 +32,8 @@
...
@@ -32,8 +32,8 @@
[
%
}
%
]
[
%
}
%
]
<
/td
>
<
/td
>
<
td
>
<
td
>
[
%
if
(
it
[
item
][
'user_n
ame
'
]
!=
null
){
%
]
[
%
if
(
it
[
item
][
'user_n
ick
'
]
!=
null
){
%
]
[
%=
it
[
item
][
"user_n
ame
"
]
%
]
[
%=
it
[
item
][
"user_n
ick
"
]
%
]
[
%
}
%
]
[
%
}
%
]
<
/td
>
<
/td
>
<
td
>
<
td
>
...
...
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