代码优化

This commit is contained in:
GaoHao
2025-03-26 13:34:19 +08:00
parent e928fdfa2a
commit 413222a5f0
42 changed files with 166 additions and 531 deletions

View File

@@ -1,4 +1,4 @@
import { $types } from '@/commons/goodsData.js'
export function returnSkuSnap(goods) {
const selectSpec = typeof goods.selectSpec === 'string' ? JSON.parse(goods.selectSpec) : goods.selectSpec
let result = selectSpec.map(v => {
@@ -9,11 +9,7 @@ export function returnSkuSnap(goods) {
})
return result
}
export function returnTypeEnum(type) {
const item = $types.find(v => v.title == type)
let result = item ? item.value : undefined
return result
}
export function returnCategory(cateName, cateList) {
console.log(cateName);
console.log(cateList);