|
@@ -14,7 +14,6 @@ import { onPageScroll, onReachBottom } from '@dcloudio/uni-app'
|
|
|
import useZPaging from 'z-paging/components/z-paging/js/hooks/useZPaging.js'
|
|
|
import { preOrder as _preOrder } from '@/api/order'
|
|
|
import { getDetail, pinkList } from '@/api/product'
|
|
|
-import { useUserStore } from '@/store/user'
|
|
|
import { formatNumber } from '@/utils/index'
|
|
|
import { getPageParams, goBack, toPage } from '@/utils/page'
|
|
|
import CustomTooltip from './components/CustomTooltip.vue'
|
|
@@ -23,9 +22,8 @@ import NotificationCarousel from './components/NotificationCarousel.vue'
|
|
|
defineOptions({
|
|
|
name: 'ProductDetail', // 商品详情
|
|
|
})
|
|
|
-const userStore = useUserStore()
|
|
|
const userInfo = computed(() => {
|
|
|
- return userStore.userInfo
|
|
|
+ return getUserInfoHook()
|
|
|
})
|
|
|
// 获取屏幕边界到安全区域距离
|
|
|
const systemInfo = uni.getSystemInfoSync()
|
|
@@ -249,6 +247,9 @@ function setDefaultSpecs() {
|
|
|
|
|
|
// 预下单
|
|
|
async function preOrder() {
|
|
|
+ if (!requireLogin()) {
|
|
|
+ return
|
|
|
+ }
|
|
|
const data = {
|
|
|
orderDetails: {
|
|
|
attrValueId: matchedAttrValue.value.id,
|