| | |
| | | :class="{ active: currentDropdown === item.key }" |
| | | @click="toggleDropdown(item.key)" |
| | | > |
| | | <text>{{ filterLabels[item.key] }}</text> |
| | | <text :class="{ 'filter-text-bold': isFilterBold(item.key) }">{{ filterLabels[item.key] }}</text> |
| | | <image :src="currentDropdown === item.key ? '/static/icon/ar_open_sel@2x.png' : '/static/icon/ar_open1@2x.png'" mode="widthFix"></image> |
| | | </view> |
| | | </view> |
| | |
| | | :class="{ active: selectedFilters[currentDropdown] === option.value }" |
| | | @click="selectDropdownOption(option)" |
| | | > |
| | | <text>{{ option.label }}</text> |
| | | <text>{{ option.label||'' }}</text> |
| | | <u-icon v-if="selectedFilters[currentDropdown] === option.value" name="checkmark" size="24" color="#2F86F6"></u-icon> |
| | | </view> |
| | | </view> |
| | |
| | | |
| | | <view class="content-wrap"> |
| | | <view v-if="!isMapMode" class="card-list"> |
| | | <view v-for="(item, index) in pointList" :key="index" class="point-card"> |
| | | <view v-for="(item, index) in pointList" :key="index" class="point-card" @click="goShopDetails(item)"> |
| | | <view class="thumb" :class="item.thumbClass"> |
| | | <image :src="item.cover" mode="widthFix"></image> |
| | | </view> |
| | |
| | | <text class="point-name">{{ item.name }}</text> |
| | | <text class="point-distance">{{ item.distance }}</text> |
| | | </view> |
| | | <view class="point-tips"> |
| | | <view class="point-tips-item" v-for="(tag, idx) in item.locationTagNames" :key="idx">{{ tag }}</view> |
| | | </view> |
| | | <view class="point-address"> |
| | | <image src="/static/icon/home_ic_location3@2x.png" mode="widthFix"></image> |
| | | <text>{{ item.address }}</text> |
| | | <text>{{ item.address ||''}}</text> |
| | | </view> |
| | | <text class="point-time">{{ item.time }}</text> |
| | | <text class="point-time">{{ item.time|| '' }}</text> |
| | | </view> |
| | | </view> |
| | | </view> |
| | |
| | | </swiper> |
| | | <view class="popup-body"> |
| | | <text class="popup-title">{{ activeStore.name }}</text> |
| | | <view class="point-tips"> |
| | | <view class="point-tips-item" v-for="(tag, idx) in activeStore.locationTagNames" :key="idx">{{ tag }}</view> |
| | | </view> |
| | | <text class="popup-hours">{{ activeStore.time }}</text> |
| | | <text class="popup-desc" v-if="activeStore.content">{{ activeStore.content }}</text> |
| | | <view class="popup-address-row" @click="openNavigation"> |
| | |
| | | <view class="popup-gap"></view> |
| | | <view class="popup-section"> |
| | | <text class="popup-section-title">寄存类型</text> |
| | | <text class="popup-section-text">{{ activeStore.depositTypes }}</text> |
| | | <text class="popup-section-text">{{ activeStore.depositTypes || '' }}</text> |
| | | </view> |
| | | <view class="popup-gap"></view> |
| | | <view class="popup-section no-border"> |
| | | <text class="popup-section-title">收费标准</text> |
| | | <text class="popup-section-text">{{ activeStore.feeStandard }}</text> |
| | | <text class="popup-section-text">{{ activeStore.feeStandard || '' }}</text> |
| | | </view> |
| | | </view> |
| | | </scroll-view> |
| | |
| | | </view> |
| | | </view> |
| | | </view> |
| | | <auth-login :show="showLogin" @close="showLogin = false"></auth-login> |
| | | </view> |
| | | </template> |
| | | |
| | |
| | | selectedFilters: { |
| | | sortType: '', |
| | | distance: '', |
| | | businessType: '' |
| | | businessType: '', |
| | | locationTagId: '' |
| | | }, |
| | | mapCenter: { |
| | | latitude: 31.86119, |
| | |
| | | filters: [ |
| | | { key: 'sortType', label: '综合排序' }, |
| | | { key: 'distance', label: '位置范围' }, |
| | | { key: 'businessType', label: '营业时间' } |
| | | { key: 'businessType', label: '营业时间' }, |
| | | { key: 'locationTagId', label: '位置标签' } |
| | | ], |
| | | dropdownOptions: { |
| | | sortType: [ |
| | |
| | | { label: '营业时间', value: '' }, |
| | | { label: '全天营业', value: '1' }, |
| | | { label: '限时营业', value: '0' } |
| | | ] |
| | | ], |
| | | locationTagId: [] |
| | | }, |
| | | pointList: [], |
| | | isRequest: true |
| | | isRequest: true, |
| | | showLogin: false |
| | | } |
| | | }, |
| | | computed: { |
| | | ...mapState(['latitude', 'longitude', 'cityId']), |
| | | ...mapState(['latitude', 'longitude', 'cityId', 'token']), |
| | | filterLabels() { |
| | | return { |
| | | sortType: this.getFilterLabel('sortType'), |
| | | distance: this.getFilterLabel('distance'), |
| | | businessType: this.getFilterLabel('businessType') |
| | | businessType: this.getFilterLabel('businessType'), |
| | | locationTagId: this.getFilterLabel('locationTagId') |
| | | } |
| | | }, |
| | | currentOptions() { |
| | |
| | | }, |
| | | async onLoad() { |
| | | await this.$onLaunched |
| | | this.getLocationTagList() |
| | | this.getNearbyShopList() |
| | | }, |
| | | onReachBottom() { |
| | | this.getNearbyShopList() |
| | | }, |
| | | methods: { |
| | | async getLocationTagList() { |
| | | const res = await this.$u.api.getCategoryList({ type: 5 }) |
| | | if (res.code === 200) { |
| | | const list = (res.data || []).map(item => ({ |
| | | label: item.name, |
| | | value: item.id |
| | | })) |
| | | this.dropdownOptions.locationTagId = [{ label: '位置标签', value: '' }, ...list] |
| | | } |
| | | }, |
| | | isFilterBold(key) { |
| | | if (key === 'sortType') { |
| | | return true |
| | | } |
| | | const label = this.filterLabels[key] |
| | | if (key === 'distance') { |
| | | return label !== '位置范围' |
| | | } else if (key === 'businessType') { |
| | | return label !== '营业时间' |
| | | } |
| | | return false |
| | | }, |
| | | handleSearch() { |
| | | this.page = 1 |
| | | this.pointList = [] |
| | |
| | | name: this.keyword, |
| | | cityId: this.cityId, |
| | | sortType: this.selectedFilters.sortType || 1, |
| | | businessType: this.selectedFilters.businessType || '' |
| | | businessType: this.selectedFilters.businessType || '', |
| | | locationTagId: this.selectedFilters.locationTagId || '' |
| | | } |
| | | }) |
| | | if (res.code === 200) { |
| | | let arr = [] |
| | | res.data.records.forEach(item => { |
| | | let locationTagNames = [] |
| | | if (item.locationTagNames) { |
| | | locationTagNames = item.locationTagNames.split(',') |
| | | } |
| | | let obj = { |
| | | id: item.id, |
| | | shopId: item.id, |
| | | name: item.name, |
| | | address: item.address, |
| | |
| | | latitude: item.latitude, |
| | | longitude: item.longitude, |
| | | depositTypes: item.depositTypes, |
| | | feeStandard: item.feeStandard |
| | | feeStandard: item.feeStandard, |
| | | locationTagNames: locationTagNames |
| | | } |
| | | arr.push(obj) |
| | | }) |
| | |
| | | longitude: this.longitude, |
| | | }).then(res => { |
| | | if (res.code === 200) { |
| | | if (res.data.locationTagNames) { |
| | | res.data.locationTagNames = res.data.locationTagNames.split(',') |
| | | } |
| | | this.activeStore = res.data |
| | | } |
| | | }) |
| | |
| | | }) |
| | | }, |
| | | storeLuggage() { |
| | | if (!this.token) { |
| | | this.showLogin = true |
| | | return |
| | | } |
| | | uni.setStorageSync('selectedStore', this.activeStore) |
| | | uni.navigateTo({ |
| | | url: '/pages/luggage-storage/luggage-storage' |
| | | }) |
| | | }, |
| | | goShopDetails(item){ |
| | | console.log(item) |
| | | uni.navigateTo({ |
| | | url: '/pages/storage-point-detail/storage-point-detail?id='+item.id |
| | | }) |
| | | } |
| | | } |
| | |
| | | .filter-item.active { |
| | | color: #222222; |
| | | } |
| | | |
| | | |
| | | .filter-text-bold { |
| | | font-weight: 700; |
| | | color: #000000; |
| | | } |
| | | |
| | | .card-list { |
| | | padding: 30rpx; |
| | | box-sizing: border-box; |
| | |
| | | justify-content: space-between; |
| | | gap: 12rpx; |
| | | } |
| | | |
| | | .point-tips { |
| | | width: 100%; |
| | | display: flex; |
| | | align-items: center; |
| | | margin-top: 12rpx; |
| | | .point-tips-item { |
| | | width: 116rpx; |
| | | height: 36rpx; |
| | | line-height: 36rpx; |
| | | text-align: center; |
| | | border-radius: 8rpx; |
| | | font-weight: 400; |
| | | font-size: 20rpx; |
| | | color: #10B2FA; |
| | | margin-right: 12rpx; |
| | | border: 1rpx solid #10B2FA; |
| | | } |
| | | } |
| | | |
| | | .point-name { |
| | | flex: 1; |
| | |
| | | width: 24rpx; |
| | | height: 24rpx; |
| | | margin-right: 4rpx; |
| | | flex-shrink: 0; |
| | | } |
| | | |
| | | .point-address text { |
| | | width: 425rpx; |
| | | display: -webkit-box; |
| | | -webkit-line-clamp: 2; |
| | | -webkit-box-orient: vertical; |
| | | overflow: hidden; |
| | | } |
| | | |
| | | .point-time { |
| | | display: block; |
| | | width: 425rpx; |
| | | display: -webkit-box; |
| | | -webkit-line-clamp: 1; |
| | | -webkit-box-orient: vertical; |
| | | overflow: hidden; |
| | | margin-top: 20rpx; |
| | | line-height: 1.5; |
| | | font-weight: 400; |