空状态需要处理,需要添加分享页面

This commit is contained in:
cbb
2025-12-26 17:42:07 +08:00
parent bb02cb22c0
commit dfc5888fa9
64 changed files with 11036 additions and 109 deletions

View File

@@ -1,10 +1,10 @@
<script setup>
import { onLoad, onShow } from '@dcloudio/uni-app'
import { getProductDetail } from '@/api/mall'
import { getProductDetail, addOrder } from '@/api/mall'
import { reactive, ref } from 'vue'
import { formatRMB } from '@/utils'
import { getUserAddress } from '@/api'
import { navigateTo } from '@/utils/router'
import { navigateTo, redirectTo } from '@/utils/router'
const viewData = ref({})
@@ -63,7 +63,6 @@
formData.spec = id
priceData.value = price
formData.total = price
console.log('111111111111111111111')
}
/** 数量切换 */
@@ -81,13 +80,18 @@
}
// 提交订单
const onConfirm = () => {
const onConfirm = async () => {
const data = {
addressId: topRessData.id,
productId: viewData.value.id,
quantity: formData.num
quantity: formData.num,
skuId: formData.spec
}
console.log(data, '提交订单')
const res = await addOrder(data)
redirectTo('/pages/shop-together/detail', {
id: res.data.groupId,
type: 'add'
})
}
onShow(() => {
@@ -121,7 +125,7 @@
</view>
<!-- 商品展示 -->
<view class="product-box">
<view class="public-product_item">
<image
:src="viewData.mainImage"
mode="scaleToFill"
@@ -133,8 +137,8 @@
</text>
<view class="line-box">
<view class="rmb-box">
<text>¥{{ viewData.maxPrice }}</text>
<text>¥{{ viewData.minPrice }}</text>
<text>¥{{ viewData.originalPrice || '' }}</text>
<text>¥{{ priceData }}</text>
</view>
<!-- 添加数量 -->
<view class="add-num">
@@ -210,5 +214,6 @@
page {
background: #f9f9f9;
}
@import '@/styles/mall.scss';
@import './styles/confirm-order.scss';
</style>