Commit eba51d59 authored by agping's avatar agping

修改

parent 068c48f2
//公用js文件 //公用js文件
let ServerHost = 'https://pre2.tonglianjituan.com'; //let ServerHost = 'https://pre2.tonglianjituan.com';
let ServerHost = 'https://api.tonglianjituan.com';
if(location.origin === 'https://api.tonglianjituan.com') { if(location.origin === 'https://api.tonglianjituan.com') {
ServerHost = location.origin; ServerHost = location.origin;
}; };
......
...@@ -5,20 +5,23 @@ ...@@ -5,20 +5,23 @@
<div v-for="(item, index) in mainData" :key="item.title" :class="{active:index === initTabNumMain}" @click="tabMain(index)">{{item.title}}</div> <div v-for="(item, index) in mainData" :key="item.title" :class="{active:index === initTabNumMain}" @click="tabMain(index)">{{item.title}}</div>
</div> </div>
<div class="nav-seat"></div> <div class="nav-seat"></div>
<div class="nav-main-choose">
<div v-for="(item, index) in mainDataChoose" :key="item.title" :class="{active:index === initTabNumMainChoose}" @click="tabMainChoose(index)">{{item.title}}</div>
</div>
</nav> </nav>
<main class="main-content"> <main class="main-content">
<section v-for="(item, index) in mainData" v-show="index === initTabNumMain"> <section v-for="(item, index) in mainData" v-show="index === initTabNumMain">
<pagination-load :canload="!item.isStop" :distance="10" @load="getLoad"> <pagination-load :canload="!item.isStop" :distance="10" @load="getList">
<ul> <ul>
<li class="main-sec-li" v-for="(item2, index2) in item.dataList"> <li class="main-sec-li" v-for="(item2, index2) in item.dataList">
<div class="shop-list-img shop-list"> <div class="shop-list-img shop-list">
<img :src="item2.api_path + item2.images[0].img_name" alt=""/> <img-error :datasrc="selesctImg(item2)" :imgtype="'div'"></img-error>
</div> </div>
<div class="shop-list-con shop-list"> <div class="shop-list-con shop-list">
<p class="shop-title">{{item2.title}}</p> <p class="shop-title shop-list-top">{{item2.title}}</p>
<p class="shop-rent">{{item2.rent_type}}</p> <p class="shop-rent shop-list-top">{{selesctRent(item2)}}</p>
<p> <p class="shop-list-top">
<span class="shop-lable">{{item2.industry_type}}</span> <span v-for="(item3, index3) in item2.shop_sign.split(',').splice(0, 3)" class="shop-lable">{{item3}}</span>
</p> </p>
</div> </div>
</li> </li>
...@@ -59,9 +62,18 @@ ...@@ -59,9 +62,18 @@
'noDataFlag': false,//是否是无数据 'noDataFlag': false,//是否是无数据
} }
],//请求返回的数据体集合 ],//请求返回的数据体集合
pageSize: 3, pageSize: 15,
initTabNumMain: 0, initTabNumMain: 0,
isLoading: false,//是否正在加载 isLoading: false,//是否正在加载
mainDataChoose:[{
'title': '区域',
}, {
'title': '业态',
}, {
'title': '面积',
}, {
'title': '更多',
}],
}), }),
created() { created() {
let _this = this; let _this = this;
...@@ -78,10 +90,10 @@ ...@@ -78,10 +90,10 @@
}, },
mounted() { mounted() {
let _this = this; let _this = this;
_this.getLoad(); _this.getList();
}, },
methods: { methods: {
getLoad() { getList() {
let _this = this; let _this = this;
let _index = _this.initTabNumMain; let _index = _this.initTabNumMain;
if(!_this.isLoading && !_this.mainData[_index].isStop) { if(!_this.isLoading && !_this.mainData[_index].isStop) {
...@@ -127,6 +139,31 @@ ...@@ -127,6 +139,31 @@
_this.getList(); _this.getList();
}; };
}, },
selesctImg(item){
var _img = '';
if(item.images.length == 0){
_img = item.api_path + '';
}else{
_img = item.api_path + item.images[0].img_name;
};
return _img;
},
selesctRent(item){
var _rent_type = '';
if(item.rent_type == 1){
_rent_type ='租金均价:' + item.rent_price + '元/月';
};
if(item.rent_type == 2){
_rent_type ='租金均价:' + item.rent_price + '%';
};
if(item.rent_type == 3){
_rent_type ='租金均价:' + item.rent_price + '元/天/m²';
};
if(item.rent_type == 4){
_rent_type ='租金均价:' + item.rent_price + '元/年';
};
return _rent_type;
},
} }
} }
</script> </script>
...@@ -182,11 +219,10 @@ ...@@ -182,11 +219,10 @@
.main-sec-li { .main-sec-li {
background: #fff; background: #fff;
font-size: .3rem; font-size: .3rem;
/*height: 2.4rem;*/ height: 2.4rem;
height: 7rem;
padding: .4rem 0;
box-sizing: border-box; box-sizing: border-box;
border-bottom:1px solid #F0F0F0; border-bottom:1px solid #F0F0F0;
padding: .4rem 0;
} }
.main-sec-li-26 { .main-sec-li-26 {
...@@ -199,30 +235,38 @@ ...@@ -199,30 +235,38 @@
} }
.main-sec-li .shop-list{ .main-sec-li .shop-list{
height: 1.6rem; height: 1.6rem;
width: 2.1rem;
} }
.shop-list>img{ .shop-list>img{
height: 1.6rem; height: 1.6rem;
width: 2.1rem; width: 2.1rem;
} }
.main-sec-li .shop-list-con{ .main-sec-li .shop-list-con{
margin-left: .2rem; margin-left: .24rem;
}
.shop-list-con{
width: 4.2rem;
overflow: hidden;
} }
.shop-list-con .shop-title{ .shop-list-con .shop-title{
font-size: .3rem; font-size: .3rem;
width: 4.6rem; width: 4.2rem;
text-overflow: ellipsis; text-overflow: ellipsis;
white-space: nowrap; white-space: nowrap;
overflow: hidden; overflow: hidden;
} }
.shop-list-con .shop-rent{ .shop-list-con .shop-rent{
font-size: .26rem; font-size: .26rem;
color: #FF5C50;
} }
.shop-list-con .shop-lable{ .shop-list-con .shop-lable{
font-size: .22rem; font-size: .22rem;
padding: .05rem .1rem;
color: #FFA900;
background-color: #FFF4DF;
margin-right: .1rem;
} }
.shop-list-top{
margin-top: .12rem;
}
</style> </style>
...@@ -5,7 +5,6 @@ ...@@ -5,7 +5,6 @@
<td>[%= it[item]['create_time'] %]</td> <td>[%= it[item]['create_time'] %]</td>
<td>[%= it[item]['income_time'] %]</td> <td>[%= it[item]['income_time'] %]</td>
<td>[%= it[item]['report_agent_name'] %]-[%= it[item]['report_agent_phone'] %]</td> <td>[%= it[item]['report_agent_name'] %]-[%= it[item]['report_agent_phone'] %]</td>
<td>[%= it[item]['district_name'] %]</td>
<td>[%= it[item]['store_name'] %]</td> <td>[%= it[item]['store_name'] %]</td>
<td>[%= it[item]['money'] %]</td> <td>[%= it[item]['money'] %]</td>
<td>[%= it[item]['real_money'] %]</td> <td>[%= it[item]['real_money'] %]</td>
......
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