修复商品库存与网络摘要并校验订购编号
This commit is contained in:
1 parent
28894e0813
commit
d8224ec5b7
15 files changed
+529
-68
No files matched your search
@@ -43,6 +43,7 @@ import MfDcimConfig from "~/components/config/MfDcimConfig.vue";
|
||||
import { t as composables_t } from "~/lib/composables-2.js";
|
||||
import { t as product_description_data_t } from "~/lib/product-description-data.js";
|
||||
import index from "~/pages/products/dedicated-server/index.vue";
|
||||
import { productId } from "~/lib/product-id.js";
|
||||
var A = {
|
||||
key: 1,
|
||||
class: `dedicated-customize`,
|
||||
@@ -65,7 +66,7 @@ var A = {
|
||||
let x = useRoute(),
|
||||
P = useRouter(),
|
||||
F = useApi(),
|
||||
I = computed(() => String(x.query.id ?? x.query.product_id ?? ``));
|
||||
I = computed(() => x.query.id ?? x.query.product_id ?? ``);
|
||||
composables_t({
|
||||
key: (e) => e.fullPath,
|
||||
});
|
||||
@@ -85,7 +86,7 @@ var A = {
|
||||
t = I.value;
|
||||
((R.value = !0), (z.value = ``), (L.value = null));
|
||||
try {
|
||||
if (!/^[1-9]\d*$/.test(t)) throw Error(`商品编号无效`);
|
||||
if (productId(t) === null) throw Error(`商品编号无效`);
|
||||
let n = await F.get(`/product/${t}`);
|
||||
if (e !== U) return;
|
||||
let r = n?.product ?? n;
|
||||
|
||||
Reference in new issue
Block a user