已优化
This commit is contained in:
@@ -6,6 +6,7 @@ import Product from '@/components/product'
|
||||
import MoveBtn from '@/components/moveBtn'
|
||||
import ShopCart from '@/components/shopCart'
|
||||
import styles from './index.module.scss'
|
||||
import { goLink } from '@/common/common'
|
||||
import { useState } from 'react'
|
||||
import Taro from '@tarojs/taro'
|
||||
|
||||
@@ -32,12 +33,6 @@ export default () => {
|
||||
|
||||
const [showShopCart, setShowShopCart] = useState(false)
|
||||
|
||||
const goLink = () => {
|
||||
Taro.navigateTo({
|
||||
url: '/pages/search/index'
|
||||
})
|
||||
}
|
||||
|
||||
return (
|
||||
<MoveBtn onClick={() => setShowShopCart(!showShopCart)}>
|
||||
<View className={styles.main}>
|
||||
@@ -45,7 +40,7 @@ export default () => {
|
||||
<View className={styles.search}>
|
||||
<View className={styles.search_collect}>我的收藏</View>
|
||||
<View className={styles.search_input}>
|
||||
<Search disabled={true} style={{width: '263rpx'}} clickOnSearch={() => goLink()}/>
|
||||
<Search disabled={true} style={{width: '263rpx'}} clickOnSearch={() => goLink('/pages/search/index')}/>
|
||||
</View>
|
||||
</View>
|
||||
<View className={styles.products}>
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
|
||||
import { View } from '@tarojs/components'
|
||||
import Search from '@/components/search'
|
||||
import { goLink } from '@/common/common';
|
||||
import classnames from "classnames";
|
||||
import styles from './index.module.scss'
|
||||
|
||||
@@ -8,7 +9,7 @@ export default () => {
|
||||
return (
|
||||
<View className={styles.main}>
|
||||
<View className={styles.search}>
|
||||
<Search style={{width: '100%'}} placeholder="请输入面料关键词" placeIcon="out" showBtn={true}/>
|
||||
<Search style={{width: '100%'}} placeholder="请输入面料关键词" placeIcon="out" showBtn={true} clickOnSearch={() => goLink('/pages/searchList/index')}/>
|
||||
</View>
|
||||
<View className={styles.hot}>
|
||||
<View className={styles.hot_header}>
|
||||
|
||||
Reference in New Issue
Block a user