liyongle 3 years ago
parent
commit
dd9d2ca545
  1. 2
      .gitignore
  2. 21
      src/components/ShopDetail/ShopDetail.vue
  3. 3
      src/components/ShopItem/ShopItem.vue
  4. 9
      src/views/Brand/filterFormatAndFloor.vue

2
.gitignore

@ -1,7 +1,7 @@
.DS_Store
node_modules
/dist
*.zip
# local env files
.env.local

21
src/components/ShopDetail/ShopDetail.vue

@ -32,12 +32,7 @@
<!-- logo 名称 属性-->
<div class="name-wrapper">
<div class="logo-wrapper">
<img
v-if="shop.logoUrl"
class="shop-logo"
:src="shop.logoUrl.search(config.sourceUrl) >= 0 ? shop.logoUrl : config.sourceUrl + shop.logoUrl"
alt=""
/>
<img v-if="shop.logoUrl" class="shop-logo" :src="shop.logoUrl" alt="" />
<img v-else class="shop-logo" src="@/assets/images/empty_small.svg" alt="" />
</div>
<div class="marquee-wrapper">
@ -110,29 +105,35 @@ import 'swiper/css/effect-fade'
import scrollView from '@/base/ScrollView/ScrollView.vue'
import masker from '@/base/Masker/Masker.vue'
import marquees from '@/base/Marquees/Marquees.vue'
import { useRouter } from 'vue-router'
import { useRouter, useRoute } from 'vue-router'
import { useStatistics } from '@/composables/useStatistics'
import { storeToRefs } from 'pinia'
import { useRootStore } from '@/store/root'
import { computed, ref } from 'vue'
import { ref, toRaw } from 'vue'
import { useSwitchLanguage } from '@/composables/useSwitchLanguage'
const { switchLanguage } = useSwitchLanguage()
const store = useRootStore()
const { shop, config } = storeToRefs(store)
const { shop, config, prevShop } = storeToRefs(store)
const router = useRouter()
const route = useRoute()
const modules = [Autoplay, Pagination, EffectFade]
const marqueesRef = ref()
const activityList = computed(() => shop.value.activityList)
// const activityList = computed(() => shop.value.activityList)
//
function close() {
if (route.fullPath === '/nav') {
console.log('prevShop.value.shopName :>> ', prevShop.value.shopName)
store.SET_SHOP(toRaw(prevShop.value))
}
store.SET_SHOW_DETAIL(false)
}
//
function handleGo() {
store.SET_SHOW_DETAIL(false)
store.SET_SHOW_SEARCH(false)
store.SET_SHOW_COLUMNLIST(false)
router.push('/nav')
}

3
src/components/ShopItem/ShopItem.vue

@ -29,7 +29,10 @@ defineProps<Prop>()
const { switchLanguage } = useSwitchLanguage()
const store = useRootStore()
const { language } = storeToRefs(store)
import { hideMapDialog } from '@/composables/useInitMap'
function showDetail(shop: Shop) {
hideMapDialog()
store.SET_SHOP(shop)
store.SET_SHOW_DETAIL(true)
}

9
src/views/Brand/filterFormatAndFloor.vue

@ -4,10 +4,11 @@
<div
v-for="(item, index) of copyList"
:key="item.industryCode"
:style="{ height: index === active ? 'fit-content' : '' }"
:style="{ height: index === active ? 'fit-content' : item.shopNum === 0 ? '0px' : '' }"
class="filter-div-f"
>
<div
v-show="item.shopNum > 0"
ref="filterDivEl"
class="filter-div"
:class="{ 'filter-active': active == index && activeSon === -1 }"
@ -95,6 +96,10 @@ import { computed, ref, nextTick } from 'vue'
import scrollView from '@/base/ScrollView/ScrollView.vue'
import { useSwitchLanguage } from '@/composables/useSwitchLanguage'
import { storeToRefs } from 'pinia'
import { useRootStore } from '@/store/root'
const store = useRootStore()
const { shopList } = storeToRefs(store)
const { switchLanguage } = useSwitchLanguage()
type Props = {
list: Industry[]
@ -120,7 +125,7 @@ const copyList = computed(() => {
industryCode: 0,
industryName: '全部品牌',
industryNameEn: '',
shopNum: 0,
shopNum: shopList.value.length,
industryList: []
},
...props.list

Loading…
Cancel
Save