巴青农资商城

search.js 1.0KB

1234567891011121314151617181920212223242526272829303132333435
  1. /** 搜索占位文案(与首页、分类一致 SRH15) */
  2. export const SEARCH_PLACEHOLDER = '搜索兽药、饲料、店铺'
  3. /** 本地历史存储键 */
  4. export const SEARCH_HISTORY_KEY = 'shop_search_history'
  5. /** 历史条数上限 */
  6. export const SEARCH_HISTORY_MAX = 20
  7. /** 结果页 Tab */
  8. export const SEARCH_TAB_SALES = 'sales'
  9. export const SEARCH_TAB_PRICE = 'price'
  10. export const SEARCH_TAB_SHOP = 'shop'
  11. export const SEARCH_TAB_OPTIONS = [
  12. { label: '按销量', value: SEARCH_TAB_SALES },
  13. { label: '按价格', value: SEARCH_TAB_PRICE },
  14. { label: '店铺', value: SEARCH_TAB_SHOP }
  15. ]
  16. /** 按价格 Tab 下的价序 */
  17. export const PRICE_ORDER_ASC = 'price_asc'
  18. export const PRICE_ORDER_DESC = 'price_desc'
  19. export const PRICE_ORDER_OPTIONS = [
  20. { label: '从低到高', value: PRICE_ORDER_ASC },
  21. { label: '从高到低', value: PRICE_ORDER_DESC }
  22. ]
  23. /** 默认商品排序(按销量 Tab / 首次进 B 页) */
  24. export const DEFAULT_GOODS_SORT = 'sales_desc'
  25. /** 列表每页条数 */
  26. export const SEARCH_PAGE_SIZE = 10