warrior 1 сар өмнө
parent
commit
0489f02641

+ 2 - 3
projects/live-app/src/modules/account/bankcard/bankcard.component.html

@@ -1,6 +1,5 @@
 <nav title="我的银行卡"></nav>
-
-<div class="notice_list">
+<ion-content class="notice_list">
   <div class="card_list">
     @if (account && account.bank && account.bank.length == 0 ) {
     <div>
@@ -24,7 +23,7 @@
     } }
   </div>
   <ion-button class="add_btn" (click)="addCard()">添加银行卡</ion-button>
-</div>
+</ion-content>
 <ion-modal
   trigger="open-modal"
   [isOpen]="isModalOpen"

+ 1 - 1
projects/live-app/src/modules/account/bankcard/bankcard.component.scss

@@ -5,7 +5,7 @@
 	background-repeat: no-repeat;
 	background-position: center top;
 	background-size: 100% 100%;
-
+  --background: #ffffff00;
 	.nav {
 		width: 100%;
 		height: 6vh;

+ 2 - 2
projects/live-app/src/modules/account/withdrawal/withdrawal.component.html

@@ -1,5 +1,5 @@
 <nav title="申请提现"></nav>
-<div class="top">
+<ion-content class="content">
   <div class="way">
     <div class="icon"></div>
     提现方式
@@ -78,4 +78,4 @@
   </div>
   <div class="withdrawal" (click)="withdrawal()">立即提现</div>
   <div class="tips">温馨提示:提现需收取10%手续费</div>
-</div>
+</ion-content>

+ 2 - 2
projects/live-app/src/modules/account/withdrawal/withdrawal.component.scss

@@ -7,7 +7,7 @@
   z-index: 100;
 }
 
-.top {
+.content {
   background-image: url("https://file-cloud.fmode.cn/Qje9D4bqol/20241220/b313ov054708770.png");
   background-repeat: no-repeat;
   background-position: center top;
@@ -15,7 +15,7 @@
   height: 100%;
   padding-bottom: 10.2564vw;
   width: 100%;
-
+  --background: #ffffff00;
   .way {
     margin: 5.1282vw;
     display: flex;

+ 5 - 4
projects/live-app/src/modules/live/room-manage/room-manage.component.html

@@ -1,14 +1,14 @@
 <nav title="直播房间管理"></nav>
 <ion-content class="content">
   <div class="edit-room">
-    <div class="row">
+    <!-- <div class="row">
       <div class="title">直播ID</div>
       <ion-input
         placeholder="创建房间后自动生成"
         [value]="room?.get('roomid')"
         disabled
       ></ion-input>
-    </div>
+    </div> -->
     <div class="row">
       <div class="title">标题<span style="color: red">*</span></div>
       <ion-input
@@ -20,8 +20,9 @@
     <div class="row">
       <div class="title">点播费用(钻石/分钟)<span style="color: red">*</span></div>
       <input
-        placeholder="请填写标题"
-        min="0.5"
+        [placeholder]="placeholder"
+        min="1"
+        max="999"
         maxlength="3"
         type="number"
         (blur)="onChange()"

+ 1 - 0
projects/live-app/src/modules/live/room-manage/room-manage.component.scss

@@ -35,6 +35,7 @@
 				background: #f3f3f3;
 				padding: 1.0256vw;
 				outline: none;
+				width: 150px;
 			}
 		}
 	}

+ 54 - 15
projects/live-app/src/modules/live/room-manage/room-manage.component.ts

@@ -18,11 +18,16 @@ import { ConnectTaskService } from '../../../services/connectTask.service';
   templateUrl: './room-manage.component.html',
   styleUrls: ['./room-manage.component.scss'],
   standalone: true,
-  imports: [...ionicStandaloneModules, NavComponent, UploadComponent,FormsModule],
+  imports: [
+    ...ionicStandaloneModules,
+    NavComponent,
+    UploadComponent,
+    FormsModule,
+  ],
 })
 export class RoomManageComponent implements OnInit {
   @ViewChild('upload') upload!: UploadComponent;
-  room?:Parse.Object
+  room?: Parse.Object;
   formData: any = {
     title: '',
     cover: null,
@@ -30,20 +35,23 @@ export class RoomManageComponent implements OnInit {
     price: 0.5,
   };
   loading: any;
-  profile?: Parse.Object
-  initLoad:boolean = true;
+  profile?: Parse.Object;
+  initLoad: boolean = true;
+  placeholder: string = '请填写点播费用';
+  min: number = 1;
+  max: number = 990;
   constructor(
     private toastController: ToastController,
     private loadingCtrl: LoadingController,
     private liveService: LiveService,
     private alertController: AlertController,
     private connectTask: ConnectTaskService,
-    private authServ: AuthService,
+    private authServ: AuthService
   ) {}
 
   async ngOnInit() {
     await this.getProfile();
-    this.getRoom()
+    this.getRoom();
   }
   // 获取用户信息
   async getProfile() {
@@ -54,6 +62,25 @@ export class RoomManageComponent implements OnInit {
     // query.select('isCheck', 'isCross');
     let r = await query.first();
     this.profile = r;
+    if (r?.get('state')) {
+      switch (r?.get('state')) {
+        case '三星':
+          this.min = 20;
+          this.max = 99;
+          break;
+        case '四星':
+          this.min = 100;
+          this.max = 150;
+          break;
+        case '五星':
+          this.min = 160;
+          this.max = 990;
+          break;
+        default:
+          break;
+      }
+    }
+    this.placeholder = this.min + '-' + this.max;
     localStorage.setItem('profile', JSON.stringify(this.profile?.toJSON()));
   }
   /* 直播间 */
@@ -70,23 +97,35 @@ export class RoomManageComponent implements OnInit {
       price: this.profile?.get('laborCosts') || 1,
     };
     console.log(this.formData);
-    this.initLoad = false
+    this.initLoad = false;
   }
   onChange() {
-    this.formData.price = Math.max(0.5, parseFloat(this.formData.price.toFixed(1)));
+    this.formData.price = Math.max(
+      0.5,
+      parseFloat(this.formData.price.toFixed(1))
+    );
     console.log(this.formData.price);
   }
   async saveEdit(e: any) {
-    let url = e[0]?.url
+    let url = e[0]?.url;
     console.log(url);
-    if(!url || !this.formData.title || !this.formData.price){
+    if (!url || !this.formData.title || !this.formData.price) {
       const toast = await this.toastController.create({
         message: '请填写完整',
         color: 'warning',
         duration: 1000,
       });
-      toast.present()
-      return
+      toast.present();
+      return;
+    }
+    if(this.formData.price < this.min || this.formData.price > this.max){
+      const toast = await this.toastController.create({
+        message: '请输入正确的点播费用',
+        color: 'warning',
+        duration: 1000,
+      });
+      toast.present();
+      return;
     }
     this.loading = await this.loadingCtrl.create({
       message: '正在保存修改',
@@ -108,16 +147,16 @@ export class RoomManageComponent implements OnInit {
         className: 'Profile',
         objectId: this.profile?.id,
       });
-      this.room?.set('roomid', this.profile?.id,);
+      this.room?.set('roomid', this.profile?.id);
     }
     this.room?.set('title', this.formData.title);
     this.room?.set('cover', url);
     this.room?.set('content', this.formData.content);
     await this.room?.save();
-    this.room && this.liveService.getToken(this.room)
+    this.room && this.liveService.getToken(this.room);
     this.loading.dismiss();
     this.getRoom();
-    await this.connectTask.anchorOnline();//房间修改或创建后重新初始化连接
+    await this.connectTask.anchorOnline(); //房间修改或创建后重新初始化连接
     this.presentAlert('保存成功');
   }
   async presentAlert(msg: string) {

+ 1 - 0
projects/live-app/src/modules/login/invite/invite.component.scss

@@ -200,6 +200,7 @@ input:-webkit-autofill:active {
   img {
     width: 21.333vw;
     height: 21.333vw;
+    border-radius: 10px;
   }
 }
 .block {

+ 1 - 0
projects/live-app/src/modules/login/login.component.scss

@@ -55,6 +55,7 @@ ion-content {
       img {
         width: 21.333vw;
         height: 21.333vw;
+        border-radius: 10px;
       }
     }
 

+ 4 - 4
projects/live-app/src/modules/tabs/my/my.component.html

@@ -83,8 +83,8 @@
     </div>
     }@else {
     <div class="ad-left">
-      <div class="text">hey聊 <span>VIP</span></div>
-      <p>开通VIP,解锁海量专属主播聊天</p>
+      <div class="text">hey聊 <img src="img/VIP.png" alt="" /></div>
+      <p>开通VIP,解锁海量专属主播聊天</p>
     </div>
     <div class="btn" (click)="toUrl('goods/vip')">立即开通</div>
     }
@@ -236,12 +236,12 @@
           <ion-icon name="chevron-forward-outline"></ion-icon>
         </div>
       </div>
-      <div class="li" (click)="toUrl('user/service')">
+      <div class="li" (click)="toUrlService('user/service')">
         <div class="li-lable">
           <img src="img/在线客服.png" alt="" class="icon" />
         </div>
         <div class="li-val">
-          联系客服
+          专属客服
           <ion-icon name="chevron-forward-outline"></ion-icon>
         </div>
       </div>

+ 5 - 0
projects/live-app/src/modules/tabs/my/my.component.scss

@@ -118,6 +118,11 @@
           line-height: 4.6154vw;
           margin: 0 1.0256vw;
         }
+        img {
+          width: 5.1282vw;
+          height: 5.1282vw;
+          margin-left: 1.5385vw;
+        }
       }
       p {
         color: #666666;

+ 13 - 0
projects/live-app/src/modules/tabs/my/my.component.ts

@@ -241,4 +241,17 @@ export class MyComponent implements OnInit {
     let data = await this.http.httpRequst(url,{pid: this.profile?.id},'POST')
     console.log(data);
   }
+
+  async toUrlService(url: string){
+    if(!this.accServ.userVip?.rights?.['vip-service']){
+      const toast = await this.toastController.create({
+        message: '高级会员专享服务',
+        color: 'warning',
+        duration: 1500,
+      });
+      toast.present();
+      return
+    }
+    this.router.navigate([url]);
+  }
 }

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

@@ -92,7 +92,6 @@
             />
             <div class="li-right">
               <div class="name">通话记录</div>
-              <div class="message-content"></div>
             </div>
             <ion-icon
               style="color: #afafaf"
@@ -108,18 +107,16 @@
             />
             <div class="li-right">
               <div class="name">亲密度</div>
-              <div class="message-content"></div>
             </div>
             <ion-icon
               style="color: #afafaf"
               name="chevron-forward-outline"
             ></ion-icon>
           </ion-item>
-          <ion-item class="li" (click)="toUrl('/user/service')">
+          <ion-item class="li" (click)="toUrlService('/user/service')">
             <img src="img/客服.png" class="avatar" slot="start" alt="avatar" />
             <div class="li-right">
-              <div class="name">小客服</div>
-              <div class="message-content"></div>
+              <div class="name">专属客服<img src="img/VIP.png" alt="" /></div>
             </div>
             <ion-icon
               style="color: #afafaf"

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

@@ -67,11 +67,17 @@
         // padding-bottom: 1.5385vw;
         .name {
           display: flex;
-          justify-content: space-between;
+          // justify-content: space-between;
+          align-items: center;
           .time {
             color: #676767;
             font-size: 3.0769vw;
           }
+          img {
+            width: 25px;
+            height: 25px;
+            margin-left: 1.5385vw;
+          }
         }
         .message-content {
           color: #676767;

+ 17 - 1
projects/live-app/src/modules/tabs/notice/notice.component.ts

@@ -5,10 +5,11 @@ import { Router } from '@angular/router';
 import { AiChatService } from '../../../services/aichart.service';
 import { SharedModule } from '../../shared.module';
 import { MessageService } from '../../../services/message.service';
-import { ionicStandaloneModules } from '../../ionic-standalone.modules';
+import { ionicStandaloneModules, ToastController } from '../../ionic-standalone.modules';
 import { DeviceService } from '../../../services/device.service';
 import { CommonModule } from '@angular/common';
 import { FormsModule } from '@angular/forms';
+import { AccountService } from '../../../services/account.service';
 @Component({
   selector: 'app-notice',
   templateUrl: './notice.component.html',
@@ -62,7 +63,9 @@ export class NoticeComponent implements OnInit {
   constructor(
     private router: Router,
     private aiSer: AiChatService,
+    public accServ: AccountService,
     public msgServe: MessageService,
+    private toastController: ToastController,
     public deviceSer: DeviceService
   ) {}
 
@@ -133,6 +136,19 @@ export class NoticeComponent implements OnInit {
     if (this.showModal) return;
     this.router.navigate([url]);
   }
+  async toUrlService(url: string){
+    if (this.showModal) return;
+    if(!this.accServ.userVip?.rights?.['vip-service']){
+      const toast = await this.toastController.create({
+        message: '高级会员专享服务',
+        color: 'warning',
+        duration: 1500,
+      });
+      toast.present();
+      return
+    }
+    this.router.navigate([url]);
+  }
   async download() {
     let canvas: any = document.createElement('canvas');
     canvas.height = '480';

+ 1 - 1
projects/live-app/src/modules/user/online-service/online-service.component.html

@@ -1,4 +1,4 @@
-<nav title="客服"></nav>
+<nav title="专属客服"></nav>
 <ion-content
   [scrollEvents]="true"
   [fullscreen]="true"