服务器更替
This commit is contained in:
@@ -36,6 +36,11 @@ const { t } = useI18n();
|
||||
|
||||
const loading = ref(false)
|
||||
|
||||
function isSoldOutStock(stockLike: unknown) {
|
||||
const n = Number(stockLike)
|
||||
return !Number.isNaN(n) && n <= 0
|
||||
}
|
||||
|
||||
function navigateTo(url: string) {
|
||||
if(userStore.checkLogin()) {
|
||||
uni.navigateTo({
|
||||
@@ -373,6 +378,12 @@ const debouncedEmit = debounce(1300, (isCollected: boolean, id: string, type: Co
|
||||
class="w-full h-full"
|
||||
/>
|
||||
</view>
|
||||
<view
|
||||
v-if="isSoldOutStock(item?.stock)"
|
||||
class="absolute z-2 left-20rpx top-20rpx px-16rpx h-52rpx rounded-26rpx bg-#14181B/70 center text-26rpx text-#fff font-500"
|
||||
>
|
||||
已售完
|
||||
</view>
|
||||
<image
|
||||
:src="item?.dishImage?.split(',')[0]"
|
||||
mode="aspectFill"
|
||||
|
||||
Reference in New Issue
Block a user