Browse Source

客服聊天 主播看礼物列表

warrior 1 week ago
parent
commit
3d7502b250

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

@@ -37,7 +37,9 @@
             <div class="info">
               <div class="name">{{ item.name }}</div>
               @if (item.rightsMap['duration']) {
-                <div class="extra">赠{{item.rightsMap['duration']}}小时聊天时长</div>
+              <div class="extra">
+                赠{{ item.rightsMap["duration"] }}小时聊天时长
+              </div>
               }
               <div class="price">
                 <img class="credit" src="img/credit.png" alt="" />{{
@@ -49,6 +51,7 @@
           }
         </div>
       </div>
+      @if(!isRead){
       <div class="gift-footer">
         <div class="left">
           <img src="img/credit.png" alt="" class="credit" />
@@ -81,6 +84,7 @@
           }
         </div>
       </div>
+      }
     </div>
   </ng-template>
 </ion-modal>

+ 2 - 0
projects/live-app/src/app/components/gift-modal/gift-modal.component.ts

@@ -30,6 +30,8 @@ import { RechargeComponent } from '../../../modules/account/recharge/recharge.co
 export class GiftModalComponent implements OnInit {
   @Input('toUid') toUid!: string; // 接收礼物的uid
   @Input('domId') domId: string = 'vap-warp';
+  @Input('isRead') isRead: boolean = false
+  
   isOpenGift: boolean = false; // 是否显示礼物弹窗
   giftList: Array<any> = [];
   tabs: Array<any> = [

+ 3 - 2
projects/live-app/src/modules/live/link-page/link-page.component.html

@@ -78,14 +78,14 @@
                 {{ liveService.tools["glorify"] ? "美颜已开启" : "美颜已关闭" }}
               </div>
             </div>
-            @if (!liveService.isAnchor) {
+            <!-- @if (!liveService.isAnchor) { -->
             <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')">
@@ -225,6 +225,7 @@
   [domId]="'live-vap-warp'"
   (sendEmit)="onSendGift()"
   [toUid]="this.room?.get('user').id"
+  [isRead]="liveService.isAnchor"
 ></app-gift-modal>
 }
 <app-flutter-comp [domId]="'live-vap-gift'"></app-flutter-comp>

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

@@ -236,7 +236,7 @@
           <ion-icon name="chevron-forward-outline"></ion-icon>
         </div>
       </div>
-      <div class="li" (click)="toService()">
+      <div class="li" (click)="toUrl('user/service')">
         <div class="li-lable">
           <img src="img/在线客服.png" alt="" class="icon" />
         </div>

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

@@ -31,7 +31,7 @@
           class="avatar fl"
           (click)="toUrl('user/profile/' + item.publisher)"
           mode="widthFix"
-          src="{{ item.avatar }}"
+          src="img/客服.png"
         />
         <!-- 文字消息 msg_type == 1 || text -->
         @if (item.msg_type == 1 || item.msg_type == 'text') {
@@ -93,7 +93,7 @@
       slot="start"
       labelPlacement="stacked"
       [clearInput]="true"
-      placeholder="文明发言"
+      placeholder="输入您的问题发送至客服"
       [(ngModel)]="text"
       (keydown)="comfirmText($event)"
       [disabled]="false"

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

@@ -37,8 +37,6 @@ export class OnlineServiceComponent implements OnInit {
 
   channel: string = 'admin';
   uid: string = '';
-  profile?: Parse.Object; // 对方身份
-  targetUser?: Parse.Object; // 对方用户
   text: string = '';
   showPreView: boolean = false; //预览图片
   viewImg: string = '';
@@ -67,6 +65,7 @@ export class OnlineServiceComponent implements OnInit {
 
   ngOnInit() {
     this.activateRoute.paramMap.subscribe(async (params) => {
+      this.channel = this.channel + '-' + Parse.User.current()?.id!;
       this.refresh();
     });
   }