修改首页功能
This commit is contained in:
@ -61,7 +61,7 @@
|
||||
|
||||
<script>
|
||||
import { mapGetters, mapActions } from 'vuex'
|
||||
import { getShopGoodsCategory } from '@/api/shop'
|
||||
import { getShopGoodsCategory, getCityGoodsCategory } from '@/api/shop'
|
||||
import { getGoodsList } from '@/api/store'
|
||||
import MescrollMixin from '@/components/mescroll-uni/mescroll-mixins.js'
|
||||
|
||||
@ -99,14 +99,15 @@
|
||||
...mapActions(['getCartNum']),
|
||||
|
||||
onCityChange() {
|
||||
console.log("🚀 ~ methods.onCityChange:", 'onCityChange')
|
||||
this.active = -1
|
||||
this.goodsList = []
|
||||
this.getShopGoodsCategoryFun()
|
||||
this.mescroll.resetUpScroll()
|
||||
},
|
||||
async getShopGoodsCategoryFun() {
|
||||
const { data, code } = await getShopGoodsCategory({
|
||||
shop_id: this.shopId
|
||||
const { data, code } = await getCityGoodsCategory({
|
||||
city_id: (this.cityInfo && this.cityInfo.id) || 0,
|
||||
})
|
||||
if (code == 1) {
|
||||
this.category = data
|
||||
@ -126,7 +127,8 @@
|
||||
page_size: pageSize,
|
||||
page_no: pageNum,
|
||||
shop_id: this.shopId,
|
||||
shop_cate_id: cateId
|
||||
shop_cate_id: cateId,
|
||||
city_id: (this.cityInfo && this.cityInfo.id) || 0,
|
||||
}).then(({ data }) => {
|
||||
let curPageData = data.lists
|
||||
let curPageLen = curPageData.length
|
||||
|
||||
Reference in New Issue
Block a user