Bläddra i källkod

个人主页页面提交

0235697 4 dagar sedan
förälder
incheckning
cc08da3f0e

+ 11 - 0
picture-web/package-lock.json

@@ -18,6 +18,7 @@
         "@angular/router": "^20.0.0",
         "@angular/router": "^20.0.0",
         "@types/swiper": "^6.0.0",
         "@types/swiper": "^6.0.0",
         "rxjs": "~7.8.0",
         "rxjs": "~7.8.0",
+        "sweetalert2": "^11.22.2",
         "swiper": "^11.2.10",
         "swiper": "^11.2.10",
         "tslib": "^2.3.0",
         "tslib": "^2.3.0",
         "zone.js": "~0.15.0"
         "zone.js": "~0.15.0"
@@ -8134,6 +8135,16 @@
         "url": "https://github.com/sponsors/ljharb"
         "url": "https://github.com/sponsors/ljharb"
       }
       }
     },
     },
+    "node_modules/sweetalert2": {
+      "version": "11.22.2",
+      "resolved": "https://registry.npmjs.org/sweetalert2/-/sweetalert2-11.22.2.tgz",
+      "integrity": "sha512-GFQGzw8ZXF23PO79WMAYXLl4zYmLiaKqYJwcp5eBF07wiI5BYPbZtKi2pcvVmfUQK+FqL1risJAMxugcPbGIyg==",
+      "license": "MIT",
+      "funding": {
+        "type": "individual",
+        "url": "https://github.com/sponsors/limonte"
+      }
+    },
     "node_modules/swiper": {
     "node_modules/swiper": {
       "version": "11.2.10",
       "version": "11.2.10",
       "resolved": "https://registry.npmmirror.com/swiper/-/swiper-11.2.10.tgz",
       "resolved": "https://registry.npmmirror.com/swiper/-/swiper-11.2.10.tgz",

+ 1 - 0
picture-web/package.json

@@ -30,6 +30,7 @@
     "@angular/router": "^20.0.0",
     "@angular/router": "^20.0.0",
     "@types/swiper": "^6.0.0",
     "@types/swiper": "^6.0.0",
     "rxjs": "~7.8.0",
     "rxjs": "~7.8.0",
+    "sweetalert2": "^11.22.2",
     "swiper": "^11.2.10",
     "swiper": "^11.2.10",
     "tslib": "^2.3.0",
     "tslib": "^2.3.0",
     "zone.js": "~0.15.0"
     "zone.js": "~0.15.0"

+ 2 - 235
picture-web/src/modules/picture/ser-tab/ser-tab.html

@@ -1,235 +1,4 @@
-<!DOCTYPE html>
-<html lang="zh-CN">
-<head>
-    <meta charset="UTF-8">
-    <meta name="viewport" content="width=device-width, initial-scale=1.0">
-    <title>图片购买App - 个人中心</title>
-    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.10.0/font/bootstrap-icons.css">
-    <style>
-        * {
-            margin: 0;
-            padding: 0;
-            box-sizing: border-box;
-            font-family: 'PingFang SC', 'Helvetica Neue', Arial, sans-serif;
-        }
-        
-        body {
-            background-color: #f8f8f8;
-            color: #333;
-            line-height: 1.6;
-        }
-        
-        .container {
-            max-width: 100%;
-            padding: 20px;
-        }
-        
-        .profile-header {
-            text-align: center;
-            margin-bottom: 30px;
-            padding: 20px 0;
-        }
-        
-        .avatar {
-            width: 80px;
-            height: 80px;
-            border-radius: 50%;
-            background-color: #FF7B25;
-            margin: 0 auto 15px;
-            display: flex;
-            align-items: center;
-            justify-content: center;
-            color: white;
-            font-size: 36px;
-            box-shadow: 0 4px 12px rgba(255, 123, 37, 0.3);
-        }
-        
-        .username {
-            font-size: 18px;
-            font-weight: 600;
-            margin-bottom: 5px;
-        }
-        
-        .user-status {
-            color: #888;
-            font-size: 14px;
-        }
-        
-        .action-buttons {
-            display: flex;
-            flex-direction: column;
-            gap: 15px;
-            margin-top: 30px;
-        }
-        
-        .btn {
-            padding: 15px;
-            border-radius: 12px;
-            border: none;
-            font-size: 16px;
-            font-weight: 500;
-            display: flex;
-            align-items: center;
-            justify-content: center;
-            gap: 10px;
-            cursor: pointer;
-            transition: all 0.3s ease;
-            box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
-            width: 100%;
-        }
-        
-        .btn-primary {
-            background-color: #FF7B25;
-            color: white;
-        }
-        
-        .btn-primary:hover {
-            background-color: #e66a1a;
-            transform: translateY(-2px);
-            box-shadow: 0 6px 12px rgba(255, 123, 37, 0.3);
-        }
-        
-        .btn-secondary {
-            background-color: white;
-            color: #FF7B25;
-            border: 1px solid #FF7B25;
-        }
-        
-        .btn-secondary:hover {
-            background-color: #fff5ef;
-            transform: translateY(-2px);
-        }
-        
-        .btn-tertiary {
-            background-color: #f0f0f0;
-            color: #555;
-        }
-        
-        .btn-tertiary:hover {
-            background-color: #e6e6e6;
-            transform: translateY(-2px);
-        }
-        
-        .icon {
-            font-size: 20px;
-        }
-        
-        .stats {
-            display: flex;
-            justify-content: space-around;
-            margin: 30px 0;
-            padding: 15px;
-            background-color: white;
-            border-radius: 12px;
-            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
-        }
-        
-        .stat-item {
-            text-align: center;
-        }
-        
-        .stat-number {
-            font-size: 20px;
-            font-weight: 700;
-            color: #FF7B25;
-        }
-        
-        .stat-label {
-            font-size: 12px;
-            color: #888;
-            margin-top: 5px;
-        }
-        
-        .recent-activity {
-            background-color: white;
-            border-radius: 12px;
-            padding: 20px;
-            margin-top: 20px;
-            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
-        }
-        
-        .section-title {
-            font-size: 16px;
-            font-weight: 600;
-            margin-bottom: 15px;
-            display: flex;
-            align-items: center;
-            gap: 8px;
-        }
-        
-        .activity-item {
-            display: flex;
-            align-items: center;
-            padding: 10px 0;
-            border-bottom: 1px solid #eee;
-        }
-        
-        .activity-item:last-child {
-            border-bottom: none;
-        }
-        
-        .activity-icon {
-            width: 40px;
-            height: 40px;
-            background-color: #fff5ef;
-            border-radius: 8px;
-            display: flex;
-            align-items: center;
-            justify-content: center;
-            margin-right: 12px;
-            color: #FF7B25;
-        }
-        
-        .activity-content {
-            flex: 1;
-        }
-        
-        .activity-title {
-            font-weight: 500;
-            margin-bottom: 3px;
-        }
-        
-        .activity-time {
-            font-size: 12px;
-            color: #999;
-        }
-        
-        .login-prompt {
-            text-align: center;
-            margin: 40px 0;
-        }
-        
-        .login-title {
-            font-size: 18px;
-            margin-bottom: 15px;
-            color: #555;
-        }
-        
-        .login-desc {
-            color: #888;
-            margin-bottom: 25px;
-            font-size: 14px;
-        }
-        
-        .login-btn-container {
-            width: 100%;
-            max-width: 400px;
-            margin: 0 auto;
-        }
-        
-        @media (max-width: 480px) {
-            .container {
-                padding: 15px;
-            }
-            
-            .btn {
-                padding: 14px;
-            }
-        }
-    </style>
-</head>
-<body>
-    <div class="container">
+<div class="container">
         <!-- 已登录状态 -->
         <!-- 已登录状态 -->
         <div class="profile-header" id="loggedInView" style="display: none;">
         <div class="profile-header" id="loggedInView" style="display: none;">
             <div class="avatar">
             <div class="avatar">
@@ -402,6 +171,4 @@
         
         
         // 初始化UI
         // 初始化UI
         updateUI();
         updateUI();
-    </script>
-</body>
-</html>
+    </script>

+ 220 - 0
picture-web/src/modules/picture/ser-tab/ser-tab.scss

@@ -0,0 +1,220 @@
+ * {
+            margin: 0;
+            padding: 0;
+            box-sizing: border-box;
+            font-family: 'PingFang SC', 'Helvetica Neue', Arial, sans-serif;
+        }
+        
+        body {
+            background-color: #f8f8f8;
+            color: #333;
+            line-height: 1.6;
+        }
+        
+        .container {
+            max-width: 100%;
+            padding: 20px;
+        }
+        
+        .profile-header {
+            text-align: center;
+            margin-bottom: 30px;
+            padding: 20px 0;
+        }
+        
+        .avatar {
+            width: 80px;
+            height: 80px;
+            border-radius: 50%;
+            background-color: #FF7B25;
+            margin: 0 auto 15px;
+            display: flex;
+            align-items: center;
+            justify-content: center;
+            color: white;
+            font-size: 36px;
+            box-shadow: 0 4px 12px rgba(255, 123, 37, 0.3);
+        }
+        
+        .username {
+            font-size: 18px;
+            font-weight: 600;
+            margin-bottom: 5px;
+        }
+        
+        .user-status {
+            color: #888;
+            font-size: 14px;
+        }
+        
+        .action-buttons {
+            display: flex;
+            flex-direction: column;
+            gap: 15px;
+            margin-top: 30px;
+        }
+        
+        .btn {
+            padding: 15px;
+            border-radius: 12px;
+            border: none;
+            font-size: 16px;
+            font-weight: 500;
+            display: flex;
+            align-items: center;
+            justify-content: center;
+            gap: 10px;
+            cursor: pointer;
+            transition: all 0.3s ease;
+            box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
+            width: 100%;
+        }
+        
+        .btn-primary {
+            background-color: #FF7B25;
+            color: white;
+        }
+        
+        .btn-primary:hover {
+            background-color: #e66a1a;
+            transform: translateY(-2px);
+            box-shadow: 0 6px 12px rgba(255, 123, 37, 0.3);
+        }
+        
+        .btn-secondary {
+            background-color: white;
+            color: #FF7B25;
+            border: 1px solid #FF7B25;
+        }
+        
+        .btn-secondary:hover {
+            background-color: #fff5ef;
+            transform: translateY(-2px);
+        }
+        
+        .btn-tertiary {
+            background-color: #f0f0f0;
+            color: #555;
+        }
+        
+        .btn-tertiary:hover {
+            background-color: #e6e6e6;
+            transform: translateY(-2px);
+        }
+        
+        .icon {
+            font-size: 20px;
+        }
+        
+        .stats {
+            display: flex;
+            justify-content: space-around;
+            margin: 30px 0;
+            padding: 15px;
+            background-color: white;
+            border-radius: 12px;
+            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
+        }
+        
+        .stat-item {
+            text-align: center;
+        }
+        
+        .stat-number {
+            font-size: 20px;
+            font-weight: 700;
+            color: #FF7B25;
+        }
+        
+        .stat-label {
+            font-size: 12px;
+            color: #888;
+            margin-top: 5px;
+        }
+        
+        .recent-activity {
+            background-color: white;
+            border-radius: 12px;
+            padding: 20px;
+            margin-top: 20px;
+            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
+        }
+        
+        .section-title {
+            font-size: 16px;
+            font-weight: 600;
+            margin-bottom: 15px;
+            display: flex;
+            align-items: center;
+            gap: 8px;
+        }
+        
+        .activity-item {
+            display: flex;
+            align-items: center;
+            padding: 10px 0;
+            border-bottom: 1px solid #eee;
+        }
+        
+        .activity-item:last-child {
+            border-bottom: none;
+        }
+        
+        .activity-icon {
+            width: 40px;
+            height: 40px;
+            background-color: #fff5ef;
+            border-radius: 8px;
+            display: flex;
+            align-items: center;
+            justify-content: center;
+            margin-right: 12px;
+            color: #FF7B25;
+        }
+        
+        .activity-content {
+            flex: 1;
+        }
+        
+        .activity-title {
+            font-weight: 500;
+            margin-bottom: 3px;
+        }
+        
+        .activity-time {
+            font-size: 12px;
+            color: #999;
+        }
+        
+        .login-prompt {
+            text-align: center;
+            margin: 40px 0;
+        }
+        
+        .login-title {
+            font-size: 18px;
+            margin-bottom: 15px;
+            color: #555;
+        }
+        
+        .login-desc {
+            color: #888;
+            margin-bottom: 25px;
+            font-size: 14px;
+        }
+        
+        .login-btn-container {
+            width: 100%;
+            max-width: 400px;
+            margin: 0 auto;
+        }
+        
+        @media (max-width: 480px) {
+            .container {
+                padding: 15px;
+            }
+            
+            .btn {
+                padding: 14px;
+            }
+        }

+ 6 - 6
picture-web/src/modules/picture/ser-tab/ser-tab.ts

@@ -1,11 +1,11 @@
 import { Component } from '@angular/core';
 import { Component } from '@angular/core';
+import { CommonModule } from '@angular/common';
 
 
 @Component({
 @Component({
-  selector: 'app-ser-tab',
-  imports: [],
+  selector: 'app-cart-tab',
+  standalone: true,
+  imports: [CommonModule],
   templateUrl: './ser-tab.html',
   templateUrl: './ser-tab.html',
-  styleUrl: './ser-tab.scss'
+  styleUrls: ['./ser-tab.scss']
 })
 })
-export class SerTab {
-
-}
+export class SerTab {} // ✅ 和 mobile.routes.ts 中保持一致