diff --git a/src/api/item.js b/src/api/item.js index 6fdd575..3a7607f 100755 --- a/src/api/item.js +++ b/src/api/item.js @@ -4,6 +4,10 @@ export function search (params = {}) { // return req.get('/item.search', 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 = {}) { return req.get(`/goods/items/${item_id}`, params) diff --git a/src/components/goods-evaluation/index.js b/src/components/goods-evaluation/index.js index e275c78..88d6e9e 100755 --- a/src/components/goods-evaluation/index.js +++ b/src/components/goods-evaluation/index.js @@ -49,7 +49,6 @@ export default class GoodsEvaluation extends Component { } fortmatStr (desc) { - console.log("🚀 ~ GoodsEvaluation ~ desc:", desc) let desc_info = '颜色分类:' if (desc) { try { @@ -106,7 +105,7 @@ export default class GoodsEvaluation extends Component { - {info.anonymous ? '匿名用户' : info.username} + {'匿名用户' || info.anonymous ? '匿名用户' : info.username} {info.item_spec_desc_txt} diff --git a/src/components/search-bar/index.js b/src/components/search-bar/index.js index 210e3e7..a2a00c3 100755 --- a/src/components/search-bar/index.js +++ b/src/components/search-bar/index.js @@ -111,7 +111,7 @@ export default class SearchBar extends Component { } handleClickHotItem = (item) => { - this.handleConfirm({ detail: { value: item.tit } }) + this.handleConfirm({ detail: { value: item } }) } handleBlurSearch = () => { @@ -123,7 +123,7 @@ export default class SearchBar extends Component { } render () { - const { isFixed, keyword, showDailog, placeholder } = this.props + const { isFixed, keyword, showDailog, placeholder, hotSearch } = this.props const { showSearchDailog, historyList, isShowAction, searchValue } = this.state return ( 近期大家搜索最多 - {[{ tit: '#测试数据' }].map((item, index) => - {item.tit} + {hotSearch.map((item, index) => + {item.content ? '#' + item.content : ''} {/* */} )} diff --git a/src/components/search-bar/index.scss b/src/components/search-bar/index.scss index 8f640cd..85fb20d 100755 --- a/src/components/search-bar/index.scss +++ b/src/components/search-bar/index.scss @@ -98,12 +98,15 @@ padding: 40px 30px; &__item { padding: 24px 42px; - margin-right: 30px 30px 0 0; + margin: 0 20px 20px 0; text-align: center; display: inline-block; color: #000; background-color: #9e9e9e40; border-radius: 6px; + // &:nth-child(3n) { + // margin-right: 0; + // } } .at-icon { font-size: 40px; diff --git a/src/pages/cart/espier-checkout.js b/src/pages/cart/espier-checkout.js index 5b2982b..eae45da 100755 --- a/src/pages/cart/espier-checkout.js +++ b/src/pages/cart/espier-checkout.js @@ -1097,7 +1097,7 @@ function CartCheckout (props) { )} {!bargain_id && ( - + */} {list.map((item) => ( - + {'匿名用户' || item.username} diff --git a/src/pages/item/comps/comp-evaluation.scss b/src/pages/item/comps/comp-evaluation.scss index db820d5..945f1f0 100755 --- a/src/pages/item/comps/comp-evaluation.scss +++ b/src/pages/item/comps/comp-evaluation.scss @@ -1,7 +1,7 @@ .comp-evaluation { // margin: 0 16px; background-color: #fff; - padding: 0 30px; + // padding: 0 30px; // box-shadow: 0px 2px 10px 0px #eae7e0; .evaluation-hd { display: flex; diff --git a/src/pages/item/list.js b/src/pages/item/list.js index 7092850..79061f0 100755 --- a/src/pages/item/list.js +++ b/src/pages/item/list.js @@ -50,6 +50,7 @@ const initialState = { routerParams: null, card_id: null, // 兑换券 total: undefined, + historyList: [] } function ItemList () { @@ -68,7 +69,8 @@ function ItemList () { show, fixTop, routerParams, - total + total, + historyList } = state const [isShowSearch, setIsShowSearch] = useState(false) const { cat_id, main_cat_id, tag_id, card_id, user_card_id } = routerParams || {} @@ -202,7 +204,6 @@ function ItemList () { select_tags_list = [], brand_list } = await api.item.search(params) - console.time('list render') console.log('fetch list:', list) const n_list = pickBy(list, doc.goods.ITEM_LIST_GOODS) const resLeftList = n_list.filter((item, index) => { @@ -216,12 +217,14 @@ function ItemList () { } }) console.timeEnd('list render') + const _historyList = await api.item.searchHotKey({ distributor_id: 0, page: 1, pageSize: 10 }) setState((v) => { v.total = total_count v.leftList[pageIndex - 1] = resLeftList v.rightList[pageIndex - 1] = resRightList v.brandList = pickBy(brand_list?.list, doc.goods.WGT_GOODS_BRAND) + v.historyList = _historyList?.list || [] if (v.tagList.length < 1) { if (select_tags_list.length > 0) { v.tagList = [ @@ -266,12 +269,13 @@ function ItemList () { }) } - const handleConfirm = async (val) => { + const handleConfirm = (val) => { setIsShowSearch(false) - await setState((draft) => { + setState((draft) => { draft.leftList = [] draft.rightList = [] draft.keywords = val + // draft.keywords = '' }) goodsRef.current.reset() } @@ -354,10 +358,11 @@ function ItemList () { handleConfirm(keywords)} + // onBlur={() => handleConfirm('')} onChange={handleOnChange} onClear={handleOnClear} onCancel={handleSearchOff} diff --git a/src/subpage/pages/trade/detail.js b/src/subpage/pages/trade/detail.js index 9c241b9..134cdbd 100755 --- a/src/subpage/pages/trade/detail.js +++ b/src/subpage/pages/trade/detail.js @@ -756,7 +756,7 @@ export default class TradeDetail extends Component { )} - + {false && {info.is_logistics && 线上订单} diff --git a/src/subpages/trade/after-sale.js b/src/subpages/trade/after-sale.js index 881fb17..b4e75a9 100755 --- a/src/subpages/trade/after-sale.js +++ b/src/subpages/trade/after-sale.js @@ -304,8 +304,11 @@ function TradeAfterSale (props) { } > {!afterSaleTid ? - 请选择售后类型: - 售后类型: + + {tabList[curTabIdx] ? tabList[curTabIdx].title : '请选择售后类型'} + + {/* item.title)} onChange={(e) => { @@ -318,7 +321,7 @@ function TradeAfterSale (props) { {tabList[curTabIdx] ? tabList[curTabIdx].title : '请选择售后类型'} -1 ? '#000' : '#a5a5a5' }}> - + */} : aftersales.progress >= 0 && aftersales.progress != 12 ? 售后单号:{afterSaleTid} @@ -441,7 +444,7 @@ function TradeAfterSale (props) { - 退货原因 + 退货原因* {!afterSaleTid ?