Commit 5bedca54 authored by agping's avatar agping

商铺列表 修改

parent 56abcf61
//公用js文件 //公用js文件
let ServerHost = 'https://pre2.tonglianjituan.com'; //let ServerHost = 'https://pre2.tonglianjituan.com';
//let ServerHost = 'https://api.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;
}; };
......
...@@ -73,7 +73,12 @@ ...@@ -73,7 +73,12 @@
'path': '/shopList', 'path': '/shopList',
'nameCustom': '商铺列表', 'nameCustom': '商铺列表',
'query': { 'query': {
// 'id':'160', }
},
{
'path': '/shopSearchList',
'nameCustom': '商铺搜索列表',
'query': {
} }
} }
] ]
......
...@@ -9,8 +9,8 @@ ...@@ -9,8 +9,8 @@
</select> </select>
<img :src="icon_address" class="icon-address-img"/> <img :src="icon_address" class="icon-address-img"/>
</div> </div>
<div class="top-shop-search"> <div class="top-shop-search" @click="toShopSearchList()">
<img :src="icon_address" class="icon-address-img"/> <img :src="icon_search" class="icon-search-img"/>
</div> </div>
<div class="nav-main"> <div class="nav-main">
...@@ -130,6 +130,8 @@ ...@@ -130,6 +130,8 @@
initSelectCity:'上海市', initSelectCity:'上海市',
initTabNumAreaCity:0, initTabNumAreaCity:0,
initTabNumBusiness:0, initTabNumBusiness:0,
initMoreNum:0,
initMoreNumRent:0,
icon_address, icon_address,
icon_down02, icon_down02,
icon_down, icon_down,
...@@ -184,8 +186,8 @@ ...@@ -184,8 +186,8 @@
_data.pageSize = _this.pageSize; _data.pageSize = _this.pageSize;
_data.pageNo = _this.mainData[_index].page; _data.pageNo = _this.mainData[_index].page;
_data.site_area = 2; _data.site_area = 2;
_data.is_carefully_chosen = _this.mainData[_index].page; _data.is_carefully_chosen = 0;
_data.shop_type = _this.mainData[_index].page; _data.shop_type = _this.initTabNumMain?0:1;
_data.city = _this.initSelectCity; _data.city = _this.initSelectCity;
if(_this.ajax_shop_area_start){ if(_this.ajax_shop_area_start){
_data.shop_area_start = _this.ajax_shop_area_start; _data.shop_area_start = _this.ajax_shop_area_start;
...@@ -208,7 +210,7 @@ ...@@ -208,7 +210,7 @@
if(!(_this.ajaxYeTai == '全部')){ if(!(_this.ajaxYeTai == '全部')){
_data.industry_type = _this.ajaxYeTai; _data.industry_type = _this.ajaxYeTai;
}; };
if(!(_this.ajaxShopSign == '全部')){ if(!(_this.ajaxShopSign == '') && !(_this.ajaxShopSign == '全部')){
_data.shop_sign = _this.ajaxShopSign; _data.shop_sign = _this.ajaxShopSign;
}; };
...@@ -359,11 +361,15 @@ ...@@ -359,11 +361,15 @@
_this.initTabNumRent = index; _this.initTabNumRent = index;
if(rent[0] != '全部' ){ if(rent[0] != '全部' ){
var parseIntStart = parseInt(rent[0]); var parseIntStart = parseInt(rent[0]);
_this.initMoreNumRent = 0;
} }
if(rent[0] == '全部'){ if(rent[0] == '全部'){
_this.initMoreNumRent = 0;
_this.ajax_rent_price_start = ''; _this.ajax_rent_price_start = '';
_this.ajax_rent_price_end = ''; _this.ajax_rent_price_end = '';
}else if((rent.length == 1) && (rent[0] != '全部')){ }else if((rent.length == 1) && (rent[0] != '全部')){
_this.initMoreNumRent = 1;
if(parseIntStart > 1){ if(parseIntStart > 1){
_this.ajax_rent_price_start = parseIntStart*10000; _this.ajax_rent_price_start = parseIntStart*10000;
_this.ajax_rent_price_end = ''; _this.ajax_rent_price_end = '';
...@@ -386,12 +392,18 @@ ...@@ -386,12 +392,18 @@
if(item == '全部'){ if(item == '全部'){
_this.arrShop=[]; _this.arrShop=[];
} }
console.log( _this.arrShop);
var _shopIndex =_this.arrShop.indexOf(item); var _shopIndex =_this.arrShop.indexOf(item);
if(_shopIndex > -1){ if(_shopIndex > -1){
_this.arrShop.splice(_shopIndex, 1); _this.arrShop.splice(_shopIndex, 1);
}else{ }else{
_this.arrShop.push(item); _this.arrShop.push(item);
}; };
if(!(_this.arrShop[0] == '全部')){
_this.initMoreNum =_this.arrShop.length;
}else{
_this.initMoreNum = 0;
}
_this.ajaxShopSign = _this.arrShop.join(','); _this.ajaxShopSign = _this.arrShop.join(',');
}, },
toShopDetail(id){ toShopDetail(id){
...@@ -401,6 +413,12 @@ ...@@ -401,6 +413,12 @@
var str = this.common.ServerHost + "/app.php/app/share_detail?share=1&isC=0&client=b&id=" + id +'&user_name=' + user_name +'&user_img=' + user_img +'&user_tel=' + user_tel; var str = this.common.ServerHost + "/app.php/app/share_detail?share=1&isC=0&client=b&id=" + id +'&user_name=' + user_name +'&user_img=' + user_img +'&user_tel=' + user_tel;
location.href = str; location.href = str;
}, },
toShopSearchList(){
location.href = '/app/dist/#/shopSearchList';
console.log(this.initSelectCity);
localStorage.setItem('shop_list_b_user_city',this.initSelectCity);
localStorage.setItem('shop_list_b_user_shoptype',this.initTabNumMain);
},
delMore(){ delMore(){
let _this = this; let _this = this;
_this.initTabNumRent = 0; _this.initTabNumRent = 0;
...@@ -411,6 +429,11 @@ ...@@ -411,6 +429,11 @@
saveMore(){ saveMore(){
let _this = this; let _this = this;
_this.mainDataChoose[_this.initTabNumMainChoose].isShow = false; _this.mainDataChoose[_this.initTabNumMainChoose].isShow = false;
if((_this.initMoreNum*1 + _this.initMoreNumRent*1) > 0 ){
_this.mainDataChoose[_this.initTabNumMainChoose].title = '更多' + '(' + (_this.initMoreNum*1 + _this.initMoreNumRent*1) + ')';
}else{
_this.mainDataChoose[_this.initTabNumMainChoose].title = '更多';
};
_this.resetConditions(); _this.resetConditions();
_this.getList(); _this.getList();
}, },
...@@ -729,9 +752,12 @@ ...@@ -729,9 +752,12 @@
} }
.top-shop-search{ .top-shop-search{
position: fixed; position: fixed;
top: 0; top: .2rem;
right: 0.18rem; right: 0.4rem;
z-index: 668; z-index: 668;
width: 1.8rem; width: .46rem;
}
.icon-search-img{
width: .46rem;
} }
</style> </style>
This diff is collapsed.
...@@ -17,6 +17,7 @@ import agreement from '@/components/inviteRegister/agreement' ...@@ -17,6 +17,7 @@ import agreement from '@/components/inviteRegister/agreement'
import businessCollege from '@/components/businessCollege/articleList' import businessCollege from '@/components/businessCollege/articleList'
import articleDetail from '@/components/businessCollege/articleDetail' import articleDetail from '@/components/businessCollege/articleDetail'
import shopList from '@/components/shop/shopList' import shopList from '@/components/shop/shopList'
import shopSearchList from '@/components/shopSearch/shopSearchList'
Vue.use(Router) Vue.use(Router)
...@@ -110,6 +111,11 @@ export default new Router({ ...@@ -110,6 +111,11 @@ export default new Router({
path: '/shopList', path: '/shopList',
name: 'v-shop-list', name: 'v-shop-list',
component: shopList component: shopList
},
{
path: '/shopSearchList',
name: 'v-shop-search-list',
component: shopSearchList
} }
] ]
}) })
\ No newline at end of file
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