修改首页功能

This commit is contained in:
wangxiaowei
2026-04-23 10:41:27 +08:00
parent 7f8f15b809
commit a3edea96af
10 changed files with 45 additions and 37 deletions

View File

@ -32,14 +32,14 @@
>
<view class="flex-1 flex">
<!-- 城市 -->
<router-link
<!-- <router-link
v-if="appConfig.is_open_nearby"
class="m-l-16 flex white row-center flex-none"
to="/bundle_b/pages/city/city"
>
<text class="m-r-6">{{ cityInfo.name || '选择' }}</text>
<u-icon name="arrow-down" size="24" color="#FFFFFF"></u-icon>
</router-link>
</router-link> -->
<view class="store-search flex-1" @click="handleSerach">
<u-search
v-model="keyword"
@ -87,16 +87,16 @@
</view>
</view>
</view>
<view
<!-- <view
class="flex row-center white br60 sm flex-none subscribe-btn"
:class="{ gray: shopInfo.shop_follow_status === 1 }"
@tap="changeShopFollowFun"
>
{{ shopInfo.shop_follow_status === 1 ? '已关注' : '+ 关注' }}
</view>
</view> -->
</view>
<view class="p-t-20 p-b-20">
<u-tabs
<!-- <u-tabs
:current="tabcurrent"
:list="[{ name: '精选' }, { name: '商品' }, { name: '领券' }]"
:is-scroll="false"
@ -104,6 +104,15 @@
bg-color="transparent"
active-color="white"
inactive-color="white"
></u-tabs> -->
<u-tabs
:current="tabcurrent"
:list="[{ name: '精选' }, { name: '商品' }]"
:is-scroll="false"
@change="tabChange"
bg-color="transparent"
active-color="white"
inactive-color="white"
></u-tabs>
</view>
</view>
@ -214,7 +223,7 @@
<script>
import { mapActions, mapGetters } from 'vuex'
import { getShopInfo, getShopGoodsCategory, changeShopFollow, getCityShops } from '@/api/shop'
import { getShopInfo, getShopGoodsCategory, changeShopFollow, getCityShops, getCityGoodsCategory } from '@/api/shop'
import { getShopLive } from '@/api/live'
import { getGoodsList } from '@/api/store'
import MescrollMixin from '@/components/mescroll-uni/mescroll-mixins.js'
@ -263,6 +272,7 @@ export default {
this.sys = uni.getSystemInfoSync()
await this.getShopInfoFun()
await this.getShopGoodsCategoryFun()
this.getCurrentCity()
// #ifdef MP-WEIXIN
this.getShopLiveFun()
// #endif
@ -275,7 +285,6 @@ export default {
// #endif
},
onShow() {
this.getCurrentCity()
// #ifdef H5
this.enableFix = true
// #endif
@ -351,8 +360,7 @@ export default {
}
},
async getShopGoodsCategoryFun() {
const { data, code } = await getShopGoodsCategory({
shop_id: this.id,
const { data, code } = await getCityGoodsCategory({
city_id: (this.cityInfo && this.cityInfo.id) || 0
})
if (code == 1) {