feat: 价格限制最低4港币
This commit is contained in:
@@ -1759,6 +1759,7 @@ export default {
|
|||||||
learnMore: '了解更多',
|
learnMore: '了解更多',
|
||||||
requiredFieldTips: '请填写{field}',
|
requiredFieldTips: '请填写{field}',
|
||||||
requiredFieldTipsWithPage: '第 {index} 个商品:请填写{field}',
|
requiredFieldTipsWithPage: '第 {index} 个商品:请填写{field}',
|
||||||
|
priceMinMessage: '价格不能低于4港币',
|
||||||
draftSaved: '草稿已保存',
|
draftSaved: '草稿已保存',
|
||||||
draftDesc: '您的商品已保存为草稿。\n您可以继续编辑,或稍后在“我的商品”中发布。',
|
draftDesc: '您的商品已保存为草稿。\n您可以继续编辑,或稍后在“我的商品”中发布。',
|
||||||
listingLive: '商品已上架',
|
listingLive: '商品已上架',
|
||||||
|
|||||||
@@ -1810,6 +1810,7 @@ export default {
|
|||||||
learnMore:'Learn more',
|
learnMore:'Learn more',
|
||||||
requiredFieldTips:'Please fill in {field}',
|
requiredFieldTips:'Please fill in {field}',
|
||||||
requiredFieldTipsWithPage:'Listing {index}: Please fill in {field}',
|
requiredFieldTipsWithPage:'Listing {index}: Please fill in {field}',
|
||||||
|
priceMinMessage: 'Price cannot be less than HK$4',
|
||||||
draftSaved: 'Draft Saved',
|
draftSaved: 'Draft Saved',
|
||||||
draftDesc: 'Your listing has been saved as a draft. \nYou can continue editing or publish it later from My Listings.',
|
draftDesc: 'Your listing has been saved as a draft. \nYou can continue editing or publish it later from My Listings.',
|
||||||
listingLive:'Listing Live',
|
listingLive:'Listing Live',
|
||||||
|
|||||||
@@ -32,20 +32,20 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="right">
|
<div class="right">
|
||||||
<div class="right-content" ref="rightContentRef">
|
<div class="right-content" ref="rightContentRef">
|
||||||
<ListingForm
|
<ListingForm
|
||||||
:product-name="currentListing.productName"
|
:product-name="currentListing.productName"
|
||||||
:price="currentListing.price"
|
:price="currentListing.price"
|
||||||
:desc="currentListing.desc"
|
:desc="currentListing.desc"
|
||||||
:gender="currentListing.gender"
|
:gender="currentListing.gender"
|
||||||
:category="currentListing.category"
|
:category="currentListing.category"
|
||||||
:gender-options="genderOptions"
|
:gender-options="genderOptions"
|
||||||
:category-options="categoryOptions"
|
:category-options="categoryOptions"
|
||||||
@update:product-name="currentListing.productName = $event"
|
@update:product-name="currentListing.productName = $event"
|
||||||
@update:price="currentListing.price = $event"
|
@update:price="handleUpdatePrice"
|
||||||
@update:desc="currentListing.desc = $event"
|
@update:desc="currentListing.desc = $event"
|
||||||
@update:gender="handleUpdateGender"
|
@update:gender="handleUpdateGender"
|
||||||
@update:category="currentListing.category = $event"
|
@update:category="currentListing.category = $event"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div class="page-control flex align-center" v-if="selectList.length > 1">
|
<div class="page-control flex align-center" v-if="selectList.length > 1">
|
||||||
<a-pagination
|
<a-pagination
|
||||||
@@ -171,6 +171,16 @@
|
|||||||
currentListing.value.category = null
|
currentListing.value.category = null
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const handleUpdatePrice = (value: string) => {
|
||||||
|
const num = Number(value)
|
||||||
|
if (value && !Number.isNaN(num) && num < 4) {
|
||||||
|
currentListing.value.price = "4"
|
||||||
|
message.warning(t("SellerListEdit.priceMinMessage"))
|
||||||
|
} else {
|
||||||
|
currentListing.value.price = value
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
const previewImageMap = computed(() => ({
|
const previewImageMap = computed(() => ({
|
||||||
sketch: currentListing.value.sketch,
|
sketch: currentListing.value.sketch,
|
||||||
mainProductImage: currentListing.value.mainProductImage,
|
mainProductImage: currentListing.value.mainProductImage,
|
||||||
|
|||||||
Reference in New Issue
Block a user