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} />
|
!isPoint && <SpPrice size={36} className='sale-price' value={price} />
|
||||||
}
|
}
|
||||||
{marketPrice > 0 && enMarketPrice && (
|
{/* {marketPrice > 0 && enMarketPrice && (
|
||||||
<SpPrice className='mkt-price' lineThrough value={marketPrice} />
|
<SpPrice className='mkt-price' lineThrough value={marketPrice} />
|
||||||
)}
|
)} */}
|
||||||
</View>
|
</View>
|
||||||
<View>
|
<View>
|
||||||
{info.memberPrice < info.price && enMemberPrice && (
|
{info.memberPrice < info.price && enMemberPrice && (
|
||||||
|
|
|
||||||
|
|
@ -131,7 +131,7 @@ function SpPage (props, ref) {
|
||||||
draft.pageTitle = pageTitle
|
draft.pageTitle = pageTitle
|
||||||
draft.isTabBarPage = isTabBarPage
|
draft.isTabBarPage = isTabBarPage
|
||||||
draft.showLeftContainer = !['/subpages/guide/index', '/pages/index'].includes(`/${page?.route}`)
|
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.showCustomNavigation = true
|
||||||
draft.showNavCartIcon = ['/subpages/marketing/coupon-center', '/subpages/marketing/coupon', '/pages/item/list'].includes(`/${page?.route}`)
|
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,
|
hideInputNumber = false,
|
||||||
onChangeImg
|
onChangeImg
|
||||||
} = props
|
} = props
|
||||||
console.log('SpSkuSelect:info', info)
|
// console.log('SpSkuSelect:info', info)
|
||||||
// const [state, setState] = useImmer(initialState)
|
// const [state, setState] = useImmer(initialState)
|
||||||
const [state, setState] = useAsyncCallback(initialState)
|
const [state, setState] = useAsyncCallback(initialState)
|
||||||
const { selection, curImage, disabledSet, curItem, skuText, num, loading } = state
|
const { selection, curImage, disabledSet, curItem, skuText, num, loading } = state
|
||||||
|
|
@ -84,7 +84,7 @@ function SpSkuSelect (props, ref) {
|
||||||
const makeReg = (sel, row, val) => {
|
const makeReg = (sel, row, val) => {
|
||||||
const tSel = sel.slice()
|
const tSel = sel.slice()
|
||||||
const regStr = tSel.map((s, idx) => (row === idx ? val : !s ? '(\\d+)' : s)).join('_')
|
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)
|
return new RegExp(regStr)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -114,12 +114,12 @@ function SpSkuSelect (props, ref) {
|
||||||
// disabledSet
|
// disabledSet
|
||||||
// )
|
// )
|
||||||
|
|
||||||
const curItem = skuDictRef.current[selection.join('_')]
|
const curItem = skuDictRef.current[selection.join('_')] || skuDictRef.current[Object.keys(skuDictRef.current)[0]]
|
||||||
// const skuText = curItem
|
// const skuText = curItem
|
||||||
// ? `已选:${curItem.specItem.map((item) => `${item.skuName}:${item.specName}`).join(',')}`
|
// ? `已选:${curItem.specItem.map((item) => `${item.skuName}:${item.specName}`).join(',')}`
|
||||||
// : '请选择规格'
|
// : '请选择规格'
|
||||||
const skuText = curItem
|
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) => {
|
setState((draft) => {
|
||||||
|
|
@ -137,7 +137,7 @@ function SpSkuSelect (props, ref) {
|
||||||
// console.log('disabledSet:', disabledSet)
|
// console.log('disabledSet:', disabledSet)
|
||||||
|
|
||||||
const handleSelectSku = ({ specId }, idx) => {
|
const handleSelectSku = ({ specId }, idx) => {
|
||||||
console.log("🚀 ~ { specId }, idx:", specId, idx)
|
// console.log("🚀 ~ { specId }, idx:", specId, idx)
|
||||||
if (disabledSet.has(specId)) return
|
if (disabledSet.has(specId)) return
|
||||||
setState(
|
setState(
|
||||||
(draft) => {
|
(draft) => {
|
||||||
|
|
@ -412,7 +412,7 @@ function SpSkuSelect (props, ref) {
|
||||||
</View>
|
</View>
|
||||||
))}
|
))}
|
||||||
{!hideInputNumber && renderLimitTip()}
|
{!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>
|
</View>
|
||||||
{/* </SpFloatLayout> */}
|
{/* </SpFloatLayout> */}
|
||||||
</View>
|
</View>
|
||||||
|
|
@ -423,4 +423,4 @@ SpSkuSelect.options = {
|
||||||
addGlobalClass: true
|
addGlobalClass: true
|
||||||
}
|
}
|
||||||
|
|
||||||
export default React.forwardRef(SpSkuSelect)
|
export default React.memo(React.forwardRef(SpSkuSelect))
|
||||||
|
|
|
||||||
|
|
@ -47,10 +47,10 @@
|
||||||
// margin-top: 30px;
|
// margin-top: 30px;
|
||||||
// margin-bottom: 100px;
|
// margin-bottom: 100px;
|
||||||
.select {
|
.select {
|
||||||
position: absolute;
|
// position: absolute;
|
||||||
top: 156px;
|
top: 156px;
|
||||||
right: 50px;
|
right: 50px;
|
||||||
font-size: 22px;
|
font-size: 24px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.sku-group {
|
.sku-group {
|
||||||
|
|
|
||||||
|
|
@ -97,7 +97,7 @@ const CompSeries = (props) => {
|
||||||
|
|
||||||
const currentTopImg = info[activeIndex].img || '' //当前分类顶部图片
|
const currentTopImg = info[activeIndex].img || '' //当前分类顶部图片
|
||||||
const currentChildren = info[activeIndex].children || [] // 子类
|
const currentChildren = info[activeIndex].children || [] // 子类
|
||||||
const currentID = info[activeIndex].id || ''
|
const currentID = info[activeIndex].id || info[activeIndex].category_id || ''
|
||||||
return (
|
return (
|
||||||
<View className='comp-series'>
|
<View className='comp-series'>
|
||||||
{/* left */}
|
{/* left */}
|
||||||
|
|
@ -146,9 +146,13 @@ const CompSeries = (props) => {
|
||||||
)}
|
)}
|
||||||
<View className='comp-series__content_box'>
|
<View className='comp-series__content_box'>
|
||||||
{!showChild ? currentChildren.map((item, index) => {
|
{!showChild ? currentChildren.map((item, index) => {
|
||||||
return (<View className='group' key={index} onClick={() => {
|
return (index === 0 || currentID === '18' ? <View className='group' key={index} onClick={() => {
|
||||||
setShowChild(true)
|
if (item.children?.length) {
|
||||||
setSelChild(item)
|
setShowChild(true)
|
||||||
|
setSelChild(item)
|
||||||
|
} else {
|
||||||
|
handleClickItem(item)
|
||||||
|
}
|
||||||
}}>
|
}}>
|
||||||
<View className='group-title'>{item.name}
|
<View className='group-title'>{item.name}
|
||||||
<Text className='iconfont icon-qianwang-01' style={{ fontSize: 'inherit', marginLeft: '4px' }}></Text>
|
<Text className='iconfont icon-qianwang-01' style={{ fontSize: 'inherit', marginLeft: '4px' }}></Text>
|
||||||
|
|
@ -159,6 +163,18 @@ const CompSeries = (props) => {
|
||||||
height={350}
|
height={350}
|
||||||
src={item.img}
|
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>)
|
</View>)
|
||||||
// return item.children ? (
|
// return item.children ? (
|
||||||
// // <View className='new' key={index}>
|
// // <View className='new' key={index}>
|
||||||
|
|
|
||||||
|
|
@ -42,14 +42,14 @@ function CompGoodsBuyToolbar (props) {
|
||||||
btns.push(BUY_TOOL_BTNS.ONLY_SHOW)
|
btns.push(BUY_TOOL_BTNS.ONLY_SHOW)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if (info.store == 0) {
|
// if (info.store == 0) {
|
||||||
if (info.subscribe) {
|
// if (info.subscribe) {
|
||||||
btns.push(BUY_TOOL_BTNS.SUBSCRIBE)
|
// btns.push(BUY_TOOL_BTNS.SUBSCRIBE)
|
||||||
} else {
|
// } else {
|
||||||
btns.push(BUY_TOOL_BTNS.NOTICE)
|
// btns.push(BUY_TOOL_BTNS.NOTICE)
|
||||||
}
|
// }
|
||||||
return
|
// return
|
||||||
}
|
// }
|
||||||
|
|
||||||
if (info.isGift) {
|
if (info.isGift) {
|
||||||
btns.push(BUY_TOOL_BTNS.GIFT)
|
btns.push(BUY_TOOL_BTNS.GIFT)
|
||||||
|
|
@ -81,12 +81,11 @@ function CompGoodsBuyToolbar (props) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
btns.push(BUY_TOOL_BTNS.ADD_CART)
|
btns.push({ ...BUY_TOOL_BTNS.ADD_CART, btnStatus: info.store == 0 ? 'disabled' : 'default' })
|
||||||
btns.push(BUY_TOOL_BTNS.FAST_BUY)
|
btns.push({ ...BUY_TOOL_BTNS.FAST_BUY, btnStatus: info.store == 0 ? 'disabled' : 'active' })
|
||||||
}
|
}
|
||||||
|
|
||||||
RenderBtns()
|
RenderBtns()
|
||||||
// console.log('btns:', btns)
|
|
||||||
|
|
||||||
const onChangeLogin = async ({ key }) => {
|
const onChangeLogin = async ({ key }) => {
|
||||||
const { dtid, card_id, user_card_id } = $instance.router.params
|
const { dtid, card_id, user_card_id } = $instance.router.params
|
||||||
|
|
|
||||||
|
|
@ -101,7 +101,7 @@
|
||||||
/* prettier-ignore */
|
/* prettier-ignore */
|
||||||
border: 1PX solid #E5E5E5;
|
border: 1PX solid #E5E5E5;
|
||||||
background: #e5e5e5;
|
background: #e5e5e5;
|
||||||
color: #8d8d8d;
|
color: #8d8d8d !important;
|
||||||
}
|
}
|
||||||
&.sp-login {
|
&.sp-login {
|
||||||
margin-left: 0;
|
margin-left: 0;
|
||||||
|
|
|
||||||
|
|
@ -102,7 +102,8 @@ const initialState = {
|
||||||
selSkuImg: '',
|
selSkuImg: '',
|
||||||
swiperList: [],
|
swiperList: [],
|
||||||
selColorIdx: 0,
|
selColorIdx: 0,
|
||||||
introList: []
|
introList: [],
|
||||||
|
scrollTop: 0
|
||||||
}
|
}
|
||||||
|
|
||||||
function EspierDetail (props) {
|
function EspierDetail (props) {
|
||||||
|
|
@ -148,7 +149,8 @@ function EspierDetail (props) {
|
||||||
selSkuImg,
|
selSkuImg,
|
||||||
swiperList,
|
swiperList,
|
||||||
selColorIdx,
|
selColorIdx,
|
||||||
introList
|
introList,
|
||||||
|
scrollTop
|
||||||
} = state
|
} = state
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
|
|
@ -455,10 +457,9 @@ function EspierDetail (props) {
|
||||||
{/* <Canvas id="canvas2" type="2d" onReady={onCanvasReady} /> */}
|
{/* <Canvas id="canvas2" type="2d" onReady={onCanvasReady} /> */}
|
||||||
{!info && <SpLoading />}
|
{!info && <SpLoading />}
|
||||||
{info && (
|
{info && (
|
||||||
<ScrollView scrollY scrollWithAnimation showScrollbar={false} scrollTop={0} className='goods-contents' onScroll={(e) => {
|
<ScrollView scrollY scrollWithAnimation showScrollbar={false} scrollTop={scrollTop} className='goods-contents' onScroll={(e) => {
|
||||||
// console.log('e', e.detail)
|
|
||||||
const { scrollTop } = e.detail
|
const { scrollTop } = e.detail
|
||||||
if (scrollTop >= 640) {
|
if (scrollTop >= 600) {
|
||||||
setState((draft) => {
|
setState((draft) => {
|
||||||
draft.isShowScroll = true
|
draft.isShowScroll = true
|
||||||
})
|
})
|
||||||
|
|
@ -731,18 +732,18 @@ function EspierDetail (props) {
|
||||||
}}
|
}}
|
||||||
onChange={(skuText, curItem, idx) => {
|
onChange={(skuText, curItem, idx) => {
|
||||||
console.log("🚀 ~ curItem:", curItem, idx)
|
console.log("🚀 ~ curItem:", curItem, idx)
|
||||||
setState((draft) => {
|
curItem && setState((draft) => {
|
||||||
draft.skuText = skuText
|
draft.skuText = skuText
|
||||||
draft.curItem = curItem
|
draft.curItem = curItem
|
||||||
// 不切换顶部轮播图
|
// 不切换顶部轮播图
|
||||||
draft.swiperList = curItem?.specItem?.[idx]?.specImgs
|
|
||||||
draft.selSkuImg = curItem.specItem?.[0]?.specImgs?.[0]
|
draft.selSkuImg = curItem.specItem?.[0]?.specImgs?.[0]
|
||||||
|
if (idx === 0) draft.swiperList = curItem?.specItem?.[idx]?.specImgs
|
||||||
})
|
})
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<View className='goods-desc'>
|
<View className='goods-desc'>
|
||||||
<View className='desc-hd'>
|
{/* <View className='desc-hd'>
|
||||||
<SpImage
|
<SpImage
|
||||||
className='sku-image'
|
className='sku-image'
|
||||||
src={selSkuImg || info?.specItem?.[0]?.specImgs?.[0]}
|
src={selSkuImg || info?.specItem?.[0]?.specImgs?.[0]}
|
||||||
|
|
@ -754,7 +755,7 @@ function EspierDetail (props) {
|
||||||
<Text className='desc-title-txt'>{info?.itemName}</Text>
|
<Text className='desc-title-txt'>{info?.itemName}</Text>
|
||||||
<SpGoodsPrice info={curItem ? curItem : info} />
|
<SpGoodsPrice info={curItem ? curItem : info} />
|
||||||
</View>
|
</View>
|
||||||
</View>
|
</View> */}
|
||||||
{isArray(info.intro) ? (
|
{isArray(info.intro) ? (
|
||||||
<View>
|
<View>
|
||||||
{info.intro.map((item, idx) => (
|
{info.intro.map((item, idx) => (
|
||||||
|
|
@ -785,6 +786,11 @@ function EspierDetail (props) {
|
||||||
})
|
})
|
||||||
draft.introList[index].isOpen = !item.isOpen
|
draft.introList[index].isOpen = !item.isOpen
|
||||||
})
|
})
|
||||||
|
if (!item.isOpen) {
|
||||||
|
setState((draft) => {
|
||||||
|
draft.scrollTop = 610 + Math.random()
|
||||||
|
})
|
||||||
|
}
|
||||||
}}
|
}}
|
||||||
title={item.title}
|
title={item.title}
|
||||||
>
|
>
|
||||||
|
|
@ -798,6 +804,11 @@ function EspierDetail (props) {
|
||||||
})
|
})
|
||||||
draft.introList[index].isOpen = !item.isOpen
|
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' /> :
|
{item.isOpen ? <AtIcon value='subtract' size='16' color='#000' /> :
|
||||||
<AtIcon value='add' size='16' color='#000' />}
|
<AtIcon value='add' size='16' color='#000' />}
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
import React, { Component } from 'react'
|
import React, { Component } from 'react'
|
||||||
import Taro, { getCurrentInstance } from '@tarojs/taro'
|
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 { SpAddress } from '@/components'
|
||||||
import { withPager, withBackToTop } from '@/hocs'
|
import { withPager, withBackToTop } from '@/hocs'
|
||||||
import { connect } from 'react-redux'
|
import { connect } from 'react-redux'
|
||||||
|
|
@ -13,10 +13,11 @@ import {
|
||||||
SpNote,
|
SpNote,
|
||||||
FilterBar,
|
FilterBar,
|
||||||
SpTabbar,
|
SpTabbar,
|
||||||
SpPage
|
SpPage,
|
||||||
|
SpImage
|
||||||
} from '@/components'
|
} from '@/components'
|
||||||
import api from '@/api'
|
import api from '@/api'
|
||||||
import { classNames, pickBy } from '@/utils'
|
import { classNames, pickBy, isWeixin } from '@/utils'
|
||||||
import S from '@/spx'
|
import S from '@/spx'
|
||||||
|
|
||||||
import './list.scss'
|
import './list.scss'
|
||||||
|
|
@ -24,7 +25,7 @@ import './list.scss'
|
||||||
@connect(({ colors }) => ({
|
@connect(({ colors }) => ({
|
||||||
colors: colors.current
|
colors: colors.current
|
||||||
}))
|
}))
|
||||||
@withPager
|
// @withPager
|
||||||
@withBackToTop
|
@withBackToTop
|
||||||
export default class RecommendList extends Component {
|
export default class RecommendList extends Component {
|
||||||
$instance = getCurrentInstance()
|
$instance = getCurrentInstance()
|
||||||
|
|
@ -45,6 +46,10 @@ export default class RecommendList extends Component {
|
||||||
isShowSearch: false,
|
isShowSearch: false,
|
||||||
shareInfo: {},
|
shareInfo: {},
|
||||||
isSpAddressOpened: false,
|
isSpAddressOpened: false,
|
||||||
|
play: false,
|
||||||
|
page: {
|
||||||
|
isLoading: true
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -68,14 +73,19 @@ export default class RecommendList extends Component {
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
Taro.showLoading({ title: '' })
|
// Taro.showLoading({ title: '' })
|
||||||
this.resetPage()
|
// this.resetPage()
|
||||||
this.setState({
|
// this.setState({
|
||||||
list: []
|
// list: []
|
||||||
})
|
// })
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
this.nextPage()
|
// this.nextPage()
|
||||||
Taro.hideLoading()
|
// Taro.hideLoading()
|
||||||
|
this.setState({
|
||||||
|
page: {
|
||||||
|
isLoading: false
|
||||||
|
}
|
||||||
|
})
|
||||||
}, 200)
|
}, 200)
|
||||||
|
|
||||||
// this.praiseNum()
|
// 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 () {
|
render () {
|
||||||
const {
|
const {
|
||||||
list,
|
list,
|
||||||
|
|
@ -543,36 +577,38 @@ export default class RecommendList extends Component {
|
||||||
areaList,
|
areaList,
|
||||||
query,
|
query,
|
||||||
isShowSearch,
|
isShowSearch,
|
||||||
isSpAddressOpened
|
isSpAddressOpened,
|
||||||
|
play
|
||||||
} = this.state
|
} = this.state
|
||||||
const { colors } = this.props
|
const { colors } = this.props
|
||||||
let address = info.province + info.city
|
let address = info.province + info.city
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<SpPage renderFooter={<SpTabbar />} className='has-nav' title="鞋床故事">
|
<SpPage renderFooter={<SpTabbar />} className='has-nav' title="" isBlack>
|
||||||
<View className='page-recommend-list'>
|
<View className='page-recommend-list'>
|
||||||
<View className='recommend-list__toolbar'>
|
{false && <>
|
||||||
<View
|
<View className='recommend-list__toolbar'>
|
||||||
className={`recommend-list__search ${query && query.title && isShowSearch ? 'on-search' : null
|
<View
|
||||||
}`}
|
className={`recommend-list__search ${query && query.title && isShowSearch ? 'on-search' : null
|
||||||
>
|
}`}
|
||||||
<SearchBar
|
>
|
||||||
showDailog={false}
|
<SearchBar
|
||||||
keyword={query ? query.title : ''}
|
showDailog={false}
|
||||||
onFocus={this.handleSearchOn}
|
keyword={query ? query.title : ''}
|
||||||
onChange={this.handleSearchChange}
|
onFocus={this.handleSearchOn}
|
||||||
onClear={this.handleSearchClear}
|
onChange={this.handleSearchChange}
|
||||||
onCancel={this.handleSearchOff}
|
onClear={this.handleSearchClear}
|
||||||
onConfirm={this.handleConfirm.bind(this)}
|
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>
|
|
||||||
</View>
|
</View>
|
||||||
<View className='filter-bar__item region-picker'>
|
<FilterBar className='recommend-list__tabs'>
|
||||||
{/* <Picker
|
<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'
|
mode='multiSelector'
|
||||||
onClick={this.handleClickPicker}
|
onClick={this.handleClickPicker}
|
||||||
onChange={this.bindMultiPickerChange}
|
onChange={this.bindMultiPickerChange}
|
||||||
|
|
@ -585,104 +621,160 @@ export default class RecommendList extends Component {
|
||||||
<Text>{address || '地区'}</Text>
|
<Text>{address || '地区'}</Text>
|
||||||
</View>
|
</View>
|
||||||
</Picker> */}
|
</Picker> */}
|
||||||
<View onClick={this.handleClickOpenSpAddress.bind(this)}>
|
<View onClick={this.handleClickOpenSpAddress.bind(this)}>
|
||||||
<View className='iconfont icon-periscope'></View>
|
<View className='iconfont icon-periscope'></View>
|
||||||
<Text>{address || '地区'}</Text>
|
<Text>{address || '地区'}</Text>
|
||||||
</View>
|
</View>
|
||||||
<SpAddress isOpened={isSpAddressOpened} onClose={this.handleClickCloseSpAddress} onChange={this.onPickerChange} />
|
<SpAddress isOpened={isSpAddressOpened} onClose={this.handleClickCloseSpAddress} onChange={this.onPickerChange} />
|
||||||
|
|
||||||
{address ? (
|
{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 (
|
|
||||||
<View
|
<View
|
||||||
className={classNames(
|
className='zoom-btn icon-close iconfont'
|
||||||
'drawer-item__options__item',
|
onClick={this.handleRegionRefresh.bind(this)}
|
||||||
item.isChooseColumn ? 'drawer-item__options__checked' : ''
|
></View>
|
||||||
)}
|
// <Text className='icon-close' onClick={this.handleRegionRefresh.bind(this)}>x</Text>
|
||||||
// className='drawer-item__options__item'
|
) : (
|
||||||
style={
|
''
|
||||||
item.isChooseColumn
|
)}
|
||||||
? {
|
</View>
|
||||||
background: (colors && colors.data && colors.data[0].primary) || null
|
</FilterBar>
|
||||||
}
|
</View>
|
||||||
: {}
|
<AtDrawer
|
||||||
}
|
show={showDrawer}
|
||||||
key={`${index}1`}
|
right
|
||||||
onClick={this.handleClickParmas.bind(this, item.id)}
|
mask
|
||||||
>
|
width={`${Taro.pxTransform(570)}`}
|
||||||
{item.name}
|
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>
|
||||||
)
|
)
|
||||||
})}
|
})}
|
||||||
<View className='drawer-item__options__none'> </View>
|
</View>
|
||||||
<View className='drawer-item__options__none'> </View>
|
{page.isLoading ? <Loading>正在加载...</Loading> : null}
|
||||||
<View className='drawer-item__options__none'> </View>
|
{!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>
|
</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} />
|
<BackToTop show={showBackToTop} onClick={this.scrollBackToTop} />
|
||||||
|
|
||||||
</View>
|
</View>
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,41 @@
|
||||||
margin-top: 60px;
|
margin-top: 60px;
|
||||||
}
|
}
|
||||||
.page-recommend-list {
|
.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 */
|
/* #ifdef alipay */
|
||||||
.filter-bar {
|
.filter-bar {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
|
|
|
||||||
|
|
@ -152,10 +152,11 @@ function CouponCenter (props) {
|
||||||
|
|
||||||
const getPoint = async () => {
|
const getPoint = async () => {
|
||||||
await api.member.depositToPoint({ money: 10000 })
|
await api.member.depositToPoint({ money: 10000 })
|
||||||
showToast('积分+500')
|
showToast('积分+100')
|
||||||
setState((draft) => {
|
setState((draft) => {
|
||||||
draft.couponList = []
|
draft.couponList = []
|
||||||
})
|
})
|
||||||
|
getMypoint()
|
||||||
listRef.current?.reset()
|
listRef.current?.reset()
|
||||||
}
|
}
|
||||||
return (
|
return (
|
||||||
|
|
|
||||||
|
|
@ -27,6 +27,7 @@ const initialState = {
|
||||||
listLength: 0,
|
listLength: 0,
|
||||||
nList: [],
|
nList: [],
|
||||||
listLength: 0,
|
listLength: 0,
|
||||||
|
loading: true
|
||||||
}
|
}
|
||||||
|
|
||||||
function MemberUserInfo () {
|
function MemberUserInfo () {
|
||||||
|
|
@ -44,6 +45,7 @@ function MemberUserInfo () {
|
||||||
areaList,
|
areaList,
|
||||||
multiIndex,
|
multiIndex,
|
||||||
nList,
|
nList,
|
||||||
|
loading
|
||||||
} = state
|
} = state
|
||||||
const { userInfo = {} } = useSelector((_state) => _state.user)
|
const { userInfo = {} } = useSelector((_state) => _state.user)
|
||||||
const pageRef = useRef()
|
const pageRef = useRef()
|
||||||
|
|
@ -180,6 +182,7 @@ function MemberUserInfo () {
|
||||||
draft.formUserInfo = _formUserInfo
|
draft.formUserInfo = _formUserInfo
|
||||||
draft.areaList = [arrProvice, arrCity, arrCounty]
|
draft.areaList = [arrProvice, arrCity, arrCounty]
|
||||||
draft.multiIndex = _multiIndex
|
draft.multiIndex = _multiIndex
|
||||||
|
draft.loading = false
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -520,7 +523,7 @@ function MemberUserInfo () {
|
||||||
if (isWeixin) {
|
if (isWeixin) {
|
||||||
return (
|
return (
|
||||||
<Button class='avatar-wrapper' open-type='chooseAvatar' onChooseAvatar={onChooseAvatar}>
|
<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>
|
</Button>
|
||||||
)
|
)
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -540,6 +543,7 @@ function MemberUserInfo () {
|
||||||
保存
|
保存
|
||||||
</AtButton>
|
</AtButton>
|
||||||
}
|
}
|
||||||
|
loading={loading}
|
||||||
>
|
>
|
||||||
<View className='block-container'>
|
<View className='block-container'>
|
||||||
{/* <SpCell title='头像' isLink border value={renderAvatar()}></SpCell> */}
|
{/* <SpCell title='头像' isLink border value={renderAvatar()}></SpCell> */}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue