diff --git a/src/assets/images/home/design-bg.jpg b/src/assets/images/home/aida-bg.jpg similarity index 100% rename from src/assets/images/home/design-bg.jpg rename to src/assets/images/home/aida-bg.jpg diff --git a/src/lang/en.ts b/src/lang/en.ts index 4e63a2b..d7e3b4f 100644 --- a/src/lang/en.ts +++ b/src/lang/en.ts @@ -1,6 +1,8 @@ export default { Login: { + signup: 'Sign up', login: 'Log in', + logoff: 'Log off', register: 'Register', loginTip: 'Platform integrated with AiDA.
AiDA account login required.', name: 'Name', @@ -11,6 +13,7 @@ export default { enterEmail: 'Enter your email', enterPassword: 'Enter your password', enterPasswordAgain: 'Enter your password again', + passwordTip: 'You must satisfy ALL password conditions to register.', forgotPassword: 'Forget password?', pleaseInputName: 'Please input the name', nameLengthError: 'Name length must be between {min} and {max} characters', @@ -37,7 +40,24 @@ export default { wechatLogin: 'Sign in with Wechat', indexTip: 'A multi-agent canvas for rapid, trend driven design iteration.', sendCodeError: 'Send code error', - retrievePassword: 'Retrieve password' + retrievePassword: 'Retrieve password', + emailVerification: 'Email Verification', + retrievePasswordTitle: 'Please enter your email address below to verify your identity.', + submit: 'Submit', + enterNewPassword: 'Enter a new password for
{email}', + passwordsDoNotMatch: 'Passwords do not match', + logOffTip: 'Are you sure to log off?', + }, + RegisterSuccess: { + title1: 'Welcome to Stylish Parade!', + title2: 'Please switch to the Login tab to log in.', + title3: 'What awaits you in Stylish Parade', + item1title: 'Behind the design', + item1tip: 'Discover how designers bring ideas to life with AiDA — from first sketch to final look.', + item2title: 'Creative digital works', + item2tip: 'Unlock a growing library of inspiring digital works to refresh your creative mind.', + item3title: 'A fashion community', + item3tip: 'Join a space where fashion speaks — exchange ideas and connect with creators worldwide.', }, Settings: { title: 'Settings', @@ -235,6 +255,8 @@ export default { digitalItem:{ BestSelling: 'Best Selling', Price: 'Price: Low to High', + SelectedFirst: 'Selected First', + DateAdded: 'Date Added', NewestFirst: 'Newest First', title: 'Digital Item', info: 'Virtual fashion creations collected in your personal archive', @@ -250,5 +272,52 @@ export default { }, checked: { All: 'All', + }, + MainHeader: { + Home: 'Home', + CollectionStory: 'Collection Story', + Brand: 'Brand', + DigitalItem: 'Digital Item', + HiName: 'Hi, {name}', + MyWardrobe: 'My Wardrobe', + Notifications: 'Notifications', + Settings: 'Settings', + }, + ShoppingCart: { + title: 'Shopping Cart', + listNullTitle: 'Your Cart is empty', + listNullTip: 'Discover new fashion assets and add them to your cart.', + dateTimeFormat: 'SM D, YYYY, h:mm A', + noLongerAvailable: 'No Longer Available', + delistedFromMarketplace: 'Delisted from marketplace', + remove: 'Remove', + removeTip: 'Are you sure to remove this item?', + total: 'Total', + digitalAssets: 'Digital assets. Creator retains copyright.', + checkout: 'Checkout', + exploreDigitalItems: 'Explore Digital Items', + orderSummary: 'Order Summary', + selected: 'Selected', + brands: 'Brands', + item: 'item', + checkoutSelected: 'Checkout Selected', + }, + 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', + }, + addShoppingCart:{ + title: 'Added to your Shopping Cart', + statement: 'Digital Assets Only. No physical product included.', + button: 'Set Shopping Cart', } } \ No newline at end of file diff --git a/src/lang/zh-cn.ts b/src/lang/zh-cn.ts index b51d165..8958ee7 100644 --- a/src/lang/zh-cn.ts +++ b/src/lang/zh-cn.ts @@ -1,6 +1,8 @@ export default { Login: { + signup: '注册', login: '登录', + logoff: '退出登录', register: '注册', loginTip: '与 AiDA 集成的平台。
需要登录 AiDA 账户。', name: '姓名', @@ -11,6 +13,7 @@ export default { enterEmail: '请输入邮箱', enterPassword: '请输入密码', enterPasswordAgain: '请输入密码确认', + passwordTip: '你必须满足所有密码条件才能注册。', forgotPassword: '忘记密码?', pleaseInputName: '请输入姓名', nameLengthError: '姓名长度必须在 {min} 到 {max} 个字符之间', @@ -37,7 +40,24 @@ export default { wechatLogin: '使用微信登录', indexTip: '一个多智能体画布,用于快速、趋势驱动的设计迭代。', sendCodeError: '发送验证码失败', - retrievePassword: '找回密码' + retrievePassword: '找回密码', + emailVerification: '邮箱验证', + retrievePasswordTitle: '请输入您的邮箱地址以验证您的身份。', + submit: '提交', + enterNewPassword: '请输入新密码
{email}', + passwordsDoNotMatch: '两次输入密码不一致', + logOffTip: '确定退出登录吗?', + }, + RegisterSuccess: { + title1: '欢迎来到 Stylish Parade!', + title2: '请切换到登录选项卡以登录。', + title3: '在 Stylish Parade 中等待你的发现', + item1title: '设计灵感', + item1tip: '了解设计师是如何借助 AiDA 将创意变为现实的——从最初的草图到最终的成品。', + item2title: '创意数字作品', + item2tip: '解锁一个增长的数字作品库,刷新你的创意。', + item3title: '时尚社区', + item3tip: '加入一个全球的时尚社区,与设计师分享创意。', }, Settings: { title: '设置', @@ -235,6 +255,8 @@ export default { digitalItem: { BestSelling: "畅销优先", Price: "价格:从低到高", + SelectedFirst: "已选优先", + DateAdded: "添加日期", NewestFirst: "最新优先", title: "数字藏品", info: "收藏于个人档案中的虚拟时装作品", @@ -250,5 +272,52 @@ export default { }, checked: { All: "全部" + }, + MainHeader: { + Home: '首页', + CollectionStory: '系列故事', + Brand: '品牌', + DigitalItem: '数字藏品', + HiName: '你好,{name}', + MyWardrobe: '我的衣橱', + Notifications: '通知', + Settings: '设置', + }, + ShoppingCart: { + title: '购物车', + listNullTitle: '你的购物车为空', + listNullTip: '发现新的时尚资产并将其添加到你的购物车。', + dateTimeFormat: 'YYYY-MM-DD HH:mm', + noLongerAvailable: '已下架', + delistedFromMarketplace: '已从市场移除', + remove: '删除', + removeTip: '确认删除吗?', + total: '总金额', + digitalAssets: '数字资产。创作者保留版权。', + checkout: '结账', + exploreDigitalItems: '探索数字单品', + orderSummary: '订单信息', + selected: '已选', + brands: '品牌', + item: '数字藏品', + checkoutSelected: '结账已选', + }, + digitalDetail:{ + Sketch: "草图", + Illustration: "插画", + Product: "产品", + EditorialVisual: "编辑视觉", + Back: "返回", + ReleaseIn: "发布于", + CopyrightLicenseNotice: "版权与许可声明", + LicenseIncludedInAsset: "资产包含许可", + LicenseIncludedInAssetInfo: "本平台所有产品均为数字资产,非实物商品。购买仅授予使用许可;版权及知识产权仍归原作者所有,除非另有说明。", + BuyNow: "立即购买", + AddToCart: "加入购物车" + }, + addShoppingCart:{ + title: "已添加到您的购物车", + statement: "仅限数字资产。不包含实体产品。", + button: "去购物车" } } diff --git a/src/utils/tools.ts b/src/utils/tools.ts index dab25f2..2ddd80c 100644 --- a/src/utils/tools.ts +++ b/src/utils/tools.ts @@ -210,4 +210,8 @@ export function FormatBytes(bytes, options: { decimals?: number, unitBig?: boole const i = Math.floor(Math.log(bytes) / Math.log(k)); const value = bytes / Math.pow(k, i); return `${Number(value.toFixed(decimals))} ${sizes[i]}`; +} + +export const openAida = () => { + window.open('https://www.aida.com.hk/', '_blank') } \ No newline at end of file diff --git a/src/views/brand/index.vue b/src/views/brand/index.vue index 4f50ba0..52e233a 100644 --- a/src/views/brand/index.vue +++ b/src/views/brand/index.vue @@ -28,14 +28,19 @@ const searchHistory = ref([ ]) let changeSearchBrandTime = null + const changeSearchBrand = () => { - merchantList.value = [] + if(!searchBrand.value)return clearTimeout(changeSearchBrandTime) - getDesignerList({ - keyword: searchBrand.value, - }).then((res)=>{ - merchantList.value.push(...res) - }) + changeSearchBrandTime = setTimeout(()=>{ + merchantList.value = [] + getDesignerList({ + keyword: searchBrand.value, + }).then((res)=>{ + merchantList.value.push(...res) + }) + },500) + // changeSearchBrandTime = setTimeout(()=>{ // getMerchantData.pageNum = 1 // getMerchantData.isShowMark = false @@ -129,7 +134,7 @@ const {} = toRefs(data);
-
+
diff --git a/src/views/brandDetail/commodity-list.vue b/src/views/brandDetail/commodity-list.vue index 32bd09f..3d31377 100644 --- a/src/views/brandDetail/commodity-list.vue +++ b/src/views/brandDetail/commodity-list.vue @@ -97,8 +97,8 @@ defineExpose({}) display: flex; flex-direction: column; .header{ - position: sticky; - top: 0; + // position: sticky; + // top: 0; z-index: 2; background-color: #fff; .title{ diff --git a/src/views/digitalDetail/index.vue b/src/views/digitalDetail/index.vue index 7df2e78..6ad3a12 100644 --- a/src/views/digitalDetail/index.vue +++ b/src/views/digitalDetail/index.vue @@ -6,6 +6,9 @@ import myEvent from '@/utils/myEvent' import { getListingDetailApi } from '@/api/listing' import { useRoute } from 'vue-router' import { ElMessage } from 'element-plus' +import { useI18n } from 'vue-i18n' +import { AddShoppingCart } from '@/api/shoppingCart' +import { CreateOrder } from '@/api/shoppingCart' //const props = defineProps({ @@ -13,6 +16,7 @@ import { ElMessage } from 'element-plus' //const emit = defineEmits([ //]) const route = useRoute() +const { t } = useI18n() const router = useRouter() let detail:any = ref({ @@ -22,30 +26,40 @@ let detail:any = ref({ shopName: '', updateTime: '', gender: '', + sellerId: '', }) const sketchList = ref([]) const illustrationList = ref([]) const productList = ref([]) const editorialVisualList = ref([]) const addShopping = () => { - console.log(detail.value) - if(!detail.value.price) return ElMessage.warning('Please log in first.') + if(!detail.value.price) return ElMessage.warning(t('brandDetail.addShoppingTip')) let data = { cover: detail.value.images.cover[0], price: detail.value.price, shopName: detail.value.shopName, 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 = () => { - if(!detail.value.price) return ElMessage.warning('Please log in first.') - router.push({path: '/shoppingCart'}) + if(!detail.value.price) return ElMessage.warning(t('brandDetail.addShoppingTip')) + CreateOrder( + [detail.value.id],true + ).then((res)=>{ + // if(res)router.push({path: '/shoppingCart') + }) + // router.push({path: '/shoppingCart'}) } const setImgList = (list)=>{ - sketchList.value = list.apparel.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}}) + sketchList.value = list?.apparel?.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}}) editorialVisualList.value = list.product.map((item:any) => {return {imgUrl:item}}) if(list.firstFrame){ @@ -62,11 +76,14 @@ const getListingDetail = ()=>{ getListingDetailApi({ id:route.params.id + '', }).then((res)=>{ - console.log(res) if(res)detail.value = res setImgList(res.images) }) } +const gobrand = () => { + if(!detail.value.sellerId)return + router.push({path: `/brand/${detail.value.sellerId}`}) +} // const vObserve = { // mounted (el,binding) { // }, @@ -85,7 +102,7 @@ defineExpose({})
-
Sketch
+
{{ $t('digitalDetail.Sketch') }}
@@ -95,13 +112,13 @@ defineExpose({})
-
Illustration
+
{{ $t('digitalDetail.Illustration') }}
-
Product
+
{{ $t('digitalDetail.Product') }}
@@ -109,7 +126,7 @@ defineExpose({})
-
Editorial Visual
+
{{ $t('digitalDetail.EditorialVisual') }}
@@ -122,7 +139,7 @@ defineExpose({})
- Back + {{ $t('digitalDetail.Back') }}
{{ detail.designFor?.toUpperCase() || ''}} / {{ detail.productCategory?.join(',')?.toUpperCase() || '' }}
@@ -133,9 +150,9 @@ defineExpose({})
-
{{ detail.shopName }}
+
{{ detail.shopName }}
- Release in {{ detail.updateTime }} + {{ $t('digitalDetail.ReleaseIn') }} {{ detail.updateTime }}
@@ -144,26 +161,26 @@ defineExpose({})
-
Copyright & License Notice
+
{{ $t('digitalDetail.CopyrightLicenseNotice') }}
- License Included in Asset + {{ $t('digitalDetail.LicenseIncludedInAsset') }}
- 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') }}
-
Buy Now
+
{{ $t('digitalDetail.BuyNow') }}
- Add to Cart + {{ $t('digitalDetail.AddToCart') }}
@@ -320,6 +337,7 @@ defineExpose({}) font-size: 1.8rem; line-height: 100%; margin-bottom: .8rem; + cursor: pointer; } .release-time{ font-family: KaiseiOpti-Regular; diff --git a/src/views/digitalItem/index.vue b/src/views/digitalItem/index.vue index a620b17..aad0134 100644 --- a/src/views/digitalItem/index.vue +++ b/src/views/digitalItem/index.vue @@ -5,6 +5,10 @@ import MerchantInfo from "./merchant-info.vue"; import { useRouter } from "vue-router"; import scListNull from '@/views/shoppingCart/sc-list-null.vue' import { useI18n } from 'vue-i18n' +import { AddShoppingCart } from '@/api/shoppingCart' +import { ElMessage } from 'element-plus' +import myEvent from '@/utils/myEvent' + // 定义组件名称 defineOptions({ @@ -36,7 +40,13 @@ const searechTypeList = ref([ ]) 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) => { scrollTop.value = digitalItemRef.value.scrollTop router.push({ diff --git a/src/views/home/index.vue b/src/views/home/index.vue index 20241e1..ad62926 100644 --- a/src/views/home/index.vue +++ b/src/views/home/index.vue @@ -2,7 +2,7 @@
- + @@ -13,7 +13,7 @@ import { computed } from 'vue' import SectionIndex from './section-index.vue' import SectionDesigner from './section-designer.vue' - import SectionDesign from './section-design.vue' + import SectionAida from './section-aida.vue' import SectionDigitalItems1 from './section-digital-items1.vue' import SectionDigitalItems2 from './section-digital-items2.vue' import SectionFooter from './section-footer.vue' diff --git a/src/views/home/section-design.vue b/src/views/home/section-aida.vue similarity index 73% rename from src/views/home/section-design.vue rename to src/views/home/section-aida.vue index 833f868..ade0002 100644 --- a/src/views/home/section-design.vue +++ b/src/views/home/section-aida.vue @@ -1,24 +1,25 @@ \ No newline at end of file diff --git a/src/views/shoppingCart/sc-list.vue b/src/views/shoppingCart/sc-list.vue index 5aac39d..2aeec68 100644 --- a/src/views/shoppingCart/sc-list.vue +++ b/src/views/shoppingCart/sc-list.vue @@ -3,7 +3,7 @@
- {{ title || 'Shopping Cart' }} + {{ title || $t('ShoppingCart.title') }} @@ -15,22 +15,32 @@ :indeterminate="selectedCount === 0 ? false : selectedCount < maxLength" @click="handleAllAllClick" /> - {{ selectedCount }}  Selected + {{ + $t('Wardrobe.assets.selectedCount', { count: selectedCount }) + }}
-
Select All
-
Deselect All
+
+ {{ $t('Wardrobe.assets.selectAll') }} +
+
+ {{ $t('Wardrobe.assets.deselectAll') }} +
- +
@@ -40,8 +50,9 @@
@@ -83,6 +94,10 @@ import { FormatBytes, FormatDate } from '@/utils/tools' import scItem from './sc-item.vue' import scListNull from './sc-list-null.vue' + import { useRouter } from 'vue-router' + import { useI18n } from 'vue-i18n' + const { t } = useI18n() + const router = useRouter() const emit = defineEmits(['close', 'selected-change']) const props = defineProps({ title: { type: String, default: '' }, @@ -100,19 +115,19 @@ const sortBy = ref('DateAdded') const sortByOptions = ref([ { - label: 'Best Selling', + label: 'digitalItem.BestSelling', value: 'BestSelling' }, { - label: 'Price: Low to High', + label: 'digitalItem.Price', value: 'PriceLowToHigh' }, { - label: 'Selected First', + label: 'digitalItem.SelectedFirst', value: 'SelectedFirst' }, { - label: 'Date Added', + label: 'digitalItem.DateAdded', value: 'DateAdded' } ]) @@ -126,7 +141,9 @@ return list_.value.filter(() => true).sort((a, b) => a.amount - b.amount) } if (sortBy.value === 'SelectedFirst') { - return list_.value.filter(() => true).sort((a, b) => (b.checked ? 1 : 0) - (a.checked ? 1 : 0)) + return list_.value + .filter(() => true) + .sort((a, b) => (b.checked ? 1 : 0) - (a.checked ? 1 : 0)) } if (sortBy.value === 'DateAdded') { return list_.value.filter(() => true).sort((a, b) => b.date - a.date) @@ -142,6 +159,7 @@ listingId: v.listingId, //资产ID title: v.title, //标题 brand: v.shopName, //店铺名称 + sellerId: v.sellerId, //店铺ID cover: v.cover, //封面 amount: v.price, //价格 status: v.status, //状态 @@ -172,7 +190,7 @@ handleSelectedChange() }) const handleRemoveClick = (value: any) => { - ElMessageBox.confirm('Are you sure to remove this item?') + ElMessageBox.confirm(t('ShoppingCart.removeTip')) .then(() => { RemoveShoppingCartItem({ listingId: value.listingId }).then(() => { GetList() @@ -180,8 +198,8 @@ }) .catch(() => {}) } - const handleExploreClick = () => { - console.log('探索') + const handleExplore = () => { + router.push({ name: 'brand' }) } @@ -360,6 +378,7 @@ height: 4.6rem; --button-font-size: 1.4rem; margin-top: 2rem; + text-transform: uppercase; } } }