mirror of
https://gitee.com/ShopeX/ECShopX_mobile-frontend
synced 2026-08-14 17:41:45 +08:00
fix: 修复一些问题
This commit is contained in:
@@ -63,11 +63,10 @@ function SpSkuSelect(props) {
|
||||
}
|
||||
// 防止列表页遗留其他商品信息
|
||||
if (info && info.nospec) {
|
||||
specItemed()
|
||||
setState((draft) => {
|
||||
draft.curItem = null
|
||||
draft.skuText = ''
|
||||
draft.minNum = specItemed()
|
||||
draft.num = specItemed()
|
||||
})
|
||||
}
|
||||
}, [info])
|
||||
@@ -106,6 +105,7 @@ function SpSkuSelect(props) {
|
||||
//多规格
|
||||
if(info.specItems.length > 0 && val.length > 0){ //多规格动态获取起订量
|
||||
const newval = val.length == 1 ? val[0] : val.join('-')
|
||||
console.log('newval:', newval,val,info.specItems)
|
||||
info.specItems.forEach((item) => {
|
||||
if(item.customSpecId == newval){
|
||||
setState((draft) => {
|
||||
@@ -119,6 +119,9 @@ function SpSkuSelect(props) {
|
||||
//单规格
|
||||
return info.startNum
|
||||
}else{
|
||||
setState((draft) => {
|
||||
draft.minNum = 1
|
||||
})
|
||||
return 1
|
||||
}
|
||||
|
||||
|
||||
@@ -238,6 +238,7 @@ export const GOODS_INFO = {
|
||||
specItems: ({ spec_items, is_point }) => {
|
||||
return pickBy(spec_items, {
|
||||
approveStatus: 'approve_status',
|
||||
customSpecId:'custom_spec_id',
|
||||
specItem: ({ item_spec }) => {
|
||||
return pickBy(item_spec, {
|
||||
specId: 'spec_value_id',
|
||||
@@ -249,6 +250,7 @@ export const GOODS_INFO = {
|
||||
})
|
||||
},
|
||||
itemId: 'item_id',
|
||||
startNum: 'start_num',// 起订量
|
||||
store: 'store',
|
||||
limitNum: 'limit_num',
|
||||
// price: ({ price }) => price / 100,
|
||||
@@ -284,6 +286,7 @@ export const GOODS_INFO = {
|
||||
video: 'videos',
|
||||
medicineData: 'medicine_data',
|
||||
isMedicine: 'is_medicine',
|
||||
startNum: 'start_num'// 起订量
|
||||
}
|
||||
|
||||
export const ESPIER_DETAIL_GOODS_INFO = {
|
||||
|
||||
Reference in New Issue
Block a user