main
wwl 2024-03-19 15:55:23 +08:00
parent 7c106ff3bc
commit a2778f0a24
12 changed files with 69 additions and 25 deletions

View File

@ -93,7 +93,7 @@ export const TRADE_AFTER_SALES_ITEM = {
return pickBy(_detail, {
id: 'id',
pic: 'pic',
itemName: 'item_name',
itemName: ({ item_name, item_name_2 }) => item_name_2 || item_name,
price: ({ total_fee }) => total_fee / 100,
num: 'num',
// 可售后商品数

View File

@ -45,7 +45,7 @@ export default class TradeRate extends Component {
item_id: 'item_id',
item_spec_desc: 'item_spec_desc',
pic_path: 'pic',
title: 'item_name',
title: ({ item_name, item_name_2 }) => item_name_2 || item_name,
price: ({ item_fee }) => (+item_fee / 100).toFixed(2),
num: 'num',
star: 0,

View File

@ -88,7 +88,7 @@ function CompGoodsItem (props) {
<View className='goods-title' onClick={onChangeGoodsIsCheck}>
{/* {info.activity_type == 'package' && <Text className='goods-title__tag'>组合商品</Text>} */}
{info.is_plus_buy && <Text className='goods-title__tag'>加价购</Text>}
{info.item_name}
{info.item_name_2 || info.item_name}
</View>
{isShowDeleteIcon && (
// <Text className='iconfont icon-shanchu-01' onClick={() => onDelete(info)}></Text>

View File

@ -112,7 +112,8 @@
}
.goods-title {
@include multi-ellipsis(2);
width: 300px;
// width: 300px;
width: 360px;
&__tag {
/* prettier-ignore */
border: 1PX solid var(--color-primary);

View File

@ -201,7 +201,7 @@ page {
.item-btn {
// width: 180px;
// height: 56px;
padding: 30px 70px 30px 90px;
padding: 20rpx 90rpx 20rpx 50rpx;
color: #fff;
font-size: 28px;
border-radius: 10px;
@ -215,11 +215,16 @@ page {
font-size: 22px;
line-height: 1;
transition: all 0.3s ease-in-out;
position: relative;
.icon-my {
font-size: 28px;
font-weight: bold;
margin-left: 16px;
}
.jiantou {
height: 50rpx;
width: 100rpx;
}
}
}
}

View File

@ -205,9 +205,12 @@ function Home () {
// goodsSort: 6,
distributor_id: 0
}
const { list: jdList } = await api.item.search({ ...req, tag_id: 1 })
const { list: newList } = await api.item.search({ ...req, tag_id: 2 })
const { list: hotList } = await api.item.search({ ...req, tag_id: 3 })
// const { list: jdList } = await api.item.search({ ...req, tag_id: 1 })
const { list: newList = [] } = await api.item.search({ ...req, tag_id: 4 })
const { list: hotList = [] } = await api.item.search({ ...req, tag_id: 3 })
const { list: BOSTON_List = [] } = await api.item.search({ ...req, tag_id: 5 })
const { list: ARIZONA_List = [] } = await api.item.search({ ...req, tag_id: 6 })
const { list: LONDON_List = [] } = await api.item.search({ ...req, tag_id: 7 })
setState((draft) => {
draft.recommend = [{
type: 'new',
@ -215,7 +218,7 @@ function Home () {
btnTxt: '查看更多',
postions: 'left',
url: '',
img: 'index/rec/new.png',
img: 'index/rec/new.png?v=1',
list: newList.map(item => ({ ...item, price: (item.price / 100) }))
}, {
type: 'hot',
@ -223,18 +226,53 @@ function Home () {
btnTxt: '查看更多',
postions: 'left',
url: '',
img: 'index/rec/hot.png',
img: 'index/rec/hot.png?v=1',
list: hotList.map(item => ({ ...item, price: (item.price / 100) }))
}, {
type: 'jd',
text: "ARIZONA",
btnTxt: '经典双扣',
type: 'BOSTON',
text: "BOSTON",
btnTxt: 'BOSTON',
postions: 'right',
url: '',
img: 'index/rec/jd.png',
list: jdList.map(item => ({ ...item, price: (item.price / 100) }))
img: 'index/rec/Boston.png',
list: BOSTON_List.map(item => ({ ...item, price: (item.price / 100) }))
}, {
type: 'ARIZONA',
img: 'index/rec/Arizona.png',
list: ARIZONA_List.map(item => ({ ...item, price: (item.price / 100) }))
}, {
type: 'LONDON',
img: 'index/rec/London.png',
list: LONDON_List.map(item => ({ ...item, price: (item.price / 100) }))
}
]
// bak
// draft.recommend = [{
// type: 'new',
// text: "新品推荐",
// btnTxt: '查看更多',
// postions: 'left',
// url: '',
// img: 'index/rec/new.png',
// list: newList.map(item => ({ ...item, price: (item.price / 100) }))
// }, {
// type: 'hot',
// text: "热销单品",
// btnTxt: '查看更多',
// postions: 'left',
// url: '',
// img: 'index/rec/hot.png',
// list: hotList.map(item => ({ ...item, price: (item.price / 100) }))
// }, {
// type: 'jd',
// text: "ARIZONA",
// btnTxt: '经典双扣',
// postions: 'right',
// url: '',
// img: 'index/rec/jd.png',
// list: jdList.map(item => ({ ...item, price: (item.price / 100) }))
// }
// ]
})
}
@ -364,8 +402,6 @@ function Home () {
const deltaY = clientY - startY
const deltaX = clientX - startX
if (Math.abs(deltaY) < 50) return
console.log("🚀 ~ deltaY:", deltaY)
if (deltaY > 0) {
// 下滑操作
setState((draft) => {
@ -534,8 +570,9 @@ function Home () {
{!isUpOperation && <>
{currentIndex === 0 ? <View className="item-btns">
<View className="item-tit">{activeInfo.activity_name}</View>
{activeInfo.end_time * 1000 >= Date.now() && <View className="item-btn" onClick={handleApply}>
{activeInfo.end_time * 1000 >= Date.now() && <View className="item-btn" style={{ paddingRight: 0 }} onClick={handleApply}>
<View className="item-btn-txt">{activeInfo.total_count ? '已报名' : '活动申请'}</View>
<Image className="jiantou" mode="aspectFit" src={require('../assets/hengjiantou.gif')}></Image>
</View>}
</View> :
<View className="item-img-box">

View File

@ -105,7 +105,7 @@ export default class ItemFav extends Component {
img: 'item_image',
fav_id: 'fav_id',
item_id: 'item_id',
title: 'item_name',
title: ({ item_name, item_name_2 }) => item_name_2 || item_name,
desc: 'brief',
item_type: 'item_type',
distributor_id: 'distributor_id',

View File

@ -120,9 +120,11 @@
flex: 1;
width: 100%;
flex-direction: column;
overflow: hidden;
&__title {
@include text-overflow();
font-size: 22px;
width: 98%;
}
&__price {
display: flex;
@ -130,8 +132,8 @@
font-weight: bold;
font-size: 32px;
line-height: 1;
margin-top: 16px;
margin-bottom: 36px;
margin-top: 26px;
margin-bottom: 20px;
&__symbol {
margin-right: 20px;
}

View File

@ -125,7 +125,7 @@ export default function status () {
await api.user.cancelRegistrationRecord({
activity_id: id
})
navigateTo('/pages/recommend/list')
navigateTo('/pages/index')
}
return (
<SpPage loading={loading} title={activeInfo.status === 'pending' ? '待审核' : '预约成功'} className='page-recommend-status' isBlack>

View File

@ -77,7 +77,6 @@ export default class TradeItem extends Component {
// 修改地址
clickToEditAddress () {
const { choose } = this.props.info
console.log("🚀 ~ TradeItem ~ this.props.info:", this.props.info)
return
Taro.navigateTo({
url: `/marketing/pages/member/address?isSelected=${choose}`

View File

@ -138,7 +138,7 @@ export default class TradeDetail extends Component {
delivery_time: 'delivery_time',
aftersales_status: 'aftersales_status',
pic_path: 'pic',
title: ({ item_name }) => item_name,
title: ({ item_name, item_name_2 }) => item_name_2 || item_name,
type: 'type',
delivery_status: 'delivery_status',
origincountry_name: 'origincountry_name',

View File

@ -207,7 +207,7 @@ export default class TradeList extends Component {
order_id: 'order_id',
item_id: 'item_id',
pic_path: 'pic',
title: 'item_name',
title: ({ item_name, item_name_2 }) => item_name_2 || item_name,
origincountry_name: 'origincountry_name',
origincountry_img_url: 'origincountry_img_url',
type: 'type',