Compare commits

..

No commits in common. "a2474dddc0d43aeaedf0d2956171f10f8e87dd87" and "40e2a6a3dc1fcf014ef317bf149e9c4b2132ce07" have entirely different histories.

21 changed files with 69 additions and 137 deletions

View File

@ -4,10 +4,6 @@ export function search (params = {}) {
// return req.get('/item.search', params) // return req.get('/item.search', params)
return req.get('/goods/items', params) return req.get('/goods/items', params)
} }
export function searchHotKey (params = {}) {
// return req.get('/item.search', params)
return req.get('/goods/keywords', params)
}
export function detail (item_id, params = {}) { export function detail (item_id, params = {}) {
return req.get(`/goods/items/${item_id}`, params) return req.get(`/goods/items/${item_id}`, params)

View File

@ -49,6 +49,7 @@ export default class GoodsEvaluation extends Component {
} }
fortmatStr (desc) { fortmatStr (desc) {
console.log("🚀 ~ GoodsEvaluation ~ desc:", desc)
let desc_info = '颜色分类:' let desc_info = '颜色分类:'
if (desc) { if (desc) {
try { try {
@ -105,7 +106,7 @@ export default class GoodsEvaluation extends Component {
</View> </View>
<View className='evaluation-item__main'> <View className='evaluation-item__main'>
<View className='name-wrap'> <View className='name-wrap'>
<View className='name'>{'匿名用户' || info.anonymous ? '匿名用户' : info.username} <View className='name'>{info.anonymous ? '匿名用户' : info.username}
<Text style={{ marginLeft: '10rpx' }}>{info.item_spec_desc_txt}</Text> <Text style={{ marginLeft: '10rpx' }}>{info.item_spec_desc_txt}</Text>
</View> </View>
<AtRate size='14' value={info.star} /> <AtRate size='14' value={info.star} />

View File

@ -111,7 +111,7 @@ export default class SearchBar extends Component {
} }
handleClickHotItem = (item) => { handleClickHotItem = (item) => {
this.handleConfirm({ detail: { value: item } }) this.handleConfirm({ detail: { value: item.tit } })
} }
handleBlurSearch = () => { handleBlurSearch = () => {
@ -123,7 +123,7 @@ export default class SearchBar extends Component {
} }
render () { render () {
const { isFixed, keyword, showDailog, placeholder, hotSearch } = this.props const { isFixed, keyword, showDailog, placeholder } = this.props
const { showSearchDailog, historyList, isShowAction, searchValue } = this.state const { showSearchDailog, historyList, isShowAction, searchValue } = this.state
return ( return (
<View <View
@ -230,8 +230,8 @@ export default class SearchBar extends Component {
<Text className='hot-title__desc'>近期大家搜索最多</Text> <Text className='hot-title__desc'>近期大家搜索最多</Text>
</View> </View>
<View className='hot-list'> <View className='hot-list'>
{hotSearch.map((item, index) => <View className='hot-list__item' onClick={this.handleClickHotItem.bind(this, item.content)} key={index}> {[{ tit: '#测试数据' }].map((item, index) => <View className='hot-list__item' onClick={this.handleClickHotItem.bind(this, item)} key={index}>
<Text>{item.content ? '#' + item.content : ''}</Text> <Text>{item.tit}</Text>
{/* <View className='at-icon at-icon-chevron-right'></View> */} {/* <View className='at-icon at-icon-chevron-right'></View> */}
</View>)} </View>)}
</View> </View>

View File

@ -98,15 +98,12 @@
padding: 40px 30px; padding: 40px 30px;
&__item { &__item {
padding: 24px 42px; padding: 24px 42px;
margin: 0 20px 20px 0; margin-right: 30px 30px 0 0;
text-align: center; text-align: center;
display: inline-block; display: inline-block;
color: #000; color: #000;
background-color: #9e9e9e40; background-color: #9e9e9e40;
border-radius: 6px; border-radius: 6px;
// &:nth-child(3n) {
// margin-right: 0;
// }
} }
.at-icon { .at-icon {
font-size: 40px; font-size: 40px;

View File

@ -28,10 +28,7 @@ const initialState = {
num: 1, num: 1,
loading: false, loading: false,
isClickSku: false, isClickSku: false,
isClickNum: false, isClickNum: false
isClickPattern: false,
showClickPattern: false,
skuTxtArr: []
} }
function SpSkuSelect (props, ref) { function SpSkuSelect (props, ref) {
@ -47,7 +44,7 @@ function SpSkuSelect (props, ref) {
// 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, isClickSku, showClickPattern, skuTxtArr } = state const { selection, curImage, disabledSet, curItem, skuText, num, loading, isClickSku } = state
const dispatch = useDispatch() const dispatch = useDispatch()
const skuDictRef = useRef({}) const skuDictRef = useRef({})
@ -70,8 +67,7 @@ function SpSkuSelect (props, ref) {
if (a?.skuValue.length > 0 && b?.skuValue.length > 0 && c?.skuValue.length > 0) { if (a?.skuValue.length > 0 && b?.skuValue.length > 0 && c?.skuValue.length > 0) {
const key = [a.skuValue[0].specId, b.skuValue[0].specId, c.skuValue[0].specId].join('_') const key = [a.skuValue[0].specId, b.skuValue[0].specId, c.skuValue[0].specId].join('_')
const item = skuDictRef.current[key] const item = skuDictRef.current[key]
// && item.store > 0 selItem = key && item && item.store > 0 && ['onsale'].includes(item.approveStatus) ? item : null
selItem = key && item && ['onsale'].includes(item.approveStatus) ? item : null
} }
} }
// 默认选中有库存并且前端可销售的sku // 默认选中有库存并且前端可销售的sku
@ -108,14 +104,14 @@ function SpSkuSelect (props, ref) {
for (let i = 0, l = skuList.length; i < l; i++) { for (let i = 0, l = skuList.length; i < l; i++) {
const { skuValue } = skuList[i] const { skuValue } = skuList[i]
// if (i === 2) { if (i === 2) {
for (let j = 0, k = skuValue.length; j < k; j++) { for (let j = 0, k = skuValue.length; j < k; j++) {
const id = skuValue[j].specId const id = skuValue[j].specId
if (!disabledSet.has(id) && !isNotDisabled(selection, i, id)) { if (!disabledSet.has(id) && !isNotDisabled(selection, i, id)) {
disabledSet.add(id) disabledSet.add(id)
}
} }
} }
// }
} }
// console.log( // console.log(
// 'skuDict:', // 'skuDict:',
@ -134,19 +130,11 @@ function SpSkuSelect (props, ref) {
? `已选择 ${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(' ')}`
: '请选择规格' : '请选择规格'
const _skuTxtArr = ['', '', '']
if (curItem) {
const name = curItem.specItem?.[0]?.specName
_skuTxtArr[0] = name ? name + ':' + curItem.itemBn : ''
_skuTxtArr[2] = name ? name + ':' + curItem.itemBnDetail : ''
}
setState((draft) => { setState((draft) => {
draft.selection = selection draft.selection = selection
draft.disabledSet = disabledSet draft.disabledSet = disabledSet
draft.curItem = curItem draft.curItem = curItem
draft.skuText = e === -1 ? '' : skuText draft.skuText = e === -1 ? '' : skuText
draft.skuTxtArr = _skuTxtArr
}) })
onChange(skuText, curItem, e === -1 ? 0 : e) onChange(skuText, curItem, e === -1 ? 0 : e)
@ -163,30 +151,17 @@ function SpSkuSelect (props, ref) {
_selection[idx] = specId _selection[idx] = specId
const key = _selection.join('_') const key = _selection.join('_')
const row = skuDictRef.current[key] || {} const row = skuDictRef.current[key] || {}
if (row?.store <= 0) { if (disabledSet.has(specId)) return
if (disabledSet.has(specId) && idx !== 2) return
setState((draft) => {
draft.selection[idx] = specId //null
draft.curImage = 1
})
return showToast('该规格库存为空')
}
if (!state.isClickNum) { if (!state.isClickNum) {
setState((draft) => { setState((draft) => {
draft.isClickNum = idx === 2 draft.isClickNum = idx === 2
}) })
} }
if (!state.isClickPattern) {
setState((draft) => {
draft.isClickPattern = idx === 1
})
}
setState( setState(
(draft) => { (draft) => {
draft.selection[idx] = specId //null draft.selection[idx] = specId //null
draft.curImage = 1 draft.curImage = 1
draft.isClickSku = draft.isClickNum ? row.store > 0 : idx === 2 draft.isClickSku = draft.isClickNum ? row.store > 0 : idx === 2
draft.showClickPattern = draft.isClickPattern ? row.store > 0 : idx === 1
}, },
(row) => { (row) => {
calcDisabled(row.selection, idx) calcDisabled(row.selection, idx)
@ -227,7 +202,7 @@ function SpSkuSelect (props, ref) {
const addToCart = async () => { const addToCart = async () => {
const { nospec } = info const { nospec } = info
if ((!nospec && !curItem) || !isClickSku || !showClickPattern) { if (!nospec && !curItem) {
showToast('请选择规格') showToast('请选择规格')
return return
} }
@ -249,7 +224,7 @@ function SpSkuSelect (props, ref) {
const fastBuy = async () => { const fastBuy = async () => {
const { nospec } = info const { nospec } = info
if ((!nospec && !curItem) || !isClickSku || !showClickPattern) { if ((!nospec && !curItem) || !isClickSku) {
showToast('请选择规格') showToast('请选择规格')
return return
} }
@ -387,7 +362,6 @@ function SpSkuSelect (props, ref) {
) )
} }
const txt = ['选择颜色', '', '选择尺码']
return ( return (
<View className='sp-sku-select'> <View className='sp-sku-select'>
{/* <SpFloatLayout {/* <SpFloatLayout
@ -417,12 +391,9 @@ function SpSkuSelect (props, ref) {
</View>} </View>}
<View className='sku-list'> <View className='sku-list'>
{info.skuList.map((item, index) => ( {info.skuList.map((item, index) => (
<View className={classNames('sku-group', { <View className='sku-group' key={`sku-group__${index}`}>
'mt30': index === 1
})} key={`sku-group__${index}`}>
{/* <View className='sku-name'>{item.skuName}</View> */} {/* <View className='sku-name'>{item.skuName}</View> */}
{index !== 1 && <View className="select-txt">{txt[index]}{index === 2 ? isClickSku && skuTxtArr[index] : skuTxtArr[isClickSku ? 2 : index]}</View>} <View className='sku-values'>
<View className={classNames('sku-values')}>
{index === 0 && <ScrollView scrollX scrollWithAnimation showScrollbar={false} scrollLeft={0} className="sku-img-box"> {index === 0 && <ScrollView scrollX scrollWithAnimation showScrollbar={false} scrollLeft={0} className="sku-img-box">
{item.skuValue?.length > 0 && item.skuValue.map((spec, idx) => spec.specImgs.length > 0 && ( {item.skuValue?.length > 0 && item.skuValue.map((spec, idx) => spec.specImgs.length > 0 && (
<View <View
@ -440,11 +411,11 @@ function SpSkuSelect (props, ref) {
</ScrollView>} </ScrollView>}
{index > 0 && (item.skuValue.length > 0 ? item.skuValue.map((spec, idx) => ( {index > 0 && (item.skuValue.length > 0 ? item.skuValue.map((spec, idx) => (
<> <>
{index === 2 && (showClickPattern && disabledSet.has(spec.specId)) ? null : <View {index === 2 && disabledSet.has(spec.specId) ? null : <View
className={classNames('sku-btn btn-noac', { className={classNames('sku-btn btn-noac', {
'active': spec.specId == selection[index], 'active': spec.specId == selection[index] && isClickSku,
'btn-primary': index !== 2 ? index === 1 ? spec.specId == selection[index] && showClickPattern : spec.specId == selection[index] : spec.specId == selection[index] && isClickSku, 'btn-primary': index !== 2 ? spec.specId == selection[index] : spec.specId == selection[index] && isClickSku,
'disabled': index === 1 && disabledSet.has(spec.specId), 'disabled': disabledSet.has(spec.specId),
'sku-img': spec.specImgs.length > 0 'sku-img': spec.specImgs.length > 0
})} })}
onClick={handleSelectSku.bind(this, spec, index)} onClick={handleSelectSku.bind(this, spec, index)}
@ -461,9 +432,7 @@ function SpSkuSelect (props, ref) {
</View> </View>
))} ))}
{/* {!hideInputNumber && renderLimitTip()} */} {/* {!hideInputNumber && renderLimitTip()} */}
<View className="select"> <View className="select">{skuText.split(' ').map((item, index) => <Text key={`sku-text__${index}`} style={{ marginRight: '14px' }}>{item}</Text>)}</View>
{/* {skuText.split(' ').map((item, index) => <Text key={`sku-text__${index}`} style={{ marginRight: '14px' }}>{item}</Text>)} */}
</View>
</View> </View>
{/* </SpFloatLayout> */} {/* </SpFloatLayout> */}
</View> </View>

View File

@ -1,5 +1,4 @@
.sp-sku-select { .sp-sku-select {
margin-top: 20px;
.sku-info { .sku-info {
display: flex; display: flex;
.sku-image { .sku-image {
@ -44,7 +43,7 @@
.sku-list { .sku-list {
position: relative; position: relative;
padding: 0 30px; padding: 0 30px;
// margin-top: 20px; margin: 0;
// margin-top: 30px; // margin-top: 30px;
// margin-bottom: 100px; // margin-bottom: 100px;
.select { .select {
@ -55,16 +54,7 @@
} }
} }
.sku-group { .sku-group {
margin: 10px 0 0; margin: 30px 0 0;
&.mt30 {
margin-top: 30px;
}
.select-txt {
height: 24px;
line-height: 24px;
font-size: 24px;
margin-bottom: 14px;
}
} }
.buy-count { .buy-count {
margin-bottom: 20px; margin-bottom: 20px;

View File

@ -41,8 +41,8 @@
} }
.sku-list { .sku-list {
// margin-top: 30px; margin-top: 30px;
// margin-bottom: 100px; margin-bottom: 100px;
} }
.sku-group { .sku-group {
margin-bottom: 20px; margin-bottom: 20px;

View File

@ -201,8 +201,6 @@ export const GOODS_INFO = {
specItems: ({ spec_items, is_point }) => { specItems: ({ spec_items, is_point }) => {
return pickBy(spec_items, { return pickBy(spec_items, {
approveStatus: 'approve_status', approveStatus: 'approve_status',
itemBn: ({ item_bn }) => item_bn ? item_bn.split('-')?.[0] : '',
itemBnDetail: 'item_bn',
specItem: ({ item_spec }) => { specItem: ({ item_spec }) => {
return pickBy(item_spec, { return pickBy(item_spec, {
specId: 'spec_value_id', specId: 'spec_value_id',

View File

@ -1097,7 +1097,7 @@ function CartCheckout (props) {
)} )}
{!bargain_id && ( {!bargain_id && (
<View style={{ marginBottom: '40rpx' }}> <View>
<SpCell <SpCell
isLink isLink
className='cart-checkout__pay' className='cart-checkout__pay'

View File

@ -9,7 +9,7 @@ $margin24: 10px;
justify-content: space-between; justify-content: space-between;
align-items: flex-end; align-items: flex-end;
background: #fff; background: #fff;
padding: 10px 40px 90px 50px; padding: 0 40px 90px 50px;
// height: 100%; // height: 100%;
&__total { &__total {
white-space: nowrap; white-space: nowrap;

View File

@ -551,7 +551,7 @@ function Home () {
</ScrollView> </ScrollView>
</View>)} </View>)}
</>} </>}
{false && isUpOperation && showRecommend && <View className="brand" style={{ padding: '15px', height: '550px' }}> {isUpOperation && showRecommend && <View className="brand" style={{ padding: '15px', height: '550px' }}>
<View className="brand-title">品牌介绍</View> <View className="brand-title">品牌介绍</View>
<ScrollView scrollX scrollWithAnimation showScrollbar={false} scrollLeft={0} className="brand-img" style={{ height: '220px' }}> <ScrollView scrollX scrollWithAnimation showScrollbar={false} scrollLeft={0} className="brand-img" style={{ height: '220px' }}>
<View className="brand-img-left brand-img-item" style={{ marginRight: '8px' }}> <View className="brand-img-left brand-img-item" style={{ marginRight: '8px' }}>

View File

@ -43,20 +43,21 @@ function CompEvaluation (props) {
return ( return (
<View className={classNames('comp-evaluation', className)}> <View className={classNames('comp-evaluation', className)}>
{/* <View className='evaluation-hd'> <View className='evaluation-hd'>
<View className='title'>{`商品评价(${list.length}`}</View> <View className='title'>{`商品评价(${list.length}`}</View>
{list.length > 0 && ( {list.length > 0 && (
<View className='extra-more' onClick={onViewMore}> <View className='extra-more' onClick={onViewMore}>
{/* 查看全部 */}
<Text className='iconfont icon-qianwang-01'></Text> <Text className='iconfont icon-qianwang-01'></Text>
</View> </View>
)} )}
</View> */} </View>
<View className='evaluation-bd'> <View className='evaluation-bd'>
{list.map((item) => ( {list.map((item) => (
<View className='evaluation-item-wrap' onClick={onViewMore}> <View className='evaluation-item-wrap'>
<View className='item-hd'> <View className='item-hd'>
<SpImage src={item.avatar} className='evaluation-icon' width={50} height={50} /> <SpImage src={item.avatar} className='evaluation-icon' width={50} height={50} />
<Text className='evaluation-name'>{'匿名用户' || item.username} <Text className='evaluation-name'>{item.username || '匿名用户'}
<Text style={{ marginLeft: '10rpx' }}>{fortmatStr(item.item_spec_desc)}</Text> <Text style={{ marginLeft: '10rpx' }}>{fortmatStr(item.item_spec_desc)}</Text>
</Text> </Text>
</View> </View>

View File

@ -1,7 +1,7 @@
.comp-evaluation { .comp-evaluation {
// margin: 0 16px; // margin: 0 16px;
background-color: #fff; background-color: #fff;
// padding: 0 30px; padding: 0 30px;
// box-shadow: 0px 2px 10px 0px #eae7e0; // box-shadow: 0px 2px 10px 0px #eae7e0;
.evaluation-hd { .evaluation-hd {
display: flex; display: flex;
@ -23,7 +23,6 @@
// padding: 24px 0; // padding: 24px 0;
.evaluation-item-wrap { .evaluation-item-wrap {
margin-bottom: 20px; margin-bottom: 20px;
margin-top: 20px;
// &:not(:last-child) { // &:not(:last-child) {
// margin-bottom: 20px; // margin-bottom: 20px;
// } // }

View File

@ -291,15 +291,16 @@ function EspierDetail (props) {
} }
}) })
} }
// console.log("🚀 ~ data.introList:", data)
setState((draft) => { setState((draft) => {
draft.info = { draft.info = {
...data, ...data,
subscribe, subscribe,
} }
draft.introList = (data.introList || []).concat([{ isOpen: false, id: '99999999', type: 'eva', title: '商品评价' }]).map((item) => { draft.introList = (data.introList || []).map((item) => {
return { return {
...item, ...item,
isOpen: false, isOpen: false
} }
}) })
draft.promotionActivity = data.promotionActivity draft.promotionActivity = data.promotionActivity
@ -784,15 +785,13 @@ function EspierDetail (props) {
}) })
// if (!item.isOpen) { // if (!item.isOpen) {
// setState((draft) => { // setState((draft) => {
// draft.scrollTop = 1042 + Math.random() / 10 // draft.scrollTop = 742 + Math.random()
// }) // })
// } // }
}} }}
title={item.title} title={item.title}
> >
{item.type !== 'eva' ? <SpHtml content={item.content} /> : <SpHtml content={item.content} />
<CompEvaluation list={evaluationList} itemId={info.itemId}></CompEvaluation>
}
</AtAccordion> </AtAccordion>
<View onClick={() => { <View onClick={() => {
setState((draft) => { setState((draft) => {
@ -804,7 +803,7 @@ function EspierDetail (props) {
}) })
// if (!item.isOpen) { // if (!item.isOpen) {
// setState((draft) => { // setState((draft) => {
// draft.scrollTop = 1042 + Math.random() / 10 // draft.scrollTop = 742 + Math.random()
// }) // })
// } // }
}}> }}>
@ -814,8 +813,7 @@ function EspierDetail (props) {
</View> </View>
</View>) : <View style={{ height: `calc(100% - 380px)` }}></View>} </View>) : <View style={{ height: `calc(100% - 380px)` }}></View>}
{/* 商品评价 */} {/* 商品评价 */}
<CompEvaluation list={evaluationList} itemId={info.itemId}></CompEvaluation>
{/* <CompEvaluation list={evaluationList} itemId={info.itemId}></CompEvaluation> */}
{isArray(historyList) ? <View className='bottom-box'> {isArray(historyList) ? <View className='bottom-box'>
<View className="bottom-box-tit">浏览历史</View> <View className="bottom-box-tit">浏览历史</View>
<ScrollView scrollX scrollWithAnimation showScrollbar={true} scrollLeft={0} className="shop-box"> <ScrollView scrollX scrollWithAnimation showScrollbar={true} scrollLeft={0} className="shop-box">

View File

@ -50,7 +50,6 @@ const initialState = {
routerParams: null, routerParams: null,
card_id: null, // 兑换券 card_id: null, // 兑换券
total: undefined, total: undefined,
historyList: []
} }
function ItemList () { function ItemList () {
@ -69,8 +68,7 @@ function ItemList () {
show, show,
fixTop, fixTop,
routerParams, routerParams,
total, total
historyList
} = state } = state
const [isShowSearch, setIsShowSearch] = useState(false) const [isShowSearch, setIsShowSearch] = useState(false)
const { cat_id, main_cat_id, tag_id, card_id, user_card_id } = routerParams || {} const { cat_id, main_cat_id, tag_id, card_id, user_card_id } = routerParams || {}
@ -204,6 +202,7 @@ function ItemList () {
select_tags_list = [], select_tags_list = [],
brand_list brand_list
} = await api.item.search(params) } = await api.item.search(params)
console.time('list render')
console.log('fetch list:', list) console.log('fetch list:', list)
const n_list = pickBy(list, doc.goods.ITEM_LIST_GOODS) const n_list = pickBy(list, doc.goods.ITEM_LIST_GOODS)
const resLeftList = n_list.filter((item, index) => { const resLeftList = n_list.filter((item, index) => {
@ -217,14 +216,12 @@ function ItemList () {
} }
}) })
console.timeEnd('list render') console.timeEnd('list render')
const _historyList = await api.item.searchHotKey({ distributor_id: 0, page: 1, pageSize: 10 })
setState((v) => { setState((v) => {
v.total = total_count v.total = total_count
v.leftList[pageIndex - 1] = resLeftList v.leftList[pageIndex - 1] = resLeftList
v.rightList[pageIndex - 1] = resRightList v.rightList[pageIndex - 1] = resRightList
v.brandList = pickBy(brand_list?.list, doc.goods.WGT_GOODS_BRAND) v.brandList = pickBy(brand_list?.list, doc.goods.WGT_GOODS_BRAND)
v.historyList = _historyList?.list || []
if (v.tagList.length < 1) { if (v.tagList.length < 1) {
if (select_tags_list.length > 0) { if (select_tags_list.length > 0) {
v.tagList = [ v.tagList = [
@ -269,13 +266,12 @@ function ItemList () {
}) })
} }
const handleConfirm = (val) => { const handleConfirm = async (val) => {
setIsShowSearch(false) setIsShowSearch(false)
setState((draft) => { await setState((draft) => {
draft.leftList = [] draft.leftList = []
draft.rightList = [] draft.rightList = []
draft.keywords = val draft.keywords = val
// draft.keywords = ''
}) })
goodsRef.current.reset() goodsRef.current.reset()
} }
@ -358,11 +354,10 @@ function ItemList () {
<SpSearchBar <SpSearchBar
className='search-wrap' className='search-wrap'
keyword={keywords} keyword={keywords}
hotSearch={historyList}
placeholder='搜索商品' placeholder='搜索商品'
isOpened={true} isOpened={true}
onFocus={handleOnFocus} onFocus={handleOnFocus}
// onBlur={() => handleConfirm('')} onBlur={() => handleConfirm(keywords)}
onChange={handleOnChange} onChange={handleOnChange}
onClear={handleOnClear} onClear={handleOnClear}
onCancel={handleSearchOff} onCancel={handleSearchOff}

View File

@ -47,7 +47,6 @@ export default class RecommendList extends Component {
shareInfo: {}, shareInfo: {},
isSpAddressOpened: false, isSpAddressOpened: false,
play: false, play: false,
windowWidth: 750,
page: { page: {
isLoading: true isLoading: true
} }
@ -579,12 +578,10 @@ export default class RecommendList extends Component {
query, query,
isShowSearch, isShowSearch,
isSpAddressOpened, isSpAddressOpened,
play, 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
const windowWidth = Taro.getSystemInfoSync().windowWidth
const height = windowWidth * 9 / 17
return ( return (
<SpPage renderFooter={<SpTabbar />} className='has-nav' title="" isBlack> <SpPage renderFooter={<SpTabbar />} className='has-nav' title="" isBlack>
@ -767,14 +764,14 @@ export default class RecommendList extends Component {
<View className="line"></View> <View className="line"></View>
</View> */} </View> */}
<View className="content-item"> <View className="content-item">
<SpImage height={height * 2} width={windowWidth * 2} mode="aspectFill" src='recommend/03.jpg' isShowMenuByLongpress={false} lazyLoad isNew /> <SpImage height={400} width={750} mode="aspectFill" src='recommend/02.jpg' isShowMenuByLongpress={false} lazyLoad isNew />
<SpImage height={height * 2} width={windowWidth * 2} mode="aspectFill" src='recommend/02.jpg' isShowMenuByLongpress={false} lazyLoad isNew /> <SpImage height={400} width={750} mode="aspectFill" src='recommend/03.jpg' isShowMenuByLongpress={false} lazyLoad isNew />
<SpImage height={height * 2} width={windowWidth * 2} mode="aspectFill" src='recommend/04.jpg' isShowMenuByLongpress={false} lazyLoad isNew /> <SpImage height={400} width={750} mode="aspectFill" src='recommend/04.jpg' isShowMenuByLongpress={false} lazyLoad isNew />
<SpImage height={height * 2} width={windowWidth * 2} mode="aspectFill" src='recommend/05.jpg' isShowMenuByLongpress={false} lazyLoad isNew /> <SpImage height={400} width={750} mode="aspectFill" src='recommend/05.jpg' isShowMenuByLongpress={false} lazyLoad isNew />
<SpImage height={height * 2} width={windowWidth * 2} mode="aspectFill" src='recommend/06.jpg' isShowMenuByLongpress={false} lazyLoad isNew /> <SpImage height={400} width={750} mode="aspectFill" src='recommend/06.jpg' isShowMenuByLongpress={false} lazyLoad isNew />
<SpImage height={height * 2} width={windowWidth * 2} mode="aspectFill" src='recommend/07.jpg' isShowMenuByLongpress={false} lazyLoad isNew /> <SpImage height={400} width={750} mode="aspectFill" src='recommend/07.jpg' isShowMenuByLongpress={false} lazyLoad isNew />
<SpImage height={height * 2} width={windowWidth * 2} mode="aspectFill" src='recommend/08.jpg' isShowMenuByLongpress={false} lazyLoad isNew /> <SpImage height={400} width={750} mode="aspectFill" src='recommend/08.jpg' isShowMenuByLongpress={false} lazyLoad isNew />
<SpImage height={height * 2} width={windowWidth * 2} mode="aspectFill" src='recommend/09.jpg' isShowMenuByLongpress={false} lazyLoad isNew /> <SpImage height={400} width={750} mode="aspectFill" src='recommend/09.jpg' isShowMenuByLongpress={false} lazyLoad isNew />
</View> </View>
</View> </View>
} }

View File

@ -259,7 +259,7 @@ export default class TradeItem extends Component {
查看物流 查看物流
</Button> </Button>
)} */} )} */}
{!info.aftersales_bn && info.receipt_type !== 'dada' && ( {info.receipt_type !== 'dada' && (
<Button <Button
className='btn-action' className='btn-action'
style={`box-shadow: 0 0 0 1PX ${colors.data[0].primary}; color: ${colors.data[0].primary}`} style={`box-shadow: 0 0 0 1PX ${colors.data[0].primary}; color: ${colors.data[0].primary}`}

View File

@ -756,7 +756,7 @@ export default class TradeDetail extends Component {
</View> </View>
)} )}
<ScrollView scroll-y className='scroll-view' style={{ bottom: info.status === 'WAIT_BUYER_PAY' || info.can_apply_aftersales === 1 || info.status === 'WAIT_BUYER_CONFIRM_GOODS' ? '140rpx' : '40rpx' }} scrollIntoView={scrollIntoView}> <ScrollView scroll-y className='scroll-view' scrollIntoView={scrollIntoView}>
{false && <View className='trade-detail-header' id='order-0'> {false && <View className='trade-detail-header' id='order-0'>
<View className='trade-detail-waitdeliver'> <View className='trade-detail-waitdeliver'>
{info.is_logistics && <View className='oneline'>线上订单</View>} {info.is_logistics && <View className='oneline'>线上订单</View>}

View File

@ -444,10 +444,9 @@ $paddingBottom: 100px;
.right { .right {
font-size: 32px; font-size: 32px;
} }
.left .left,
// ,.sp-price__symbol, .sp-price__symbol,
// .sp-price__int .sp-price__int {
{
font-weight: bold; font-weight: bold;
} }
} }

View File

@ -227,13 +227,11 @@ function InvoiceInfo (props) {
// 预览文件 // 预览文件
const preview = (url, fileName) => { const preview = (url, fileName) => {
Taro.showLoading({ title: '正在加载中', mask: true })
Taro.downloadFile({ Taro.downloadFile({
url: url, url: url,
success: function (res) { success: function (res) {
console.log("下载:", res) console.log("下载:", res)
var filePath = res.tempFilePath var filePath = res.tempFilePath
Taro.hideLoading()
Taro.openDocument({ Taro.openDocument({
filePath: filePath, filePath: filePath,
fileType: getFileType(url), fileType: getFileType(url),
@ -243,9 +241,6 @@ function InvoiceInfo (props) {
}, },
}) })
}, },
fail: function (_) {
Taro.hideLoading()
}
}) })
} }
// 获取文件类型 // 获取文件类型

View File

@ -304,11 +304,8 @@ function TradeAfterSale (props) {
} }
> >
{!afterSaleTid ? <View className="after-item"> {!afterSaleTid ? <View className="after-item">
<View className="after-item-label">售后类型:</View> <View className="after-item-label">请选择售后类型:</View>
<View className="after-item-input"> <Picker
<View className="input-txt color-hui">{tabList[curTabIdx] ? tabList[curTabIdx].title : '请选择售后类型'}</View>
</View>
{/* <Picker
mode='selector' mode='selector'
range={tabList.map(item => item.title)} range={tabList.map(item => item.title)}
onChange={(e) => { onChange={(e) => {
@ -321,7 +318,7 @@ function TradeAfterSale (props) {
<View className="input-txt">{tabList[curTabIdx] ? tabList[curTabIdx].title : '请选择售后类型'}</View> <View className="input-txt">{tabList[curTabIdx] ? tabList[curTabIdx].title : '请选择售后类型'}</View>
<View className="iconfont icon-arrowRight" style={{ color: tabList[curTabIdx] > -1 ? '#000' : '#a5a5a5' }}></View> <View className="iconfont icon-arrowRight" style={{ color: tabList[curTabIdx] > -1 ? '#000' : '#a5a5a5' }}></View>
</View> </View>
</Picker> */} </Picker>
</View> : aftersales.progress >= 0 && aftersales.progress != 12 ? <View className="after-item"> </View> : aftersales.progress >= 0 && aftersales.progress != 12 ? <View className="after-item">
<View className="after-item-label">售后单号{afterSaleTid}</View> <View className="after-item-label">售后单号{afterSaleTid}</View>
<View className="after-item-label" style={{ fontSize: '30rpx', display: 'flex', alignItems: 'flex-end', justifyContent: 'space-between', opacity: '80', margin: '36rpx 0 50rpx 0', lineHeight: '0.8' }}> <View className="after-item-label" style={{ fontSize: '30rpx', display: 'flex', alignItems: 'flex-end', justifyContent: 'space-between', opacity: '80', margin: '36rpx 0 50rpx 0', lineHeight: '0.8' }}>
@ -444,7 +441,7 @@ function TradeAfterSale (props) {
</View> </View>
<View className="after-item mt-40" style={{ marginTop: '60rpx' }}> <View className="after-item mt-40" style={{ marginTop: '60rpx' }}>
<View className="after-item-label color-hui">退货原因*</View> <View className="after-item-label color-hui">退货原因</View>
{!afterSaleTid ? <Picker {!afterSaleTid ? <Picker
mode='selector' mode='selector'
range={reasons} range={reasons}