add:新增会员、优惠券
This commit is contained in:
@@ -55,6 +55,7 @@
|
||||
<view class="tags">
|
||||
<view class="tag rent" v-if="isRentable(item)">{{ $t('location.rent') }}</view>
|
||||
<view class="tag return" v-if="isReturnable(item)">{{ $t('location.return') }}</view>
|
||||
<view class="tag" v-if="isCoupon(item)">{{CouponOrmember(item)}}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="actions">
|
||||
@@ -131,6 +132,11 @@
|
||||
if (typeof item?.canReturn !== 'undefined') return !!item.canReturn
|
||||
return String(item?.status || '').toLowerCase() === 'online'
|
||||
}
|
||||
|
||||
const isCoupon = (item)=>{
|
||||
if(typeof item.canCoupon!=='undefined')return !!item.canCoupon
|
||||
return String(item?.canCoupon||'').toLowerCase()==='true';
|
||||
}
|
||||
|
||||
const formatDistance = (meters) => {
|
||||
if (meters < 1000) return `${Math.round(meters)}m`
|
||||
@@ -186,6 +192,11 @@
|
||||
positionList.value.sort((a, b) => (a.distanceInMeters || 999999) - (b.distanceInMeters || 999999))
|
||||
applyFilter()
|
||||
}
|
||||
|
||||
const CouponOrmember= async(item)=>{
|
||||
|
||||
return "可使用优惠券、会员卡"
|
||||
}
|
||||
|
||||
const loadPositions = async (center) => {
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user