update
parent
9ffd570fbb
commit
bf90b988f0
Binary file not shown.
|
After Width: | Height: | Size: 1.5 KiB |
|
|
@ -45,9 +45,9 @@ function SpGoodsPrice (props) {
|
|||
{
|
||||
!isPoint && <SpPrice size={36} className='sale-price' value={price} />
|
||||
}
|
||||
{marketPrice > 0 && enMarketPrice && (
|
||||
{/* {marketPrice > 0 && enMarketPrice && (
|
||||
<SpPrice className='mkt-price' lineThrough value={marketPrice} />
|
||||
)}
|
||||
)} */}
|
||||
</View>
|
||||
<View>
|
||||
{info.memberPrice < info.price && enMemberPrice && (
|
||||
|
|
|
|||
|
|
@ -131,7 +131,7 @@ function SpPage (props, ref) {
|
|||
draft.pageTitle = pageTitle
|
||||
draft.isTabBarPage = isTabBarPage
|
||||
draft.showLeftContainer = !['/subpages/guide/index', '/pages/index'].includes(`/${page?.route}`)
|
||||
draft.showCustomNavigation = ['/pages/cart/espier-index', '/pages/index', '/subpages/member/index', '/pages/category/index'].includes(`/${page?.route}`)
|
||||
draft.showCustomNavigation = ['/pages/cart/espier-index', '/pages/index', '/subpages/member/index', '/pages/category/index', '/pages/recommend/list'].includes(`/${page?.route}`)
|
||||
// draft.showCustomNavigation = true
|
||||
draft.showNavCartIcon = ['/subpages/marketing/coupon-center', '/subpages/marketing/coupon', '/pages/item/list'].includes(`/${page?.route}`)
|
||||
})
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@ function SpSkuSelect (props, ref) {
|
|||
hideInputNumber = false,
|
||||
onChangeImg
|
||||
} = props
|
||||
console.log('SpSkuSelect:info', info)
|
||||
// console.log('SpSkuSelect:info', info)
|
||||
// const [state, setState] = useImmer(initialState)
|
||||
const [state, setState] = useAsyncCallback(initialState)
|
||||
const { selection, curImage, disabledSet, curItem, skuText, num, loading } = state
|
||||
|
|
@ -84,7 +84,7 @@ function SpSkuSelect (props, ref) {
|
|||
const makeReg = (sel, row, val) => {
|
||||
const tSel = sel.slice()
|
||||
const regStr = tSel.map((s, idx) => (row === idx ? val : !s ? '(\\d+)' : s)).join('_')
|
||||
console.log('regStr:', regStr)
|
||||
// console.log('regStr:', regStr)
|
||||
return new RegExp(regStr)
|
||||
}
|
||||
|
||||
|
|
@ -114,12 +114,12 @@ function SpSkuSelect (props, ref) {
|
|||
// disabledSet
|
||||
// )
|
||||
|
||||
const curItem = skuDictRef.current[selection.join('_')]
|
||||
const curItem = skuDictRef.current[selection.join('_')] || skuDictRef.current[Object.keys(skuDictRef.current)[0]]
|
||||
// const skuText = curItem
|
||||
// ? `已选:${curItem.specItem.map((item) => `${item.skuName}:${item.specName}`).join(',')}`
|
||||
// : '请选择规格'
|
||||
const skuText = curItem
|
||||
? `已选择 ${curItem.specItem.map((item, index) => `${index === 1 ? item.specName.substr(0, 2) : item.specName}`).join(' ')}码`
|
||||
? `已选择 ${curItem.specItem.map((item, index) => `${index === 1 ? item.specName.substr(0, 2) : item.specName}`).join(' ')}码`
|
||||
: '请选择规格'
|
||||
|
||||
setState((draft) => {
|
||||
|
|
@ -137,7 +137,7 @@ function SpSkuSelect (props, ref) {
|
|||
// console.log('disabledSet:', disabledSet)
|
||||
|
||||
const handleSelectSku = ({ specId }, idx) => {
|
||||
console.log("🚀 ~ { specId }, idx:", specId, idx)
|
||||
// console.log("🚀 ~ { specId }, idx:", specId, idx)
|
||||
if (disabledSet.has(specId)) return
|
||||
setState(
|
||||
(draft) => {
|
||||
|
|
@ -412,7 +412,7 @@ function SpSkuSelect (props, ref) {
|
|||
</View>
|
||||
))}
|
||||
{!hideInputNumber && renderLimitTip()}
|
||||
<View className="select">{skuText}</View>
|
||||
<View className="select">{skuText.split(' ').map((item, index) => <Text key={`sku-text__${index}`} style={{ marginRight: '14px' }}>{item}</Text>)}</View>
|
||||
</View>
|
||||
{/* </SpFloatLayout> */}
|
||||
</View>
|
||||
|
|
@ -423,4 +423,4 @@ SpSkuSelect.options = {
|
|||
addGlobalClass: true
|
||||
}
|
||||
|
||||
export default React.forwardRef(SpSkuSelect)
|
||||
export default React.memo(React.forwardRef(SpSkuSelect))
|
||||
|
|
|
|||
|
|
@ -47,10 +47,10 @@
|
|||
// margin-top: 30px;
|
||||
// margin-bottom: 100px;
|
||||
.select {
|
||||
position: absolute;
|
||||
// position: absolute;
|
||||
top: 156px;
|
||||
right: 50px;
|
||||
font-size: 22px;
|
||||
font-size: 24px;
|
||||
}
|
||||
}
|
||||
.sku-group {
|
||||
|
|
|
|||
|
|
@ -97,7 +97,7 @@ const CompSeries = (props) => {
|
|||
|
||||
const currentTopImg = info[activeIndex].img || '' //当前分类顶部图片
|
||||
const currentChildren = info[activeIndex].children || [] // 子类
|
||||
const currentID = info[activeIndex].id || ''
|
||||
const currentID = info[activeIndex].id || info[activeIndex].category_id || ''
|
||||
return (
|
||||
<View className='comp-series'>
|
||||
{/* left */}
|
||||
|
|
@ -146,9 +146,13 @@ const CompSeries = (props) => {
|
|||
)}
|
||||
<View className='comp-series__content_box'>
|
||||
{!showChild ? currentChildren.map((item, index) => {
|
||||
return (<View className='group' key={index} onClick={() => {
|
||||
setShowChild(true)
|
||||
setSelChild(item)
|
||||
return (index === 0 || currentID === '18' ? <View className='group' key={index} onClick={() => {
|
||||
if (item.children?.length) {
|
||||
setShowChild(true)
|
||||
setSelChild(item)
|
||||
} else {
|
||||
handleClickItem(item)
|
||||
}
|
||||
}}>
|
||||
<View className='group-title'>{item.name}
|
||||
<Text className='iconfont icon-qianwang-01' style={{ fontSize: 'inherit', marginLeft: '4px' }}></Text>
|
||||
|
|
@ -159,6 +163,18 @@ const CompSeries = (props) => {
|
|||
height={350}
|
||||
src={item.img}
|
||||
/>
|
||||
</View> : <View
|
||||
className='category-content__img'
|
||||
key={item.category_id}
|
||||
onClick={() => handleClickItem(item)}
|
||||
>
|
||||
<SpImage
|
||||
className={classNames(imgType ? 'cat-img' : 'cat-img-no')}
|
||||
mode='aspectFill'
|
||||
src={item.img}
|
||||
/>
|
||||
<View className='img-cat-name'>{item.name}</View>
|
||||
<Text className='iconfont icon-qianwang-01' style={{ fontSize: 'inherit', marginLeft: '4px' }}></Text>
|
||||
</View>)
|
||||
// return item.children ? (
|
||||
// // <View className='new' key={index}>
|
||||
|
|
|
|||
|
|
@ -42,14 +42,14 @@ function CompGoodsBuyToolbar (props) {
|
|||
btns.push(BUY_TOOL_BTNS.ONLY_SHOW)
|
||||
return
|
||||
}
|
||||
if (info.store == 0) {
|
||||
if (info.subscribe) {
|
||||
btns.push(BUY_TOOL_BTNS.SUBSCRIBE)
|
||||
} else {
|
||||
btns.push(BUY_TOOL_BTNS.NOTICE)
|
||||
}
|
||||
return
|
||||
}
|
||||
// if (info.store == 0) {
|
||||
// if (info.subscribe) {
|
||||
// btns.push(BUY_TOOL_BTNS.SUBSCRIBE)
|
||||
// } else {
|
||||
// btns.push(BUY_TOOL_BTNS.NOTICE)
|
||||
// }
|
||||
// return
|
||||
// }
|
||||
|
||||
if (info.isGift) {
|
||||
btns.push(BUY_TOOL_BTNS.GIFT)
|
||||
|
|
@ -81,12 +81,11 @@ function CompGoodsBuyToolbar (props) {
|
|||
return
|
||||
}
|
||||
|
||||
btns.push(BUY_TOOL_BTNS.ADD_CART)
|
||||
btns.push(BUY_TOOL_BTNS.FAST_BUY)
|
||||
btns.push({ ...BUY_TOOL_BTNS.ADD_CART, btnStatus: info.store == 0 ? 'disabled' : 'default' })
|
||||
btns.push({ ...BUY_TOOL_BTNS.FAST_BUY, btnStatus: info.store == 0 ? 'disabled' : 'active' })
|
||||
}
|
||||
|
||||
RenderBtns()
|
||||
// console.log('btns:', btns)
|
||||
|
||||
const onChangeLogin = async ({ key }) => {
|
||||
const { dtid, card_id, user_card_id } = $instance.router.params
|
||||
|
|
|
|||
|
|
@ -101,7 +101,7 @@
|
|||
/* prettier-ignore */
|
||||
border: 1PX solid #E5E5E5;
|
||||
background: #e5e5e5;
|
||||
color: #8d8d8d;
|
||||
color: #8d8d8d !important;
|
||||
}
|
||||
&.sp-login {
|
||||
margin-left: 0;
|
||||
|
|
|
|||
|
|
@ -102,7 +102,8 @@ const initialState = {
|
|||
selSkuImg: '',
|
||||
swiperList: [],
|
||||
selColorIdx: 0,
|
||||
introList: []
|
||||
introList: [],
|
||||
scrollTop: 0
|
||||
}
|
||||
|
||||
function EspierDetail (props) {
|
||||
|
|
@ -148,7 +149,8 @@ function EspierDetail (props) {
|
|||
selSkuImg,
|
||||
swiperList,
|
||||
selColorIdx,
|
||||
introList
|
||||
introList,
|
||||
scrollTop
|
||||
} = state
|
||||
|
||||
useEffect(() => {
|
||||
|
|
@ -455,10 +457,9 @@ function EspierDetail (props) {
|
|||
{/* <Canvas id="canvas2" type="2d" onReady={onCanvasReady} /> */}
|
||||
{!info && <SpLoading />}
|
||||
{info && (
|
||||
<ScrollView scrollY scrollWithAnimation showScrollbar={false} scrollTop={0} className='goods-contents' onScroll={(e) => {
|
||||
// console.log('e', e.detail)
|
||||
<ScrollView scrollY scrollWithAnimation showScrollbar={false} scrollTop={scrollTop} className='goods-contents' onScroll={(e) => {
|
||||
const { scrollTop } = e.detail
|
||||
if (scrollTop >= 640) {
|
||||
if (scrollTop >= 600) {
|
||||
setState((draft) => {
|
||||
draft.isShowScroll = true
|
||||
})
|
||||
|
|
@ -731,18 +732,18 @@ function EspierDetail (props) {
|
|||
}}
|
||||
onChange={(skuText, curItem, idx) => {
|
||||
console.log("🚀 ~ curItem:", curItem, idx)
|
||||
setState((draft) => {
|
||||
curItem && setState((draft) => {
|
||||
draft.skuText = skuText
|
||||
draft.curItem = curItem
|
||||
// 不切换顶部轮播图
|
||||
draft.swiperList = curItem?.specItem?.[idx]?.specImgs
|
||||
draft.selSkuImg = curItem.specItem?.[0]?.specImgs?.[0]
|
||||
if (idx === 0) draft.swiperList = curItem?.specItem?.[idx]?.specImgs
|
||||
})
|
||||
}}
|
||||
/>
|
||||
|
||||
<View className='goods-desc'>
|
||||
<View className='desc-hd'>
|
||||
{/* <View className='desc-hd'>
|
||||
<SpImage
|
||||
className='sku-image'
|
||||
src={selSkuImg || info?.specItem?.[0]?.specImgs?.[0]}
|
||||
|
|
@ -754,7 +755,7 @@ function EspierDetail (props) {
|
|||
<Text className='desc-title-txt'>{info?.itemName}</Text>
|
||||
<SpGoodsPrice info={curItem ? curItem : info} />
|
||||
</View>
|
||||
</View>
|
||||
</View> */}
|
||||
{isArray(info.intro) ? (
|
||||
<View>
|
||||
{info.intro.map((item, idx) => (
|
||||
|
|
@ -785,6 +786,11 @@ function EspierDetail (props) {
|
|||
})
|
||||
draft.introList[index].isOpen = !item.isOpen
|
||||
})
|
||||
if (!item.isOpen) {
|
||||
setState((draft) => {
|
||||
draft.scrollTop = 610 + Math.random()
|
||||
})
|
||||
}
|
||||
}}
|
||||
title={item.title}
|
||||
>
|
||||
|
|
@ -798,6 +804,11 @@ function EspierDetail (props) {
|
|||
})
|
||||
draft.introList[index].isOpen = !item.isOpen
|
||||
})
|
||||
if (!item.isOpen) {
|
||||
setState((draft) => {
|
||||
draft.scrollTop = 610 + Math.random()
|
||||
})
|
||||
}
|
||||
}}>
|
||||
{item.isOpen ? <AtIcon value='subtract' size='16' color='#000' /> :
|
||||
<AtIcon value='add' size='16' color='#000' />}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import React, { Component } from 'react'
|
||||
import Taro, { getCurrentInstance } from '@tarojs/taro'
|
||||
import { View, Text, ScrollView, Picker } from '@tarojs/components'
|
||||
import { View, Text, ScrollView, Picker, Video } from '@tarojs/components'
|
||||
import { SpAddress } from '@/components'
|
||||
import { withPager, withBackToTop } from '@/hocs'
|
||||
import { connect } from 'react-redux'
|
||||
|
|
@ -13,10 +13,11 @@ import {
|
|||
SpNote,
|
||||
FilterBar,
|
||||
SpTabbar,
|
||||
SpPage
|
||||
SpPage,
|
||||
SpImage
|
||||
} from '@/components'
|
||||
import api from '@/api'
|
||||
import { classNames, pickBy } from '@/utils'
|
||||
import { classNames, pickBy, isWeixin } from '@/utils'
|
||||
import S from '@/spx'
|
||||
|
||||
import './list.scss'
|
||||
|
|
@ -24,7 +25,7 @@ import './list.scss'
|
|||
@connect(({ colors }) => ({
|
||||
colors: colors.current
|
||||
}))
|
||||
@withPager
|
||||
// @withPager
|
||||
@withBackToTop
|
||||
export default class RecommendList extends Component {
|
||||
$instance = getCurrentInstance()
|
||||
|
|
@ -45,6 +46,10 @@ export default class RecommendList extends Component {
|
|||
isShowSearch: false,
|
||||
shareInfo: {},
|
||||
isSpAddressOpened: false,
|
||||
play: false,
|
||||
page: {
|
||||
isLoading: true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -68,14 +73,19 @@ export default class RecommendList extends Component {
|
|||
}
|
||||
})
|
||||
}
|
||||
Taro.showLoading({ title: '' })
|
||||
this.resetPage()
|
||||
this.setState({
|
||||
list: []
|
||||
})
|
||||
// Taro.showLoading({ title: '' })
|
||||
// this.resetPage()
|
||||
// this.setState({
|
||||
// list: []
|
||||
// })
|
||||
setTimeout(() => {
|
||||
this.nextPage()
|
||||
Taro.hideLoading()
|
||||
// this.nextPage()
|
||||
// Taro.hideLoading()
|
||||
this.setState({
|
||||
page: {
|
||||
isLoading: false
|
||||
}
|
||||
})
|
||||
}, 200)
|
||||
|
||||
// this.praiseNum()
|
||||
|
|
@ -529,6 +539,30 @@ export default class RecommendList extends Component {
|
|||
})
|
||||
}
|
||||
|
||||
handleVideoClick = (play) => {
|
||||
let video
|
||||
if (isWeixin) {
|
||||
video = Taro.createVideoContext('recommend-video')
|
||||
} else if (isWeb) {
|
||||
video = document.getElementById('recommend-video')
|
||||
}
|
||||
|
||||
if (!video) {
|
||||
return
|
||||
}
|
||||
|
||||
if (play) {
|
||||
setTimeout(() => {
|
||||
video.play()
|
||||
}, 200)
|
||||
} else {
|
||||
isWeixin ? video.stop() : video.pause()
|
||||
}
|
||||
this.setState({
|
||||
play
|
||||
})
|
||||
}
|
||||
|
||||
render () {
|
||||
const {
|
||||
list,
|
||||
|
|
@ -543,36 +577,38 @@ export default class RecommendList extends Component {
|
|||
areaList,
|
||||
query,
|
||||
isShowSearch,
|
||||
isSpAddressOpened
|
||||
isSpAddressOpened,
|
||||
play
|
||||
} = this.state
|
||||
const { colors } = this.props
|
||||
let address = info.province + info.city
|
||||
|
||||
return (
|
||||
<SpPage renderFooter={<SpTabbar />} className='has-nav' title="鞋床故事">
|
||||
<SpPage renderFooter={<SpTabbar />} className='has-nav' title="" isBlack>
|
||||
<View className='page-recommend-list'>
|
||||
<View className='recommend-list__toolbar'>
|
||||
<View
|
||||
className={`recommend-list__search ${query && query.title && isShowSearch ? 'on-search' : null
|
||||
}`}
|
||||
>
|
||||
<SearchBar
|
||||
showDailog={false}
|
||||
keyword={query ? query.title : ''}
|
||||
onFocus={this.handleSearchOn}
|
||||
onChange={this.handleSearchChange}
|
||||
onClear={this.handleSearchClear}
|
||||
onCancel={this.handleSearchOff}
|
||||
onConfirm={this.handleConfirm.bind(this)}
|
||||
/>
|
||||
</View>
|
||||
<FilterBar className='recommend-list__tabs'>
|
||||
<View className='filter-bar__item' onClick={this.handleClickFilter.bind(this)}>
|
||||
<View className='iconfont icon-menu'></View>
|
||||
<Text>{selectColumn.name || '栏目'}</Text>
|
||||
{false && <>
|
||||
<View className='recommend-list__toolbar'>
|
||||
<View
|
||||
className={`recommend-list__search ${query && query.title && isShowSearch ? 'on-search' : null
|
||||
}`}
|
||||
>
|
||||
<SearchBar
|
||||
showDailog={false}
|
||||
keyword={query ? query.title : ''}
|
||||
onFocus={this.handleSearchOn}
|
||||
onChange={this.handleSearchChange}
|
||||
onClear={this.handleSearchClear}
|
||||
onCancel={this.handleSearchOff}
|
||||
onConfirm={this.handleConfirm.bind(this)}
|
||||
/>
|
||||
</View>
|
||||
<View className='filter-bar__item region-picker'>
|
||||
{/* <Picker
|
||||
<FilterBar className='recommend-list__tabs'>
|
||||
<View className='filter-bar__item' onClick={this.handleClickFilter.bind(this)}>
|
||||
<View className='iconfont icon-menu'></View>
|
||||
<Text>{selectColumn.name || '栏目'}</Text>
|
||||
</View>
|
||||
<View className='filter-bar__item region-picker'>
|
||||
{/* <Picker
|
||||
mode='multiSelector'
|
||||
onClick={this.handleClickPicker}
|
||||
onChange={this.bindMultiPickerChange}
|
||||
|
|
@ -585,104 +621,160 @@ export default class RecommendList extends Component {
|
|||
<Text>{address || '地区'}</Text>
|
||||
</View>
|
||||
</Picker> */}
|
||||
<View onClick={this.handleClickOpenSpAddress.bind(this)}>
|
||||
<View className='iconfont icon-periscope'></View>
|
||||
<Text>{address || '地区'}</Text>
|
||||
</View>
|
||||
<SpAddress isOpened={isSpAddressOpened} onClose={this.handleClickCloseSpAddress} onChange={this.onPickerChange} />
|
||||
<View onClick={this.handleClickOpenSpAddress.bind(this)}>
|
||||
<View className='iconfont icon-periscope'></View>
|
||||
<Text>{address || '地区'}</Text>
|
||||
</View>
|
||||
<SpAddress isOpened={isSpAddressOpened} onClose={this.handleClickCloseSpAddress} onChange={this.onPickerChange} />
|
||||
|
||||
{address ? (
|
||||
<View
|
||||
className='zoom-btn icon-close iconfont'
|
||||
onClick={this.handleRegionRefresh.bind(this)}
|
||||
></View>
|
||||
// <Text className='icon-close' onClick={this.handleRegionRefresh.bind(this)}>x</Text>
|
||||
) : (
|
||||
''
|
||||
)}
|
||||
</View>
|
||||
</FilterBar>
|
||||
</View>
|
||||
<AtDrawer
|
||||
show={showDrawer}
|
||||
right
|
||||
mask
|
||||
width={`${Taro.pxTransform(570)}`}
|
||||
onClose={this.handleClose}
|
||||
>
|
||||
<View className='drawer-item'>
|
||||
<View className='drawer-item__options'>
|
||||
{columnList.map((item, index) => {
|
||||
return (
|
||||
{address ? (
|
||||
<View
|
||||
className={classNames(
|
||||
'drawer-item__options__item',
|
||||
item.isChooseColumn ? 'drawer-item__options__checked' : ''
|
||||
)}
|
||||
// className='drawer-item__options__item'
|
||||
style={
|
||||
item.isChooseColumn
|
||||
? {
|
||||
background: (colors && colors.data && colors.data[0].primary) || null
|
||||
}
|
||||
: {}
|
||||
}
|
||||
key={`${index}1`}
|
||||
onClick={this.handleClickParmas.bind(this, item.id)}
|
||||
>
|
||||
{item.name}
|
||||
className='zoom-btn icon-close iconfont'
|
||||
onClick={this.handleRegionRefresh.bind(this)}
|
||||
></View>
|
||||
// <Text className='icon-close' onClick={this.handleRegionRefresh.bind(this)}>x</Text>
|
||||
) : (
|
||||
''
|
||||
)}
|
||||
</View>
|
||||
</FilterBar>
|
||||
</View>
|
||||
<AtDrawer
|
||||
show={showDrawer}
|
||||
right
|
||||
mask
|
||||
width={`${Taro.pxTransform(570)}`}
|
||||
onClose={this.handleClose}
|
||||
>
|
||||
<View className='drawer-item'>
|
||||
<View className='drawer-item__options'>
|
||||
{columnList.map((item, index) => {
|
||||
return (
|
||||
<View
|
||||
className={classNames(
|
||||
'drawer-item__options__item',
|
||||
item.isChooseColumn ? 'drawer-item__options__checked' : ''
|
||||
)}
|
||||
// className='drawer-item__options__item'
|
||||
style={
|
||||
item.isChooseColumn
|
||||
? {
|
||||
background: (colors && colors.data && colors.data[0].primary) || null
|
||||
}
|
||||
: {}
|
||||
}
|
||||
key={`${index}1`}
|
||||
onClick={this.handleClickParmas.bind(this, item.id)}
|
||||
>
|
||||
{item.name}
|
||||
</View>
|
||||
)
|
||||
})}
|
||||
<View className='drawer-item__options__none'> </View>
|
||||
<View className='drawer-item__options__none'> </View>
|
||||
<View className='drawer-item__options__none'> </View>
|
||||
</View>
|
||||
</View>
|
||||
<View className='drawer-footer'>
|
||||
<Text
|
||||
className='drawer-footer__btn'
|
||||
onClick={this.handleClickSearchParams.bind(this, 'reset')}
|
||||
>
|
||||
重置
|
||||
</Text>
|
||||
<Text
|
||||
className='drawer-footer__btn drawer-footer__btn_active'
|
||||
style={{ background: (colors && colors.data && colors.data[0].primary) || null }}
|
||||
onClick={this.handleClickSearchParams.bind(this, 'submit')}
|
||||
>
|
||||
确定
|
||||
</Text>
|
||||
</View>
|
||||
</AtDrawer>
|
||||
|
||||
<ScrollView
|
||||
className='recommend-list__scroll'
|
||||
scrollY
|
||||
scrollTop={scrollTop}
|
||||
scrollWithAnimation
|
||||
onScroll={this.handleScroll}
|
||||
onScrollToLower={this.nextPage}
|
||||
>
|
||||
<View className='recommend-list recommend-list__type-grid'>
|
||||
{list.map((item) => {
|
||||
return (
|
||||
<View className='recommend-list__item'>
|
||||
<RecommendItem
|
||||
key={item.item_id}
|
||||
info={item}
|
||||
onClick={() => this.handleClickItem(item)}
|
||||
/>
|
||||
</View>
|
||||
)
|
||||
})}
|
||||
<View className='drawer-item__options__none'> </View>
|
||||
<View className='drawer-item__options__none'> </View>
|
||||
<View className='drawer-item__options__none'> </View>
|
||||
</View>
|
||||
{page.isLoading ? <Loading>正在加载...</Loading> : null}
|
||||
{!page.isLoading && !page.hasNext && !list.length && (
|
||||
<SpNote img='trades_empty.png'>暂无数据~</SpNote>
|
||||
)}
|
||||
</ScrollView>
|
||||
</>}
|
||||
{page.isLoading ? <Loading></Loading> :
|
||||
<View className="recommend-content">
|
||||
<Video
|
||||
id="recommend-video"
|
||||
src={`${process.env.APP_IMAGE_CDN_NEW}/recommend/162S.mp4`}
|
||||
poster={`${process.env.APP_IMAGE_CDN_NEW}/recommend/02.jpg`}
|
||||
initialTime={0}
|
||||
controls={play}
|
||||
autoplay={false}
|
||||
loop={false}
|
||||
// muted={true}
|
||||
showProgress={true}
|
||||
showFullscreenBtn={true}
|
||||
showPlayBtn={true}
|
||||
showCenterPlayBtn={false}
|
||||
enableProgressGesture={true}
|
||||
showMuteBtn
|
||||
objectFit="cover"
|
||||
style={{ width: "100%", height: "400rpx", marginTop: "20rpx" }}
|
||||
onPlay={() => {
|
||||
|
||||
}}
|
||||
onEnded={() => {
|
||||
|
||||
}}
|
||||
onClick={() => {
|
||||
!play && this.handleVideoClick(true)
|
||||
}}
|
||||
/>
|
||||
{/* <View className="top-txt">
|
||||
<View className="top-txt-title">BIRKENSTOCK产品的核心和灵魂</View>
|
||||
<View className="top-txt-dec">
|
||||
<View className="top-txt-dec-item">标志性的鞋床是每一双BIRKENSTOCK的核心和灵魂。</View>
|
||||
<View className="top-txt-dec-item"> 其精美的解剖学设计是Birkenstock家族世代相传的知识结晶。</View>
|
||||
<View className="top-txt-dec-item">它的发明源于一个朴素但难以实现的愿望:让人们能够自然地行走。</View>
|
||||
<View className="top-txt-dec-item">为了实现这个功能,</View>
|
||||
<View className="top-txt-dec-item">鞋床的轮廓被精确设计以用于从解剖学上符合支撑人类脚部的功效,</View>
|
||||
<View className="top-txt-dec-item">仿佛在沙滩上的脚印。</View>
|
||||
<View className="top-txt-dec-item">它的分层结构采用独特且天然的材料组合,</View>
|
||||
<View className="top-txt-dec-item">经过一系列专门的制造工艺加工,确保产品拥有最大程度上的耐用性和灵活性,</View>
|
||||
<View className="top-txt-dec-item">这也意味着BIRKENSTOCK鞋床的功能是无可匹敌的。</View>
|
||||
</View>
|
||||
<View className="line"></View>
|
||||
</View> */}
|
||||
<View className="content-item">
|
||||
<SpImage height={400} width={750} src='recommend/02.jpg' isShowMenuByLongpress={false} lazyLoad isNew />
|
||||
<SpImage height={400} width={750} src='recommend/03.jpg' isShowMenuByLongpress={false} lazyLoad isNew />
|
||||
<SpImage height={400} width={750} src='recommend/04.jpg' isShowMenuByLongpress={false} lazyLoad isNew />
|
||||
<SpImage height={400} width={750} src='recommend/05.jpg' isShowMenuByLongpress={false} lazyLoad isNew />
|
||||
<SpImage height={400} width={750} src='recommend/06.jpg' isShowMenuByLongpress={false} lazyLoad isNew />
|
||||
<SpImage height={400} width={750} src='recommend/07.jpg' isShowMenuByLongpress={false} lazyLoad isNew />
|
||||
<SpImage height={400} width={750} src='recommend/08.jpg' isShowMenuByLongpress={false} lazyLoad isNew />
|
||||
<SpImage height={400} width={750} src='recommend/09.jpg' isShowMenuByLongpress={false} lazyLoad isNew />
|
||||
</View>
|
||||
</View>
|
||||
<View className='drawer-footer'>
|
||||
<Text
|
||||
className='drawer-footer__btn'
|
||||
onClick={this.handleClickSearchParams.bind(this, 'reset')}
|
||||
>
|
||||
重置
|
||||
</Text>
|
||||
<Text
|
||||
className='drawer-footer__btn drawer-footer__btn_active'
|
||||
style={{ background: (colors && colors.data && colors.data[0].primary) || null }}
|
||||
onClick={this.handleClickSearchParams.bind(this, 'submit')}
|
||||
>
|
||||
确定
|
||||
</Text>
|
||||
</View>
|
||||
</AtDrawer>
|
||||
|
||||
<ScrollView
|
||||
className='recommend-list__scroll'
|
||||
scrollY
|
||||
scrollTop={scrollTop}
|
||||
scrollWithAnimation
|
||||
onScroll={this.handleScroll}
|
||||
onScrollToLower={this.nextPage}
|
||||
>
|
||||
<View className='recommend-list recommend-list__type-grid'>
|
||||
{list.map((item) => {
|
||||
return (
|
||||
<View className='recommend-list__item'>
|
||||
<RecommendItem
|
||||
key={item.item_id}
|
||||
info={item}
|
||||
onClick={() => this.handleClickItem(item)}
|
||||
/>
|
||||
</View>
|
||||
)
|
||||
})}
|
||||
</View>
|
||||
{page.isLoading ? <Loading>正在加载...</Loading> : null}
|
||||
{!page.isLoading && !page.hasNext && !list.length && (
|
||||
<SpNote img='trades_empty.png'>暂无数据~</SpNote>
|
||||
)}
|
||||
</ScrollView>
|
||||
|
||||
}
|
||||
<BackToTop show={showBackToTop} onClick={this.scrollBackToTop} />
|
||||
|
||||
</View>
|
||||
|
|
|
|||
|
|
@ -3,6 +3,41 @@
|
|||
margin-top: 60px;
|
||||
}
|
||||
.page-recommend-list {
|
||||
.recommend-content {
|
||||
width: 100%;
|
||||
.top-txt {
|
||||
margin-top: 46px;
|
||||
margin-bottom: 40px;
|
||||
&-title {
|
||||
text-align: center;
|
||||
font-size: 30px;
|
||||
margin-bottom: 24px;
|
||||
font-weight: bold;
|
||||
}
|
||||
&-dec {
|
||||
white-space: pre-wrap;
|
||||
word-wrap: break-word;
|
||||
text-align: center;
|
||||
margin-bottom: 30px;
|
||||
&-item {
|
||||
text-align: center;
|
||||
font-size: 20px;
|
||||
line-height: 1.5;
|
||||
margin: 0 auto;
|
||||
}
|
||||
}
|
||||
.line {
|
||||
margin: 0 auto;
|
||||
width: 50px;
|
||||
height: 6px;
|
||||
background: #000;
|
||||
border-radius: 4px;
|
||||
}
|
||||
}
|
||||
.content-item {
|
||||
margin-bottom: 50px;
|
||||
}
|
||||
}
|
||||
/* #ifdef alipay */
|
||||
.filter-bar {
|
||||
position: absolute;
|
||||
|
|
|
|||
|
|
@ -152,10 +152,11 @@ function CouponCenter (props) {
|
|||
|
||||
const getPoint = async () => {
|
||||
await api.member.depositToPoint({ money: 10000 })
|
||||
showToast('积分+500')
|
||||
showToast('积分+100')
|
||||
setState((draft) => {
|
||||
draft.couponList = []
|
||||
})
|
||||
getMypoint()
|
||||
listRef.current?.reset()
|
||||
}
|
||||
return (
|
||||
|
|
|
|||
|
|
@ -27,6 +27,7 @@ const initialState = {
|
|||
listLength: 0,
|
||||
nList: [],
|
||||
listLength: 0,
|
||||
loading: true
|
||||
}
|
||||
|
||||
function MemberUserInfo () {
|
||||
|
|
@ -44,6 +45,7 @@ function MemberUserInfo () {
|
|||
areaList,
|
||||
multiIndex,
|
||||
nList,
|
||||
loading
|
||||
} = state
|
||||
const { userInfo = {} } = useSelector((_state) => _state.user)
|
||||
const pageRef = useRef()
|
||||
|
|
@ -180,6 +182,7 @@ function MemberUserInfo () {
|
|||
draft.formUserInfo = _formUserInfo
|
||||
draft.areaList = [arrProvice, arrCity, arrCounty]
|
||||
draft.multiIndex = _multiIndex
|
||||
draft.loading = false
|
||||
})
|
||||
}
|
||||
|
||||
|
|
@ -520,7 +523,7 @@ function MemberUserInfo () {
|
|||
if (isWeixin) {
|
||||
return (
|
||||
<Button class='avatar-wrapper' open-type='chooseAvatar' onChooseAvatar={onChooseAvatar}>
|
||||
<SpImage src={'cart/logo-hui.png'} width={110} height={110} circle isNew />
|
||||
{formUserInfo.avatar ? <SpImage src={formUserInfo.avatar} width={110} height={110} circle /> : <SpImage src={'cart/logo-hui.png'} width={110} height={110} circle isNew />}
|
||||
</Button>
|
||||
)
|
||||
} else {
|
||||
|
|
@ -540,6 +543,7 @@ function MemberUserInfo () {
|
|||
保存
|
||||
</AtButton>
|
||||
}
|
||||
loading={loading}
|
||||
>
|
||||
<View className='block-container'>
|
||||
{/* <SpCell title='头像' isLink border value={renderAvatar()}></SpCell> */}
|
||||
|
|
|
|||
Loading…
Reference in New Issue