feat(补充面料详情页客户浮窗):

This commit is contained in:
czm 2022-12-12 17:28:31 +08:00
parent 8ac939e693
commit b2616abab0
2 changed files with 109 additions and 107 deletions

View File

@ -1,4 +1,4 @@
// export const BASE_URL = CURRENT_BASE_URL export const BASE_URL = CURRENT_BASE_URL
// export const BASE_URL = `http://192.168.0.75:50001/lymarket` // export const BASE_URL = `http://192.168.0.75:50001/lymarket`
// export const BASE_URL = `http://192.168.0.89:50001/lymarket` // export const BASE_URL = `http://192.168.0.89:50001/lymarket`
// export const BASE_URL = `http://10.0.0.5:50001/lymarket` // export const BASE_URL = `http://10.0.0.5:50001/lymarket`
@ -12,7 +12,7 @@
// export const BASE_URL = `https://dev.zzfzyc.com/lymarket` // 开发环境 // export const BASE_URL = `https://dev.zzfzyc.com/lymarket` // 开发环境
// export const BASE_URL = 'https://www.zzfzyc.com/lymarket' // 正式环境 // export const BASE_URL = 'https://www.zzfzyc.com/lymarket' // 正式环境
// export const BASE_URL = `http://192.168.1.5:40001/lymarket` // 王霞 // export const BASE_URL = `http://192.168.1.5:40001/lymarket` // 王霞
export const BASE_URL = 'http://192.168.1.7:50002/lymarket' // 添 // export const BASE_URL = 'http://192.168.1.7:50002/lymarket' // 添
// export const BASE_URL = 'http://192.168.1.28:50002/lymarket' // 婷 // export const BASE_URL = 'http://192.168.1.28:50002/lymarket' // 婷
// export const BASE_URL = `http://192.168.1.42:50002/lymarket` // 杰 // export const BASE_URL = `http://192.168.1.42:50002/lymarket` // 杰

View File

@ -180,130 +180,132 @@ const Details = (props: Params) => {
const [showPopup, setshowPopup] = useState(false) const [showPopup, setshowPopup] = useState(false)
return ( return (
<View className={styles.main}> <MoveBtn showList={['customer']}>
<DesSwiper list={productInfo.texture_url ? productInfo.texture_url.toString().split(',') : []} /> <View className={styles.main}>
<View className={styles.product_header}> <DesSwiper list={productInfo.texture_url ? productInfo.texture_url.toString().split(',') : []} />
<View className={styles.title}> <View className={styles.product_header}>
{productInfo.code && <View className={styles.name}>{productName}</View>} <View className={styles.title}>
<View className={styles.des}>{productInfo.describe}</View> {productInfo.code && <View className={styles.name}>{productName}</View>}
<View className={styles.des}>{productInfo.describe}</View>
</View>
<View className={styles.collect} onClick={openCollection}>
<View
className={classnames(
`iconfont ${collectStatus ? 'icon-shoucangchenggong' : 'icon-dianjishoucang'}`,
styles.miconfont,
collectStatus && styles.collected,
)}
></View>
<View className={styles.text}></View>
</View>
<View className={styles.share}>
<View className={classnames('iconfont icon-fenxiangshangpin', styles.miconfont)}></View>
<View className={styles.text}></View>
<Button open-type="share" className={styles.shareBtn}></Button>
</View>
</View> </View>
<View className={styles.collect} onClick={openCollection}> <View className={styles.des_data}>
<View <View className={styles.flexBox}>
className={classnames( <View className={styles.title}></View>
`iconfont ${collectStatus ? 'icon-shoucangchenggong' : 'icon-dianjishoucang'}`, {
styles.miconfont, productInfo.is_instruct && <View className={styles.flexRight} onClick={() => setshowPopup(true)}>{'特色百科 >'}</View>
collectStatus && styles.collected, }
)} </View>
></View> <View className={styles.con}>
<View className={styles.text}></View> {/* <View className={styles.des_text}>
</View>
<View className={styles.share}>
<View className={classnames('iconfont icon-fenxiangshangpin', styles.miconfont)}></View>
<View className={styles.text}></View>
<Button open-type="share" className={styles.shareBtn}></Button>
</View>
</View>
<View className={styles.des_data}>
<View className={styles.flexBox}>
<View className={styles.title}></View>
{
productInfo.is_instruct && <View className={styles.flexRight} onClick={() => setshowPopup(true)}>{'特色百科 >'}</View>
}
</View>
<View className={styles.con}>
{/* <View className={styles.des_text}>
<Text>{productInfo.code}</Text> <Text>{productInfo.code}</Text>
</View> */} </View> */}
<View className={styles.des_text}> <View className={styles.des_text}>
<Text>{productInfo.width}</Text> <Text>{productInfo.width}</Text>
</View> </View>
<View className={styles.des_text}> <View className={styles.des_text}>
<Text>{productInfo.craft}</Text> <Text>{productInfo.craft}</Text>
</View> </View>
<View className={styles.des_text}> <View className={styles.des_text}>
<Text>{productInfo.weight_error_discount / 1000}KG</Text> <Text>{productInfo.weight_error_discount / 1000}KG</Text>
</View> </View>
<View className={styles.des_text}> <View className={styles.des_text}>
<Text>{productInfo.weight_density}</Text> <Text>{productInfo.weight_density}</Text>
</View> </View>
<View className={styles.des_text}> <View className={styles.des_text}>
<Text>{productInfo.component}</Text> <Text>{productInfo.component}</Text>
</View> </View>
<View className={styles.des_text}> <View className={styles.des_text}>
<Text>{productInfo.tube / 1000}KG</Text> <Text>{productInfo.tube / 1000}KG</Text>
</View> </View>
<View className={styles.des_text}> <View className={styles.des_text}>
<Text>{productInfo.length_to_weight_rate / 100}</Text> <Text>{productInfo.length_to_weight_rate / 100}</Text>
</View> </View>
<View className={styles.des_text}> <View className={styles.des_text}>
<Text>{productInfo.weight_error / 1000}KG</Text> <Text>{productInfo.weight_error / 1000}KG</Text>
</View>
</View>
</View>
<View className={styles.product_color}>
<View className={styles.title}> ({productInfo?.product_color_list?.length})</View>
<View className={styles.list}>
{productInfo?.product_color_list?.map((item) => {
return (
<View key={item.id} className={styles.item}>
<View className={styles.item_color}>
<LabAndImg
value={{ lab: item.lab, rgb: item.rgb, texture_url: item.texture_url, title: item.code }}
showStatus
round
name={formatRemoveHashTag(item.code)}
/>
</View>
<View className={styles.item_name}>{item.name}</View>
<View className={styles.bulk_price}>{formatPriceDiv(item.bulk_price)}/Kg</View>
</View>
)
})}
</View>
</View>
<View className={styles.product_detail}>
<RichText nodes={html}></RichText>
</View>
<View className={styles.product_buy}>
<View className={styles.icon_btn}>
<View className={styles.customer_service}>
<View className={classnames('iconfont icon-kefu', styles.miconfont)}></View>
<View className={styles.text}>
/
<Button
className={styles.wxBtn}
openType="contact"
sendMessageImg={shareImg}
sendMessageTitle={productName}
showMessageCard
sendMessagePath={`/pages/details/index?id=${productInfo.id}`}
></Button>
</View> </View>
</View> </View>
<View className={styles.buy_cart} onClick={() => setShowCart(true)}> </View>
<View className={classnames('iconfont icon-gouwuche', styles.miconfont)}></View> <View className={styles.product_color}>
<View className={styles.text}></View> <View className={styles.title}> ({productInfo?.product_color_list?.length})</View>
{commonData.shopCount > 0 && <View className={styles.product_num}>{commonData.shopCount > 99 ? '99+' : commonData.shopCount}</View>} <View className={styles.list}>
{productInfo?.product_color_list?.map((item) => {
return (
<View key={item.id} className={styles.item}>
<View className={styles.item_color}>
<LabAndImg
value={{ lab: item.lab, rgb: item.rgb, texture_url: item.texture_url, title: item.code }}
showStatus
round
name={formatRemoveHashTag(item.code)}
/>
</View>
<View className={styles.item_name}>{item.name}</View>
<View className={styles.bulk_price}>{formatPriceDiv(item.bulk_price)}/Kg</View>
</View>
)
})}
</View> </View>
</View> </View>
<View className={styles.product_detail}>
<RichText nodes={html}></RichText>
</View>
<View className={styles.product_buy}>
<View className={styles.icon_btn}>
<View className={styles.customer_service}>
<View className={classnames('iconfont icon-kefu', styles.miconfont)}></View>
<View className={styles.text}>
/
<Button
className={styles.wxBtn}
openType="contact"
sendMessageImg={shareImg}
sendMessageTitle={productName}
showMessageCard
sendMessagePath={`/pages/details/index?id=${productInfo.id}`}
></Button>
</View>
</View>
<View className={styles.buy_cart} onClick={() => setShowCart(true)}>
<View className={classnames('iconfont icon-gouwuche', styles.miconfont)}></View>
<View className={styles.text}></View>
{commonData.shopCount > 0 && <View className={styles.product_num}>{commonData.shopCount > 99 ? '99+' : commonData.shopCount}</View>}
</View>
</View>
{(!userInfo.adminUserInfo?.is_authorize_phone && ( {(!userInfo.adminUserInfo?.is_authorize_phone && (
<View className={styles.buy_btn}> <View className={styles.buy_btn}>
<Button className={styles.wxBtn} open-type="getPhoneNumber" onGetPhoneNumber={e => placeOrder('to_phone', e)}></Button> <Button className={styles.wxBtn} open-type="getPhoneNumber" onGetPhoneNumber={e => placeOrder('to_phone', e)}></Button>
</View> </View>
)) || ( )) || (
<View className={styles.buy_btn} onClick={() => placeOrder('to_order')}> <View className={styles.buy_btn} onClick={() => placeOrder('to_order')}>
</View> </View>
)} )}
</View>
<OrderCount show={showOrderCount} is_first_login={productInfo.is_first_login} onClose={() => setShowOrderCount(false)} title={productName} productId={productInfo.id} />
<ShopCart show={showCart} onClose={() => setShowCart(false)} />
<AddCollection show={collectionShow} onAdd={onAdd} onClose={closeCollection} />
<FeaturePopup showPopup={showPopup} closePopup={() => setshowPopup(false)} productName={productName} productIds={Number(params?.id)}></FeaturePopup>
<View className="common_safe_area_y"></View>
</View> </View>
<OrderCount show={showOrderCount} is_first_login={productInfo.is_first_login} onClose={() => setShowOrderCount(false)} title={productName} productId={productInfo.id} /> </MoveBtn>
<ShopCart show={showCart} onClose={() => setShowCart(false)} />
<AddCollection show={collectionShow} onAdd={onAdd} onClose={closeCollection} />
<FeaturePopup showPopup={showPopup} closePopup={() => setshowPopup(false)} productName={productName} productIds={Number(params?.id)}></FeaturePopup>
<View className="common_safe_area_y"></View>
</View>
) )
} }