Pārlūkot izejas kodu

change payment fee

wind 2 nedēļas atpakaļ
vecāks
revīzija
a51527690d

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

@@ -27,7 +27,6 @@ export default function ArticleDetail({ params }: { params: { slug: string } })
   const [message, setMessage] = useState<string | null>(null);
   useEffect(() => {
     fetchArticleDetail(parseInt(articleId as string)).then((data) => {
-      console.log(data);
       if (data.code == 9001) {
         setMessage("此文章为付费文章,请返回列表页面进行购买!");
       } else if (data.code == 3010) {

+ 20 - 2
src/app/insightList/insightList.module.scss

@@ -16,13 +16,22 @@
     .payment {
       margin-left: 20px;
       padding: 6px;
-      font-size: 12px;
+      font-size: 14px;
       color: #f60707;
       background-color: #fefefe;
       box-shadow: 0 3px 6px rgba(0, 0, 0, 0.1);
       border-radius: 4px;
     }
 
+    .payed {
+      margin-left: 20px;
+      padding: 5px;
+      font-size: 12px;
+      color: #333333;
+      background-color: #e5e5e5;
+      border-radius: 8px;
+    }
+
     .articleContent {
       font-size: 16px;
       line-height: 30px;
@@ -84,13 +93,22 @@
       .payment {
         margin-left: 20px;
         padding: 5px;
-        font-size: 12px;
+        font-size: 14px;
         color: #f60707;
         background-color: #e7dbdb;
         box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
         border-radius: 8px;
       }
 
+      .payed {
+        margin-left: 20px;
+        padding: 5px;
+        font-size: 12px;
+        color: #333333;
+        background-color: #e5e5e5;
+        border-radius: 8px;
+      }
+
       .articleContent {
         font-size: 16px;
         line-height: 30px;

+ 2 - 1
src/app/insightList/page.tsx

@@ -64,9 +64,10 @@ const InsightList: React.FC = () => {
                         {item?.title}
                         {!item?.payed && (
                           <span className={styles.payment} onClick={(event) => buy(event, item?.id)}>
-                            需购买
+                            付费:1元
                           </span>
                         )}
+                        {item?.payed && <span className={styles.payed}>已付费</span>}
                       </div>
                       <div className={styles.articleContent}>{item?.digest}</div>
                     </div>

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

@@ -42,7 +42,6 @@ export default function Login() {
   const handleSubmit = async (values: LoginParams) => {
     try {
       const response = await login({ ...values, type: type == "password" ? 0 : 1 });
-      console.log(response);
       if (response.code === 200) {
         const data = response.data;
         Cookies.set("ut", data.token);
@@ -176,7 +175,6 @@ export default function Login() {
                     throw new Error("请先输入手机号");
                   }
                   const result = await sendCaptcha(phone);
-                  console.log(result);
                   if (result === false) {
                     return;
                   }

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

@@ -122,7 +122,6 @@ const Register: React.FC = () => {
                     throw new Error("请先输入手机号");
                   }
                   const result = await sendCaptcha(phone);
-                  console.log(result);
                   if (result === false) {
                     return;
                   }