warrior 3 сар өмнө
parent
commit
bd91b6a68b
46 өөрчлөгдсөн 764 нэмэгдсэн , 261 устгасан
  1. BIN
      projects/live-app/public/img/login-poster.png
  2. BIN
      projects/live-app/public/img/poster.png
  3. 1 1
      projects/live-app/src/app/components/gift-modal/gift-modal.component.html
  4. 4 1
      projects/live-app/src/app/components/gift-modal/gift-modal.component.ts
  5. 19 0
      projects/live-app/src/modules/account/account-log/account-log.component.html
  6. 26 0
      projects/live-app/src/modules/account/account-log/account-log.component.scss
  7. 28 0
      projects/live-app/src/modules/account/account-log/account-log.component.spec.ts
  8. 38 0
      projects/live-app/src/modules/account/account-log/account-log.component.ts
  9. 6 0
      projects/live-app/src/modules/account/account.modules.routes.ts
  10. 1 1
      projects/live-app/src/modules/account/bankcard/bankcard.component.scss
  11. 1 1
      projects/live-app/src/modules/account/recharge/recharge.component.scss
  12. 11 6
      projects/live-app/src/modules/account/recharge/recharge.component.ts
  13. 1 1
      projects/live-app/src/modules/account/wattle/wattle.component.html
  14. 1 1
      projects/live-app/src/modules/account/wattle/wattle.component.scss
  15. 1 1
      projects/live-app/src/modules/account/wattle/wattle.component.ts
  16. 1 1
      projects/live-app/src/modules/live/chat/chat.component.html
  17. 4 96
      projects/live-app/src/modules/live/chat/chat.component.ts
  18. 148 77
      projects/live-app/src/modules/live/link-page/link-page.component.html
  19. 85 2
      projects/live-app/src/modules/live/link-page/link-page.component.scss
  20. 73 3
      projects/live-app/src/modules/live/link-page/link-page.component.ts
  21. 1 1
      projects/live-app/src/modules/live/room-manage/room-manage.component.html
  22. 1 1
      projects/live-app/src/modules/live/room-manage/room-manage.component.scss
  23. 4 4
      projects/live-app/src/modules/live/search/search.component.html
  24. 15 5
      projects/live-app/src/modules/live/search/search.component.ts
  25. 8 3
      projects/live-app/src/modules/login/login.component.html
  26. 6 2
      projects/live-app/src/modules/login/login.component.scss
  27. 5 2
      projects/live-app/src/modules/tabs/home/home.component.html
  28. 18 8
      projects/live-app/src/modules/tabs/home/home.component.scss
  29. 4 9
      projects/live-app/src/modules/tabs/home/home.component.ts
  30. 24 7
      projects/live-app/src/modules/tabs/live-review/live-review.component.html
  31. 29 8
      projects/live-app/src/modules/tabs/live-review/live-review.component.scss
  32. 50 2
      projects/live-app/src/modules/tabs/live-review/live-review.component.ts
  33. 3 1
      projects/live-app/src/modules/tabs/tabs/tabs.component.scss
  34. 1 1
      projects/live-app/src/modules/user/album/album.component.scss
  35. 1 1
      projects/live-app/src/modules/user/anchor/anchor.component.scss
  36. 1 1
      projects/live-app/src/modules/user/browse/browse.component.scss
  37. 1 1
      projects/live-app/src/modules/user/certification/certification.component.scss
  38. 1 1
      projects/live-app/src/modules/user/feedback/feedback.component.scss
  39. 3 0
      projects/live-app/src/modules/user/profile/profile.component.html
  40. 4 1
      projects/live-app/src/modules/user/profile/profile.component.scss
  41. 17 4
      projects/live-app/src/modules/user/profile/profile.component.ts
  42. 1 1
      projects/live-app/src/modules/user/setting/setting.component.scss
  43. 1 1
      projects/live-app/src/modules/user/share/share.component.scss
  44. 108 1
      projects/live-app/src/services/aichart.service.ts
  45. 6 1
      projects/live-app/src/services/live.service.ts
  46. 2 2
      projects/live-app/src/services/message.service.ts

BIN
projects/live-app/public/img/login-poster.png


BIN
projects/live-app/public/img/poster.png


+ 1 - 1
projects/live-app/src/app/components/gift-modal/gift-modal.component.html

@@ -74,7 +74,7 @@
   </ng-template>
 </ion-modal>
 @if (isShowGiftModal) {
-<div class="modal-gift-img">
+<div class="modal-gift-img" (click)="onCloseGiftModal()">
   <img [src]="currentGift?.imgUrl" alt="" />
 </div>
 }

+ 4 - 1
projects/live-app/src/app/components/gift-modal/gift-modal.component.ts

@@ -95,8 +95,8 @@ export class GiftModalComponent implements OnInit {
               .then((data) => {
                 console.log(data);
                 // _this.liveService.get_duration();
-                _this.sendEmit.emit(); //触发父组件的sendEmit事件
                 loading.dismiss();
+                _this.sendEmit.emit(); //触发父组件的sendEmit事件
                 _this.isOpenGift = false;
                 _this.isShowGiftModal = true;
                 setTimeout(() => {
@@ -116,4 +116,7 @@ export class GiftModalComponent implements OnInit {
     });
     await alert.present();
   }
+  onCloseGiftModal(){
+    if(!this.isShowGiftModal) this.isShowGiftModal = false
+  }
 }

+ 19 - 0
projects/live-app/src/modules/account/account-log/account-log.component.html

@@ -0,0 +1,19 @@
+<nav title="动账记录"></nav>
+<ion-content class="content">
+  <ion-list>
+    @for (item of list; track $index) {
+    <ion-item lines="none" class="log-item">
+      <ion-label>
+        <div class="title">{{ item.title }}</div>
+        <div class="time">{{ item.time }}</div>
+      </ion-label>
+      <div class="val">
+        <div class="val-num">
+          {{ item.num }}
+        </div>
+        <div class="order-num">{{ item.orderNum }}</div>
+      </div>
+    </ion-item>
+    }
+  </ion-list>
+</ion-content>

+ 26 - 0
projects/live-app/src/modules/account/account-log/account-log.component.scss

@@ -0,0 +1,26 @@
+.content {
+  background-image: url("https://file-cloud.fmode.cn/Qje9D4bqol/20241220/b313ov054708770.png") !important;
+  background-repeat: no-repeat;
+  background-position: center top;
+  background-size: 100% 100%;
+  --background: #ffffff00;
+  .log-item {
+    display: flex;
+    justify-content: space-between;
+		margin-bottom: 6px;
+    .order-num {
+      font-size: 12px;
+      color: #7d7d7d;
+    }
+    .val {
+      text-align: right;
+      .val-num {
+        color: red;
+      }
+    }
+    .time {
+      font-size: 12px;
+      color: #7d7d7d;
+    }
+  }
+}

+ 28 - 0
projects/live-app/src/modules/account/account-log/account-log.component.spec.ts

@@ -0,0 +1,28 @@
+/* tslint:disable:no-unused-variable */
+import { async, ComponentFixture, TestBed } from '@angular/core/testing';
+import { By } from '@angular/platform-browser';
+import { DebugElement } from '@angular/core';
+
+import { AccountLogComponent } from './account-log.component';
+
+describe('AccountLogComponent', () => {
+  let component: AccountLogComponent;
+  let fixture: ComponentFixture<AccountLogComponent>;
+
+  beforeEach(async(() => {
+    TestBed.configureTestingModule({
+      declarations: [ AccountLogComponent ]
+    })
+    .compileComponents();
+  }));
+
+  beforeEach(() => {
+    fixture = TestBed.createComponent(AccountLogComponent);
+    component = fixture.componentInstance;
+    fixture.detectChanges();
+  });
+
+  it('should create', () => {
+    expect(component).toBeTruthy();
+  });
+});

+ 38 - 0
projects/live-app/src/modules/account/account-log/account-log.component.ts

@@ -0,0 +1,38 @@
+import { Component, OnInit } from '@angular/core';
+import { NavComponent } from '../../../app/components/nav/nav.component';
+import {
+  ionicStandaloneModules,
+} from '../../ionic-standalone.modules';
+@Component({
+  selector: 'app-account-log',
+  templateUrl: './account-log.component.html',
+  styleUrls: ['./account-log.component.scss'],
+  standalone: true,
+  imports: [
+    ...ionicStandaloneModules,
+    NavComponent,
+  ],
+})
+export class AccountLogComponent implements OnInit {
+  list:Array<any> = [
+    {
+      title: '会员充值',
+      time: '2022-08-08 12:12:12',
+      num: '1000',
+      orderNum:'C20220808121212',
+      state: '已到账'
+    },
+    {
+      title: '钻石充值',
+      num: '1000',
+      time: '2022-08-08 12:12:12',
+      orderNum:'C20220808121212',
+      money: '1000',
+    }
+  ]
+  constructor() { }
+
+  ngOnInit() {
+  }
+
+}

+ 6 - 0
projects/live-app/src/modules/account/account.modules.routes.ts

@@ -1,5 +1,6 @@
 import { NgModule } from '@angular/core';
 import { RouterModule, Routes } from '@angular/router';
+import { AccountLogComponent } from './account-log/account-log.component';
 import { BankcardComponent } from './bankcard/bankcard.component';
 import { RechargeComponent } from './recharge/recharge.component';
 import { WattleComponent } from './wattle/wattle.component';
@@ -21,6 +22,11 @@ const routes: Routes = [
     path: 'recharge',
     component: RechargeComponent,
   },
+  {
+    path: 'log',
+    component: AccountLogComponent,
+  },
+  
 ]
 @NgModule({
   imports: [RouterModule.forChild(routes)],

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

@@ -1,7 +1,7 @@
 .notice_list {
 	height: 100vh;
 	width: 100%;
-	background-image: url("https://file-cloud.fmode.cn/uiZD6NisQm/20220831/g1bkbm102855.png");
+	background-image: url("https://file-cloud.fmode.cn/Qje9D4bqol/20241220/b313ov054708770.png");
 	background-repeat: no-repeat;
 	background-position: center top;
 	background-size: 100% 100%;

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

@@ -1,5 +1,5 @@
 .recharge-content {
-  background-image: url("https://file-cloud.fmode.cn/uiZD6NisQm/20220831/g1bkbm102855.png");
+  background-image: url("https://file-cloud.fmode.cn/Qje9D4bqol/20241220/b313ov054708770.png");
   background-repeat: no-repeat;
   background-position: center top;
   background-size: 100% 100%;

+ 11 - 6
projects/live-app/src/modules/account/recharge/recharge.component.ts

@@ -3,20 +3,25 @@ import { FormsModule } from '@angular/forms';
 import * as Parse from 'parse';
 import { HttpClient } from '@angular/common/http';
 import { Router } from '@angular/router';
-import {
-  LoadingController,
-  ToastController,
-} from '@ionic/angular';
 import { Wechat } from '@ionic-native/wechat/ngx';
 import { NavComponent } from '../../../app/components/nav/nav.component';
 import { PayCompComponent } from '../../../app/components/pay-comp/pay-comp.component';
-import { ionicStandaloneModules } from '../../ionic-standalone.modules';
+import {
+  ionicStandaloneModules,
+  LoadingController,
+  ToastController,
+} from '../../ionic-standalone.modules';
 @Component({
   selector: 'app-recharge',
   templateUrl: './recharge.component.html',
   styleUrls: ['./recharge.component.scss'],
   standalone: true,
-  imports: [...ionicStandaloneModules, NavComponent, FormsModule, PayCompComponent],
+  imports: [
+    ...ionicStandaloneModules,
+    NavComponent,
+    FormsModule,
+    PayCompComponent,
+  ],
 })
 export class RechargeComponent implements OnInit {
   @ViewChild('paycomp') paycomp!: PayCompComponent;

+ 1 - 1
projects/live-app/src/modules/account/wattle/wattle.component.html

@@ -25,7 +25,7 @@
     </div> -->
     <div class="install" (click)="record()">
       <div class="install-to">
-        <div class="name">充值记录</div>
+        <div class="name">动账记录</div>
       </div>
       <img
         class="img"

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

@@ -1,5 +1,5 @@
 .top {
-  background-image: url("https://file-cloud.fmode.cn/uiZD6NisQm/20220831/g1bkbm102855.png");
+  background-image: url("https://file-cloud.fmode.cn/Qje9D4bqol/20241220/b313ov054708770.png");
   background-repeat: no-repeat;
   background-position: center top;
   background-size: 100% 100%;

+ 1 - 1
projects/live-app/src/modules/account/wattle/wattle.component.ts

@@ -43,7 +43,7 @@ export class WattleComponent implements OnInit {
   //   }
   // }
   record() {
-    this.router.navigate(['account/record'])
+    this.router.navigate(['account/log'])
   }
   records() {
     this.router.navigate(['account/records'])

+ 1 - 1
projects/live-app/src/modules/live/chat/chat.component.html

@@ -167,7 +167,7 @@
   } @if (showEmoji) {
   <div class="emoji-content">
     <div class="emoji-box">
-      @for (item of emojis; track $index) {
+      @for (item of aiServ.emojis; track $index) {
       <div class="emoji-item">
         <div class="emoji-img" (click)="emojiChoose(item.char)">
           {{ item.char }}

+ 4 - 96
projects/live-app/src/modules/live/chat/chat.component.ts

@@ -17,6 +17,8 @@ import {
   ScrollDetail,
   ToastController,
 } from '../../ionic-standalone.modules';
+import { AiChatService } from '../../../services/aichart.service';
+
 @Component({
   selector: 'app-chat',
   templateUrl: './chat.component.html',
@@ -42,7 +44,6 @@ export class ChatComponent implements OnInit {
   viewImg: string = '';
   height: number = 0;
   showEmoji: boolean = false;
-  emojis: Array<any> = [];
   timer: any;
   currentScroll: number = 0; //滚动条位置
   disabled: boolean = false;
@@ -53,7 +54,8 @@ export class ChatComponent implements OnInit {
     public toastController: ToastController,
     private loadingCtrl: LoadingController,
     private activateRoute: ActivatedRoute,
-    public msgServe: MessageService
+    public msgServe: MessageService,
+    public aiServ: AiChatService,
   ) {
     msgServe.pageFun = this.updatePage;
     msgServe.pageFun();
@@ -98,7 +100,6 @@ export class ChatComponent implements OnInit {
       message: true,
       // presence: true,
     }); //订阅消息
-    this.initEmoji();
     loading.dismiss();
   }
   /* 获取用户信息 */
@@ -126,99 +127,6 @@ export class ChatComponent implements OnInit {
       this.msgServe.unsubscribeMessage(this.channle);
     }
   }
-  initEmoji() {
-    let emojiChar =
-      '☺-😋-😌-😍-😏-😜-😝-😞-😔-😪-😁-😂-😃-😅-😆-👿-😒-😓-😔-😏-😖-😘-😚-😒-😡-😢-😣-😤-😢-😨-😳-😵-😷-😸-😻-😼-😽-😾-😿-🙊-🙋-🙏-✈-🚇-🚃-🚌-🍄-🍅-🍆-🍇-🍈-🍉-🍑-🍒-🍓-🐔-🐶-🐷-👦-👧-👱-👩-👰-👨-👲-👳-💃-💄-💅-💆-💇-🌹-💑-💓-💘-🚲';
-
-    let emojiKey = [
-      '60a',
-      '60b',
-      '60c',
-      '60d',
-      '60f',
-      '61b',
-      '61d',
-      '61e',
-      '61f',
-      '62a',
-      '62c',
-      '602',
-      '603',
-      '605',
-      '606',
-      '608',
-      '612',
-      '613',
-      '614',
-      '615',
-      '616',
-      '618',
-      '619',
-      '620',
-      '621',
-      '623',
-      '624',
-      '625',
-      '627',
-      '629',
-      '633',
-      '635',
-      '637',
-      '63a',
-      '63b',
-      '63c',
-      '63d',
-      '63e',
-      '63f',
-      '64a',
-      '64b',
-      '64f',
-      '681',
-      '68a',
-      '68b',
-      '68c',
-      '344',
-      '345',
-      '346',
-      '347',
-      '348',
-      '349',
-      '351',
-      '352',
-      '353',
-      '414',
-      '415',
-      '416',
-      '466',
-      '467',
-      '468',
-      '469',
-      '470',
-      '471',
-      '472',
-      '473',
-      '483',
-      '484',
-      '485',
-      '486',
-      '487',
-      '490',
-      '491',
-      '493',
-      '498',
-      '6b4',
-    ];
-    let emojis = [];
-    let emojiCharArr = emojiChar.split('-');
-    for (let i in emojiKey) {
-      let em = {
-        char: emojiCharArr[i],
-        emoji: '0x1f' + emojiKey[i],
-      };
-      emojis.push(em);
-    }
-    this.emojis = emojis;
-  }
   /* 开始滑动 */
   handleScrollStart() {
     // console.log('scroll start');

+ 148 - 77
projects/live-app/src/modules/live/link-page/link-page.component.html

@@ -23,84 +23,155 @@
       <ion-icon name="enter-outline"></ion-icon>
     </div>
   </div>
-  <app-live (touch)="showTool = !showTool"></app-live>
-  <div
-    class="tools"
-    (click)="showTool = !showTool"
-    [style.visibility]="showTool ? 'visible' : 'hidden'"
-  >
-    <div class="row" style="justify-content: center">
-      @if(liveService.connection_state === 'CONNECTED'){
-      <div class="tips">
-        剩余通话时长
-        <span
-          [style.color]="liveService.countdown > 120 ? '#ffc409' : '#ff2636'"
-          >{{ liveService.countdown | secondsToTime }}</span
-        >
-      </div>
-      }
-    </div>
-    @if (!liveService.isAnchor) {
-    <div class="row">
-      <div class="row-li" (click)="onChangeLiveStatus($event, 'gift')">
-        <div class="icon-box">
-          <ion-icon class="icon" name="gift"></ion-icon>
-        </div>
-        <div class="label">礼物</div>
-      </div>
-    </div>
-    }
-    <div class="row">
-      <div class="row-li" (click)="onChangeLiveStatus($event, 'camera')">
-        <div
-          [ngClass]="{
-            'action-icon': liveService.tools['camera'],
-            'icon-box': true
-          }"
-        >
-          <ion-icon name="camera-reverse"></ion-icon>
-        </div>
-        <div class="label">旋转摄像头</div>
-      </div>
-      <div class="row-li" (click)="onChangeLiveStatus($event, 'mute')">
-        <div
-          class="icon-box"
-          [ngClass]="{
-            'action-icon': liveService.tools['mute'],
-            'icon-box': true
-          }"
-        >
-          <ion-icon class="icon" name="notifications-off"></ion-icon>
-        </div>
-        <div class="label">
-          {{ liveService.tools["mute"] ? "已静音" : "静音" }}
-        </div>
-      </div>
-    </div>
-    <div class="row">
-      <div class="row-li">
-        <div class="icon-box">
-          <ion-icon class="icon" name="keypad"></ion-icon>
-        </div>
-        <div class="label">聊天</div>
-      </div>
-      <div class="row-li" (click)="endCall($event)">
-        <div class="icon-box" style="background-color: rgba(0, 0, 0, 0)">
-          <img class="icon" src="img/挂断.png" alt="" class="icon-img" />
-        </div>
-        <div class="label">挂断</div>
-      </div>
-      <div class="row-li" (click)="onChangeLiveStatus($event, 'audio')">
-        <div
-          [ngClass]="{
-            'action-icon': liveService.tools['audio'],
-            'icon-box': true
-          }"
-        >
-          <ion-icon class="icon" name="mic-off"></ion-icon>
+  <app-live (touch)="onPage()"></app-live>
+  <div class="tools" [style.visibility]="showTool ? 'visible' : 'hidden'">
+    <div class="swiper chartSwiper">
+      <div class="swiper-wrapper">
+        <div class="swiper-slide" (click)="showTool = !showTool">
+          <div class="row" style="justify-content: center">
+            @if(liveService.connection_state === 'CONNECTED'){
+            <div class="tips">
+              剩余通话时长
+              <span
+                [style.color]="
+                  liveService.countdown > 120 ? '#ffc409' : '#ff2636'
+                "
+                >{{ liveService.countdown | secondsToTime }}</span
+              >
+            </div>
+            }
+          </div>
+          @if (!liveService.isAnchor) {
+          <div class="row">
+            <div class="row-li" (click)="onChangeLiveStatus($event, 'gift')">
+              <div class="icon-box">
+                <ion-icon class="icon" name="gift"></ion-icon>
+              </div>
+              <div class="label">礼物</div>
+            </div>
+          </div>
+          }
+          <div class="row">
+            <div class="row-li" (click)="onChangeLiveStatus($event, 'camera')">
+              <div
+                [ngClass]="{
+                  'action-icon': liveService.tools['camera'],
+                  'icon-box': true
+                }"
+              >
+                <ion-icon name="camera-reverse"></ion-icon>
+              </div>
+              <div class="label">旋转摄像头</div>
+            </div>
+            <div class="row-li" (click)="onChangeLiveStatus($event, 'mute')">
+              <div
+                class="icon-box"
+                [ngClass]="{
+                  'action-icon': liveService.tools['mute'],
+                  'icon-box': true
+                }"
+              >
+                <ion-icon class="icon" name="notifications-off"></ion-icon>
+              </div>
+              <div class="label">
+                {{ liveService.tools["mute"] ? "已静音" : "静音" }}
+              </div>
+            </div>
+          </div>
+          <div class="row">
+            <div class="row-li" (click)="onChangeLiveStatus($event, 'audio')">
+              <div
+                [ngClass]="{
+                  'action-icon': liveService.tools['audio'],
+                  'icon-box': true
+                }"
+              >
+                <ion-icon class="icon" name="mic-off"></ion-icon>
+              </div>
+              <div class="label">
+                麦克风{{ liveService.tools["audio"] ? "已关" : "已开" }}
+              </div>
+            </div>
+            <div class="row-li" (click)="endCall($event)">
+              <div class="icon-box" style="background-color: rgba(0, 0, 0, 0)">
+                <img class="icon" src="img/挂断.png" alt="" class="icon-img" />
+              </div>
+              <div class="label">挂断</div>
+            </div>
+            <div class="row-li" (click)="onChangeLiveStatus($event, 'chat')">
+              <div class="icon-box">
+                <!-- <ion-icon class="icon" name="keypad"></ion-icon> -->
+                <ion-icon name="arrow-forward-circle"></ion-icon>
+              </div>
+              <div class="label">左滑聊天</div>
+            </div>
+          </div>
         </div>
-        <div class="label">
-          麦克风{{ liveService.tools["audio"] ? "已关" : "已开" }}
+        <div class="swiper-slide chat-template">
+          <div class="chat-list">
+            <p class="message tips">欢迎进入视频直播1V1聊天</p>
+            @for (item of msgServe.messageMapList[room?.get('user').id]; track
+            $index) {
+            <p
+              [ngClass]="{
+                slef_m: item?.is_self,
+                message: true
+              }"
+            >
+              <span>{{ item.name }}:</span> {{ item.content }}
+            </p>
+            }
+          </div>
+          <div class="footer-tool">
+            <ion-input
+              slot="start"
+              labelPlacement="stacked"
+              [clearInput]="true"
+              placeholder="文明畅聊"
+              [(ngModel)]="text"
+              (keydown)="comfirmText($event)"
+            >
+            </ion-input>
+            <div class="input-bar" slot="end">
+              <ion-icon
+                name="happy-outline"
+                (click)="showEmoji = !showEmoji"
+              ></ion-icon>
+              <span class="splice">|</span>
+              <ion-button
+                class="send"
+                fill="outline"
+                size="small"
+                [disabled]="text.length == 0 || disabled"
+                (click)="comfirmText()"
+                >发送</ion-button
+              >
+            </div>
+          </div>
+          <div [style.height]="0 + 'px'"></div>
+          @if (showEmoji) {
+          <div class="b-1px-b"></div>
+          <div class="emoji-content">
+            <div class="emoji-box">
+              @for (item of aiServ.emojis; track $index) {
+              <div class="emoji-item">
+                <div class="emoji-img" (click)="emojiChoose(item.char)">
+                  {{ item.char }}
+                </div>
+              </div>
+              }
+              <div
+                class="emoji-item__del"
+                (click)="text.substring(0, this.text.length - 2)"
+              >
+                <ion-icon
+                  class="emoji-img"
+                  name="close-circle-outline"
+                ></ion-icon>
+              </div>
+            </div>
+          </div>
+          }
         </div>
       </div>
     </div>

+ 85 - 2
projects/live-app/src/modules/live/link-page/link-page.component.scss

@@ -68,8 +68,11 @@
     bottom: 0;
     left: 0;
     width: 100%;
-    // height: 260px;
     padding: 10px;
+    .swiper-wrapper {
+      // height: 280px;
+      // justify-content: end;
+    }
     .row {
       display: flex;
       justify-content: space-between;
@@ -130,4 +133,84 @@
       }
     }
   }
-}
+  .chat-template {
+    // height: 370px;
+    display: flex;
+    flex-direction: column;
+    justify-content: end;
+    background: linear-gradient(to top, #000, #fff0);
+    border-radius: 0 0 4px 4px;
+    .chat-list{
+      height: 160px;
+      color: #fff;
+      overflow-y: scroll;
+      .tips{
+        color:#b7000e;
+        text-align: center;
+      }
+      .message{
+        font-size: 12px;
+        margin-bottom: 4px;
+      }
+      .slef_m{
+        color: #ffc409;
+      }
+    }
+    .footer-tool {
+      display: flex;
+      // background: white;
+      padding: 0 4px;
+      backdrop-filter: saturate(180%) blur(20px);
+      background: rgb(255 255 255 / 0.8);
+      border-radius: 4px;
+      .input-bar {
+        // width: 160px;
+        display: flex;
+        align-items: center;
+        justify-content: space-between;
+        flex-shrink: 0;
+        ion-icon {
+          font-size: 30px;
+        }
+        .splice {
+          margin: 0 2px;
+        }
+      }
+      .tools-maxwid {
+        width: 160px;
+      }
+    }
+    .emoji-content {
+      background: #fbfbfb;
+      height: 160px;
+      overflow-y: scroll;
+      .emoji-box {
+        display: flex;
+        flex-wrap: wrap;
+        width: 100%;
+        .emoji-item {
+          width: 30px;
+          height: 30px;
+          display: flex;
+          justify-content: center;
+          align-items: center;
+          .emoji-img {
+            width: 20px;
+            height: 20px;
+          }
+        }
+        .emoji-item__del {
+          width: 30px;
+          height: 30px;
+          display: flex;
+          justify-content: center;
+          align-items: center;
+          .emoji-img {
+            width: 20px;
+            height: 20px;
+          }
+        }
+      }
+    }
+  }
+}

+ 73 - 3
projects/live-app/src/modules/live/link-page/link-page.component.ts

@@ -2,6 +2,7 @@ import { Component, OnInit, ViewChild } from '@angular/core';
 import { CommonModule } from '@angular/common';
 import { FormsModule } from '@angular/forms';
 import * as Parse from 'parse';
+import { Swiper } from 'swiper';
 
 import { ActivatedRoute } from '@angular/router';
 import { LiveComponent } from '../../../app/components/live/live.component';
@@ -15,6 +16,7 @@ import {
   LoadingController,
   ToastController,
 } from '../../ionic-standalone.modules';
+import { MessageService } from '../../../services/message.service';
 @Component({
   selector: 'app-link-page',
   templateUrl: './link-page.component.html',
@@ -38,12 +40,17 @@ export class LinkPageComponent implements OnInit {
   showTool: boolean = true; // 是否显示工具栏
   @ViewChild('gift') gift!: GiftModalComponent;
 
+  text: string = '';
+  disabled: boolean = false;
+  showEmoji: boolean = false;
+
   constructor(
     public toastController: ToastController,
     private loadingCtrl: LoadingController,
     private alertController: AlertController,
     private activateRoute: ActivatedRoute,
-    private aiServ: AiChatService,
+    public aiServ: AiChatService,
+    public msgServe: MessageService,
     public liveService: LiveService
   ) {}
 
@@ -64,6 +71,7 @@ export class LinkPageComponent implements OnInit {
     });
     loading.present();
     await this.getRoom();
+    this.initSwiperTimeEvent();
     loading.dismiss();
   }
   async getRoom() {
@@ -75,6 +83,17 @@ export class LinkPageComponent implements OnInit {
     this.room = await query.first();
     this.getFollwState(this.room?.get('user').id);
   }
+  initSwiperTimeEvent() {
+    // 初始化轮播图
+    let swiper = new Swiper('.chartSwiper', {
+      loop: false, // 循环模式选项
+      observer: false, //修改swiper自己或子元素时,自动初始化swiper
+      observeParents: true, //修改swiper的父元素时,自动初始化swiper
+    });
+    swiper.on('slideChange', function (event: any) {
+      // console.log(event);
+    });
+  }
   /* 关注状态 */
   async getFollwState(uid: string) {
     let query = new Parse.Query('ProfileRadar');
@@ -116,6 +135,10 @@ export class LinkPageComponent implements OnInit {
   /* 直播状态 */
   async onChangeLiveStatus(e: any, type: string) {
     e.cancelBubble = true;
+    if (this.liveService.connection_state !== 'CONNECTED') {
+      this.presentToast('需连接成功后操作');
+      return;
+    }
     switch (type) {
       case 'audio':
         this.liveService.updatePublishedAudioTrack();
@@ -129,19 +152,28 @@ export class LinkPageComponent implements OnInit {
       case 'gift':
         this.gift.openModal();
         break;
+      case 'chat':
+        break;
     }
   }
   onSendGift() {
     console.log('点击送出礼物');
     this.liveService.get_duration();
   }
+  onPage() {
+    if (!this.showEmoji) {
+      this.showTool = !this.showTool;
+    } else {
+      this.showEmoji = false;
+    }
+  }
   /* 结束直播 */
   async endCall(e: any) {
     e.cancelBubble = true;
     const alert = await this.alertController.create({
       cssClass: 'my-custom-class',
       header: '退出提示',
-      message: '你确定退出登录吗?',
+      message: '你确定退出吗?',
       buttons: [
         {
           text: '取消',
@@ -165,7 +197,7 @@ export class LinkPageComponent implements OnInit {
     const alert = await this.alertController.create({
       cssClass: 'my-custom-class',
       header: '举报',
-      message: '请填写需要举报的内容',
+      message: '请填写需要举报的内容',
       inputs: [
         {
           name: 'report',
@@ -191,6 +223,44 @@ export class LinkPageComponent implements OnInit {
     });
     await alert.present();
   }
+  //添加表情
+  emojiChoose(value: any) {
+    console.log(value);
+    this.text = this.text + value;
+  }
+  //发送文字
+  comfirmText(e?: any) {
+    if (e && e.keyCode != 13) {
+      return;
+    }
+    this.disabled = true;
+    if (this.text == '' && this.text.trim() == '') {
+      this.presentToast('聊天内容不能为空');
+      this.disabled = false;
+      return;
+    }
+    this.send({
+      msg_type: 'text',
+      content: this.text,
+    });
+  }
+  async send(param: { msg_type: string; content: string }) {
+    await this.msgServe.publishMessage(
+      param.content,
+      this.room?.get('user')?.id
+    );
+    this.text = '';
+    this.disabled = false;
+  }
+
+  async presentToast(title: string, time?: number, color?: string) {
+    const toast = await this.toastController.create({
+      message: title,
+      duration: time || 1500,
+      color: color || 'danger',
+    });
+    toast.present();
+  }
   onExit() {
     this.liveService.client.leave();
     history.back();

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

@@ -18,7 +18,7 @@
       ></ion-input>
     </div>
     <div class="row">
-      <div class="title">点播费用(/分钟)<span style="color: red">*</span></div>
+      <div class="title">点播费用(钻石/分钟)<span style="color: red">*</span></div>
       <input
         placeholder="请填写标题"
         min="0.5"

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

@@ -1,7 +1,7 @@
 .content {
 	height: 100vh;
 	width: 100%;
-	background-image: url("https://file-cloud.fmode.cn/uiZD6NisQm/20220831/g1bkbm102855.png") !important;
+	background-image: url("https://file-cloud.fmode.cn/Qje9D4bqol/20241220/b313ov054708770.png") !important;
 	background-repeat: no-repeat;
 	background-position: center top;
 	background-size: 100% 100%;

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

@@ -30,7 +30,8 @@
     @for (item of roomList; track $index) {
     <div
       class="list-row"
-      [style.background-image]="'url(' + item?.get('cover') + ')'"
+      (click)="toUrl('user/profile/' + item.uid)"
+      [style.background-image]="'url(' + item?.cover + ')'"
     >
       <div class="title-tag">在线聊天</div>
       <div class="live-tag">
@@ -41,11 +42,10 @@
       <div class="room-footer">
         <div class="user">
           {{
-            item?.get("user")?.get("nickname") ||
-              item?.get("user")?.get("mobile")
+            item?.nickname || item?.mobile
           }}
         </div>
-        <div class="desc">{{ item?.get("title") }}</div>
+        <div class="desc">{{ item?.title }}</div>
         <div class="city-block">
           <div class="row-li">
             <ion-icon name="location-outline"></ion-icon>

+ 15 - 5
projects/live-app/src/modules/live/search/search.component.ts

@@ -5,6 +5,7 @@ import { Router } from '@angular/router';
 import { LoadingController, ToastController } from '@ionic/angular';
 import * as Parse from 'parse';
 import { NavComponent } from '../../../app/components/nav/nav.component';
+import { AiChatService } from '../../../services/aichart.service';
 import { ionicStandaloneModules } from '../../ionic-standalone.modules';
 
 @Component({
@@ -23,6 +24,7 @@ export class SearchComponent implements OnInit {
   hots: Array<Parse.Object> = [];
 
   constructor(
+    private aiServ: AiChatService,
     private router: Router,
     public toastController: ToastController
   ) {}
@@ -94,11 +96,19 @@ export class SearchComponent implements OnInit {
   }
   async getSearch() {
     let query = new Parse.Query('Room');
-    query.equalTo('company', this.company);
-    query.equalTo('title', this.value);
-    query.notEqualTo('isDeleted', true);
-    let r = await query.find();
-    this.roomList = r;
+    // query.equalTo('company', this.company);
+    // query.equalTo('title', this.value);
+    // query.notEqualTo('isDeleted', true);
+    // let r = await query.find();
+    // this.roomList = r;
+    let uid = Parse.User.current()?.id;
+    this.roomList = await this.aiServ.getRooms({
+      title:this.value,
+      uid: uid,
+    });
     if (this.roomList.length == 0) this.presentToast('暂无搜索结果');
   }
+  toUrl(url: string) {
+    this.router.navigate([url]);
+  }
 }

+ 8 - 3
projects/live-app/src/modules/login/login.component.html

@@ -1,5 +1,7 @@
 <!-- 登录 -->
-<ion-content fullscreen scroll-y="false" *ngIf="status == 'login'">
+<ion-content fullscreen scroll-y="false" *ngIf="status == 'login'"
+[style.background-image]="'url(img/poster.png)'"
+>
   <div class="container">
     <div class="logo">
       <img *ngIf="logo" [src]="logo" alt="" />
@@ -60,7 +62,8 @@
   </div>
 </ion-content>
 <!-- 重置密码 -->
-<ion-content fullscreen scroll-y="false" *ngIf="status == 'forget'">
+<ion-content fullscreen scroll-y="false" *ngIf="status == 'forget'"
+[style.background-image]="'url(img/poster.png)'">
   <div class="header">
     <ion-buttons slot="start" (click)="back()">
       <ion-icon
@@ -141,7 +144,9 @@
   </div>
 </ion-content>
 <!-- 注册账号 -->
-<ion-content fullscreen *ngIf="status == 'register'">
+<ion-content fullscreen *ngIf="status == 'register'"
+[style.background-image]="'url(img/poster.png)'"
+>
   <div class="container" style="background-image: url('')">
     <div class="logo">
       <img *ngIf="logo" [src]="logo" alt="" />

+ 6 - 2
projects/live-app/src/modules/login/login.component.scss

@@ -7,10 +7,14 @@ ion-header {
 }
 ion-content {
   // --padding-top: 0;
-  --background: #fff;
+  --background: #fdfdfd00;
   font-family: Source Han Sans CN;
   --keyboard-offset: 0vw;
   position: relative;
+  // background-image: url("https://file-cloud.fmode.cn/Qje9D4bqol/20241220/b313ov054708770.png") !important;
+  background-repeat: no-repeat;
+  background-position: center top;
+  background-size: 100% 100%;
   .header {
     position: absolute;
     top: 0;
@@ -103,7 +107,7 @@ ion-content {
     .submit {
       width: 84vw;
       height: 10.667vw;
-      background: #0054e9;
+      background: #fe4f55;
       border-radius: 3.2vw;
       font-size: 4.8vw;
       font-weight: bold;

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

@@ -46,9 +46,12 @@
             <div class="notice-item-text">
               {{ item?.title }}
             </div>
+            <div class="notice-item-content">
+              {{ item?.content }}
+            </div>
           </div>
-          <div class="notice-item-content">
-            {{ item?.content }}
+          <div class="notice-item-time">
+            {{ item?.time }}
           </div>
         </div>
         }

+ 18 - 8
projects/live-app/src/modules/tabs/home/home.component.scss

@@ -83,19 +83,29 @@
     .swiper-wrapper {
       flex: 1;
       height: 20px;
-
-      .swiper-slide {
+      flex-shrink: 0;
+      .notice-item {
         display: flex;
+        justify-content: space-between;
         font-size: 14px;
         background: #ffffff00;
         .notice-item-title {
-          flex-shrink: 0;
+          display: flex;
+          justify-content: start;
+          .notice-item-text{
+            flex-shrink: 0;
+          }
+          .notice-item-content {
+            display: -webkit-box; //对象作为弹性伸缩盒子模型显示
+            overflow: hidden; //溢出隐藏
+            -webkit-box-orient: vertical; //设置伸缩盒子对象的子元素的排列方式
+            -webkit-line-clamp: 1; //设置 块元素包含的文本行数
+            margin: 0 6px 0 0;
+          }
         }
-        .notice-item-content {
-          display: -webkit-box; //对象作为弹性伸缩盒子模型显示
-          overflow: hidden; //溢出隐藏
-          -webkit-box-orient: vertical; //设置伸缩盒子对象的子元素的排列方式
-          -webkit-line-clamp: 1; //设置 块元素包含的文本行数
+        .notice-item-time{
+          flex-shrink: 0;
+          color: #cccccc;
         }
       }
     }

+ 4 - 9
projects/live-app/src/modules/tabs/home/home.component.ts

@@ -70,19 +70,13 @@ export class HomeComponent implements OnInit {
       title: '【公告】',
       content:
         '欢迎来到直播间,请遵守直播规则,禁止一切违法直播行为,否则封号处理。',
-      time: '2022-06-01',
+      time: '2024-12-01',
     },
     {
       title: '【公告】',
       content:
-        '欢迎来到直播间,请遵守直播规则,禁止一切违法直播行为,否则封号处理。',
-      time: '2022-06-01',
-    },
-    {
-      title: '【公告】',
-      content:
-        '欢迎来到直播间,请遵守直播规则,禁止一切违法直播行为,否则封号处理。',
-      time: '2022-06-01',
+        '欢迎使用爱聊',
+      time: '2024-12-10',
     },
   ];
   viewAnchor: string = localStorage.getItem('viewSex') || '女';
@@ -231,6 +225,7 @@ export class HomeComponent implements OnInit {
   async presentAlert(item: any) {
     const alert = await this.alertController.create({
       header: item.title || '消息通知',
+      subHeader:item.time,
       message:
         item.content || 'A message should be a short, complete sentence.',
       buttons: ['关闭'],

+ 24 - 7
projects/live-app/src/modules/tabs/live-review/live-review.component.html

@@ -1,12 +1,29 @@
 <div class="live-page">
-  <div class="post-footer">
-    <div class="btn">点击进入直播间</div>
-    <div class="block">
-      <div class="tag">直播中
-        <img src="img/live.gif" alt="">
+  <div class="swiper poster">
+    <div class="swiper-wrapper">
+      @for (item of roomList; track $index) {
+      <div
+        class="swiper-slide"
+        [style.background-image]="'url(' + item?.cover + ')'"
+      >
+        <div class="post-footer">
+          <div class="user-dateil">
+            <div class="avatar">
+              <img [src]="item.avatar" alt="">
+            </div>
+            <div class="btn">点击查看主页</div>
+          </div>
+          <div class="block">
+            <!-- <div class="tag">
+              直播中
+              <img src="img/live.gif" alt="" />
+            </div> -->
+            <div class="live-room">{{ item?.nickname || item?.mobile }}</div>
+            <div class="tips">{{ item?.title }}</div>
+          </div>
+        </div>
       </div>
-      <div class="live-room">这个女孩叫小美</div>
-      <div class="tips">这个女孩叫小美正在直播</div>
+      }
     </div>
   </div>
 </div>

+ 29 - 8
projects/live-app/src/modules/tabs/live-review/live-review.component.scss

@@ -1,11 +1,20 @@
 .live-page{
   height: 100%;
-  background-color: #fff;
-  position: relative;
+  background-color: #000000;
+  .swiper {
+    width: 100%;
+    height: 100%;
+  }
+  .swiper-slide{
+    position: relative;
+    background-repeat: no-repeat;
+    background-position: center top;
+    background-size: 100% 100%;
+  }
   .post-footer{
     position: absolute;
     bottom: 0;
-    height: 350px;
+    height: 380px;
     color: white;
     padding: 50px 10px 120px;
     width: 100%;
@@ -14,11 +23,22 @@
     justify-content: space-between;
     align-items: center;
     background: linear-gradient(to top, #000000, rgba(255, 255, 255, 0));
-    .btn{
-      padding: 10px;
-      border-radius: 20px;
-      border: 1px solid;
-      // margin:auto;
+    .user-dateil{
+      display: flex;
+      flex-direction: column;
+      align-items: center;
+      .avatar{
+        width: 50px;
+        height: 50px;
+        border-radius: 50%;
+        margin-bottom: 10px;
+      }
+      .btn{
+        padding: 10px;
+        border-radius: 30px;
+        border: 1px solid;
+        // margin:auto;
+      }
     }
     .block{
       width: 100%;
@@ -34,6 +54,7 @@
       }
       .live-room{
         margin: 6px auto;
+        font-weight: 600;
       }
     }
   }

+ 50 - 2
projects/live-app/src/modules/tabs/live-review/live-review.component.ts

@@ -1,6 +1,13 @@
 import { Component, OnInit } from '@angular/core';
 import { IonicModule } from '@ionic/angular';
+import { Swiper } from 'swiper';
+import { ConnectTaskService } from '../../../services/connectTask.service';
 import * as Parse from 'parse';
+import {
+  AlertController,
+  LoadingController,
+} from '../../ionic-standalone.modules';
+import { AiChatService } from '../../../services/aichart.service';
 @Component({
   selector: 'app-live-review',
   templateUrl: './live-review.component.html',
@@ -9,10 +16,51 @@ import * as Parse from 'parse';
   imports: [IonicModule],
 })
 export class LiveReviewComponent implements OnInit {
-
-  constructor() { }
+  roomList: Array<any> = [];
+  constructor(
+    private aiServ: AiChatService,
+    private loadingCtrl: LoadingController,
+    private connectTask: ConnectTaskService,
+  ) { }
 
   ngOnInit() {
+    this.refresh()
+  }
+  async refresh() {
+    const loading = await this.loadingCtrl.create({
+      message: '正在加载',
+    });
+    loading.present();
+    await this.getRoom();
+    setTimeout(() => {
+      this.initSwiperTimeEvent();
+      loading.dismiss();
+    }, 100);
   }
+  async getRoom() {
+    let uid = Parse.User.current()?.id;
+    const userList = Array.from(this.connectTask.onlineUserList);
+    let data = await this.aiServ.getRooms({
+      uid: uid,
+      users: userList,
+      sex:'女'
+    });
+    this.roomList = data;
 
+  }
+  initSwiperTimeEvent() {
+    // 初始化轮播图
+    let swiper = new Swiper('.poster', {
+      loop: false, // 循环模式选项
+      observer: false, //修改swiper自己或子元素时,自动初始化swiper
+      observeParents: true, //修改swiper的父元素时,自动初始化swiper
+      // autoplay: {
+      //   delay: 3000,
+      // },
+      direction: 'vertical',
+    });
+    swiper.on('slideChange', function (event: any) {
+      // console.log(event);
+    });
+  }
 }

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

@@ -7,7 +7,9 @@
   display         : flex;
   justify-content : space-evenly;
   height          : 13.3333vw;
-  background-color: #fff;
+  // background-color: #fff;
+  backdrop-filter: saturate(180%) blur(20px);
+  background: rgb(255 255 255 / .8);
   color           : #808080;
   box-shadow: rgba(17, 17, 26, 0.1) 0px -1px 0px;
   border-radius: 10px 10px 0 0;

+ 1 - 1
projects/live-app/src/modules/user/album/album.component.scss

@@ -7,7 +7,7 @@
   border-radius: 18px;
 }
 .content {
-  background-image: url("https://file-cloud.fmode.cn/uiZD6NisQm/20220831/g1bkbm102855.png") !important;
+  background-image: url("https://file-cloud.fmode.cn/Qje9D4bqol/20241220/b313ov054708770.png") !important;
 	background-repeat: no-repeat;
 	background-position: center top;
 	background-size: 100% 100%;

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

@@ -1,7 +1,7 @@
 .content {
   height: 100vh;
   width: 100%;
-  background-image: url("https://file-cloud.fmode.cn/uiZD6NisQm/20220831/g1bkbm102855.png") !important;
+  background-image: url("https://file-cloud.fmode.cn/Qje9D4bqol/20241220/b313ov054708770.png") !important;
   background-repeat: no-repeat;
   background-position: center top;
   background-size: 100% 100%;

+ 1 - 1
projects/live-app/src/modules/user/browse/browse.component.scss

@@ -1,6 +1,6 @@
 .content {
   padding-bottom: 50px;
-  background-image: url("https://file-cloud.fmode.cn/uiZD6NisQm/20220831/g1bkbm102855.png") !important;
+  background-image: url("https://file-cloud.fmode.cn/Qje9D4bqol/20241220/b313ov054708770.png") !important;
   background-repeat: no-repeat;
   background-position: center top;
   background-size: 100% 100%;

+ 1 - 1
projects/live-app/src/modules/user/certification/certification.component.scss

@@ -17,7 +17,7 @@
 .content {
   // --background: #f8f8f8;
   --padding-bottom: 5.3333vw;
-  background-image: url("https://file-cloud.fmode.cn/uiZD6NisQm/20220831/g1bkbm102855.png") !important;
+  background-image: url("https://file-cloud.fmode.cn/Qje9D4bqol/20241220/b313ov054708770.png") !important;
 	background-repeat: no-repeat;
 	background-position: center top;
 	background-size: 100% 100%;

+ 1 - 1
projects/live-app/src/modules/user/feedback/feedback.component.scss

@@ -1,6 +1,6 @@
 .content {
   padding-bottom: 50px;
-  background-image: url("https://file-cloud.fmode.cn/uiZD6NisQm/20220831/g1bkbm102855.png") !important;
+  background-image: url("https://file-cloud.fmode.cn/Qje9D4bqol/20241220/b313ov054708770.png") !important;
   background-repeat: no-repeat;
   background-position: center top;
   background-size: 100% 100%;

+ 3 - 0
projects/live-app/src/modules/user/profile/profile.component.html

@@ -48,6 +48,9 @@
             <span class="tag">{{ state.val }}</span>
           </div>
           }
+          @if (profile?.get('identyType') === 'anchor') {
+            <div class="video-unit">通话:{{profile?.get('laborCosts')}}钻石/分钟</div>
+          }
         </div>
       </div>
       <div class="user-right">

+ 4 - 1
projects/live-app/src/modules/user/profile/profile.component.scss

@@ -1,7 +1,7 @@
 .content {
   --padding-bottom: 100px;
   // --background: #ffffff;
-  background-image: url("https://file-cloud.fmode.cn/uiZD6NisQm/20220831/g1bkbm102855.png") !important;
+  background-image: url("https://file-cloud.fmode.cn/Qje9D4bqol/20241220/b313ov054708770.png") !important;
   background-repeat: no-repeat;
   background-position: center top;
   background-size: 100% 100%;
@@ -109,6 +109,9 @@
               // margin-left: 10px;
             }
           }
+          .video-unit{
+            margin-left: 10px;
+          }
         }
       }
       .user-right {

+ 17 - 4
projects/live-app/src/modules/user/profile/profile.component.ts

@@ -98,15 +98,19 @@ export class ProfileComponent implements OnInit {
       let id: any = params.get('id');
       this.uid = id;
       await this.refresh();
-      // this.userStatus = await this.connectTask.getState(this.uid, this.uid);
+      if(this.uid !== this.currentUser?.id){
+        this.userStatus = await this.connectTask.getState(this.uid, this.uid);
+      }else{
+        this.userStatus = 'ONLINE'
+      }
     });
   }
   ngOnDestroy(): void {
     //Called once, before the instance is destroyed.
     //Add 'implements OnDestroy' to the class.
-    if (this.isLiveing && this.uid !== this.currentUser?.id) {
+    if (!this.isLiveing && this.uid !== this.currentUser?.id) {
       console.log('断开连接');
-      this.msgSer.unsubscribeMessage(this.uid);
+      this.msgSer?.unsubscribeMessage(this.uid);
     }
   }
   async refresh() {
@@ -286,7 +290,6 @@ export class ProfileComponent implements OnInit {
       toast.present();
       return;
     }
-    console.log(this.userStatus);
     const alert = await this.alertController.create({
       cssClass: 'my-custom-class',
       header: '邀请通话',
@@ -326,6 +329,16 @@ export class ProfileComponent implements OnInit {
     }
   }
   async sendVideoCallInvite() {
+    let second = await this.aiChatServ.get_duration(this.room?.id!,this.currentUser?.id!)
+    if(second < 120){
+      const toast = await this.toastController.create({
+        message: '通话时长不足2分钟,请充值后再试通',
+        color: 'warning',
+        duration: 1500,
+      });
+      toast.present();
+      return;
+    }
     this.iscall = true;
     // this.router.navigate(['live/link-room/' + this.room?.id]);
     await this.msgSer.subscribeMessage(this.uid, {

+ 1 - 1
projects/live-app/src/modules/user/setting/setting.component.scss

@@ -4,7 +4,7 @@
 
 ion-content {
   --padding-bottom: 26.6667vw;
-  background-image: url("https://file-cloud.fmode.cn/uiZD6NisQm/20220831/g1bkbm102855.png") !important;
+  background-image: url("https://file-cloud.fmode.cn/Qje9D4bqol/20241220/b313ov054708770.png") !important;
   background-repeat: no-repeat;
   background-position: center top;
   background-size: 100% 100%;

+ 1 - 1
projects/live-app/src/modules/user/share/share.component.scss

@@ -1,7 +1,7 @@
 .content {
 	height: 100vh;
 	width: 100%;
-	background-image: url("https://file-cloud.fmode.cn/uiZD6NisQm/20220831/g1bkbm102855.png");
+	background-image: url("https://file-cloud.fmode.cn/Qje9D4bqol/20241220/b313ov054708770.png");
 	background-repeat: no-repeat;
 	background-position: center top;
 	background-size: 100% 100%;

+ 108 - 1
projects/live-app/src/services/aichart.service.ts

@@ -8,7 +8,103 @@ import { HttpService } from './http.service';
 export class AiChatService {
   isLoggedIn = false;
   company: string = 'Qje9D4bqol';
-  constructor(private router: Router, private http: HttpService) {}
+  emojis: Array<any> = [];
+
+  constructor(private router: Router, private http: HttpService) {
+    this.initEmoji()
+  }
+  initEmoji() {
+    let emojiChar =
+      '☺-😋-😌-😍-😏-😜-😝-😞-😔-😪-😁-😂-😃-😅-😆-👿-😒-😓-😔-😏-😖-😘-😚-😒-😡-😢-😣-😤-😢-😨-😳-😵-😷-😸-😻-😼-😽-😾-😿-🙊-🙋-🙏-✈-🚇-🚃-🚌-🍄-🍅-🍆-🍇-🍈-🍉-🍑-🍒-🍓-🐔-🐶-🐷-👦-👧-👱-👩-👰-👨-👲-👳-💃-💄-💅-💆-💇-🌹-💑-💓-💘-🚲';
+    let emojiKey = [
+      '60a',
+      '60b',
+      '60c',
+      '60d',
+      '60f',
+      '61b',
+      '61d',
+      '61e',
+      '61f',
+      '62a',
+      '62c',
+      '602',
+      '603',
+      '605',
+      '606',
+      '608',
+      '612',
+      '613',
+      '614',
+      '615',
+      '616',
+      '618',
+      '619',
+      '620',
+      '621',
+      '623',
+      '624',
+      '625',
+      '627',
+      '629',
+      '633',
+      '635',
+      '637',
+      '63a',
+      '63b',
+      '63c',
+      '63d',
+      '63e',
+      '63f',
+      '64a',
+      '64b',
+      '64f',
+      '681',
+      '68a',
+      '68b',
+      '68c',
+      '344',
+      '345',
+      '346',
+      '347',
+      '348',
+      '349',
+      '351',
+      '352',
+      '353',
+      '414',
+      '415',
+      '416',
+      '466',
+      '467',
+      '468',
+      '469',
+      '470',
+      '471',
+      '472',
+      '473',
+      '483',
+      '484',
+      '485',
+      '486',
+      '487',
+      '490',
+      '491',
+      '493',
+      '498',
+      '6b4',
+    ];
+    let emojis = [];
+    let emojiCharArr = emojiChar.split('-');
+    for (let i in emojiKey) {
+      let em = {
+        char: emojiCharArr[i],
+        emoji: '0x1f' + emojiKey[i],
+      };
+      emojis.push(em);
+    }
+    this.emojis = emojis;
+  }
   async getWallet(uid: string): Promise<any> {
     const data = await this.http.httpRequst(
       'https://server.fmode.cn/api/ailiao/wallet',
@@ -136,4 +232,15 @@ export class AiChatService {
     let res:any = await this.http.customSQL(sql);
     return res.data
   }
+
+  async get_duration(rid:string,uid:string) {
+    let url = 'https://server.fmode.cn/api/ailiao/remain_second';
+    let params = {
+      rid: rid,
+      uid: uid,
+    };
+    let data = await this.http.httpRequst(url, params, 'POST');
+    console.log(data);
+    return data.data ?? 0;
+  }
 }

+ 6 - 1
projects/live-app/src/services/live.service.ts

@@ -126,7 +126,7 @@ export class LiveService {
     let remoteEle = document.getElementById('vice-video');
     (remoteEle as any).style.display = 'none';
     //获取频道token记录
-    let baseurl = 'https://test.fmode.cn/api/ailiao/token';
+    let baseurl = 'https://server.fmode.cn/api/ailiao/token';
     if (this.isAnchor) {
       this.UID = 111111;
       baseurl = 'https://server.fmode.cn/api/webrtc/build_token';
@@ -180,6 +180,11 @@ export class LiveService {
         // await this.client.setClientRole('host');
         this.connection_state = this.client.connectionState;
         console.log('进入频道当前uid:', uid, '状态:', this.connection_state);
+        let user = Parse.User.current();
+        this.msgSer?.publishMessage(
+          `${user?.get('name') || user?.get('nickname')}加入频道直播`,
+          this.room?.get('user')?.id
+        );
         if (!this.isAnchor) {
           // 观众进入直播间,创建直播记录
           await this.createLiveLog(uid);

+ 2 - 2
projects/live-app/src/services/message.service.ts

@@ -25,14 +25,14 @@ export class MessageService {
 
   pageFun?: Function; //页面传入的方法
   alert: any; // 弹窗
-
+  messageMapList: any = {};
+  
   constructor(
     private alertController: AlertController,
     private router: Router,
     public toastController: ToastController,
     private http: HttpService
   ) {}
-  messageMapList: any = {};
 
   /* 获取token */
   async getToken() {