更新云市场
This commit is contained in:
parent
f9c2e90785
commit
b561aac302
@ -89,11 +89,11 @@
|
||||
|
||||
<view class="menu_cls">
|
||||
<u-scroll-list indicatorActiveColor='#FF6D20' :indicator="true">
|
||||
<view class="menu_li" :class="{'menu_li_on': item.store_category_id==store_category_id}" @click="changeMerchant(item.store_category_id)" v-for="item,index in menuList"
|
||||
<view class="menu_li" :class="{'menu_li_on': item.merchant_category_id==merchant_category_id}" @click="changeMerchant(item.merchant_category_id)" v-for="item,index in menuList"
|
||||
:key="index">
|
||||
<u--image class="image" :showLoading="true" :src="item.pic" width="87.62rpx" height="87.62rpx" shape="circle"
|
||||
<u--image class="image" :showLoading="true" :src="item.background" width="87.62rpx" height="87.62rpx" shape="circle"
|
||||
></u--image>
|
||||
<view class="li_text" style="display: block;font-size: 26.29rpx;margin-top: 10rpx;">{{item.cate_name}}</view>
|
||||
<view class="li_text" style="display: block;font-size: 26.29rpx;margin-top: 10rpx;">{{item.category_name}}</view>
|
||||
</view>
|
||||
</u-scroll-list>
|
||||
</view>
|
||||
@ -308,7 +308,7 @@
|
||||
page: 1,
|
||||
limit: 10,
|
||||
order: 'location',
|
||||
store_category_id: '', //商品类型id
|
||||
merchant_category_id: '', //商品类型id
|
||||
category_id: '', //商户类型id
|
||||
type_id: '',
|
||||
street_id: '',
|
||||
@ -316,7 +316,7 @@
|
||||
},
|
||||
storeKey: 0,
|
||||
storeScroll: true,
|
||||
store_category_id: '', // 当前选中类型的id
|
||||
merchant_category_id: '', // 当前选中类型的id
|
||||
mer_id: '',
|
||||
sortId: '',
|
||||
price_on: '',
|
||||
@ -350,17 +350,16 @@
|
||||
this.credit_buy = options.credit_buy
|
||||
this.storeParam.type_id = options.type_id
|
||||
this.storeParam.type_id = options.type_id && options.type_id.split(',').toString() || ''
|
||||
this.storeParam.store_category_id = options.cate_id && options.cate_id.split(',').toString() || ''
|
||||
this.storeParam.merchant_category_id = options.cate_id && options.cate_id.split(',').toString() || ''
|
||||
this.storeList = [];
|
||||
getCategoryListLevel().then(res => {
|
||||
merClassifly().then(res => {
|
||||
this.menuList = res.data;
|
||||
this.store_category_id = this.menuList[0].store_category_id;
|
||||
this.storeParam.store_category_id = this.store_category_id;
|
||||
this.merchant_category_id = this.menuList[0].merchant_category_id;
|
||||
this.storeParam.merchant_category_id = this.merchant_category_id;
|
||||
if (this.mer_location == 1) {
|
||||
this.selfLocation()
|
||||
}
|
||||
// this.storeMerchantList();
|
||||
// this.getClassfication();
|
||||
this.getStoreType();
|
||||
this.Area()
|
||||
let that = this
|
||||
@ -529,32 +528,25 @@
|
||||
}
|
||||
},
|
||||
// 获取商户分类
|
||||
getClassfication: function() {
|
||||
let temp = []
|
||||
merClassifly()
|
||||
.then(res => {
|
||||
temp = res.data.map(item => {
|
||||
return {
|
||||
...item,
|
||||
check: false
|
||||
}
|
||||
})
|
||||
if (this.storeParam.store_category_id.length > 0) {
|
||||
this.storeParam.store_category_id.forEach((ids, index) => {
|
||||
temp.forEach(el => {
|
||||
if (ids == el.merchant_category_id) {
|
||||
el.check = true
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
this.merList = temp
|
||||
})
|
||||
.catch(res => {
|
||||
this.$util.Tips({
|
||||
title: res
|
||||
});
|
||||
});
|
||||
async getClassfication(res=null) {
|
||||
let temp = [];
|
||||
if(!res) res = await merClassifly();
|
||||
temp = res.data.map(item => {
|
||||
return {
|
||||
...item,
|
||||
check: false
|
||||
}
|
||||
})
|
||||
if (this.storeParam.merchant_category_id.length > 0) {
|
||||
this.storeParam.merchant_category_id.forEach((ids, index) => {
|
||||
temp.forEach(el => {
|
||||
if (ids == el.merchant_category_id) {
|
||||
el.check = true
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
this.merList = temp
|
||||
},
|
||||
// 获取店铺类型
|
||||
getStoreType: function() {
|
||||
@ -717,7 +709,7 @@
|
||||
page: this.storeParam.page,
|
||||
limit: 10,
|
||||
order: this.storeParam.order,
|
||||
store_category_id: this.storeParam.store_category_id,
|
||||
merchant_category_id: this.storeParam.merchant_category_id,
|
||||
type_id: this.storeParam.type_id,
|
||||
credit_buy: this.credit_buy,
|
||||
}
|
||||
@ -750,10 +742,11 @@
|
||||
page: this.storeParam.page,
|
||||
limit: 10,
|
||||
order: this.storeParam.order,
|
||||
store_category_id: this.storeParam.store_category_id,
|
||||
// merchant_category_id: this.storeParam.merchant_category_id,
|
||||
type_id: this.storeParam.type_id,
|
||||
credit_buy: this.credit_buy,
|
||||
}
|
||||
rqData.street_id = this.storeParam.street_id
|
||||
if (this.latitude) {
|
||||
rqData.location = this.latitude + ',' + this.longitude
|
||||
}
|
||||
@ -806,12 +799,12 @@
|
||||
this.storeParam.type_id = arr1.toString();
|
||||
}
|
||||
if (data.merList.length == 0) {
|
||||
this.storeParam.store_category_id = ''
|
||||
this.storeParam.merchant_category_id = ''
|
||||
} else {
|
||||
data.merList.forEach(item => {
|
||||
arr2.push(item.merchant_category_id)
|
||||
})
|
||||
this.storeParam.store_category_id = arr2.toString();
|
||||
this.storeParam.merchant_category_id = arr2.toString();
|
||||
}
|
||||
this.rightBox = data.status
|
||||
this.loadend = false;
|
||||
@ -855,8 +848,8 @@
|
||||
},
|
||||
// 点击商户分类
|
||||
changeMerchant(id){
|
||||
this.store_category_id = id;
|
||||
this.storeParam.store_category_id = this.store_category_id;
|
||||
this.merchant_category_id = id;
|
||||
this.storeParam.merchant_category_id = this.merchant_category_id;
|
||||
this.storeParam.page = 1;
|
||||
this.storeMerchantList()
|
||||
},
|
||||
@ -915,7 +908,7 @@
|
||||
credit_buy: this.credit_buy
|
||||
}
|
||||
if(!this.storeParam.is_recommend){
|
||||
rqData.store_category_id = this.storeParam.store_category_id;
|
||||
rqData.merchant_category_id = this.storeParam.merchant_category_id;
|
||||
rqData.street_id = this.storeParam.street_id;
|
||||
}
|
||||
if (this.latitude) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user