语言适配

This commit is contained in:
李志鹏
2026-05-06 13:45:28 +08:00
parent 752b33f196
commit 27da4739a6
5 changed files with 1851 additions and 1798 deletions

View File

@@ -2,56 +2,58 @@
<div class="seller-apply">
<div class="session">
<div class="content mini-scrollbar">
<div class="title">Brand Information</div>
<div class="tip">Share a few details to set up your seller profile</div>
<div class="title">{{ $t("ApplySeller.formTitle") }}</div>
<div class="tip">{{ $t("ApplySeller.formTip") }}</div>
<div class="form">
<a-form :model="formData" :rules="formRules" layout="vertical" ref="formRef">
<a-form-item label="Store Name" name="storeName">
<a-form-item :label="$t('Seller.storeName')" name="storeName">
<a-input
v-model:value="formData.storeName"
placeholder="Enter the store name"
:placeholder="$t('Seller.storeNameDesc')"
:maxlength="80"
/>
<span class="tip-length">{{ formData.storeName.length }}/80</span>
</a-form-item>
<a-form-item label="Owners Full Name" name="fullName">
<a-form-item :label="$t('Seller.ownerName')" name="fullName">
<a-input
v-model:value="formData.fullName"
placeholder="Enter store owner's full name"
:placeholder="$t('Seller.ownerNameDesc')"
/>
</a-form-item>
<div class="form-group">
<a-form-item label="Email" name="email">
<a-form-item :label="$t('Seller.email')" name="email">
<a-input
type="email"
v-model:value="formData.email"
placeholder="Enter email"
:placeholder="$t('Seller.emailDesc')"
/>
</a-form-item>
<a-form-item label="Phone Number" name="phoneNumber">
<a-form-item :label="$t('Seller.mobile')" name="mobile">
<a-input
type="tel"
v-model:value="formData.phoneNumber"
placeholder="Enter phone number"
v-model:value="formData.mobile"
:placeholder="$t('Seller.mobileDesc')"
/>
</a-form-item>
</div>
<a-form-item label="Store Description" name="description">
<a-form-item :label="$t('Seller.storeDescription')" name="description">
<a-textarea
v-model:value="formData.description"
placeholder="Briefly describe your design style and store features..."
:placeholder="$t('Seller.storeDescriptionDesc')"
:maxlength="500"
/>
<span class="tip-length">{{ formData.description.length }}/500</span>
</a-form-item>
<a-form-item label="Portfoilo/Social Media Links">
<a-form-item :label="$t('Seller.links')">
<a-input
placeholder="https://"
v-for="(v, i) in formData.links"
:key="i"
v-model:value="formData.links[i]"
>
<template #prefix>Link {{ i + 1 }}</template>
<template #prefix>{{
$t("Seller.link", { index: i + 1 })
}}</template>
</a-input>
<a-input
placeholder="https://"
@@ -71,33 +73,25 @@
</div>
<div class="session">
<div class="content">
<div class="title">Brand Information</div>
<div class="tip">Share a few details to set up your seller profile</div>
<div class="title">{{ $t("ApplySeller.termsTitle") }}</div>
<div class="tip">{{ $t("ApplySeller.termsTip") }}</div>
<div class="agreement">
<div class="title">AiDA Seller Agreement</div>
<div class="tip">
By checking the box below, you agree to comply with the following terms:
</div>
<div class="title">{{ $t("ApplySeller.agreementTitle") }}</div>
<div class="tip">{{ $t("ApplySeller.agreementTip") }}</div>
<ul>
<li>Provide accurate and truthful personal and store information</li>
<li>Only sell original designs or content with proper licensing</li>
<li>Maintain high quality standards for all products</li>
<li>Respond to customer inquiries within 48 hours</li>
<li>Ship orders within promised timeframes</li>
<li>Comply with AiDA's terms of service and community guidelines</li>
<li>Pay applicable platform fees and transaction charges</li>
<li>Handle customer disputes professionally and fairly</li>
<li v-for="(v, i) in 8" :key="i">
{{ $t(`ApplySeller.agreementItem${i + 1}`) }}
</li>
</ul>
</div>
<a-checkbox class="agree-agreement" v-model:checked="isAgreement">
I have read and agree to the Seller Agreement, understanding my responsibilities
and obligations as a seller on the AiDA platform.
{{ $t("ApplySeller.agreementAgreement") }}
</a-checkbox>
</div>
<div class="btns">
<button class="cancel" @click="onCancel">Cancel</button>
<button class="cancel" @click="onCancel">{{ $t("Seller.cancel") }}</button>
<button class="submit" :disabled="!isAgreement" @click="onSubmit">
Submit Application
{{ $t("ApplySeller.submitApplication") }}
</button>
</div>
</div>
@@ -106,24 +100,26 @@
<script setup>
import { ref, reactive } from "vue"
import { useI18n } from "vue-i18n"
const { t } = useI18n()
import { useRoute, useRouter } from "vue-router"
const route = useRoute()
const router = useRouter()
import { Https } from "@/tool/https"
const emit = defineEmits(["submit"])
const formRules = {
storeName: [{ required: true, message: "Enter the store name" }],
fullName: [{ required: true, message: "Enter store owner's full name" }],
email: [{ required: true, message: "Enter email" }],
phoneNumber: [{ required: true, message: "Enter phone number" }],
description: [{ required: true, message: "Enter store description" }]
storeName: [{ required: true, message: t("Seller.storeNameDesc") }],
fullName: [{ required: true, message: t("Seller.ownerNameDesc") }],
email: [{ required: true, message: t("Seller.emailDesc") }],
mobile: [{ required: true, message: t("Seller.mobileDesc") }],
description: [{ required: true, message: t("Seller.storeDescriptionErr") }]
}
const formRef = ref(null)
const formData = reactive({
storeName: "",
fullName: "",
email: "",
phoneNumber: "",
mobile: "",
description: "",
links: ["", ""]
})
@@ -140,7 +136,6 @@
formRef.value
.validate()
.then(() => {
console.log(formData)
const data = {
// userId: 0,
shopName: formData.storeName,
@@ -148,7 +143,7 @@
// brandBanner: "",
ownerName: formData.fullName,
email: formData.email,
mobile: formData.phoneNumber,
mobile: formData.mobile,
description: formData.description,
socialLinks: JSON.stringify(formData.links.filter((v) => v))
}