Merge branch 'main' of ssh://18.167.251.121:10002/aidlab/Aida_Purchaser_Front
This commit is contained in:
@@ -1,3 +1,5 @@
|
|||||||
|
import { add } from "lodash-es";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
Login: {
|
Login: {
|
||||||
signup: 'Sign up',
|
signup: 'Sign up',
|
||||||
@@ -358,7 +360,9 @@ export default {
|
|||||||
addShoppingCart: {
|
addShoppingCart: {
|
||||||
title: 'Added to your Shopping Cart',
|
title: 'Added to your Shopping Cart',
|
||||||
statement: 'Digital Assets Only. No physical product included.',
|
statement: 'Digital Assets Only. No physical product included.',
|
||||||
button: 'See Shopping Cart'
|
button: 'See Shopping Cart',
|
||||||
|
status1: 'The product has been purchased. You can view it in your orders.',
|
||||||
|
status0: 'The order has been placed but not yet paid for.'
|
||||||
},
|
},
|
||||||
area: {
|
area: {
|
||||||
chinaMainland: 'China Mainland',
|
chinaMainland: 'China Mainland',
|
||||||
|
|||||||
@@ -325,7 +325,9 @@ export default {
|
|||||||
addShoppingCart: {
|
addShoppingCart: {
|
||||||
title: '已添加到您的购物车',
|
title: '已添加到您的购物车',
|
||||||
statement: '仅限数字资产。不包含实体产品。',
|
statement: '仅限数字资产。不包含实体产品。',
|
||||||
button: '去购物车'
|
button: '去购物车',
|
||||||
|
status1: '商品已经购买,可在订单中看到',
|
||||||
|
status0: '商品已下单尚未付款'
|
||||||
},
|
},
|
||||||
area: {
|
area: {
|
||||||
chinaMainland: '中国大陆',
|
chinaMainland: '中国大陆',
|
||||||
|
|||||||
@@ -26,11 +26,14 @@ const designerDetail = ref({
|
|||||||
mobile: '',
|
mobile: '',
|
||||||
ownerName: '',
|
ownerName: '',
|
||||||
shopName: '',
|
shopName: '',
|
||||||
|
productStatus: 2,
|
||||||
socialLinks: '[]',
|
socialLinks: '[]',
|
||||||
})
|
})
|
||||||
|
|
||||||
const addShopping = (item) => {
|
const addShopping = (item) => {
|
||||||
if(!item.price) return ElMessage.warning(t('brandDetail.addShoppingTip'))
|
if(!item.price) return ElMessage.warning(t('brandDetail.addShoppingTip'))
|
||||||
|
if(item.productStatus == 0) return ElMessage.warning(t('addShoppingCart.status0'))
|
||||||
|
if(item.productStatus == 1) return ElMessage.warning(t('addShoppingCart.status1'))
|
||||||
AddShoppingCart({listingIds:[item.id]}).then((res)=>{
|
AddShoppingCart({listingIds:[item.id]}).then((res)=>{
|
||||||
item.shopName = designerDetail.value.shopName
|
item.shopName = designerDetail.value.shopName
|
||||||
myEvent.emit('addShopping', item)
|
myEvent.emit('addShopping', item)
|
||||||
|
|||||||
@@ -27,6 +27,7 @@ let detail:any = ref({
|
|||||||
updateTime: '',
|
updateTime: '',
|
||||||
gender: '',
|
gender: '',
|
||||||
sellerId: '',
|
sellerId: '',
|
||||||
|
productStatus: 2,
|
||||||
})
|
})
|
||||||
const sketchList = ref([])
|
const sketchList = ref([])
|
||||||
const illustrationList = ref([])
|
const illustrationList = ref([])
|
||||||
@@ -34,12 +35,15 @@ const productList = ref([])
|
|||||||
const editorialVisualList = ref([])
|
const editorialVisualList = ref([])
|
||||||
const addShopping = () => {
|
const addShopping = () => {
|
||||||
if(!detail.value.price) return ElMessage.warning(t('brandDetail.addShoppingTip'))
|
if(!detail.value.price) return ElMessage.warning(t('brandDetail.addShoppingTip'))
|
||||||
|
if(detail.value.productStatus == 0) return ElMessage.warning(t('addShoppingCart.status0'))
|
||||||
|
if(detail.value.productStatus == 1) return ElMessage.warning(t('addShoppingCart.status1'))
|
||||||
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,
|
id: detail.value.id,
|
||||||
|
productStatus: detail.value.productStatus,
|
||||||
}
|
}
|
||||||
AddShoppingCart({listingIds:[detail.value.id]}).then((res)=>{
|
AddShoppingCart({listingIds:[detail.value.id]}).then((res)=>{
|
||||||
myEvent.emit('addShopping', data)
|
myEvent.emit('addShopping', data)
|
||||||
@@ -49,6 +53,8 @@ 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'))
|
||||||
|
if(detail.value.productStatus == 0) return ElMessage.warning(t('addShoppingCart.status0'))
|
||||||
|
if(detail.value.productStatus == 1) return ElMessage.warning(t('addShoppingCart.status1'))
|
||||||
// console.log(detail.value)
|
// console.log(detail.value)
|
||||||
// return
|
// return
|
||||||
let data = {
|
let data = {
|
||||||
|
|||||||
@@ -42,6 +42,8 @@ const searechTypeList = ref([
|
|||||||
const searechType = ref('updateTime')
|
const searechType = ref('updateTime')
|
||||||
const addShopping = (item) => {
|
const addShopping = (item) => {
|
||||||
if(!item.price) return ElMessage.warning(t('brandDetail.addShoppingTip'))
|
if(!item.price) return ElMessage.warning(t('brandDetail.addShoppingTip'))
|
||||||
|
if(item.productStatus == 0) return ElMessage.warning(t('addShoppingCart.status0'))
|
||||||
|
if(item.productStatus == 1) return ElMessage.warning(t('addShoppingCart.status1'))
|
||||||
AddShoppingCart({listingIds:[item.id]}).then((res)=>{
|
AddShoppingCart({listingIds:[item.id]}).then((res)=>{
|
||||||
myEvent.emit('addShopping', item)
|
myEvent.emit('addShopping', item)
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user