fix
This commit is contained in:
@@ -10,7 +10,7 @@ const props = defineProps({
|
|||||||
default: 'aaa'
|
default: 'aaa'
|
||||||
},
|
},
|
||||||
price: {
|
price: {
|
||||||
type: String,
|
type: [String, Number],
|
||||||
default: '111'
|
default: '111'
|
||||||
},
|
},
|
||||||
download: {
|
download: {
|
||||||
|
|||||||
@@ -250,5 +250,18 @@ export default {
|
|||||||
},
|
},
|
||||||
checked: {
|
checked: {
|
||||||
All: 'All',
|
All: 'All',
|
||||||
}
|
},
|
||||||
|
digitalDetail:{
|
||||||
|
Sketch: 'Sketch',
|
||||||
|
Illustration: 'Illustration',
|
||||||
|
Product: 'Product',
|
||||||
|
EditorialVisual: 'Editorial Visual',
|
||||||
|
Back: 'Back',
|
||||||
|
ReleaseIn: 'Release in',
|
||||||
|
CopyrightLicenseNotice: 'Copyright & License Notice',
|
||||||
|
LicenseIncludedInAsset: 'License Included in Asset',
|
||||||
|
LicenseIncludedInAssetInfo: 'All products on this platform are digital assets, not physical goods. Purchase grants a usage license only; copyright and intellectual property rights remain with the original creator, unless otherwise stated.',
|
||||||
|
BuyNow: 'Buy Now',
|
||||||
|
AddToCart: 'Add to Cart',
|
||||||
|
},
|
||||||
}
|
}
|
||||||
@@ -250,5 +250,18 @@ export default {
|
|||||||
},
|
},
|
||||||
checked: {
|
checked: {
|
||||||
All: "全部"
|
All: "全部"
|
||||||
}
|
},
|
||||||
|
digitalDetail:{
|
||||||
|
Sketch: "草图",
|
||||||
|
Illustration: "插画",
|
||||||
|
Product: "产品",
|
||||||
|
EditorialVisual: "编辑视觉",
|
||||||
|
Back: "返回",
|
||||||
|
ReleaseIn: "发布于",
|
||||||
|
CopyrightLicenseNotice: "版权与许可声明",
|
||||||
|
LicenseIncludedInAsset: "资产包含许可",
|
||||||
|
LicenseIncludedInAssetInfo: "本平台所有产品均为数字资产,非实物商品。购买仅授予使用许可;版权及知识产权仍归原作者所有,除非另有说明。",
|
||||||
|
BuyNow: "立即购买",
|
||||||
|
AddToCart: "加入购物车"
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,6 +6,9 @@ import myEvent from '@/utils/myEvent'
|
|||||||
import { getListingDetailApi } from '@/api/listing'
|
import { getListingDetailApi } from '@/api/listing'
|
||||||
import { useRoute } from 'vue-router'
|
import { useRoute } from 'vue-router'
|
||||||
import { ElMessage } from 'element-plus'
|
import { ElMessage } from 'element-plus'
|
||||||
|
import { useI18n } from 'vue-i18n'
|
||||||
|
import { AddShoppingCart } from '@/api/shoppingCart'
|
||||||
|
import { CreateOrder } from '@/api/shoppingCart'
|
||||||
|
|
||||||
|
|
||||||
//const props = defineProps({
|
//const props = defineProps({
|
||||||
@@ -13,6 +16,7 @@ import { ElMessage } from 'element-plus'
|
|||||||
//const emit = defineEmits([
|
//const emit = defineEmits([
|
||||||
//])
|
//])
|
||||||
const route = useRoute()
|
const route = useRoute()
|
||||||
|
const { t } = useI18n()
|
||||||
|
|
||||||
const router = useRouter()
|
const router = useRouter()
|
||||||
let detail:any = ref({
|
let detail:any = ref({
|
||||||
@@ -28,24 +32,33 @@ const illustrationList = ref([])
|
|||||||
const productList = ref([])
|
const productList = ref([])
|
||||||
const editorialVisualList = ref([])
|
const editorialVisualList = ref([])
|
||||||
const addShopping = () => {
|
const addShopping = () => {
|
||||||
console.log(detail.value)
|
if(!detail.value.price) return ElMessage.warning(t('brandDetail.addShoppingTip'))
|
||||||
if(!detail.value.price) return ElMessage.warning('Please log in first.')
|
|
||||||
let data = {
|
let data = {
|
||||||
cover: detail.value.images.cover[0],
|
cover: detail.value.images.cover[0],
|
||||||
price: detail.value.price,
|
price: detail.value.price,
|
||||||
shopName: detail.value.shopName,
|
shopName: detail.value.shopName,
|
||||||
title: detail.value.title,
|
title: detail.value.title,
|
||||||
|
id: detail.value.id,
|
||||||
}
|
}
|
||||||
myEvent.emit('addShopping', data)
|
AddShoppingCart({listingIds:[detail.value.id]}).then((res)=>{
|
||||||
|
myEvent.emit('addShopping', data)
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
const goShopping = () => {
|
const goShopping = () => {
|
||||||
if(!detail.value.price) return ElMessage.warning('Please log in first.')
|
if(!detail.value.price) return ElMessage.warning(t('brandDetail.addShoppingTip'))
|
||||||
router.push({path: '/shoppingCart'})
|
CreateOrder(
|
||||||
|
[detail.value.id],true
|
||||||
|
).then((res)=>{
|
||||||
|
// if(res)router.push({path: '/shoppingCart')
|
||||||
|
})
|
||||||
|
// 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}})
|
||||||
illustrationList.value = list.sketch.map((item:any) => {return {imgUrl:item}})
|
illustrationList.value = list?.sketch?.map((item:any) => {return {imgUrl:item}})
|
||||||
productList.value = list.main_product.map((item:any) => {return {imgUrl:item}})
|
productList.value = list?.main_product?.map((item:any) => {return {imgUrl:item}})
|
||||||
|
|
||||||
editorialVisualList.value = list.product.map((item:any) => {return {imgUrl:item}})
|
editorialVisualList.value = list.product.map((item:any) => {return {imgUrl:item}})
|
||||||
if(list.firstFrame){
|
if(list.firstFrame){
|
||||||
@@ -85,7 +98,7 @@ defineExpose({})
|
|||||||
<div class="center">
|
<div class="center">
|
||||||
<div class="img-list">
|
<div class="img-list">
|
||||||
<div class="left">
|
<div class="left">
|
||||||
<div class="title">Sketch</div>
|
<div class="title">{{ $t('digitalDetail.Sketch') }}</div>
|
||||||
<div class="box sketch">
|
<div class="box sketch">
|
||||||
<div class="imgBox">
|
<div class="imgBox">
|
||||||
<img :src="item?.imgUrl" v-for="item in sketchList" :key="item" alt="">
|
<img :src="item?.imgUrl" v-for="item in sketchList" :key="item" alt="">
|
||||||
@@ -95,13 +108,13 @@ defineExpose({})
|
|||||||
<div class="right">
|
<div class="right">
|
||||||
<div class="top">
|
<div class="top">
|
||||||
<div class="box">
|
<div class="box">
|
||||||
<div class="title">Illustration</div>
|
<div class="title">{{ $t('digitalDetail.Illustration') }}</div>
|
||||||
<div class="imgBox">
|
<div class="imgBox">
|
||||||
<img :src="item?.imgUrl" v-for="item in illustrationList" :key="item" alt="">
|
<img :src="item?.imgUrl" v-for="item in illustrationList" :key="item" alt="">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="box">
|
<div class="box">
|
||||||
<div class="title">Product</div>
|
<div class="title">{{ $t('digitalDetail.Product') }}</div>
|
||||||
<div class="imgBox">
|
<div class="imgBox">
|
||||||
<img :src="item?.imgUrl" v-for="item in productList" :key="item" alt="">
|
<img :src="item?.imgUrl" v-for="item in productList" :key="item" alt="">
|
||||||
</div>
|
</div>
|
||||||
@@ -109,7 +122,7 @@ defineExpose({})
|
|||||||
</div>
|
</div>
|
||||||
<div class="bottom">
|
<div class="bottom">
|
||||||
<div class="box aa">
|
<div class="box aa">
|
||||||
<div class="title">Editorial Visual</div>
|
<div class="title">{{ $t('digitalDetail.EditorialVisual') }}</div>
|
||||||
<div class="imgBox">
|
<div class="imgBox">
|
||||||
<img :src="item?.gif||item?.imgUrl" v-for="item in editorialVisualList" :key="item" alt="">
|
<img :src="item?.gif||item?.imgUrl" v-for="item in editorialVisualList" :key="item" alt="">
|
||||||
</div>
|
</div>
|
||||||
@@ -122,7 +135,7 @@ defineExpose({})
|
|||||||
<div class="icon">
|
<div class="icon">
|
||||||
<svg-icon name="digital-back" size="28"></svg-icon>
|
<svg-icon name="digital-back" size="28"></svg-icon>
|
||||||
</div>
|
</div>
|
||||||
<span>Back</span>
|
<span>{{ $t('digitalDetail.Back') }}</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="img-info">
|
<div class="img-info">
|
||||||
<div class="img-type">{{ detail.designFor?.toUpperCase() || ''}} / {{ detail.productCategory?.join(',')?.toUpperCase() || '' }}</div>
|
<div class="img-type">{{ detail.designFor?.toUpperCase() || ''}} / {{ detail.productCategory?.join(',')?.toUpperCase() || '' }}</div>
|
||||||
@@ -135,7 +148,7 @@ defineExpose({})
|
|||||||
<div class="detail">
|
<div class="detail">
|
||||||
<div class="name">{{ detail.shopName }}</div>
|
<div class="name">{{ detail.shopName }}</div>
|
||||||
<div class="release-time">
|
<div class="release-time">
|
||||||
<span>Release in {{ detail.updateTime }}</span>
|
<span>{{ $t('digitalDetail.ReleaseIn') }} {{ detail.updateTime }}</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -144,26 +157,26 @@ defineExpose({})
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="notice">
|
<div class="notice">
|
||||||
<div class="title">Copyright & License Notice</div>
|
<div class="title">{{ $t('digitalDetail.CopyrightLicenseNotice') }}</div>
|
||||||
<div class="conter">
|
<div class="conter">
|
||||||
<div class="contet-title">
|
<div class="contet-title">
|
||||||
<div class="icon">
|
<div class="icon">
|
||||||
<svg-icon name="digital-Info" size="24"></svg-icon>
|
<svg-icon name="digital-Info" size="24"></svg-icon>
|
||||||
</div>
|
</div>
|
||||||
<span>License Included in Asset</span>
|
<span>{{ $t('digitalDetail.LicenseIncludedInAsset') }}</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="info">
|
<div class="info">
|
||||||
All products on this platform are digital assets, not physical goods. Purchase grants a usage license only; copyright and intellectual property rights remain with the original creator, unless otherwise stated.
|
{{ $t('digitalDetail.LicenseIncludedInAssetInfo') }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="button">
|
<div class="button">
|
||||||
<div class="buy-now" @click="goShopping">Buy Now</div>
|
<div class="buy-now" @click="goShopping">{{ $t('digitalDetail.BuyNow') }}</div>
|
||||||
<div class="add-cart" @click="addShopping()">
|
<div class="add-cart" @click="addShopping()">
|
||||||
<div class="icon">
|
<div class="icon">
|
||||||
<svg-icon name="cart_0" size="24"></svg-icon>
|
<svg-icon name="cart_0" size="24"></svg-icon>
|
||||||
</div>
|
</div>
|
||||||
Add to Cart
|
{{ $t('digitalDetail.AddToCart') }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -5,6 +5,10 @@ import MerchantInfo from "./merchant-info.vue";
|
|||||||
import { useRouter } from "vue-router";
|
import { useRouter } from "vue-router";
|
||||||
import scListNull from '@/views/shoppingCart/sc-list-null.vue'
|
import scListNull from '@/views/shoppingCart/sc-list-null.vue'
|
||||||
import { useI18n } from 'vue-i18n'
|
import { useI18n } from 'vue-i18n'
|
||||||
|
import { AddShoppingCart } from '@/api/shoppingCart'
|
||||||
|
import { ElMessage } from 'element-plus'
|
||||||
|
import myEvent from '@/utils/myEvent'
|
||||||
|
|
||||||
|
|
||||||
// 定义组件名称
|
// 定义组件名称
|
||||||
defineOptions({
|
defineOptions({
|
||||||
@@ -36,7 +40,13 @@ const searechTypeList = ref([
|
|||||||
])
|
])
|
||||||
|
|
||||||
const searechType = ref('updateTime')
|
const searechType = ref('updateTime')
|
||||||
const addShopping = (item) => {}
|
const addShopping = (item) => {
|
||||||
|
console.log(item)
|
||||||
|
if(!item.price) return ElMessage.warning(t('brandDetail.addShoppingTip'))
|
||||||
|
AddShoppingCart({listingIds:[item.id]}).then((res)=>{
|
||||||
|
myEvent.emit('addShopping', item)
|
||||||
|
})
|
||||||
|
}
|
||||||
const openDetail = (item) => {
|
const openDetail = (item) => {
|
||||||
scrollTop.value = digitalItemRef.value.scrollTop
|
scrollTop.value = digitalItemRef.value.scrollTop
|
||||||
router.push({
|
router.push({
|
||||||
|
|||||||
Reference in New Issue
Block a user