Merge branch 'main' of ssh://18.167.251.121:10002/aidlab/Aida_Purchaser_Front
This commit is contained in:
@@ -49,12 +49,23 @@ const addShopping = () => {
|
||||
|
||||
const goShopping = () => {
|
||||
if(!detail.value.price) return ElMessage.warning(t('brandDetail.addShoppingTip'))
|
||||
CreateOrder(
|
||||
[detail.value.id],true
|
||||
).then((res)=>{
|
||||
// if(res)router.push({path: '/shoppingCart')
|
||||
let data = {
|
||||
listingId: detail.value.id, //资产ID
|
||||
title: detail.value.title, //标题
|
||||
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)=>{
|
||||
sketchList.value = list?.apparel?.map((item:any) => {return {imgUrl:item}})
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
<template>
|
||||
<div class="pay">
|
||||
<div class="content">
|
||||
<payment :ids="ids" />
|
||||
<sc-list title="Order Summary" is-view is-mini :list="list" />
|
||||
</div>
|
||||
<my-footer />
|
||||
@@ -10,10 +11,14 @@
|
||||
<script setup lang="ts">
|
||||
import { computed, onMounted, ref } from 'vue'
|
||||
import scList from '../shoppingCart/sc-list.vue'
|
||||
import payment from './payment.vue'
|
||||
import myFooter from '@/components/Footer.vue'
|
||||
import { useRoute } from 'vue-router'
|
||||
const route = useRoute()
|
||||
const list = ref([])
|
||||
const ids = computed(() => {
|
||||
return list.value.map((item) => item.listingId)
|
||||
})
|
||||
try {
|
||||
let str = route.query.list as string
|
||||
list.value = JSON.parse(decodeURIComponent(atob(str)))
|
||||
@@ -28,23 +33,30 @@
|
||||
overflow-y: auto;
|
||||
--content-top: 4.8rem;
|
||||
> .content {
|
||||
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);
|
||||
flex: 1;
|
||||
}
|
||||
// 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>
|
||||
|
||||
18
src/views/pay/payment.vue
Normal file
18
src/views/pay/payment.vue
Normal 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>
|
||||
Reference in New Issue
Block a user