diff --git a/src/pages/product/manage.vue b/src/pages/product/manage.vue index 7a3f4d5..aff3cf8 100644 --- a/src/pages/product/manage.vue +++ b/src/pages/product/manage.vue @@ -58,7 +58,7 @@ - 分类 + *分类 {{ form.categoryId ? getCategoryName(form.categoryId) : '请选择分类' }} @@ -218,6 +218,10 @@ export default { return cat ? cat.name : '' }, async saveProduct() { + if (!this.form.categoryId) { + uni.showToast({ title: '请选择分类', icon: 'none' }) + return + } if (!this.form.name) { uni.showToast({ title: '请输入商品名称', icon: 'none' }) return