对接支付优惠

This commit is contained in:
gyq
2025-03-11 09:10:49 +08:00
parent 5cf2355d28
commit 3df0cce9ec
31 changed files with 1527 additions and 846 deletions

View File

@@ -19,9 +19,9 @@
<div class="cart_list">
<div class="item" v-for="item in cartList" :key="item.id">
<div class="top">
<span class="name">{{ item.name }}</span>
<span class="n">x{{ item.number }}</span>
<span class="p">{{ item.salePrice }}</span>
<span class="name">{{ item.productName }}</span>
<span class="n">x{{ item.num }}</span>
<span class="p">{{ item.price }}</span>
</div>
<div class="tag_wrap" v-if="item.skuName">
<div class="tag" v-for="item in item.skuName.split(',')">
@@ -93,6 +93,7 @@ import settleAccount from "@/views/home/components/settleAccount.vue";
import { ElMessage } from 'element-plus'
import { clearTable } from '@/api/table.js'
import { useGoods } from "@/store/goods.js";
import { getOrderByIdAjax } from '@/utils/index.js'
const goodsStore = useGoods()
const router = useRouter()
@@ -173,22 +174,14 @@ async function getOrderDetail() {
try {
if (props.tableInfo.orderId) {
payLoading.value = true
const res = await orderDetail({
shopId: store.userInfo.shopId,
id: props.tableInfo.orderId
})
const res = await getOrderByIdAjax(props.tableInfo.orderId)
console.log(res);
payLoading.value = false
orderInfo.value = res
cartList.value = res.detailList.map(item => {
let obj = {
name: item.productName,
number: item.num,
salePrice: item.price,
skuName: item.productSkuName
}
return obj
})
cartList.value = res.cartList
}
} catch (error) {
payLoading.value = false