Jelajahi Sumber

change logo & remote build error

wind 4 hari lalu
induk
melakukan
a8323d1c1c

+ 2 - 0
package.json

@@ -21,9 +21,11 @@
     "react-responsive": "^10.0.0",
     "react-scroll": "^1.9.0",
     "sass": "^1.83.0",
+    "sharp": "^0.33.5",
     "swiper": "^10.3.1"
   },
   "devDependencies": {
+    "@types/js-cookie": "^3.0.6",
     "@types/jsdom": "^21.1.7",
     "@types/node": "^20",
     "@types/react": "^18",

+ 1 - 2
src/app/insightDetail/[slug]/page.tsx

@@ -4,7 +4,6 @@ import Nav from "@/components/Nav";
 import Footer from "@/components/Footer";
 import styles from "./insightDetail.module.scss";
 import { fetchArticleDetail } from "@/lib/cmsForPayment";
-import { getDesc180 } from "@/lib/parser";
 
 interface ArticleType {
   id: number;
@@ -35,7 +34,7 @@ export default function ArticleDetail({ params }: { params: { slug: string } })
         setArticle(data.data);
       }
     });
-  }, []);
+  }, [articleId]);
 
   return (
     <>

+ 1 - 0
src/app/user/login/page.tsx

@@ -57,6 +57,7 @@ export default function Login() {
       }
       setErrorMsg(response.message || "");
     } catch (error) {
+      console.log(error);
       message.error("登录失败,请重试!");
     }
   };

+ 24 - 0
src/components/Header/header.module.scss

@@ -41,6 +41,30 @@
 
         letter-spacing: 0.1px;
       }
+
+      .logo2 {
+        /* HIPO 高潜 */
+        position: absolute;
+        top: 13px;
+        left: 0px;
+        width: 300px;
+        height: 32px;
+
+        /* light-text-color */
+
+        color: #ffffff;
+        font-weight: 500;
+        font-size: 20px;
+
+        /* h3 */
+
+        font-family: "Montserrat";
+        font-style: normal;
+        line-height: 32px;
+        /* identical to box height, or 133% */
+
+        letter-spacing: 0.1px;
+      }
     }
 
     .navbar-collapse {

+ 2 - 1
src/components/Header/headerPC.tsx

@@ -45,7 +45,8 @@ const HeaderPC: React.FC = () => {
     <div className={styles.nav}>
       <div className={styles["nav-bar"]}>
         <div className={styles["navbar-brand"]}>
-          <div className={styles.logo}>HIPO 高潜</div>
+          {/* <div className={styles.logo}>HIPO 高潜</div> */}
+          <div className={styles.logo2}>高潜(北京)咨询有限公司官网</div>
         </div>
         <div className={styles["navbar-collapse"]}>
           <div className={styles["navbar-content"]}>

+ 1 - 3
src/context/commonContext.tsx

@@ -1,7 +1,6 @@
 "use client";
 
 import React, { createContext, useContext, useState, useEffect } from "react";
-import Cookies from "js-cookie";
 import { userInfo } from "@/lib/user";
 
 export interface UserType {
@@ -24,8 +23,7 @@ export function CommonProvider({ children }: { children: React.ReactNode }) {
   const [redirectAfterLogin, setRedirectAfterLogin] = useState<string>("/");
 
   useEffect(() => {
-    const ut = Cookies.get("ut");
-    userInfo(ut).then(({ data: data }) => {
+    userInfo().then(({ data: data }) => {
       if (data) {
         const currentUser = {
           id: data.id,

+ 1 - 1
src/lib/user.ts

@@ -58,7 +58,7 @@ export async function register(params: RegisterParams) {
   return json;
 }
 
-export async function userInfo(token: string) {
+export async function userInfo() {
   const options = {
     method: "POST",
   };