Merge branch 'main' of ssh://18.167.251.121:10002/aidlab/Aida_Purchaser_Front

This commit is contained in:
2026-05-28 11:46:25 +08:00
3 changed files with 58 additions and 17 deletions

View File

@@ -49,12 +49,23 @@ const addShopping = () => {
const goShopping = () => { const goShopping = () => {
if(!detail.value.price) return ElMessage.warning(t('brandDetail.addShoppingTip')) if(!detail.value.price) return ElMessage.warning(t('brandDetail.addShoppingTip'))
CreateOrder( let data = {
[detail.value.id],true listingId: detail.value.id, //资产ID
).then((res)=>{ title: detail.value.title, //标题
// if(res)router.push({path: '/shoppingCart') brand: detail.value.shopName, //店铺名称
sellerId: detail.value.sellerId, //店铺ID
cover: detail.value.images.cover[0], //封面
amount: detail.value.price, //价格
// status: v.status, //状态
// date: v.addTime, //添加时间
// tags: v.productCategory, //标签
// salesVolume: v.salesVolume, //销售量
}
const list = btoa(encodeURIComponent(JSON.stringify([data])))
router.push({
name: 'pay',
query: { list }
}) })
// router.push({path: '/shoppingCart'})
} }
const setImgList = (list)=>{ const setImgList = (list)=>{
sketchList.value = list?.apparel?.map((item:any) => {return {imgUrl:item}}) sketchList.value = list?.apparel?.map((item:any) => {return {imgUrl:item}})

View File

@@ -1,6 +1,7 @@
<template> <template>
<div class="pay"> <div class="pay">
<div class="content"> <div class="content">
<payment :ids="ids" />
<sc-list title="Order Summary" is-view is-mini :list="list" /> <sc-list title="Order Summary" is-view is-mini :list="list" />
</div> </div>
<my-footer /> <my-footer />
@@ -10,10 +11,14 @@
<script setup lang="ts"> <script setup lang="ts">
import { computed, onMounted, ref } from 'vue' import { computed, onMounted, ref } from 'vue'
import scList from '../shoppingCart/sc-list.vue' import scList from '../shoppingCart/sc-list.vue'
import payment from './payment.vue'
import myFooter from '@/components/Footer.vue' import myFooter from '@/components/Footer.vue'
import { useRoute } from 'vue-router' import { useRoute } from 'vue-router'
const route = useRoute() const route = useRoute()
const list = ref([]) const list = ref([])
const ids = computed(() => {
return list.value.map((item) => item.listingId)
})
try { try {
let str = route.query.list as string let str = route.query.list as string
list.value = JSON.parse(decodeURIComponent(atob(str))) list.value = JSON.parse(decodeURIComponent(atob(str)))
@@ -28,23 +33,30 @@
overflow-y: auto; overflow-y: auto;
--content-top: 4.8rem; --content-top: 4.8rem;
> .content { > .content {
max-width: 126rem;
padding-top: var(--content-top);
margin: 0 auto;
min-height: var(--app-view-height);
display: flex; display: flex;
align-items: flex-start; > * {
> .sc-list {
flex: 1; flex: 1;
margin-right: 7.5rem;
margin-bottom: 8rem;
--sc-list-header-top: var(--content-top);
} }
> .order-summary { > .order-summary {
position: sticky; flex: 1;
top: var(--content-top);
max-height: var(--app-view-height);
} }
// max-width: 126rem;
// padding-top: var(--content-top);
// margin: 0 auto;
// min-height: var(--app-view-height);
// display: flex;
// align-items: flex-start;
// > .sc-list {
// flex: 1;
// margin-right: 7.5rem;
// margin-bottom: 8rem;
// --sc-list-header-top: var(--content-top);
// }
// > .order-summary {
// position: sticky;
// top: var(--content-top);
// max-height: var(--app-view-height);
// }
} }
} }
</style> </style>

18
src/views/pay/payment.vue Normal file
View File

@@ -0,0 +1,18 @@
<template>
<div class="pay">{{ props.ids }}</div>
</template>
<script setup lang="ts">
import { computed, onMounted, ref } from 'vue'
const props = defineProps({
ids: {
type: Array,
default: () => []
}
})
</script>
<style lang="less" scoped>
.pay {
}
</style>