代码优化
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user