Commit 254ba108 authored by agping's avatar agping

h5优化

parent 0f81e5b7
......@@ -14,6 +14,22 @@
.loading_pic_new,.no_more,.zanwu_data,.loading_pic_samll_new{
display: none;
}
.li-bottom-area{
box-sizing: border-box;
padding-left: .1rem;
}
.li-bottom-area .star_darl{
font-size: .24rem;
background:rgba(248,249,251,1);
box-sizing: border-box;
padding:.1rem .15rem ;
border-radius: .23rem;
margin-right: .15rem;
}
.li-bottom-area>div:nth-of-type(2){
font-size: .28rem;
}
</style>
<script src="/app/js/vconsole.min.js"></script>
<script>
......
......@@ -53,10 +53,15 @@ $(function() {
function dealStar(_fen) {
var _htmlTemp = '';
if((_fen*1).toFixed(1).toString().replace(/\d+\.(\d*)/,'$1') >= 5){//个位数字大于5
var _fenA = parseInt(_fen) + '.5'
}else{
var _fenA = parseInt(_fen);//个位数字小于5
}
for(var i = 1; i < 6; i++) {
if(i < _fen + 0.5) {
if(i < _fenA*1 + 0.5) {
_htmlTemp += '<small class="small-active"></small>';
} else if(i == _fen + 0.5) {
} else if(i == _fenA*1 + 0.5) {
_htmlTemp += '<small class="small-active-guodu"></small>';
} else {
_htmlTemp += '<small></small>';
......@@ -101,7 +106,7 @@ $(function() {
success: function(data) {
if(typeof data === 'object') {
if(data['code'] == 200) {
var _fenNum = parseInt(Number(data['data']['evaluate_grade']));
var _fenNum = (data['data']['evaluate_grade']).toFixed(1);
var _pingNum = Number(data['data']['evaluate_num']) > 99 ? '99+' : Number(data['data']['evaluate_num']);
$('#pingjia_fen').html(_fenNum);
$('.pingfen-area-large').html(dealStar(_fenNum));
......@@ -129,7 +134,7 @@ $(function() {
function ajaxUl(fn){
$.ajax({
type: 'get',
url: ServerHost + '/broker/commentAndDeal',
url: ServerHost + '/api/commentAndDeal',
timeout: 30000,
dataType: 'json',
data: {
......@@ -155,18 +160,21 @@ $(function() {
var _html = "";
var _tpl = $('#tpl_list').html();
$.each(data['data']['evaluate'], function(i, item) {
_html += _tpl.stringFormatObj({
// if(i < 2) {
_html += '<li><div class="li-top-area oh"><figure class="li-top-area-left fl"><div class="oh fl"><img src="{6}" onerror="javascript:this.src=\'{7}\'" class="fl"></div><figcaption class="oh fl"><p>{0}</p><div class="oh"><p class="fl">{4}</p></div></figcaption></figure><div class="li-top-area-right fr">{3}</div></div><div class="li-bottom-area"><div class="star_row" style="overflow:hidden;width:100%;margin-top:.1rem"><div class="star_darl" style="float:left;" ><span style="float:left;">专业</span><div class="pingfen-area fl">{1}</div></div><div class="star_darl" style="float:left;" ><span style="float:left;">态度</span><div class="pingfen-area fl">{8}</div></div><div class="star_darl" style="float:left;" ><span style="float:left;">着装</span><div class="pingfen-area fl">{9}</div></div></div><div style="width:100%;margin-top:.15rem;"><p>{5}</p></div></div></li>'.stringFormatObj({
'0': $.trim(item['user_nick']) == ''?'昵称暂无':item['user_nick'],
'1': dealStar(item['evaluate_grade']),
'2': dealStarText(item['evaluate_grade']),
'3': item['created'],
'4': (item['receptiontime'] != ''||item['houserAddress'] != '')?(dealTimeKf(item['receptiontime'])+'在'+item['houserAddress']+'看房'):'暂无看房数据',
'4': (item['receptiontime'] != ''||item['houserAddress'] != '')?'在'+item['houserAddress']+'看房'/*(dealTimeKf(item['receptiontime'])+'在'+item['houserAddress']+'看房')*/:'暂无看房数据',
'5': item['evaluate_content'],
'6': item['user_pic'],
'7': ServerHost+'/app/images/ic_default_headpic.png',
'8': item['record_id'],
'9': item['house_id']
'8': dealStar(item['evaluate_grade_attitude']/2),
'9': dealStar(item['evaluate_grade_clothing']/2)
});
// };
});
$('.pingjia-list-area>ul').append(_html);
if(data['data']['evaluate'].length < 10) {
......
......@@ -31,7 +31,7 @@
<div class="leftDiv" v-show="item.type == 91 || item.type == 92"> 中介费类型: <!--{{getType(item.type)}}-->{{item.type_ext==0?'正常':'多收'}} </div>
<div class="rightDiv" v-show="item.type == 91 || item.type == 92"> 应收金额: {{(Math.floor(((item.price-0)*(item.type_ext == 0 ? 0.7 : 0))*100)/100).toFixed(2)}} </div>
<div class="leftDiv" v-show="item.type == 91"> 被收取方: {{item.be_charged_party==1?'房东':'客户'}} </div>
<div class="leftDiv" v-show="item.type == 91"> 被收取方: {{getbeChargedParty(item.be_charged_party)}} </div>
<div class="woalDiv" v-show="item.type == 91 || item.type == 92"> 多收金额:{{(Math.floor((item.money - ((item.price-0)*(item.type_ext == 0 ? 0.7 : 0)) + (item.received_money-0)*(item.type_ext == 0 ? 1 : 0) )*100)/100).toFixed(2)}}</div>
<div class="leftDiv"> 手续费: {{item.transaction_fee}}</div>
......@@ -96,6 +96,7 @@
'noborder': true,
'isBack': true
},
// be_charged_party:'',
addImg,
tie : 'http://img.redocn.com/sheji/20141219/zhongguofengdaodeliyizhanbanzhijing_3744115.jpg',
files : [] ,
......@@ -130,6 +131,21 @@
}
return str ;
},
getbeChargedParty (t){
let str = '' ;
switch(t-0){
case 0 :
str = '';
break ;
case 1 :
str = '房东';
break ;
case 2 :
str = '客户';
break ;
}
return str ;
},
//退款 调整 /带看
turntoMobilBack ( obj ){
let _this = this ;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment