🐳 chore(eslint): 修正所有文件的eslint 错误❌
This commit is contained in:
@@ -6,15 +6,15 @@ import styles from './index.module.scss'
|
||||
import Goods from './components/goods'
|
||||
import Search from '@/components/search'
|
||||
import Empty from '@/components/empty'
|
||||
import { mpproductlist } from '@/api/search'
|
||||
import { MpProductList } from '@/api/search'
|
||||
import { debounce, getFilterData } from '@/common/util'
|
||||
import ShopCart from '@/components/shoppingCart'
|
||||
import {
|
||||
ClientListApi,
|
||||
mpproductcolorlist,
|
||||
mpsearchHistory,
|
||||
mpsearchHistorylist
|
||||
, mpshoppingCartproductColorlist,
|
||||
MpProductColorList,
|
||||
MpSearchHistory,
|
||||
MpSearchHistoryList
|
||||
, MpShoppingCartProductColorList,
|
||||
} from '@/api/order'
|
||||
|
||||
const SearchPage = () => {
|
||||
@@ -78,7 +78,7 @@ const SearchPage = () => {
|
||||
const [showShopCart, setShowShopCart] = useState(false)
|
||||
|
||||
// 获取商品
|
||||
const { fetchData: colorlistFetch } = mpproductcolorlist()
|
||||
const { fetchData: colorlistFetch } = MpProductColorList()
|
||||
const getGoodList = async() => {
|
||||
const res = await colorlistFetch({ product_id: search.goodsId, sale_mode: search.modeId, code_or_name: search.code_or_name, physical_warehouse: search?.physical_warehouse, purchaser_id: clientObj?.clientId })
|
||||
res.data.list.map((item) => {
|
||||
@@ -107,7 +107,7 @@ const SearchPage = () => {
|
||||
}, [search])
|
||||
|
||||
// 加入购物车
|
||||
const { fetchData: preViewFetch } = mpshoppingCartproductColorlist()
|
||||
const { fetchData: preViewFetch } = MpShoppingCartProductColorList()
|
||||
const handSure = async() => {
|
||||
const arr = goodList.filter((item) => {
|
||||
return item.showInput
|
||||
@@ -199,13 +199,22 @@ const SearchPage = () => {
|
||||
if (item.id === it.id) {
|
||||
item.nums--
|
||||
if (search.modeId == 0) {
|
||||
if (item.nums < 1) { it.showInput = false, it.nums = 1 }
|
||||
if (item.nums < 1) {
|
||||
it.showInput = false
|
||||
it.nums = 1
|
||||
}
|
||||
}
|
||||
if (search.modeId == 1) {
|
||||
if (item.nums < 0.5) { it.showInput = false, it.nums = 0.5 }
|
||||
if (item.nums < 0.5) {
|
||||
it.showInput = false
|
||||
it.nums = 0.5
|
||||
}
|
||||
}
|
||||
if (search.modeId == 2) {
|
||||
if (item.nums < 3) { it.showInput = false, it.nums = 3 }
|
||||
if (item.nums < 3) {
|
||||
it.showInput = false
|
||||
it.nums = 3
|
||||
}
|
||||
}
|
||||
}
|
||||
return item
|
||||
@@ -236,7 +245,7 @@ const SearchPage = () => {
|
||||
|
||||
// 获取关键字数据
|
||||
const [histroyList, setHistroyList] = useState<any[]>([])
|
||||
const { fetchData: historyFetch } = mpsearchHistorylist()
|
||||
const { fetchData: historyFetch } = MpSearchHistoryList()
|
||||
const getHistory = async() => {
|
||||
Taro.showLoading({
|
||||
title: '加载中...',
|
||||
@@ -258,8 +267,8 @@ const SearchPage = () => {
|
||||
}, [])
|
||||
|
||||
// 搜索获取商品数据
|
||||
const { fetchData: productFetch } = mpproductlist()
|
||||
const { fetchData: historyputFetch } = mpsearchHistory()
|
||||
const { fetchData: productFetch } = MpProductList()
|
||||
const { fetchData: historyputFetch } = MpSearchHistory()
|
||||
const getProduct = debounce(async(e) => {
|
||||
Taro.showLoading({
|
||||
title: '加载中...',
|
||||
|
||||
Reference in New Issue
Block a user