|
|
@@ -37,6 +37,8 @@ import { useSystemStore } from '../stores/system'
|
|
|
import { accAdd, accMul } from '../plugins/calc'
|
|
|
import toast from '@/utils/toast'
|
|
|
import { useI18n } from 'vue-i18n'
|
|
|
+import { useUserStore } from '@/stores/user'
|
|
|
+import { isAfter, addDays } from 'date-fns'
|
|
|
|
|
|
const { t } = useI18n()
|
|
|
const props = defineProps({
|
|
|
@@ -59,8 +61,15 @@ const category = computed(() => {
|
|
|
return props.info.category || {}
|
|
|
})
|
|
|
|
|
|
+const userStore = useUserStore()
|
|
|
+const user = computed(() => {
|
|
|
+ return userStore.user
|
|
|
+})
|
|
|
+
|
|
|
const notStock = computed(() => {
|
|
|
- return props.stopOfficial && props.info.sales === 0
|
|
|
+ return (
|
|
|
+ props.stopOfficial && props.info.sales === 0 && !isAfter(addDays(new Date(user.value.createdAt), 2), new Date())
|
|
|
+ )
|
|
|
})
|
|
|
|
|
|
const router = useRouter()
|