mirror of
https://gitee.com/ShopeX/ECShopX_mobile-frontend
synced 2026-08-14 09:25:55 +08:00
bug(custom): eCX-7259
This commit is contained in:
1
.env
1
.env
@@ -13,5 +13,4 @@ APP_IMAGE_CDN=https://b-img-cdn.yuanyuanke.cn/ecshopx-vshop
|
||||
APP_DIANWU_URL=https://demo-ecshopx-dianwu.shopex123.com
|
||||
APP_MERCHANT_URL=
|
||||
APP_ADAPAY=
|
||||
APP_I18N_ORIGIN_LANG=en
|
||||
|
||||
|
||||
@@ -46,6 +46,13 @@ class AtInputNumber extends AtComponent {
|
||||
localValue: this.props.value
|
||||
})
|
||||
}
|
||||
componentDidUpdate(prevProps) {
|
||||
if (prevProps.value !== this.props.value) {
|
||||
this.setState({
|
||||
localValue: this.props.value
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
handleClick(clickType) {
|
||||
const { disabled, value, min, max, step } = this.props
|
||||
|
||||
@@ -85,13 +85,13 @@ function SpSkuSelect(props) {
|
||||
// }
|
||||
}, [info])
|
||||
|
||||
useEffect(() => {
|
||||
if (!open) {
|
||||
setState((draft) => {
|
||||
draft.num = 1
|
||||
})
|
||||
}
|
||||
}, [open])
|
||||
// useEffect(() => {
|
||||
// if (!open) {
|
||||
// setState((draft) => {
|
||||
// draft.num = 1
|
||||
// })
|
||||
// }
|
||||
// }, [open])
|
||||
|
||||
const init = () => {
|
||||
const { skuList, specItems } = info
|
||||
@@ -120,7 +120,6 @@ 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) => {
|
||||
@@ -130,12 +129,19 @@ function SpSkuSelect(props) {
|
||||
return item.startNum
|
||||
}
|
||||
})
|
||||
}else{
|
||||
// 单规格
|
||||
setState((draft) => {
|
||||
draft.minNum = info.startNum
|
||||
draft.num = info.startNum
|
||||
})
|
||||
}
|
||||
//单规格
|
||||
return info.startNum
|
||||
} else {
|
||||
setState((draft) => {
|
||||
draft.minNum = 1
|
||||
draft.num = 1
|
||||
})
|
||||
return 1
|
||||
}
|
||||
|
||||
@@ -337,8 +337,8 @@ function EspierDetail(props) {
|
||||
getRecommendList() // 猜你喜欢
|
||||
}
|
||||
}
|
||||
const getMultipleImageInfo = async (imageUrls) => {
|
||||
const promises = imageUrls.map((url) =>
|
||||
const getMultipleImageInfo = async (imageUrls=[]) => {
|
||||
const promises = imageUrls?.map((url) =>
|
||||
Taro.getImageInfo({ src: url })
|
||||
.then((info) => info)
|
||||
.catch((error) => {
|
||||
|
||||
Reference in New Issue
Block a user