refactor(components): 重构 CouponCard 组件样式

- 优化了 CouponCard 组件的视觉效果,增加了更多细节和动画
- 添加了响应式样式,提高了移动端体验
- 新增了 CouponList组件样式,用于展示优惠券列表
This commit is contained in:
2025-08-22 17:27:45 +08:00
parent 41702c295a
commit 1e51a137ee
20 changed files with 1321 additions and 241 deletions

View File

@@ -2,6 +2,7 @@ import {Search} from '@nutui/icons-react-taro'
import {Button, Input} from '@nutui/nutui-react-taro'
import {useState} from "react";
import Taro from '@tarojs/taro';
import { goTo } from '@/utils/navigation';
function MySearch() {
const [keywords, setKeywords] = useState<string>('')
@@ -18,17 +19,13 @@ function MySearch() {
});
return false;
}
// 跳转到搜索页面
Taro.navigateTo({
url: `/shop/search/index?keywords=${encodeURIComponent(keywords.trim())}`
});
// 跳转到搜索页面 - 使用新的导航工具,自动处理路径和参数
goTo('shop/search/index', { keywords: keywords.trim() });
}
// 点击搜索框跳转到搜索页面
const onInputFocus = () => {
Taro.navigateTo({
url: '/shop/search/index'
});
goTo('shop/search/index');
}