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