Commit c7f89677 by gyt

Merge branch 'hotfix/20250512_搜索白屏' into 'master'

hotfix(搜索): 处理搜索后页面空白的问题

See merge request !1
parents c53b726a ca7861aa
Showing with 3 additions and 2 deletions
...@@ -105,6 +105,7 @@ const ListOneItem = (props: dataListItemType) => { ...@@ -105,6 +105,7 @@ const ListOneItem = (props: dataListItemType) => {
const onePriceRow = () => { const onePriceRow = () => {
const priceList =itemInfo.ladder_price const priceList =itemInfo.ladder_price
if(!priceList) return
priceList.forEach((item:any, index:number) => { priceList.forEach((item:any, index:number) => {
item.checked = false item.checked = false
var value_ = Number(purNum) var value_ = Number(purNum)
...@@ -194,7 +195,7 @@ const ListOneItem = (props: dataListItemType) => { ...@@ -194,7 +195,7 @@ const ListOneItem = (props: dataListItemType) => {
</div> </div>
<div className={`${styles.item} ${styles.w298}`}> <div className={`${styles.item} ${styles.w298}`}>
{ {
itemInfo.ladder_price.map((item, index) => { itemInfo.ladder_price&&itemInfo.ladder_price.map((item, index) => {
return ( return (
<div key={index + item.price_cn} className={`${styles.jtgroup} row ${item.checked ? styles.actjt : ''}`}> <div key={index + item.price_cn} className={`${styles.jtgroup} row ${item.checked ? styles.actjt : ''}`}>
<span>{item.purchases || item.purchase}+</span> <span>{item.purchases || item.purchase}+</span>
...@@ -226,7 +227,7 @@ const ListOneItem = (props: dataListItemType) => { ...@@ -226,7 +227,7 @@ const ListOneItem = (props: dataListItemType) => {
</div> </div>
<div className={`${styles.item} row`}> <div className={`${styles.item} row`}>
<div> <div>
{(!itemInfo.stock || itemInfo.ladder_price.length == 0) ? ( {(!itemInfo.stock || (itemInfo.ladder_price&&itemInfo.ladder_price.length == 0)) ? (
<a href={QQURL} rel="noreferrer" className={styles.ljxunj} target='_blank'>立即询价</a> <a href={QQURL} rel="noreferrer" className={styles.ljxunj} target='_blank'>立即询价</a>
) : ( ) : (
<> <>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment