2023-11-22 18:55:55 +08:00
|
|
|
|
<!--
|
|
|
|
|
@name: 空购物车
|
|
|
|
|
@author: kahu4
|
|
|
|
|
@date: 2023-11-06 15:59
|
|
|
|
|
@description:CartEmpty
|
|
|
|
|
@update: 2023-11-06 15:59
|
|
|
|
|
-->
|
|
|
|
|
<script setup>
|
|
|
|
|
import Empty from '@/components/Empty/index.vue'
|
2024-02-08 21:01:37 +08:00
|
|
|
|
import { nextTick, onMounted, ref } from 'vue'
|
2023-11-22 18:55:55 +08:00
|
|
|
|
import { emptyGoodIcon } from "@/utils/images";
|
|
|
|
|
import { useRouter } from "@/hooks/useRouter";
|
2024-02-08 21:01:37 +08:00
|
|
|
|
import Recommend from "@/components/Recommend/index.vue";
|
2023-11-22 18:55:55 +08:00
|
|
|
|
|
|
|
|
|
const {pushToTab} = useRouter()
|
2024-02-08 21:01:37 +08:00
|
|
|
|
const recommendRef = ref()
|
|
|
|
|
onMounted(() => {
|
|
|
|
|
nextTick(() => {
|
|
|
|
|
recommendRef.value.executeRefresh()
|
|
|
|
|
})
|
|
|
|
|
})
|
2023-11-22 18:55:55 +08:00
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<template>
|
|
|
|
|
<Empty
|
|
|
|
|
:iconSrc="emptyGoodIcon"
|
|
|
|
|
>
|
|
|
|
|
<template #default>
|
|
|
|
|
商品不存在~
|
|
|
|
|
</template>
|
|
|
|
|
<template #bottom>
|
|
|
|
|
<view
|
|
|
|
|
class="go-on-btn"
|
2024-02-08 21:01:37 +08:00
|
|
|
|
@click="pushToTab({url:'/root/index/index'})"
|
2023-11-22 18:55:55 +08:00
|
|
|
|
>
|
|
|
|
|
继续逛逛
|
|
|
|
|
</view>
|
|
|
|
|
</template>
|
|
|
|
|
</Empty>
|
2024-02-08 21:01:37 +08:00
|
|
|
|
<!-- 商品推荐 -->
|
|
|
|
|
<Recommend ref="recommendRef" />
|
2023-11-22 18:55:55 +08:00
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<style
|
|
|
|
|
scoped
|
|
|
|
|
lang="scss"
|
|
|
|
|
>
|
|
|
|
|
.go-on-btn {
|
|
|
|
|
padding: 15rpx 50rpx;
|
2024-02-08 21:01:37 +08:00
|
|
|
|
margin-top: 20rpx;
|
|
|
|
|
background: #333333;
|
2023-11-22 18:55:55 +08:00
|
|
|
|
color: #fff;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
</style>
|