diff --git a/src/common/constant.ts b/src/common/constant.ts
index 02a6fb2..74bd374 100644
--- a/src/common/constant.ts
+++ b/src/common/constant.ts
@@ -1,11 +1,11 @@
-export const BASE_URL = CURRENT_BASE_URL
+// export const BASE_URL = CURRENT_BASE_URL
// export const BASE_URL = `http://192.168.0.75:50001/lymarket`
// export const BASE_URL = `http://192.168.0.89:50001/lymarket`
// export const BASE_URL = `http://10.0.0.5:50001/lymarket`
// export const BASE_URL = `http://192.168.0.89:40001/lymarket`
// export const BASE_URL = `http://192.168.1.165:40001/lymarket` // 王霞
// export const BASE_URL = 'https://test.zzfzyc.com/lymarket' // 测试环境
-// export const BASE_URL = 'https://pre.zzfzyc.com/lymarket' // 预发布
+export const BASE_URL = 'https://pre.zzfzyc.com/lymarket' // 预发布
// export const BASE_URL = `http://192.168.1.9:40001/lymarket` // 发
// export const BASE_URL = `http://192.168.1.9:50005/lymarket` // 发
// export const BASE_URL = `http://192.168.1.30:50001/lymarket` // 发
diff --git a/src/components/LabAndImg/index.tsx b/src/components/LabAndImg/index.tsx
index d3d4a4b..6e13f1b 100644
--- a/src/components/LabAndImg/index.tsx
+++ b/src/components/LabAndImg/index.tsx
@@ -41,7 +41,6 @@ const LabAndImg = ({ value, onClick, showStatus = false, round = false, name = '
// }, [value])
const img = useMemo(() => {
- console.log('update img')
if (value?.texture_url) {
const imgs = value.texture_url.split(',').map((item) => {
return formatImgUrl(item, suffix)
diff --git a/src/components/infiniteScroll/index.tsx b/src/components/infiniteScroll/index.tsx
index f119bcf..30e9aee 100644
--- a/src/components/infiniteScroll/index.tsx
+++ b/src/components/infiniteScroll/index.tsx
@@ -47,7 +47,7 @@ const InfiniteScroll = ({
safeAreaInsetBottom = true,
enableLoadMoreStatus = true,
children,
- lowerThresholdNum = 5,
+ lowerThresholdNum = 30,
paddingBottom = 0,
refresherTriggered = false,
refresherEnabled = false,
diff --git a/src/pages/searchList/search.tsx b/src/pages/searchList/search.tsx
index f2533ed..b905b43 100644
--- a/src/pages/searchList/search.tsx
+++ b/src/pages/searchList/search.tsx
@@ -1,17 +1,13 @@
import Taro, { useDidShow, useShareAppMessage } from '@tarojs/taro'
import { Text, View } from '@tarojs/components'
import { useCallback, useEffect, useMemo, useRef, useState } from 'react'
-import classnames from 'classnames'
import styles from './search.module.scss'
-import Goods from './components/goods'
import Search from '@/components/search'
import { alert, goLink } from '@/common/common'
import { AddSearchHistoryApi, GetHotSearchApi, GetSearchHistoryApi } from '@/api/search'
import { SCENE, SEARCH_EMPTY_IMAGE } from '@/common/constant'
import useLogin from '@/use/useLogin'
import Empty from '@/components/empty'
-import { dataLoadingStatus, debounce, getFilterData } from '@/common/util'
-import InfiniteScroll from '@/components/infiniteScroll'
import { GetProductListApi, mallsearchHistorydelete } from '@/api/material'
import IconFont from '@/components/iconfont/iconfont'
@@ -57,7 +53,6 @@ export default () => {
const { fetchData: addFetchData } = AddSearchHistoryApi()
const addSearchHistory = async() => {
await addFetchData(addSearchField.current)
- // goLink('/pages/searchList/searchList', {key: addSearchField.current.key})
}
// 默认输入框词
@@ -67,19 +62,11 @@ export default () => {
const searchEvent = (e, status = true) => {
addSearchField.current.key = e
setdefaultValue(e)
- // if (e == '') {
- // alert.error('请输入关键词')
- // return false
- // }
- // addSearchField.current.key = e
addSearchHistory()
// status && addSearchHistory()
Taro.navigateTo({
url: `/pages/searchList/searchList?key=${addSearchField.current.key}`,
})
-
- // setSearchData(val => ({ ...val, page: 1, size: 10, code_or_name: e }))
- // getProductList()
}
const changeSearch = useCallback((e) => {
@@ -105,37 +92,6 @@ export default () => {
}
}
- // 获取面料列表
- // const [materialList, setMaterialList] = useState<{ list: any[]; total: number }>({ list: [], total: 0 })
- // const { fetchData: materialFetchData, state: materialState } = GetProductListApi()
- // const getProductList = async() => {
- // const { data } = await materialFetchData(getFilterData(searchData))
- // setMaterialList({ list: data.list, total: data.total })
- // Taro.stopPullDownRefresh()
- // }
-
- // 上拉加载数据
- const pageNum = useRef({ size: searchData.size, page: searchData.page })
- // const getScrolltolower = () => {
- // if (materialList.list.length < materialList.total) {
- // pageNum.current.page++
- // const size = pageNum.current.size * pageNum.current.page
- // setSearchData({ ...searchData, size })
- // }
- // }
-
- // 监听筛选条件变化
- // useEffect(() => {
- // if (searchData.code_or_name !== '') {
- // getProductList()
- // }
- // }, [searchData.code_or_name])
-
- // 数据加载状态
- // const statusMore = useMemo(() => {
- // return dataLoadingStatus({ list: materialList.list, total: materialList.total, status: materialState.loading })
- // }, [materialList, materialState])
-
// 删除历史搜索
const { fetchData: deleteFetch } = mallsearchHistorydelete()
const handDelete = async() => {
@@ -232,22 +188,6 @@ export default () => {
searchData?.historyField.length === 0 &&
}
>
- {/* {
- searchData.showIndex === 2 &&
- 搜索结果
-
-
- {
- materialList?.list.map((item) => {
- return (
- goLink(`/pages/details/index?id=${item.id}`)} key={item} data={item}>
- )
- })
- }
-
-
-
- } */}
)
}
diff --git a/src/pages/searchList/searchList.tsx b/src/pages/searchList/searchList.tsx
index 9345ecd..b5daa6b 100644
--- a/src/pages/searchList/searchList.tsx
+++ b/src/pages/searchList/searchList.tsx
@@ -91,7 +91,7 @@ export default () => {
// 上拉加载数据
const pageNum = useRef({ size: searchField.size, page: searchField.page })
- const getScrolltolower = () => {
+ const getScrollToLower = () => {
if (materialList.list.length < materialList.total) {
pageNum.current.page++
const size = pageNum.current.size * pageNum.current.page
@@ -231,7 +231,14 @@ export default () => {
-
+
{materialList.list?.map((item) => {
return (