warrior 3 тижнів тому
батько
коміт
6e0179c876

+ 2 - 1
projects/live-app/src/app/components/appraise/appraise.component.ts

@@ -117,11 +117,12 @@ export class AppraiseComponent implements OnInit {
     postLog.set('user', {
       __type: 'Pointer',
       className: '_User',
-      objectId: this.liveService.room?.get('user')?.id,
+      objectId: Parse.User.current()?.id,
     });
     postLog.set('type', 'comment');
     // postLog.set('credit', star)
     postLog.set('tags',Array.from(this.checkTags))
+    postLog.set('isVerify', true)
     await postLog.save();
     loading.dismiss();
     this.liveService.isOpenEvaluate = false;

+ 1 - 0
projects/live-app/src/app/components/avatar/avatar.component.scss

@@ -11,6 +11,7 @@
     height: 48px;
     z-index: 1;
     border-radius: 50%;
+    object-fit: cover;
   }
   .frame-item1{
     position: absolute;

+ 39 - 24
projects/live-app/src/app/components/upload/upload.component.ts

@@ -21,7 +21,7 @@ export class UploadComponent implements OnInit {
 
   @Input('maxlenght') maxlenght: number = 1; //文件数量限制
   @Input('type') type: string = 'image';
-  @Input('size') size: number = 2048; //上传文件限制大小单位KB
+  @Input('size') size: number = 10240; //上传文件限制大小单位KB
   @Input('active') active: boolean = false; //选择文件后主动触发上传
 
   @Input('multiple') multiple: boolean = false; //是否允许选择多张
@@ -64,7 +64,7 @@ export class UploadComponent implements OnInit {
   }> = [];
   Previewfilelist: any; //预览图片数组
   loading: any;
-  currentPreviewImg:string = ''
+  currentPreviewImg: string = '';
   constructor(
     private toastController: ToastController,
     public loadCtrl: LoadingController
@@ -96,8 +96,8 @@ export class UploadComponent implements OnInit {
     });
     this.Previewfilelist = this.fileList;
   }
-  onPreview(url:string){
-    this.currentPreviewImg = url
+  onPreview(url: string) {
+    this.currentPreviewImg = url;
   }
   onDelete(index: number) {
     console.log(index);
@@ -120,14 +120,24 @@ export class UploadComponent implements OnInit {
       await this.changeFileReader(f);
     }
     console.log(this.fileList);
-    this.active && this.onUpload()
+    this.active && this.onUpload();
   }
   //转图片格式
   changeFileReader(file: any) {
-    return new Promise((res) => {
+    return new Promise(async (res) => {
       const windowURL = window.URL || window.webkitURL;
       const src = windowURL.createObjectURL(file);
       let size = file.size / 1024; //KB
+      if(size > this.size){
+        const toast = await this.toastController.create({
+          message: `${file.name || '未知'}超过${Math.ceil(this.size/1024)}MB`,
+          color: 'warning',
+          duration: 1500,
+        });
+        toast.present();
+        res(true);
+        return
+      }
       this.fileList.push({
         url: src,
         size: size,
@@ -176,26 +186,31 @@ export class UploadComponent implements OnInit {
         duration: 1000,
       });
       toast.present();
+      return;
     }
     let fs = this.fileList;
     this.loading = await this.loadCtrl.create({ message: '上传中' });
     this.loading.present();
-    for (let index = 0; index < fs.length; index++) {
-      const f = fs[index];
-      if (f.type == 'local') {
-        console.log(f);
-        let url = await this.onQiniuUpFile(f);
-        await this.saveAttachment({
-          size: f.size,
-          url: url,
-          name: f.name,
-          type: this.fileList[index].file.type,
-        });
-        this.fileList[index].url = url;
-        this.fileList[index].type = 'http';
-        delete this.fileList[index].file;
-        delete this.fileList[index].size;
+    try{
+      for (let index = 0; index < fs.length; index++) {
+        const f = fs[index];
+        if (f.type == 'local') {
+          console.log(f);
+          let url = await this.onQiniuUpFile(f);
+          await this.saveAttachment({
+            size: f.size,
+            url: url,
+            name: f.name,
+            type: this.fileList[index].file.type,
+          });
+          this.fileList[index].url = url;
+          this.fileList[index].type = 'http';
+          delete this.fileList[index].file;
+          delete this.fileList[index].size;
+        }
       }
+    }catch(err){
+      this.loading.dismiss();
     }
     this.onChange.emit(this.fileList);
     this.loading.dismiss();
@@ -264,9 +279,9 @@ export class UploadComponent implements OnInit {
       let datepath = this.DateFormat(new Date(), 'hhmmss');
       let qiniuFileKey = this.company + '/' + datepath + '/' + file.name;
       const putExtra = {
-        fname: '',
-        params: {},
-        mimeType: this.accept === 'image/*'?'image/*' : undefined,
+        // fname: '',
+        // params: {},
+        // mimeType: this.accept === 'image/*' ? 'image/*' : undefined,
       };
       const config = {
         useCdnDomain: true, //使用cdn加速

+ 2 - 2
projects/live-app/src/modules/tabs/notice/notice.component.scss

@@ -57,10 +57,10 @@
         position: relative;
         .tips{
           position: absolute;
-          right: 5px;
           width: 6px;
           height: 6px;
-          top: -4px;
+          right: 2px;
+          top: 2px;
           background: #dd0000;
           border-radius: 50%;
           color: white;

+ 1 - 0
projects/live-app/src/modules/user/anchor/anchor.component.html

@@ -77,6 +77,7 @@
         [boxWidth]="370"
         [type]="'video'"
         [active]="true"
+        [size]="1024 * 500"
         ></app-upload>
       }
     </div>

+ 57 - 41
projects/live-app/src/modules/user/profile/profile.component.html

@@ -1,5 +1,19 @@
-<nav title="主页信息"></nav>
-<ion-content [fullscreen]="true" class="content">
+<!-- <nav title="主页信息"></nav> -->
+<div
+  [ngClass]="{
+    nav: true,
+    'nav-pad-ios': deviceSer.isIOS
+  }"
+>
+  <div class="back" (click)="back()"><ion-icon name="chevron-back-outline"></ion-icon></div>
+</div>
+<ion-content
+  [fullscreen]="true"
+  [ngClass]="{
+    content: true,
+    'content-pad-ios': deviceSer.isIOS
+  }"
+>
   <div class="bg">
     <img [src]="profile?.get('image') || 'img/bg_duf.jpg'" alt="" />
     <div class="mask" (click)="onShow()"></div>
@@ -17,7 +31,12 @@
           />
           }
           <div class="top-right-block">
-            <div class="top-left-title">{{profile?.get('user')?.get('nickname') || profile?.get('user')?.id }}</div>
+            <div class="top-left-title">
+              {{
+                profile?.get("user")?.get("nickname") ||
+                  profile?.get("user")?.id
+              }}
+            </div>
             @if (profile?.get('user')?.get('sex') == '男') {
             <div class="sex">
               <ion-icon name="male-outline"></ion-icon>
@@ -28,30 +47,29 @@
             </div>
             }@else {
             <!-- <div class="sex">未知</div> -->
+            } @if (profile?.get('identyType') == 'anchor') {
+            <div
+              class="level"
+              [style.background-color]="
+                aiChatServ.authorLevelColor[
+                  profile?.get('user').get('completionRate')
+                ]?.color
+              "
+            >
+              LV{{ profile?.get("user").get("completionRate") }}
+            </div>
+            }@else {
+            <div
+              class="level"
+              [style.background-color]="
+                aiChatServ.userLevelColor[
+                  profile?.get('user').get('achievementCount')
+                ]?.color
+              "
+            >
+              LV{{ profile?.get("user").get("achievementCount") }}
+            </div>
             }
-            @if (profile?.get('identyType') == 'anchor') {
-              <div
-                class="level"
-                [style.background-color]="
-                  aiChatServ.authorLevelColor[
-                    profile?.get('user').get('completionRate')
-                  ]?.color
-                "
-              >
-                LV{{ profile?.get("user").get("completionRate") }}
-              </div>
-              }@else {
-              <div
-                class="level"
-                [style.background-color]="
-                  aiChatServ.userLevelColor[
-                    profile?.get('user').get('achievementCount')
-                  ]?.color
-                "
-              >
-                LV{{ profile?.get("user").get("achievementCount") }}
-              </div>
-              }
           </div>
         </div>
         <div class="user-status">
@@ -60,21 +78,19 @@
             <span class="spot" [style.background]="state.color"></span>
             <span class="tag">{{ state.val }}</span>
           </div>
-        
 
           <div
-          [ngClass]="{
-            gril: profile?.get('user')?.get('sex') == '女',
-            age: true
-          }"
-        >
-          <img
-            src="https://file-cloud.fmode.cn/Qje9D4bqol/20241109/pctmvt110807052.png"
-            alt=""
-          />
-          {{ profile?.get("birthdate") || "未知" }}
-        </div>
-
+            [ngClass]="{
+              gril: profile?.get('user')?.get('sex') == '女',
+              age: true
+            }"
+          >
+            <img
+              src="https://file-cloud.fmode.cn/Qje9D4bqol/20241109/pctmvt110807052.png"
+              alt=""
+            />
+            {{ profile?.get("birthdate") || "未知" }}
+          </div>
         </div>
       </div>
       <div class="user-right">
@@ -89,7 +105,7 @@
     </div>
     <div class="user-fans">
       <span>关注:{{ numsObject.follow }}</span>
-      <span>粉丝:{{ profile?.get('degreeNumber') || numsObject.fans }}</span>
+      <span>粉丝:{{ profile?.get("degreeNumber") || numsObject.fans }}</span>
       <span>送出:{{ numsObject.gift }}</span>
     </div>
     <div class="bar"></div>
@@ -264,7 +280,7 @@
       </ion-buttons>
     </ion-toolbar>
     <div class="wrapper">
-      <div style="margin-bottom: 10px;">建议图片比例 2.5:1</div>
+      <div style="margin-bottom: 10px">建议图片比例 2:1</div>
       <app-upload
         (onChange)="onSaveBackGround($event)"
         #upload

+ 34 - 3
projects/live-app/src/modules/user/profile/profile.component.scss

@@ -1,5 +1,31 @@
+.nav{
+  position: fixed;
+  top: 0;
+  z-index: 9;
+  height: 44px;
+  width: 100%;
+  padding: 6px;
+  display: flex;
+  align-items: center;
+  .back{
+    backdrop-filter: saturate(180%) blur(2px);
+    background: rgb(255 255 255 / .8);
+    font-size: 20px;
+    width: 28px;
+    height: 20px;
+    border-radius: 50px;
+    display: flex;
+    align-items: center;
+    justify-content: center;
+  }
+}
+.nav-pad-ios{
+  height: 88px;
+  padding-top: 44px;
+}
 .content {
   --padding-bottom: 25.641vw;
+  // --padding-top: 44px;
   // --background: #ffffff;
   background-image: url("https://file-cloud.fmode.cn/Qje9D4bqol/20241220/b313ov054708770.png") !important;
   background-repeat: no-repeat;
@@ -7,13 +33,13 @@
   background-size: 100% 100%;
   --background: #ffffff00;
   .bg {
-    height: 41.0256vw;
+    height: 200px;
     width: 100%;
     position: relative;
     img {
       width: 100%;
       height: 100%;
-      object-fit: contain;
+      object-fit: cover;
     }
     .mask {
       position: absolute;
@@ -29,7 +55,7 @@
     // height: 25.641vw;
     padding: 1.5385vw 2.5641vw;
     // background: white;
-    // border-radius: 0 0 1.5385vw 1.5385vw;
+    border-radius:1.5385vw 1.5385vw 0 0 ;
     .user-dateil {
       width: 100%;
       display: flex;
@@ -270,6 +296,8 @@
                 width: 30px;
                 height: 30px;
                 margin-right: 4px;
+                object-fit: cover;
+                border-radius: 50%;
               }
               .level {
                 margin-left: 1.5385vw;
@@ -358,6 +386,9 @@
     }
   }
 }
+.content-pad-ios{
+  --padding-top: 44px;
+}
 .footer {
   .btns {
     display: flex;

+ 7 - 2
projects/live-app/src/modules/user/profile/profile.component.ts

@@ -21,6 +21,7 @@ import { AccountService } from '../../../services/account.service';
 import { CallModalComponent } from '../../../app/components/call-modal/call-modal.component';
 import { AvatarComponent } from '../../../app/components/avatar/avatar.component';
 import { AppraiseComponent } from '../../../app/components/appraise/appraise.component';
+import { DeviceService } from '../../../services/device.service';
 
 @Component({
   selector: 'app-profile',
@@ -31,7 +32,7 @@ import { AppraiseComponent } from '../../../app/components/appraise/appraise.com
     ...ionicStandaloneModules,
     FormsModule,
     // DatePipe,
-    NavComponent,
+    // NavComponent,
     CommonModule,
     ImagePreviewComponent,
     UploadComponent,
@@ -84,7 +85,8 @@ export class ProfileComponent implements OnInit {
     // private alertController: AlertController,
     // private msgSer: MessageService,
     private connectTask: ConnectTaskService,
-    public accServ: AccountService
+    public accServ: AccountService,
+    public deviceSer: DeviceService
   ) {}
   get state() {
     let map: any = {
@@ -399,4 +401,7 @@ export class ProfileComponent implements OnInit {
     console.log('点击送出礼物');
     // this.liveService.get_duration()
   }
+  back(){
+    history.back();
+  }
 }