yi 1 jaar geleden
bovenliggende
commit
225446bb32

+ 0 - 15
FilmDraw-app/src/app/tab1/tab1.page.scss

@@ -1,4 +1,3 @@
-<<<<<<< HEAD
 // ion-toolbar {
 //   display: flex;
 //   justify-content: space-between; // 使内容在两侧分开
@@ -29,8 +28,6 @@
 
 
 
-=======
->>>>>>> fe70b786df2f8f475ffdf23a041efd136b02587f
 .content-container {
   display: flex;
   justify-content: space-between; /* 在主轴上均匀分配空间 */
@@ -78,24 +75,12 @@ ion-label p {
   font-size: 0.9em; /* 字体大小 */
 }
 
-/* 设置搜索框的样式 */
-   ion-searchbar {
-     padding: 10px; /* 内边距 */
-     border-radius: 6px; /* 圆角 */
-     font-size: 16px; /* 字体大小 */
-    }
 
-<<<<<<< HEAD
 
 // ion-header {
 //     background-color: #ffffff; // 设置头部背景色
 //     color: white; // 设置头部文字颜色
 //   }
-=======
-ion-header {
-    background-color: #f5f7fc; // 设置头部背景色
-  }
->>>>>>> fe70b786df2f8f475ffdf23a041efd136b02587f
   
 //   ion-card {
 //     margin: 10px; // 设置卡片之间的间距

+ 1 - 2
FilmDraw-app/src/app/tab1/tab1.page.ts

@@ -35,11 +35,10 @@ export class Tab1Page {
 
 async openPublishModal(){
 
-
   if(!this.currentUser?.id){
     openUserLoginModal(this.modalCtrl);
   }
-if(this.currentUser){
+if(this.currentUser?.id){
   openPostPublisherModal(this.modalCtrl);
 }
   

+ 2 - 2
FilmDraw-app/src/app/tab3/tab3.page.scss

@@ -69,7 +69,7 @@ ion-content {
           }
 
           ion-button {
-            background-color: $blue;
+            --background:#036a99;
             color: white;
             border-radius: 20px;
             &:hover {
@@ -130,7 +130,7 @@ ion-content {
           }
 
           ion-button {
-            background-color: $blue;
+            --background:#036a99;
             color: white;
             border-radius: 20px;
             &:hover {

+ 2 - 2
FilmDraw-app/src/lib/ncloud.ts

@@ -200,7 +200,7 @@ export class CloudUser extends CloudObject {
     sessionToken: string | null = ""; // 用户的 sessionToken,用于身份验证
 
     constructor() {
-        super("_User"); // 调用父类构造函数,指定类名为 "FilmUser"
+        super("_User"); // 调用父类构造函数,指定类名为 "User"
 
         // 读取用户缓存信息
         let userCacheStr = localStorage.getItem("NCloud/dev/User");
@@ -381,7 +381,7 @@ export class CloudPost extends CloudObject {
     }
 
     // 设置帖子数据,包括发布者信息
-    setPostData(postData: Record<string, any>, userId: string) {
+    setPostData(postData: Record<string, any>, userId: string|null) {
         this.set(postData); // 设置帖子内容
         this.data["author"] = { "__type": "Pointer", "className": "_User", "objectId": userId }; // 设置发布者信息
     }

+ 3 - 0
FilmDraw-app/src/lib/public/post-publisher/post-publisher.component.scss

@@ -0,0 +1,3 @@
+ion-button{
+    --background: #036a99;;
+}

+ 7 - 4
FilmDraw-app/src/lib/public/post-publisher/post-publisher.component.ts

@@ -20,19 +20,22 @@ export class PostPublisherComponent  implements OnInit {
   postData:any={
 
   }
-  userId: string; // 当前用户ID
+
   postDataChange(key:string,env:any){
     this.postData[key] = env.detail.value; // 更新 postData 对象
  
   }
 
-  constructor(private modalCtrl:ModalController) { 
-    this.userId = 'currentUserId';
+  currentUser:CloudUser
+  constructor(private modalCtrl:ModalController){
+    this.currentUser=new CloudUser();
+
   }
 
+  
   async save(){
     const post = new CloudPost();
-    post.setPostData(this.postData, this.userId); // 设置帖子数据和用户ID
+    post.setPostData(this.postData, this.currentUser.id); // 设置帖子数据和用户ID
 
     try {
       await post.save(); // 保存帖子

+ 3 - 0
FilmDraw-app/src/lib/user/modal-user-edit/modal-user-edit.component.scss

@@ -0,0 +1,3 @@
+ion-button{
+    --background: #036a99;;
+}

+ 3 - 0
FilmDraw-app/src/lib/user/modal-user-login/modal-user-login.component.scss

@@ -0,0 +1,3 @@
+ion-button{
+    --background: #036a99;;
+}