feat(ID1000812推荐螺纹,包含精确到色号维度):
This commit is contained in:
parent
063c5d1ec5
commit
4de7804bac
@ -43,3 +43,36 @@ export const UpdateShoppingCartApi = () => {
|
||||
method: 'put',
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取购物车列表v2
|
||||
* @returns
|
||||
*/
|
||||
export const GetShoppingCartV2Api = () => {
|
||||
return useRequest({
|
||||
url: '/v2/mall/shoppingCart/productColor',
|
||||
method: 'get',
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取购物车sku数量
|
||||
* @returns
|
||||
*/
|
||||
export const GetProductColorApi = () => {
|
||||
return useRequest({
|
||||
url: '/v2/mall/shoppingCart/productColor/num',
|
||||
method: 'get',
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取配套螺纹
|
||||
* @returns
|
||||
*/
|
||||
export const GetScrewProductApi = () => {
|
||||
return useRequest({
|
||||
url: '/v2/mall/shoppingCart/productColor/screwProduct',
|
||||
method: 'get',
|
||||
})
|
||||
}
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
// export const BASE_URL = `http://10.0.0.5:50001/lymarket`
|
||||
// export const BASE_URL = `http://192.168.0.89:40001/lymarket`
|
||||
// export const BASE_URL = `http://192.168.1.165:40001/lymarket` // 王霞
|
||||
// export const BASE_URL = 'https://test.zzfzyc.com/lymarket' // 测试环境
|
||||
export const BASE_URL = 'https://test.zzfzyc.com/lymarket' // 测试环境
|
||||
// export const BASE_URL = 'https://pre.zzfzyc.com/lymarket' // 预发布
|
||||
// export const BASE_URL = `http://192.168.1.9:40001/lymarket` // 发
|
||||
// export const BASE_URL = `http://192.168.1.9:50005/lymarket` // 发
|
||||
|
||||
47
src/pages/details/components/recommend/index.module.scss
Normal file
47
src/pages/details/components/recommend/index.module.scss
Normal file
@ -0,0 +1,47 @@
|
||||
.recommend {
|
||||
background-color: #fff;
|
||||
margin-top: 16px;
|
||||
border-radius: 16px;
|
||||
padding: 24px;
|
||||
box-sizing: border-box;
|
||||
.recommend_title {
|
||||
font-size: 28px;
|
||||
color: #000000ff;
|
||||
}
|
||||
.recommend_con {
|
||||
background: #ffffff;
|
||||
border-radius: 8px;
|
||||
border: 1px solid #e7e9ec;
|
||||
margin-top: 24px;
|
||||
display: flex;
|
||||
.img {
|
||||
width: 126px;
|
||||
height: 126px;
|
||||
}
|
||||
.con {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
flex: 1;
|
||||
padding: 16px 0 0 20px;
|
||||
box-sizing: border-box;
|
||||
text {
|
||||
&:nth-child(1) {
|
||||
color: #333333;
|
||||
font-size: 26px;
|
||||
}
|
||||
&:nth-child(2) {
|
||||
color: #999999;
|
||||
font-size: 24px;
|
||||
margin-top: 8px;
|
||||
}
|
||||
}
|
||||
}
|
||||
.open_select {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
color: #337fff;
|
||||
font-size: 26px;
|
||||
margin-right: 24px;
|
||||
}
|
||||
}
|
||||
}
|
||||
28
src/pages/details/components/recommend/index.tsx
Normal file
28
src/pages/details/components/recommend/index.tsx
Normal file
@ -0,0 +1,28 @@
|
||||
import { Text, View } from '@tarojs/components'
|
||||
import { memo } from 'react'
|
||||
import styles from './index.module.scss'
|
||||
import LabAndImg from '@/components/LabAndImg'
|
||||
import IconFont from '@/components/iconfont/iconfont'
|
||||
|
||||
interface ParamType {
|
||||
onClick?: () => void
|
||||
}
|
||||
export default memo((props: ParamType) => {
|
||||
const { onClick } = props
|
||||
return <View className={styles.recommend} onClick={onClick}>
|
||||
<View className={styles.recommend_title}>螺纹配套</View>
|
||||
<View className={styles.recommend_con}>
|
||||
<View className={styles.img}>
|
||||
<LabAndImg value={{}} customImageStyle={{ borderRadius: 0 }} />
|
||||
</View>
|
||||
<View className={styles.con}>
|
||||
<Text>0033#21支2*2螺纹</Text>
|
||||
<Text>管家建议选择配套商品</Text>
|
||||
</View>
|
||||
<View className={styles.open_select}>
|
||||
<Text>去选购</Text>
|
||||
<IconFont name="icon-rukou" size={37} />
|
||||
</View>
|
||||
</View>
|
||||
</View>
|
||||
})
|
||||
@ -102,6 +102,7 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.product_color {
|
||||
background-color: #fff;
|
||||
margin-top: 16px;
|
||||
@ -236,20 +237,20 @@
|
||||
background-color: #e4eefd;
|
||||
padding: 24px;
|
||||
width: 75vw;
|
||||
&_img{
|
||||
&_img {
|
||||
width: 100%;
|
||||
height: 450px;
|
||||
}
|
||||
&_content{
|
||||
&_content {
|
||||
overflow: hidden;
|
||||
border-radius: 20px;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
&_info{
|
||||
&_info {
|
||||
background-color: #fff;
|
||||
padding: 20px;
|
||||
}
|
||||
&_title{
|
||||
&_title {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
font-size: 28px;
|
||||
@ -257,14 +258,12 @@
|
||||
font-weight: 500;
|
||||
margin-bottom: 14px;
|
||||
}
|
||||
&_name{
|
||||
|
||||
&_name {
|
||||
}
|
||||
&_price{
|
||||
&_price {
|
||||
display: flex;
|
||||
|
||||
}
|
||||
&_bottomBar{
|
||||
&_bottomBar {
|
||||
display: flex;
|
||||
flex-flow: row nowrap;
|
||||
justify-content: space-between;
|
||||
@ -272,13 +271,11 @@
|
||||
font-size: 24px;
|
||||
color: #999999;
|
||||
}
|
||||
&_history{
|
||||
|
||||
&_history {
|
||||
}
|
||||
&_oldPrice{
|
||||
&_oldPrice {
|
||||
text-decoration: line-through;
|
||||
}
|
||||
&_button{
|
||||
|
||||
&_button {
|
||||
}
|
||||
}
|
||||
|
||||
@ -6,6 +6,7 @@ import DesSwiper from './components/swiper'
|
||||
import OrderCount from './components/orderCount'
|
||||
import styles from './index.module.scss'
|
||||
import FeaturePopup from './components/feature'
|
||||
import Recommend from './components/recommend'
|
||||
import ShopCart from '@/components/shopCart'
|
||||
import { formatDateTime, formatHashTag, formatImgUrl, formatPriceDiv, formatRemoveHashTag } from '@/common/fotmat'
|
||||
import { GetProductDetailApi } from '@/api/material'
|
||||
@ -21,6 +22,8 @@ import useCommonData from '@/use/useCommonData'
|
||||
import MoveBtn from '@/components/moveBtn'
|
||||
import Dialog from '@/components/Dialog'
|
||||
import NormalButton from '@/components/normalButton'
|
||||
import IconFont from '@/components/iconfont/iconfont'
|
||||
import LabAndImgShow from '@/components/LabAndImgShow'
|
||||
|
||||
interface item { title: string; img: string; url: string; id: number }
|
||||
|
||||
@ -265,6 +268,7 @@ const Details = (props: Params) => {
|
||||
</View>
|
||||
</View>
|
||||
</View>
|
||||
<Recommend onClick={() => placeOrder('to_order')} />
|
||||
<View className={styles.product_color}>
|
||||
<View className={styles.title}>色号信息 ({productInfo?.product_color_list?.length})</View>
|
||||
<View className={styles.list}>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user