Merge branch 'main' of http://18.167.251.121:10003/aidlab/Aida_Purchaser_Front
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
<script setup lang="ts">
|
||||
import { ref, onMounted, onUnmounted, reactive, toRefs } from 'vue'
|
||||
const props = defineProps({
|
||||
import { ref, onMounted, onUnmounted, reactive, toRefs } from 'vue'
|
||||
const props = defineProps({
|
||||
url: {
|
||||
type: String,
|
||||
default: ''
|
||||
@@ -11,7 +11,7 @@ const props = defineProps({
|
||||
},
|
||||
price: {
|
||||
type: [String, Number],
|
||||
default: '111'
|
||||
default: ''
|
||||
},
|
||||
download: {
|
||||
type: Boolean,
|
||||
@@ -21,23 +21,23 @@ const props = defineProps({
|
||||
type: Boolean,
|
||||
default: true
|
||||
}
|
||||
})
|
||||
const emit = defineEmits(['addShopping', 'openDetail', 'download'])
|
||||
let data = reactive({})
|
||||
const addShopping = () => {
|
||||
})
|
||||
const emit = defineEmits(['addShopping', 'openDetail', 'download'])
|
||||
let data = reactive({})
|
||||
const addShopping = () => {
|
||||
if (props.download) {
|
||||
emit('download')
|
||||
} else {
|
||||
emit('addShopping')
|
||||
}
|
||||
}
|
||||
const openDetail = () => {
|
||||
}
|
||||
const openDetail = () => {
|
||||
emit('openDetail')
|
||||
}
|
||||
onMounted(() => {})
|
||||
onUnmounted(() => {})
|
||||
defineExpose({})
|
||||
const {} = toRefs(data)
|
||||
}
|
||||
onMounted(() => {})
|
||||
onUnmounted(() => {})
|
||||
defineExpose({})
|
||||
const {} = toRefs(data)
|
||||
</script>
|
||||
<template>
|
||||
<div class="commodity-item" :class="{ 'is-download': download }">
|
||||
@@ -47,23 +47,31 @@ const {} = toRefs(data)
|
||||
<div class="name">
|
||||
{{ props.name }}
|
||||
</div>
|
||||
<div class="price" :class="{ 'is-download': download }" v-if="props.showPrice && props.price">
|
||||
<div
|
||||
class="price"
|
||||
:class="{ 'is-download': download }"
|
||||
v-if="props.showPrice && props.price"
|
||||
>
|
||||
{{ props.price }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="btn" @click="addShopping">
|
||||
<div class="text">
|
||||
<SvgIcon :name="download ? 'download' : 'add'" size="26" color="#232323"></SvgIcon>
|
||||
<SvgIcon
|
||||
:name="download ? 'download' : 'add'"
|
||||
size="26"
|
||||
color="#232323"
|
||||
></SvgIcon>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<style lang="less" scoped>
|
||||
.commodity-item {
|
||||
.commodity-item {
|
||||
width: var(--commodity-width, 100%);
|
||||
&.is-download{
|
||||
img{
|
||||
&.is-download {
|
||||
img {
|
||||
cursor: initial;
|
||||
}
|
||||
}
|
||||
@@ -100,5 +108,5 @@ const {} = toRefs(data)
|
||||
.btn {
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -345,4 +345,9 @@ export default {
|
||||
Offices: "Offices",
|
||||
JoinWithUs: "Join with Us",
|
||||
},
|
||||
addShoppingCart:{
|
||||
title: 'Added to your Shopping Cart',
|
||||
statement: 'Digital Assets Only. No physical product included.',
|
||||
button: 'Set Shopping Cart',
|
||||
}
|
||||
}
|
||||
@@ -345,4 +345,9 @@ export default {
|
||||
Offices: "办公室",
|
||||
JoinWithUs: "加入我们",
|
||||
},
|
||||
addShoppingCart:{
|
||||
title: "已添加到您的购物车",
|
||||
statement: "仅限数字资产。不包含实体产品。",
|
||||
button: "去购物车"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -195,13 +195,14 @@ defineExpose({})
|
||||
.digitalItemDetail{
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
overflow-y: auto;
|
||||
position: relative;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
.center{
|
||||
flex: 1;
|
||||
// flex: 1;
|
||||
display: flex;
|
||||
overflow: hidden;
|
||||
// overflow: hidden;
|
||||
.img-list{
|
||||
flex: 1;
|
||||
display: grid;
|
||||
@@ -211,6 +212,7 @@ defineExpose({})
|
||||
// --row-width: 29.3rem;
|
||||
overflow-y: auto;
|
||||
position: relative;
|
||||
border-right: 0.5px solid #585858;
|
||||
&::-webkit-scrollbar{
|
||||
display: none;
|
||||
}
|
||||
@@ -268,12 +270,15 @@ defineExpose({})
|
||||
}
|
||||
}
|
||||
.img-detail{
|
||||
border-left: 0.5px solid #585858;
|
||||
padding-left: 3.2rem;
|
||||
width: 57rem;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
overflow-y: auto;
|
||||
height: calc(var(--app-view-height) - var(--footer-height));
|
||||
position: sticky;
|
||||
top: 0;
|
||||
// height: 100%;
|
||||
&::-webkit-scrollbar{
|
||||
display: none;
|
||||
}
|
||||
@@ -305,7 +310,6 @@ defineExpose({})
|
||||
font-size: 3rem;
|
||||
line-height: 120%;
|
||||
margin-bottom: 1rem;
|
||||
cursor: pointer;
|
||||
}
|
||||
.img-price{
|
||||
font-family: KaiseiOpti-Bold;
|
||||
@@ -338,6 +342,7 @@ defineExpose({})
|
||||
font-size: 1.8rem;
|
||||
line-height: 100%;
|
||||
margin-bottom: .8rem;
|
||||
cursor: pointer;
|
||||
}
|
||||
.release-time{
|
||||
font-family: KaiseiOpti-Regular;
|
||||
|
||||
@@ -45,7 +45,7 @@ const {} = toRefs(data);
|
||||
<el-drawer v-model="isShoppingShow" width="50rem" class="addShoppingDrawer" :close-on-click-modal="false" title="I am the title" :with-header="false">
|
||||
<div class="addShoppingInfo">
|
||||
<div class="header">
|
||||
<div class="title">Added to your Shopping Cart</div>
|
||||
<div class="title">{{ $t('addShoppingCart.title') }}</div>
|
||||
<span class="close" @click="shoppingClose"
|
||||
><svg-icon name="close" size="13"
|
||||
/></span>
|
||||
@@ -76,11 +76,11 @@ const {} = toRefs(data);
|
||||
<div class="icon">
|
||||
<SvgIcon name="statement" size="16.6" />
|
||||
</div>
|
||||
Digital Assets Only. No physical product included.
|
||||
{{ $t('addShoppingCart.statement') }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="button" @click="goShopping">
|
||||
SeE Shopping Cart
|
||||
{{ $t('addShoppingCart.button') }}
|
||||
</div>
|
||||
</div>
|
||||
<!-- <sc-list is-mini style="flex: 0.6;" @close="shoppingClose"/> -->
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
</div>
|
||||
<div class="amount" v-show="!disabled">${{ info.amount }}<span> HKD</span></div>
|
||||
<SvgIcon
|
||||
v-if="orderActionsLayout"
|
||||
v-if="showDownload"
|
||||
class="download"
|
||||
name="download"
|
||||
size="32"
|
||||
@@ -59,6 +59,7 @@
|
||||
showRemove: { type: Boolean, default: true },
|
||||
orderActionsLayout: { type: Boolean, default: false },
|
||||
showBrand: { type: Boolean, default: true },
|
||||
isOrder: { type: Boolean, default: false },
|
||||
info: {
|
||||
type: Object as () => {
|
||||
status: number
|
||||
@@ -77,6 +78,10 @@
|
||||
const onRemove = () => {
|
||||
emit('remove', props.info)
|
||||
}
|
||||
|
||||
const showDownload = computed(() => {
|
||||
return props.isOrder ? props.info.status === 1 : props.orderActionsLayout
|
||||
})
|
||||
const handleBrandClick = () => {
|
||||
router.push({
|
||||
name: 'brandDetail',
|
||||
|
||||
@@ -30,7 +30,9 @@
|
||||
<span class="icon">
|
||||
<svg-icon name="order-shop" size="24" />
|
||||
</span>
|
||||
<span class="text">{{ order.shopName }}</span>
|
||||
<span class="text" @click="handleRouteBrand(order)">
|
||||
{{ order.shopName }}
|
||||
</span>
|
||||
</div>
|
||||
<p class="order-card__date">{{ order.formatUpdatetime }}</p>
|
||||
</div>
|
||||
@@ -80,6 +82,7 @@
|
||||
:show-date="false"
|
||||
:show-remove="false"
|
||||
:show-brand="false"
|
||||
is-order
|
||||
order-actions-layout
|
||||
/>
|
||||
</div>
|
||||
@@ -92,6 +95,7 @@
|
||||
<script setup lang="ts">
|
||||
import { computed, onMounted, ref, shallowRef } from 'vue'
|
||||
import { useI18n } from 'vue-i18n'
|
||||
import { useRouter } from 'vue-router'
|
||||
import { fetchMyOrders } from '@/api/user'
|
||||
import ScItem from '@/views/shoppingCart/sc-item.vue'
|
||||
import Empty from './Empty.vue'
|
||||
@@ -130,6 +134,7 @@
|
||||
formatUpdatetime: string
|
||||
}
|
||||
|
||||
const ROUTER = useRouter()
|
||||
const { t, locale } = useI18n({ useScope: 'global' })
|
||||
|
||||
const statusOptions = computed<StatusOption[]>(() => [
|
||||
@@ -183,7 +188,7 @@
|
||||
}
|
||||
|
||||
const getOrderStatus = (order: OrderRecord) => {
|
||||
return getOrderStatusValue(order.items[0]?.status)
|
||||
return getOrderStatusValue(order.status)
|
||||
}
|
||||
|
||||
const formatOrderUpdateTime = (dateStr: string) => {
|
||||
@@ -291,6 +296,10 @@
|
||||
}
|
||||
}
|
||||
|
||||
const handleRouteBrand = (order: OrderRecord) => {
|
||||
ROUTER.push(`/brand/${order.sellerId}`)
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
fetchAllOrders()
|
||||
})
|
||||
@@ -396,6 +405,10 @@
|
||||
}
|
||||
.brand {
|
||||
column-gap: 1rem;
|
||||
.text {
|
||||
text-decoration: underline;
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user