Просмотр исходного кода

Merge branch 'zzf-account' into dev

zhangzf 1 день назад
Родитель
Сommit
2edcc961bb

+ 1 - 1
src/app/(public)/customer/account/accessories/page.tsx

@@ -16,7 +16,7 @@ const PointsRedeemHairPage: React.FC = () => {
   // 总积分(模拟数据)
   // 总积分(模拟数据)
   const totalPoints = 100009;
   const totalPoints = 100009;
   // 商品列表数据
   // 商品列表数据
-  const [products, setProducts] = useState<RedeemProduct[]>([
+  const [products, ] = useState<RedeemProduct[]>([
     {
     {
       id: 1,
       id: 1,
       type: "BUNDLE",
       type: "BUNDLE",

+ 1 - 1
src/app/(public)/customer/account/mycoupon/_components/CouponList.tsx

@@ -1,5 +1,5 @@
 // src/components/CouponList.tsx
 // src/components/CouponList.tsx
-import React, { useState, useEffect } from 'react';
+import React, { useState } from 'react';
 import { useInfiniteScroll } from "./UseInfiniteScroll";
 import { useInfiniteScroll } from "./UseInfiniteScroll";
 
 
 // 优惠券数据类型
 // 优惠券数据类型

+ 3 - 3
src/app/(public)/customer/account/pointsreceivelist/_components/RedeemGiftCard.tsx

@@ -46,8 +46,8 @@ const RedeemGiftCard: React.FC = () => {
     console.log("返回结果:", json);
     console.log("返回结果:", json);
   };
   };
 
 
-  // 总积分(模拟数据)
-  const totalPoints = 100009;
+  // // 总积分(模拟数据)
+  // const totalPoints = 100009;
   return (
   return (
     <div className="">
     <div className="">
       {/* 顶部积分展示 */}
       {/* 顶部积分展示 */}
@@ -109,7 +109,7 @@ const RedeemGiftCard: React.FC = () => {
       <div className="min-h-screen bg-white px-2.5 max-w-md mx-auto">
       <div className="min-h-screen bg-white px-2.5 max-w-md mx-auto">
         {/* 积分兑换列表 */}
         {/* 积分兑换列表 */}
         <div className="space-y-3">
         <div className="space-y-3">
-          {Object.values(list).map((item,index) => (
+          {Object.values(list).map((item) => (
             <div
             <div
               key={item.id}
               key={item.id}
               className="bg-gradient-to-r from-orange-500 to-orange-400 rounded-md p-4 flex items-center justify-between text-white"
               className="bg-gradient-to-r from-orange-500 to-orange-400 rounded-md p-4 flex items-center justify-between text-white"

+ 1 - 1
src/app/(public)/customer/account/redeemhair/page.tsx

@@ -16,7 +16,7 @@ const PointsRedeemHairPage: React.FC = () => {
   // 总积分(模拟数据)
   // 总积分(模拟数据)
   const totalPoints = 100009;
   const totalPoints = 100009;
   // 商品列表数据
   // 商品列表数据
-  const [products, setProducts] = useState<RedeemProduct[]>([
+  const [products, ] = useState<RedeemProduct[]>([
     {
     {
       id: 1,
       id: 1,
       type: "BUNDLE",
       type: "BUNDLE",

+ 1 - 1
src/app/api/gift/lists/route.ts

@@ -3,7 +3,7 @@ import { restApiFetch } from "@/utils/bagisto";
 import { isBagistoError } from "@/utils/type-guards";
 import { isBagistoError } from "@/utils/type-guards";
 import { getAuthToken } from "@/utils/helper";
 import { getAuthToken } from "@/utils/helper";
 import type { GiftListBody,FetchWrap  } from '@/types/api/gift/lists';
 import type { GiftListBody,FetchWrap  } from '@/types/api/gift/lists';
-export async function GET(req: NextRequest,{ params }: { params: Promise<{ id: string }> }) {
+export async function GET(req: NextRequest,{  }: { params: Promise<{ id: string }> }) {
     try {
     try {
         const guestToken = getAuthToken(req);
         const guestToken = getAuthToken(req);
         const response = await restApiFetch<FetchWrap<GiftListBody>>({
         const response = await restApiFetch<FetchWrap<GiftListBody>>({

+ 1 - 1
src/app/api/gift/my-gift-cards/route.ts

@@ -3,7 +3,7 @@ import { restApiFetch } from "@/utils/bagisto";
 import { isBagistoError } from "@/utils/type-guards";
 import { isBagistoError } from "@/utils/type-guards";
 import { getAuthToken } from "@/utils/helper";
 import { getAuthToken } from "@/utils/helper";
 import type { GiftCardRespBody,FetchResult  } from '@/types/api/gift/my-gift-cards';
 import type { GiftCardRespBody,FetchResult  } from '@/types/api/gift/my-gift-cards';
-export async function GET(req: NextRequest,{ params }: { params: Promise<{ id: string }> }) {
+export async function GET(req: NextRequest,{  }: { params: Promise<{ id: string }> }) {
     try {
     try {
         const guestToken = getAuthToken(req);
         const guestToken = getAuthToken(req);
         const response = await restApiFetch<FetchResult<GiftCardRespBody>>({
         const response = await restApiFetch<FetchResult<GiftCardRespBody>>({

+ 1 - 1
src/components/customer/mycounpon/couponList.tsx

@@ -1,5 +1,5 @@
 // src/components/CouponList.tsx
 // src/components/CouponList.tsx
-import React, { useState, useEffect } from 'react';
+import React, { useState} from 'react';
 import { useInfiniteScroll } from './useInfiniteScroll';
 import { useInfiniteScroll } from './useInfiniteScroll';
 
 
 // 优惠券数据类型
 // 优惠券数据类型