用户中心 商城 登陆注册前端

Change-Id: I4165f66073210b296608a5cfa0e8329e3d9bc8e3
diff --git a/src/components/AvatarWithFrame.css b/src/components/AvatarWithFrame.css
new file mode 100644
index 0000000..ffea91b
--- /dev/null
+++ b/src/components/AvatarWithFrame.css
@@ -0,0 +1,25 @@
+.avatar-container {
+  position: relative;
+  display: inline-block;
+  width: 100px;
+  height: 100px;
+}
+
+.user-avatar {
+  position: absolute;
+  width: 80px;
+  height: 80px;
+  top: 10px;
+  left: 10px;
+  z-index: 1;
+}
+
+.avatar-frame-image {
+  position: absolute;
+  width: 100%;
+  height: 100%;
+  top: 0;
+  left: 0;
+  z-index: 2;
+  pointer-events: none;
+}
\ No newline at end of file
diff --git a/src/components/AvatarWithFrame.jsx b/src/components/AvatarWithFrame.jsx
new file mode 100644
index 0000000..15be459
--- /dev/null
+++ b/src/components/AvatarWithFrame.jsx
@@ -0,0 +1,35 @@
+import React from 'react';
+import { Avatar } from 'antd';
+import frameImage from './avatar-frame.png'; // 头像框图片素材
+import './AvatarWithFrame.css';
+
+const AvatarWithFrame = () => {
+  // 从localStorage获取用户数据
+  const userData = JSON.parse(localStorage.getItem('user')) || {};
+  const { image, decoration = '' } = userData;
+
+  // 检查是否包含头像框
+  const hasFrame = decoration.includes('头像框');
+
+  return (
+    <div className="avatar-container">
+      {/* 头像 */}
+      <Avatar 
+        src={image} 
+        size={80}
+        className={`user-avatar ${hasFrame ? 'with-frame' : ''}`}
+      />
+      
+      {/* 头像框图片 - 根据decoration显示 */}
+      {hasFrame && (
+        <img 
+          src={frameImage} 
+          alt="头像框" 
+          className="avatar-frame-image"
+        />
+      )}
+    </div>
+  );
+};
+
+export default AvatarWithFrame;
\ No newline at end of file
diff --git a/src/components/avatar-frame.png b/src/components/avatar-frame.png
new file mode 100644
index 0000000..16ad8f0
--- /dev/null
+++ b/src/components/avatar-frame.png
Binary files differ