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
e8e24317
Commit
e8e24317
authored
Dec 19, 2017
by
xishifeng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
经纪人详情评论别表,成交列表路由添加
parent
5505d875
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
237 additions
and
187 deletions
+237
-187
Index.php
application/app/controller/Index.php
+8
-0
route.php
application/route.php
+2
-0
agent_detail.css
public/app/css/agent_detail.css
+3
-0
agent_detail.js
public/app/js/agent_detail.js
+181
-146
common.js
public/app/js/common.js
+43
-41
No files found.
application/app/controller/Index.php
View file @
e8e24317
...
@@ -30,6 +30,14 @@ class Index
...
@@ -30,6 +30,14 @@ class Index
{
{
return
view
(
'index/agent_detail'
);
return
view
(
'index/agent_detail'
);
}
}
public
function
more_pingjia
()
{
return
view
(
'index/more_pingjia'
);
}
public
function
more_chengjiao
()
{
return
view
(
'index/more_chengjiao'
);
}
/**
/**
* 楼盘详情
* 楼盘详情
* @return \think\Response
* @return \think\Response
...
...
application/route.php
View file @
e8e24317
...
@@ -43,6 +43,8 @@ Route::rule(['/city/:name' => 'error/index'] , '' ,'GET');*/
...
@@ -43,6 +43,8 @@ Route::rule(['/city/:name' => 'error/index'] , '' ,'GET');*/
Route
::
group
(
'app'
,
[
Route
::
group
(
'app'
,
[
'index'
=>
[
'app/index/index'
,
[
'method'
=>
'get'
]
],
'index'
=>
[
'app/index/index'
,
[
'method'
=>
'get'
]
],
'agent_detail'
=>
[
'app/index/agent_detail'
,
[
'method'
=>
'get'
]
],
'agent_detail'
=>
[
'app/index/agent_detail'
,
[
'method'
=>
'get'
]
],
'more_pingjia'
=>
[
'app/index/more_pingjia'
,
[
'method'
=>
'get'
]
],
'more_chengjiao'
=>
[
'app/index/more_chengjiao'
,
[
'method'
=>
'get'
]
],
'share_detail'
=>
[
'app/index/share_detail'
,
[
'method'
=>
'get'
]
],
'share_detail'
=>
[
'app/index/share_detail'
,
[
'method'
=>
'get'
]
],
'getShopDetails'
=>
[
'app/index/getShopDetail'
,
[
'method'
=>
'get | post'
]
],
'getShopDetails'
=>
[
'app/index/getShopDetail'
,
[
'method'
=>
'get | post'
]
],
]);
]);
...
...
public/app/css/agent_detail.css
View file @
e8e24317
@charset
"utf-8"
;
@charset
"utf-8"
;
body
{
display
:
none
;
}
.user-info-area
{
.user-info-area
{
background-image
:
url('/app/images/bg_yellow.png')
;
background-image
:
url('/app/images/bg_yellow.png')
;
background-size
:
7.5rem
2.3rem
;
background-size
:
7.5rem
2.3rem
;
...
...
public/app/js/agent_detail.js
View file @
e8e24317
$
(
function
(){
$
(
function
()
{
$
.
ajax
({
$
(
document
.
body
).
show
();
type
:
'get'
,
var
_doc
=
$
(
document
);
url
:
ServerHost
+
'/api/brokerDetail/799'
,
var
_appToken
=
getUrlParam
(
'token'
);
timeout
:
30000
,
dataType
:
'json'
,
if
(
_appToken
!==
null
)
{
beforeSend
:
function
()
{},
_doc
.
on
(
'click'
,
'.ps-back'
,
function
(
e
)
{
success
:
function
(
data
)
{
e
.
preventDefault
();
if
(
typeof
data
===
'object'
)
{
e
.
stopPropagation
();
if
(
data
[
'code'
]
==
200
)
{
Compatible
({
$
(
'#name_jingjiren'
).
html
(
data
[
'data'
][
'realname'
]);
paraIos
:
{
$
(
'#time_ruzhi'
).
html
(
data
[
'data'
][
'created'
]);
'route'
:
"aabb"
,
$
(
'#name_store'
).
html
(
data
[
'data'
][
'sub_shopname'
]);
'url'
:
'back'
$
(
'.portrait-area>img'
).
attr
(
'src'
,
data
[
'data'
][
'head_portrait'
]);
},
$
(
'#pingjia_fen'
).
html
(
parseInt
(
data
[
'data'
][
'evaluate_grade'
]));
fnAndroid
:
function
()
{
$
(
'.pingfen-area-large'
).
html
(
dealStar
(
parseInt
(
data
[
'data'
][
'evaluate_grade'
])));
window
.
android
.
onBackPressed
();
$
(
'#pingjia_shu'
).
html
(
Number
(
data
[
'data'
][
'evaluate_num'
])
>
99
?
'99+'
:
Number
(
data
[
'data'
][
'evaluate_num'
]));
},
$
(
'#chengjiao_lishi'
).
html
(
data
[
'data'
][
'JournalAccounts'
]);
fn
:
function
()
{
$
(
'#daikan_30'
).
html
(
data
[
'data'
][
'watch_shop'
]);
console
.
warn
(
'error'
);
}
else
{
}
layerTipsX
(
data
[
'msg'
]);
});
};
});
}
else
{
h5Page
(
_appToken
,
function
(
data
)
{
layerTipsX
(
'数据错误'
);
loadMain
();
};
});
},
}
else
{
error
:
function
(
XMLHttpRequest
,
textStatus
,
errorThrown
)
{
loadMain
();
layerTipsX
(
'error'
);
};
},
complete
:
function
(
xhr
,
textStatus
){
function
loadMain
()
{
if
(
textStatus
===
'timeout'
){
var
_token
=
localStorage
.
getItem
(
'token'
);
layerTipsX
(
'请求超时'
);
$
.
ajax
({
};
type
:
'get'
,
}
url
:
ServerHost
+
'/api/brokerDetail'
,
});
timeout
:
30000
,
dataType
:
'json'
,
function
dealStar
(
_fen
){
data
:
{
var
_htmlTemp
=
''
;
'AuthToken'
:
_token
for
(
var
i
=
1
;
i
<
6
;
i
++
){
},
if
(
i
<
_fen
/
2
+
0.5
){
beforeSend
:
function
()
{},
_htmlTemp
+=
'<small class="small-active"></small>'
;
success
:
function
(
data
)
{
}
else
if
(
i
==
_fen
/
2
+
0.5
){
if
(
typeof
data
===
'object'
)
{
_htmlTemp
+=
'<small class="small-active-guodu"></small>'
;
if
(
data
[
'code'
]
==
200
)
{
}
else
{
$
(
'#name_jingjiren'
).
html
(
data
[
'data'
][
'realname'
]);
_htmlTemp
+=
'<small></small>'
;
$
(
'#time_ruzhi'
).
html
(
data
[
'data'
][
'created'
]);
}
$
(
'#name_store'
).
html
(
data
[
'data'
][
'sub_shopname'
]);
};
$
(
'.portrait-area>img'
).
attr
(
'src'
,
data
[
'data'
][
'head_portrait'
]);
return
_htmlTemp
;
$
(
'#pingjia_fen'
).
html
(
parseInt
(
data
[
'data'
][
'evaluate_grade'
]));
};
$
(
'.pingfen-area-large'
).
html
(
dealStar
(
parseInt
(
data
[
'data'
][
'evaluate_grade'
])));
$
(
'#pingjia_shu'
).
html
(
Number
(
data
[
'data'
][
'evaluate_num'
])
>
99
?
'99+'
:
Number
(
data
[
'data'
][
'evaluate_num'
]));
function
dealStarText
(
_fen
){
$
(
'#chengjiao_lishi'
).
html
(
data
[
'data'
][
'JournalAccounts'
]);
if
(
_fen
>=
8
){
$
(
'#daikan_30'
).
html
(
data
[
'data'
][
'watch_shop'
]);
return
'非常推荐'
;
}
else
{
}
else
if
(
_fen
>=
6
){
layerTipsX
(
data
[
'msg'
]);
return
'很好'
;
};
}
else
if
(
_fen
>=
4
){
}
else
{
return
'一般'
;
layerTipsX
(
'数据错误'
);
}
else
if
(
_fen
>=
4
){
};
return
'很差'
;
},
}
else
{
error
:
function
(
XMLHttpRequest
,
textStatus
,
errorThrown
)
{
return
'非常差'
;
layerTipsX
(
'error'
);
};
},
};
complete
:
function
(
xhr
,
textStatus
)
{
if
(
textStatus
===
'timeout'
)
{
function
dealScale
(
obj
){
layerTipsX
(
'请求超时'
);
if
(
obj
[
'shangpu_type'
]
==
'0'
){
};
return
Number
(
obj
[
'room_area'
])
+
'-'
+
Number
(
obj
[
'room_area2'
])
+
'm²'
;
}
}
else
{
});
return
Number
(
obj
[
'room_area'
])
+
'm²'
;
}
function
dealStar
(
_fen
)
{
};
var
_htmlTemp
=
''
;
for
(
var
i
=
1
;
i
<
6
;
i
++
)
{
$
.
ajax
({
if
(
i
<
_fen
/
2
+
0.5
)
{
type
:
'get'
,
_htmlTemp
+=
'<small class="small-active"></small>'
;
url
:
ServerHost
+
'/api/commentAndDeal'
,
}
else
if
(
i
==
_fen
/
2
+
0.5
)
{
timeout
:
30000
,
_htmlTemp
+=
'<small class="small-active-guodu"></small>'
;
dataType
:
'json'
,
}
else
{
data
:
{
_htmlTemp
+=
'<small></small>'
;
'agent_id'
:
9
,
}
'type'
:
0
,
};
'pageNo'
:
1
,
return
_htmlTemp
;
'pageSize'
:
3
};
},
beforeSend
:
function
()
{},
function
dealStarText
(
_fen
)
{
success
:
function
(
data
)
{
if
(
_fen
>=
8
)
{
if
(
typeof
data
===
'object'
)
{
return
'非常推荐'
;
if
(
data
[
'code'
]
==
200
)
{
}
else
if
(
_fen
>=
6
)
{
//评价列表
return
'很好'
;
if
(
data
[
'data'
][
'evaluate'
]
&&
data
[
'data'
][
'evaluate'
].
length
>
0
){
}
else
if
(
_fen
>=
4
)
{
var
_html
=
""
;
return
'一般'
;
$
.
each
(
data
[
'data'
][
'evaluate'
],
function
(
i
,
item
)
{
}
else
if
(
_fen
>=
4
)
{
if
(
i
<
2
){
return
'很差'
;
_html
+=
'<li><div class="li-top-area oh"><figure class="li-top-area-left fl"><div class="oh fl"><img src="{7}" class="fl"></div><figcaption class="oh fl"><p>{0}</p><div class="oh"><div class="pingfen-area fl">{1}</div><p class="fl">{2}</p></div></figcaption></figure><div class="li-top-area-right fr">{3}</div></div><div class="li-bottom-area"><h3>{4}在{5}看房</h3><p>{6}</p></div></li>'
.
stringFormatObj
({
}
else
{
'0'
:
item
[
'user_nick'
],
return
'非常差'
;
'1'
:
dealStar
(
item
[
'evaluate_grade'
]),
};
'2'
:
dealStarText
(
item
[
'evaluate_grade'
]),
};
'3'
:
'2017-12-17'
,
'4'
:
'2017-03'
,
function
dealScale
(
obj
)
{
'5'
:
'长宁路'
,
if
(
obj
[
'shangpu_type'
]
==
'0'
)
{
'6'
:
item
[
'evaluate_content'
],
return
Number
(
obj
[
'room_area'
])
+
'-'
+
Number
(
obj
[
'room_area2'
])
+
'm²'
;
'7'
:
item
[
'user_pic'
]
}
else
{
});
return
Number
(
obj
[
'room_area'
])
+
'm²'
;
};
};
});
};
$
(
'.pingjia-list-area>ul'
).
html
(
_html
);
data
[
'data'
][
'evaluate'
].
length
>
2
&&
$
(
'.pingjia-list-area .see-all-area'
).
show
().
find
(
'a'
).
attr
(
'href'
,
'more_pingjia?id='
+
9
);
$
.
ajax
({
}
else
{
type
:
'get'
,
$
(
'.pingjia-list-area .zanwu_data'
).
show
();
url
:
ServerHost
+
'/api/commentAndDeal'
,
};
timeout
:
30000
,
dataType
:
'json'
,
//成交列表
data
:
{
if
(
data
[
'data'
][
'journalAccounts'
]
&&
data
[
'data'
][
'journalAccounts'
].
length
>
0
){
'agent_id'
:
9
,
var
_html2
=
""
;
'type'
:
0
,
$
.
each
(
data
[
'data'
][
'journalAccounts'
],
function
(
i
,
item
)
{
'pageNo'
:
1
,
if
(
i
<
2
){
'pageSize'
:
3
_html2
+=
'<li class="oh"><div class="fl oh"><img src="{5}"></div><div class="fl"><h3 class="shangpu-name ellipsis">{0}</h3><p class="qianyue-time">签约时间:{1}</p><p class="mianji-scale">{2}</p><p class="zuji-price">租金均价:<span>{3}</span>元/月</p><p class="sp-text oh">{4}</p></div></li>'
.
stringFormatObj
({
},
'0'
:
item
[
'title'
],
beforeSend
:
function
()
{},
'1'
:
'2017-12-12'
,
success
:
function
(
data
)
{
'2'
:
dealScale
(
item
),
if
(
typeof
data
===
'object'
)
{
'3'
:
item
[
'price'
],
if
(
data
[
'code'
]
==
200
)
{
'4'
:
'<span>小面积</span><span>随时看铺</span><span>沿街旺铺</span>'
,
//评价列表
'5'
:
item
[
'img'
]
if
(
data
[
'data'
][
'evaluate'
]
&&
data
[
'data'
][
'evaluate'
].
length
>
0
)
{
});
var
_html
=
""
;
};
$
.
each
(
data
[
'data'
][
'evaluate'
],
function
(
i
,
item
)
{
});
if
(
i
<
2
)
{
$
(
'.chengjiao-list-area>ul'
).
html
(
_html2
);
_html
+=
'<li><div class="li-top-area oh"><figure class="li-top-area-left fl"><div class="oh fl"><img src="{7}" class="fl"></div><figcaption class="oh fl"><p>{0}</p><div class="oh"><div class="pingfen-area fl">{1}</div><p class="fl">{2}</p></div></figcaption></figure><div class="li-top-area-right fr">{3}</div></div><div class="li-bottom-area"><h3>{4}在{5}看房</h3><p>{6}</p></div></li>'
.
stringFormatObj
({
data
[
'data'
][
'evaluate'
].
length
>
2
&&
$
(
'.chengjiao-list-area .see-all-area'
).
show
().
find
(
'a'
).
attr
(
'href'
,
'more_chengjiao?id='
+
9
);
'0'
:
item
[
'user_nick'
],
}
else
{
'1'
:
dealStar
(
item
[
'evaluate_grade'
]),
$
(
'.chengjiao-list-area .zanwu_data'
).
show
();
'2'
:
dealStarText
(
item
[
'evaluate_grade'
]),
};
'3'
:
'2017-12-17'
,
}
else
{
'4'
:
'2017-03'
,
layerTipsX
(
data
[
'msg'
]);
'5'
:
'长宁路'
,
};
'6'
:
item
[
'evaluate_content'
],
}
else
{
'7'
:
item
[
'user_pic'
]
layerTipsX
(
'数据错误'
);
});
};
};
},
});
error
:
function
(
XMLHttpRequest
,
textStatus
,
errorThrown
)
{
$
(
'.pingjia-list-area>ul'
).
html
(
_html
);
layerTipsX
(
'error'
);
data
[
'data'
][
'evaluate'
].
length
>
2
&&
$
(
'.pingjia-list-area .see-all-area'
).
show
().
find
(
'a'
).
attr
(
'href'
,
'more_pingjia?id='
+
9
);
},
}
else
{
complete
:
function
(
xhr
,
textStatus
){
$
(
'.pingjia-list-area .zanwu_data'
).
show
();
if
(
textStatus
===
'timeout'
){
};
layerTipsX
(
'请求超时'
);
};
//成交列表
}
if
(
data
[
'data'
][
'journalAccounts'
]
&&
data
[
'data'
][
'journalAccounts'
].
length
>
0
)
{
});
var
_html2
=
""
;
$
.
each
(
data
[
'data'
][
'journalAccounts'
],
function
(
i
,
item
)
{
if
(
i
<
2
)
{
_html2
+=
'<li class="oh"><div class="fl oh"><img src="{5}"></div><div class="fl"><h3 class="shangpu-name ellipsis">{0}</h3><p class="qianyue-time">签约时间:{1}</p><p class="mianji-scale">{2}</p><p class="zuji-price">租金均价:<span>{3}</span>元/月</p><p class="sp-text oh">{4}</p></div></li>'
.
stringFormatObj
({
'0'
:
item
[
'title'
],
'1'
:
'2017-12-12'
,
'2'
:
dealScale
(
item
),
'3'
:
item
[
'price'
],
'4'
:
'<span>小面积</span><span>随时看铺</span><span>沿街旺铺</span>'
,
'5'
:
item
[
'img'
]
});
};
});
$
(
'.chengjiao-list-area>ul'
).
html
(
_html2
);
data
[
'data'
][
'evaluate'
].
length
>
2
&&
$
(
'.chengjiao-list-area .see-all-area'
).
show
().
find
(
'a'
).
attr
(
'href'
,
'more_chengjiao?id='
+
9
);
}
else
{
$
(
'.chengjiao-list-area .zanwu_data'
).
show
();
};
}
else
{
layerTipsX
(
data
[
'msg'
]);
};
}
else
{
layerTipsX
(
'数据错误'
);
};
},
error
:
function
(
XMLHttpRequest
,
textStatus
,
errorThrown
)
{
layerTipsX
(
'error'
);
},
complete
:
function
(
xhr
,
textStatus
)
{
if
(
textStatus
===
'timeout'
)
{
layerTipsX
(
'请求超时'
);
};
}
});
};
});
});
\ No newline at end of file
public/app/js/common.js
View file @
e8e24317
...
@@ -61,47 +61,49 @@ function Compatible(obj) {
...
@@ -61,47 +61,49 @@ function Compatible(obj) {
//xishifeng 2017-05-08
//xishifeng 2017-05-08
//同联和福居的有区别
//同联和福居的有区别
function
h5Page
(
token
,
fn
)
{
function
h5Page
(
token
,
fn
)
{
$
.
ajax
({
localStorage
.
setItem
(
'token'
,
token
);
type
:
"post"
,
fn
();
url
:
ServerHost
+
"/AppTab5/about_Token"
,
// $.ajax({
data
:
{
// type: "post",
'token'
:
token
// url: ServerHost + "/AppTab5/about_Token",
},
// data: {
dataType
:
"json"
,
// 'token': token
success
:
function
(
data
)
{
// },
if
(
typeof
data
===
'object'
){
// dataType: "json",
if
(
data
[
'status'
]
==
'0'
){
// success: function(data) {
console
.
log
(
data
.
msg
);
// if(typeof data === 'object'){
setLoginStorage
(
data
,
token
,
'agents'
);
// if(data['status'] == '0'){
fn
(
data
);
// console.log(data.msg);
}
else
{
// setLoginStorage(data, token, 'agents');
try
{
// fn(data);
layer
.
open
({
// }else{
content
:
data
.
msg
,
// try{
skin
:
'msg'
,
// layer.open({
time
:
2
// content: data.msg,
});
// skin: 'msg',
}
catch
(
e
){
// time: 2
alert
(
data
.
msg
);
// });
}
// }catch(e){
// alert(data.msg);
}
// }
}
else
{
//
try
{
// }
layer
.
open
({
// }else{
content
:
'token验证接口数据错误'
,
// try{
skin
:
'msg'
,
// layer.open({
time
:
2
// content: 'token验证接口数据错误',
});
// skin: 'msg',
}
catch
(
e
){
// time: 2
alert
(
'token验证接口数据错误'
);
// });
}
// }catch(e){
};
// alert('token验证接口数据错误');
},
// }
error
:
function
()
{
// };
console
.
warn
(
"获取token失败"
);
// },
}
// error: function() {
});
// console.warn("获取token失败");
// }
// });
}
}
//每次登录时设置缓存数据 by xishifeng
//每次登录时设置缓存数据 by xishifeng
...
...
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