hid_msrpuwgj56ccf29 4 miesięcy temu
rodzic
commit
ed5111fa0b

+ 0 - 18
app-angular/src/modules/lesson/user-block/user-block.component.scss

@@ -1,18 +0,0 @@
-ion-content {
-    height: calc(100vh - 121px) !important;
-}
-
-ion-item-divider {
-    ion-icon {
-        margin-right: 9px;
-    }
-}
-
-ion-label {
-    ion-note {
-        font-size: 0.7rem;
-        overflow: hidden;
-        text-overflow: ellipsis;
-        white-space: nowrap;
-    }
-}

+ 0 - 60
app-angular/src/modules/lesson/user-block/user-blockcomponent.html

@@ -1,60 +0,0 @@
-<ion-header>
-    <ion-toolbar>
-        <ion-buttons slot="start">
-            <ion-button routerLink="/lesson/me" fill="clear" color="dark">
-                <ion-icon name="chevron-back-outline" size="small"></ion-icon>返回</ion-button>
-        </ion-buttons>
-    </ion-toolbar>
-</ion-header>
-<ion-content color="light">
-    <ion-list [inset]="true">
-        <ion-item-group>
-            <ion-item-divider>
-                <ion-label>礼物🌟</ion-label>
-            </ion-item-divider>
-            <ion-segment>
-                <ion-segment-button value="已得" (click)="cate='已得'">
-                    <ion-label>收到➡️</ion-label>
-                </ion-segment-button>
-                <ion-segment-button value="未获" (click)="cate='未获'">
-                    <ion-label>送出⬅️</ion-label>
-                </ion-segment-button>
-            </ion-segment>
-            <ng-container *ngIf="cate=='未获'">
-                <ion-item button detail="false" lines="full">
-                    <ion-label>
-                        <p>
-                            未获标签成就
-                        </p>
-                        <ion-note>
-                            获取条件
-                        </ion-note>
-                    </ion-label>
-                    <ion-buttons slot="end">
-                        <ion-button color="medium">
-                            <ion-icon name="heart-circle" size="large"></ion-icon>
-                        </ion-button>
-                    </ion-buttons>
-                </ion-item>
-            </ng-container>
-            <ng-container *ngIf="cate=='已得'">
-                <ion-item button detail="false" lines="full">
-                    <ion-label>
-                        <p>
-                            已享受10+特权
-                        </p>
-                        <ion-note>
-                            还有7天到期
-                        </ion-note>
-                    </ion-label>
-                    <ion-buttons slot="end">
-                        <ion-button color="danger">
-                        </ion-button>
-                    </ion-buttons>
-                </ion-item>
-            </ng-container>
-
-        </ion-item-group>
-    </ion-list>
-
-</ion-content>

+ 18 - 5
app-angular/src/modules/user/page-add/page-add.component.html

@@ -27,15 +27,28 @@
         <ion-input  placeholder="姓名*"></ion-input>
       </ion-item>
       <ion-item>
-        <ion-label position="stacked" style="width: 30%; font-size: 1.2em; ">生日:</ion-label>
-        <ion-datetime-button datetime="datetime" style="width: 130%;"></ion-datetime-button><ion-icon slot="end" name="chevron-forward-outline"></ion-icon>
+        <ion-input  placeholder="生日*"></ion-input>
+        <ion-icon slot="end" id="open-modal" name="chevron-forward-outline" size="small"></ion-icon>
       </ion-item>
-      <ion-modal [keepContentsMounted]="true">
+      <ion-modal #modal trigger="open-modal">
         <ng-template>
-          <ion-datetime id="datetime"></ion-datetime>
+          <ion-content>
+            <ion-toolbar>
+              <ion-title>请选择</ion-title>
+              <ion-buttons slot="end">
+                <ion-button color="black" (click)="modal.dismiss()">完成</ion-button>
+              </ion-buttons>
+            </ion-toolbar>
+            <ion-datetime-button datetime="datetime" style="width: 100%;"></ion-datetime-button>
+            <ion-modal [keepContentsMounted]="true">
+              <ng-template>
+                <ion-datetime id="datetime"></ion-datetime>
+              </ng-template>
+            </ion-modal>
+          </ion-content>
         </ng-template>
       </ion-modal>
-    
+     
       
       <ion-item>
         <ion-label position="stacked">名字:</ion-label>

+ 3 - 1
app-angular/src/modules/user/page-add/page-add.component.ts

@@ -11,7 +11,8 @@ export class PageAddComponent {
   userAdd: any = {
     name: '',
     tag: '',
-    desc: ''
+    desc: '',
+    img: ''
   };
   selectedImage: string | ArrayBuffer | null = null;
 
@@ -45,6 +46,7 @@ export class PageAddComponent {
       const reader = new FileReader();
       reader.onload = () => {
         this.selectedImage = reader.result;
+        this.userAdd.img = reader.result as string; // 将图片数据存储到 userAdd.img 中
       };
       reader.readAsDataURL(file);
     }