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, { return pickBy(_detail, {
id: 'id', id: 'id',
pic: 'pic', pic: 'pic',
itemName: 'item_name', itemName: ({ item_name, item_name_2 }) => item_name_2 || item_name,
price: ({ total_fee }) => total_fee / 100, price: ({ total_fee }) => total_fee / 100,
num: 'num', num: 'num',
// 可售后商品数 // 可售后商品数

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -125,7 +125,7 @@ export default function status () {
await api.user.cancelRegistrationRecord({ await api.user.cancelRegistrationRecord({
activity_id: id activity_id: id
}) })
navigateTo('/pages/recommend/list') navigateTo('/pages/index')
} }
return ( return (
<SpPage loading={loading} title={activeInfo.status === 'pending' ? '待审核' : '预约成功'} className='page-recommend-status' isBlack> <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 () { clickToEditAddress () {
const { choose } = this.props.info const { choose } = this.props.info
console.log("🚀 ~ TradeItem ~ this.props.info:", this.props.info)
return return
Taro.navigateTo({ Taro.navigateTo({
url: `/marketing/pages/member/address?isSelected=${choose}` url: `/marketing/pages/member/address?isSelected=${choose}`

View File

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

View File

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