feat(ID1000812推荐螺纹,包含精确到色号维度):

This commit is contained in:
czm 2023-01-10 17:12:57 +08:00
parent 063c5d1ec5
commit 4de7804bac
6 changed files with 124 additions and 15 deletions

View File

@ -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',
})
}

View File

@ -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` // 发

View 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;
}
}
}

View 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#212*2</Text>
<Text></Text>
</View>
<View className={styles.open_select}>
<Text></Text>
<IconFont name="icon-rukou" size={37} />
</View>
</View>
</View>
})

View File

@ -102,6 +102,7 @@
}
}
}
.product_color {
background-color: #fff;
margin-top: 16px;
@ -258,11 +259,9 @@
margin-bottom: 14px;
}
&_name {
}
&_price {
display: flex;
}
&_bottomBar {
display: flex;
@ -273,12 +272,10 @@
color: #999999;
}
&_history {
}
&_oldPrice {
text-decoration: line-through;
}
&_button {
}
}

View File

@ -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}>