处理未登录情况
This commit is contained in:
@@ -131,7 +131,7 @@
|
||||
<script lang='ts' setup>
|
||||
import { assetsUrl } from '@/utils/assets';
|
||||
import dayjs from 'dayjs';
|
||||
import { formatTimeWithZeroPad, goPath } from '@/utils';
|
||||
import { formatTimeWithZeroPad, goPath, isLogin } from '@/utils';
|
||||
import SkuDialog from '@/components/sku-dialog.vue';
|
||||
import CouponItem from './components/coupon-item.vue';
|
||||
|
||||
@@ -163,12 +163,14 @@ const recordList = ref<RecordBean[]>([]);
|
||||
const currentPageNum = ref(1);
|
||||
|
||||
onLoad(async (e: any) => {
|
||||
groupBuyBean.value = await getGroupBuyDetail(e.id);
|
||||
groupBuyBean.value.goods.price = groupBuyBean.value.price;
|
||||
bannerList.value = JSON.parse(groupBuyBean.value.content).filter((item: any) => item.type === 2).map((item: any) => item.images);
|
||||
countdown();
|
||||
await fetchRecommendList();
|
||||
await fetchBuyRecordList();
|
||||
if(isLogin()) {
|
||||
groupBuyBean.value = await getGroupBuyDetail(e.id);
|
||||
groupBuyBean.value.goods.price = groupBuyBean.value.price;
|
||||
bannerList.value = JSON.parse(groupBuyBean.value.content).filter((item: any) => item.type === 2).map((item: any) => item.images);
|
||||
countdown();
|
||||
await fetchRecommendList();
|
||||
await fetchBuyRecordList();
|
||||
}
|
||||
});
|
||||
|
||||
onUnload(() => {
|
||||
|
Reference in New Issue
Block a user