|
@@ -19,7 +19,7 @@
|
|
|
|
|
|
<script setup>
|
|
|
defineOptions({ name: 'mall-goods-item'})
|
|
|
-import { useRouter } from 'vue-router'
|
|
|
+// import { useRouter } from 'vue-router'
|
|
|
import { fen2yuan } from '@/hooks/web/useGoods'
|
|
|
|
|
|
defineProps({
|
|
@@ -41,12 +41,12 @@ defineProps({
|
|
|
}
|
|
|
})
|
|
|
|
|
|
-const router = useRouter()
|
|
|
+// const router = useRouter()
|
|
|
|
|
|
const handleDetail = (val) => {
|
|
|
const spuId = val.spuId || val.id // 商品id
|
|
|
- // window.open(`/mall/goodsDetail/${spuId}`)
|
|
|
- if (spuId) router.push(`/mall/goodsDetail/${spuId}`)
|
|
|
+ if (spuId) window.open(`/mall/goodsDetail/${spuId}`)
|
|
|
+ // if (spuId) router.push(`/mall/goodsDetail/${spuId}`)
|
|
|
}
|
|
|
</script>
|
|
|
|