Browse Source

优化部分问题

warrior 13 hours ago
parent
commit
1d0e50d9c9

+ 26 - 4
projects/live-app/src/app/components/call-modal/call-modal.component.ts

@@ -142,12 +142,34 @@ export class CallModalComponent implements OnInit {
       this.currentUser?.id!
     );
     if (second < 120) {
-      const toast = await this.toastController.create({
+      const alert = await this.alertController.create({
+        cssClass: 'my-custom-class',
+        header: '钻石余额不足',
+        backdropDismiss: false,
         message: '通话时长不足2分钟,请充值后再试通',
-        color: 'warning',
-        duration: 1500,
+        buttons: [
+          {
+            text: '取消',
+            role: 'cancel',
+            handler: (blah) => {},
+          },
+          {
+            text: '去充值',
+            cssClass: 'secondary',
+            handler: () => {
+              this.router.navigate(['/account/recharge']);
+            },
+          },
+        ],
       });
-      toast.present();
+      await alert.present();
+
+      // const toast = await this.toastController.create({
+      //   message: '通话时长不足2分钟,请充值后再试通',
+      //   color: 'warning',
+      //   duration: 1500,
+      // });
+      // toast.present();
       return;
     }
     this.iscall = true;

+ 141 - 141
projects/live-app/src/app/components/gift-modal/gift-modal.component.scss

@@ -7,148 +7,148 @@
 .gift-modal {
   --height: 102.5641vw;
 }
-.gift-region {
-  position: relative;
-  .gift-tabs {
-    display: flex;
-    font-size: 3.5897vw;
-    font-weight: bold;
-    padding: 0 2.5641vw;
-    .tab {
-      margin-right: 2.5641vw;
-    }
-  }
-  .gift-content {
-    overflow-y: scroll;
-    padding-bottom: 25.641vw;
-    height: 91.2821vw;
-    .gift-list {
-      display: grid;
-      grid-template-columns: repeat(4, 1fr);
-      grid-gap: 2.5641vw;
-      padding: 1.5385vw;
-      .gift-item {
-        display: flex;
-        flex-direction: column;
-        justify-content: center;
-        align-items: center;
-        border-radius: 2.5641vw;
-        border: 0.2564vw solid #fff;
-        font-size: 3.5897vw;
-        .img {
-          width: 10.2564vw;
-          height: 10.2564vw;
-          border-radius: 2.5641vw;
-        }
-        .info {
-          text-align: center;
-          .name {
-            margin: 1.5385vw 0;
-          }
-          .extra{
-            font-size: 10px;
-            color: #ff7800;
-            border-radius: 4px;
-          }
-          .price {
-            display: flex;
-            align-items: center;
-            justify-content: center;
-            color: #6b6b6b;
-            font-family: PingFang SC;
-            font-size: 3.0769vw;
-            .credit {
-              width: 2.5641vw;
-              height: 2.5641vw;
-            }
-          }
-        }
-      }
-      .gift-item-acitve {
-        border: 0.2564vw solid #fc3651 !important;
-      }
-    }
-  }
-  .gift-footer {
-    position: absolute;
-    bottom: 0;
-    width: 100%;
-    display: flex;
-    align-items: center;
-    justify-content: space-between;
-    height: 20.5128vw;
-    padding: 5.1282vw;
-    padding-bottom: 5.1282vw;
-    background: linear-gradient(
-      rgb(255 255 255 / 31%),
-      rgb(255 255 255 / 86%),
-      #ffffff,
-      #fdfdfd
-    );
-    align-items: flex-end;
-    .left {
-      display: flex;
-      align-items: center;
-      font-size: 3.0769vw;
-      .credit {
-        width: 2.5641vw;
-        height: 2.5641vw;
-        margin-right: 1.5385vw;
-      }
-      .recharge{
-        background: #0054e9;
-        color: white;
-        padding: 2px 4px;
-        border-radius: 4px;
-        margin-left: 4px;
-      }
-    }
-    .btns {
-      display: flex;
-      align-items: flex-end;
-      .chang-gift {
-        font-size: 3.0769vw;
-      }
-      .input-num {
-        width: 12.8205vw;
-        height: 6.1538vw;
-        margin-right: 2.5641vw;
-        border-radius: 1.5385vw;
-        border: 0.2564vw solid #dcdcdc;
-      }
-      .btn-item {
-        background-color: #fc3651;
-        color: white;
-        padding: 1.0256vw 4.1026vw;
-        border-radius: 4.1026vw;
-        font-size: 3.5897vw;
-      }
-      .btn-disabled{
-        background-color: #dcdcdc;
-      }
-    }
-  }
-}
-.modal-gift-img {
-  position: fixed;
-  top: 0;
-  width: 100%;
-  height: 100%;
-  display: flex;
-  align-items: center;
-  justify-content: center;
-  background: #000000b0;
-  z-index: 999;
-  img{
-    animation: scaleUp 5s ease-in-out forwards; /* 使用scaleUp动画,持续3秒 */
-    position: absolute;
-    bottom: 0;
-  }
-}
-.recharge-modal{
-  --height: 80%;
+// .gift-region {
+//   position: relative;
+//   .gift-tabs {
+//     display: flex;
+//     font-size: 3.5897vw;
+//     font-weight: bold;
+//     padding: 0 2.5641vw;
+//     .tab {
+//       margin-right: 2.5641vw;
+//     }
+//   }
+//   .gift-content {
+//     overflow-y: scroll;
+//     padding-bottom: 25.641vw;
+//     height: 91.2821vw;
+//     .gift-list {
+//       display: grid;
+//       grid-template-columns: repeat(4, 1fr);
+//       grid-gap: 2.5641vw;
+//       padding: 1.5385vw;
+//       .gift-item {
+//         display: flex;
+//         flex-direction: column;
+//         justify-content: center;
+//         align-items: center;
+//         border-radius: 2.5641vw;
+//         border: 0.2564vw solid #fff;
+//         font-size: 3.5897vw;
+//         .img {
+//           width: 10.2564vw;
+//           height: 10.2564vw;
+//           border-radius: 2.5641vw;
+//         }
+//         .info {
+//           text-align: center;
+//           .name {
+//             margin: 1.5385vw 0;
+//           }
+//           .extra{
+//             font-size: 10px;
+//             color: #ff7800;
+//             border-radius: 4px;
+//           }
+//           .price {
+//             display: flex;
+//             align-items: center;
+//             justify-content: center;
+//             color: #6b6b6b;
+//             font-family: PingFang SC;
+//             font-size: 3.0769vw;
+//             .credit {
+//               width: 2.5641vw;
+//               height: 2.5641vw;
+//             }
+//           }
+//         }
+//       }
+//       .gift-item-acitve {
+//         border: 0.2564vw solid #fc3651 !important;
+//       }
+//     }
+//   }
+//   .gift-footer {
+//     position: absolute;
+//     bottom: 0;
+//     width: 100%;
+//     display: flex;
+//     align-items: center;
+//     justify-content: space-between;
+//     height: 20.5128vw;
+//     padding: 5.1282vw;
+//     padding-bottom: 5.1282vw;
+//     background: linear-gradient(
+//       rgb(255 255 255 / 31%),
+//       rgb(255 255 255 / 86%),
+//       #ffffff,
+//       #fdfdfd
+//     );
+//     align-items: flex-end;
+//     .left {
+//       display: flex;
+//       align-items: center;
+//       font-size: 3.0769vw;
+//       .credit {
+//         width: 2.5641vw;
+//         height: 2.5641vw;
+//         margin-right: 1.5385vw;
+//       }
+//       .recharge{
+//         background: #0054e9;
+//         color: white;
+//         padding: 2px 4px;
+//         border-radius: 4px;
+//         margin-left: 4px;
+//       }
+//     }
+//     .btns {
+//       display: flex;
+//       align-items: flex-end;
+//       .chang-gift {
+//         font-size: 3.0769vw;
+//       }
+//       .input-num {
+//         width: 12.8205vw;
+//         height: 6.1538vw;
+//         margin-right: 2.5641vw;
+//         border-radius: 1.5385vw;
+//         border: 0.2564vw solid #dcdcdc;
+//       }
+//       .btn-item {
+//         background-color: #fc3651;
+//         color: white;
+//         padding: 1.0256vw 4.1026vw;
+//         border-radius: 4.1026vw;
+//         font-size: 3.5897vw;
+//       }
+//       .btn-disabled{
+//         background-color: #dcdcdc;
+//       }
+//     }
+//   }
+// }
+// .modal-gift-img {
+//   position: fixed;
+//   top: 0;
+//   width: 100%;
+//   height: 100%;
+//   display: flex;
+//   align-items: center;
+//   justify-content: center;
+//   background: #000000b0;
+//   z-index: 999;
+//   img{
+//     animation: scaleUp 5s ease-in-out forwards; /* 使用scaleUp动画,持续3秒 */
+//     position: absolute;
+//     bottom: 0;
+//   }
+// }
+// .recharge-modal{
+//   --height: 80%;
 
-}
+// }
 @keyframes scaleUp {
   0% {
     transform: scale(0.1); /* 从0.1倍大小开始 */

+ 40 - 30
projects/live-app/src/modules/account/recharge/recharge.component.html

@@ -1,30 +1,36 @@
 @if (!isComp) {
-  <nav title="充值"></nav>
+<nav title="充值"></nav>
 }@else {
-  <ion-header [translucent]="true" class="header">
-    <ion-toolbar class="toolbar">
-        <ion-buttons slot="start" (click)="complete.emit()">
-          <ion-icon
-            name="chevron-back-outline"
-            style="width: 6.4vw; height: 6.4vw; color: #000000"
-          ></ion-icon>
-        </ion-buttons>
-      <ion-title class="title">充值</ion-title>
-    </ion-toolbar>
-  </ion-header>
+<ion-header [translucent]="true" class="header">
+  <ion-toolbar class="toolbar">
+    <ion-buttons slot="start" (click)="complete.emit()">
+      <ion-icon
+        name="chevron-back-outline"
+        style="width: 6.4vw; height: 6.4vw; color: #000000"
+      ></ion-icon>
+    </ion-buttons>
+    <ion-title class="title">充值</ion-title>
+  </ion-toolbar>
+</ion-header>
 }
 <div class="recharge-content">
   <div class="options">
     @for (val of options; track $index) {
-    <div class="select" (click)="onChange(val)">
+    <div
+      [ngClass]="{
+        select: true,
+        'select-active': price == val
+      }"
+      (click)="onChange(val)"
+    >
       {{ val * 10 }}钻石
-    <span>¥{{val}}</span>
+      <span>¥{{ val }}</span>
     </div>
     }
   </div>
-  <div class="h3">
+  <!-- <div class="h3">
     <span>充值记录</span>
-  </div>
+  </div> -->
   <div class="li">
     <div class="int">
       充值金额(¥)
@@ -40,9 +46,7 @@
         (blur)="onChangeInput()"
       />
     </div>
-    <div class="desc">
-      钻石:{{price * 10}}
-    </div>
+    <div class="desc">钻石:{{ price * 10 }}</div>
   </div>
 
   <div
@@ -52,16 +56,22 @@
   >
     下一步
   </div>
+  <div style="margin: 20px auto; font-size: 14px; color: #9f9f9f">
+    <div class="agreement-content">
+      阅读且同意<span style="color: #3f51b5" (click)="showAgreement()">{{
+        registerAgreement?.get("title")
+      }}</span>
+    </div>
+  </div>
 </div>
 @if (showPay) {
-  <app-pay-comp
-    (payResult)="onComplete($event)"
-    [tradeNo]="tradeNo"
-    [orderType]="'recharge'"
-    [price]="price"
-    [credit]="price * 10"
-    [title]="'钻石充值'"
-    #paycomp
-  ></app-pay-comp>
-  }
-  
+<app-pay-comp
+  (payResult)="onComplete($event)"
+  [tradeNo]="tradeNo"
+  [orderType]="'recharge'"
+  [price]="price"
+  [credit]="price * 10"
+  [title]="'钻石充值'"
+  #paycomp
+></app-pay-comp>
+}

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

@@ -1,104 +1,104 @@
-.recharge-content {
-  background-image: url("https://file-cloud.fmode.cn/Qje9D4bqol/20241220/b313ov054708770.png");
-  background-repeat: no-repeat;
-  background-position: center top;
-  background-size: 100% 100%;
-  height: 100%;
-  padding-top: 2.5641vw;
-  width: 100%;
-  text-align: center;
-  .options {
-    display: grid;
-    grid-template-columns: repeat(4, 1fr);
-    grid-gap: 2.5641vw;
-    padding: 1.5385vw;
-		background: white;
-    .select {
-      display: flex;
-      flex-direction: column;
-      padding: 2.5641vw 0;
-      border: 0.2564vw solid #ebebeb;
-      border-radius: 1.0256vw;
-      font-size: 3.5897vw;
-      span {
-        font-size: 3.0769vw;
-        color: #c5000f;
-      }
-    }
-		.select:active{
-      border: 0.2564vw solid #c5000f;
-      color: #c5000f;
-		}
-  }
-  .h3 {
-    margin-top: 5.1282vw;
-    text-align: left;
-    padding: 2.6667vw;
-    span {
-      // color: #000000;
-      font-size: 3.0769vw;
-    }
-  }
-  .li {
-		background: white;
-    // border: 0.2564vw solid #000000;
-    padding: 2.6667vw;
-    width: 94.8718vw;
-    margin: 0 auto;
-    border-radius: 2.6667vw;
-    .int {
-      display: flex;
-      align-items: center;
-      // margin-top: 5.1282vw;
-      font-size: 3.5897vw;
-      font-family: Source Han Sans CN;
-      font-weight: 500;
-      // color: #FFFFFF;
-      // background: #353C4D;
-      .input {
-				padding: 1.0256vw 1.5385vw;
-        margin-left: 2.5641vw;
-        border-radius: 1.6vw;
-        border: 0.2564vw solid #d3d3d3;
-        // background: #353c4d;
-        color: #c5000f;
-        font-size: 4.1026vw;
-        flex: 1;
-        width: 51.2821vw;
-        background: none;
-				outline: none;
-      }
-    }
-		.desc{
-			margin-top: 1.0256vw;
-			font-size: 3.0769vw;
-			text-align: left;
-		}
-  }
+// .recharge-content {
+//   background-image: url("https://file-cloud.fmode.cn/Qje9D4bqol/20241220/b313ov054708770.png");
+//   background-repeat: no-repeat;
+//   background-position: center top;
+//   background-size: 100% 100%;
+//   height: 100%;
+//   padding-top: 2.5641vw;
+//   width: 100%;
+//   text-align: center;
+//   .options {
+//     display: grid;
+//     grid-template-columns: repeat(4, 1fr);
+//     grid-gap: 2.5641vw;
+//     padding: 1.5385vw;
+// 		background: white;
+//     .select {
+//       display: flex;
+//       flex-direction: column;
+//       padding: 2.5641vw 0;
+//       border: 0.2564vw solid #ebebeb;
+//       border-radius: 1.0256vw;
+//       font-size: 3.5897vw;
+//       span {
+//         font-size: 3.0769vw;
+//         color: #c5000f;
+//       }
+//     }
+// 		.select-active{
+//       border: 0.2564vw solid #c5000f;
+//       color: #c5000f;
+// 		}
+//   }
+//   .h3 {
+//     margin-top: 5.1282vw;
+//     text-align: left;
+//     padding: 2.6667vw;
+//     span {
+//       // color: #000000;
+//       font-size: 3.0769vw;
+//     }
+//   }
+//   .li {
+// 		background: white;
+//     // border: 0.2564vw solid #000000;
+//     padding: 2.6667vw;
+//     width: 94.8718vw;
+//     margin: 0 auto;
+//     border-radius: 2.6667vw;
+//     .int {
+//       display: flex;
+//       align-items: center;
+//       // margin-top: 5.1282vw;
+//       font-size: 3.5897vw;
+//       font-family: Source Han Sans CN;
+//       font-weight: 500;
+//       // color: #FFFFFF;
+//       // background: #353C4D;
+//       .input {
+// 				padding: 1.0256vw 1.5385vw;
+//         margin-left: 2.5641vw;
+//         border-radius: 1.6vw;
+//         border: 0.2564vw solid #d3d3d3;
+//         // background: #353c4d;
+//         color: #c5000f;
+//         font-size: 4.1026vw;
+//         flex: 1;
+//         width: 51.2821vw;
+//         background: none;
+// 				outline: none;
+//       }
+//     }
+// 		.desc{
+// 			margin-top: 1.0256vw;
+// 			font-size: 3.0769vw;
+// 			text-align: left;
+// 		}
+//   }
 
-  .confirm {
-    width: 71.7949vw;
-    background: #92a1ff;
-    border-radius: 1.0256vw;
-    padding: 2.5641vw 0 2.5641vw 0;
-    margin: 0 auto;
-    margin-top: 17.9487vw;
-    color: #fff;
-  }
+//   .confirm {
+//     width: 71.7949vw;
+//     background: #92a1ff;
+//     border-radius: 1.0256vw;
+//     padding: 2.5641vw 0 2.5641vw 0;
+//     margin: 0 auto;
+//     margin-top: 17.9487vw;
+//     color: #fff;
+//   }
 
-  modal {
-    margin-top: -25.641vw;
+//   modal {
+//     margin-top: -25.641vw;
 
-    .confirm {
-      margin-top: 2.5641vw;
-      margin-bottom: -2.5641vw;
-      color: #fff;
-      text-align: center;
-      background: #d81e06;
+//     .confirm {
+//       margin-top: 2.5641vw;
+//       margin-bottom: -2.5641vw;
+//       color: #fff;
+//       text-align: center;
+//       background: #d81e06;
 
-      &:active {
-        background: #a11d0b;
-      }
-    }
-  }
-}
+//       &:active {
+//         background: #a11d0b;
+//       }
+//     }
+//   }
+// }

+ 27 - 3
projects/live-app/src/modules/account/recharge/recharge.component.ts

@@ -9,8 +9,11 @@ import { PayCompComponent } from '../../../app/components/pay-comp/pay-comp.comp
 import {
   ionicStandaloneModules,
   LoadingController,
+  ModalController,
   ToastController,
 } from '../../ionic-standalone.modules';
+import { AgreementComponent } from '../../login/agreement/agreement.component';
+import { CommonModule } from '@angular/common';
 @Component({
   selector: 'app-recharge',
   templateUrl: './recharge.component.html',
@@ -19,6 +22,7 @@ import {
   imports: [
     ...ionicStandaloneModules,
     NavComponent,
+    CommonModule,
     FormsModule,
     PayCompComponent,
   ],
@@ -28,7 +32,7 @@ export class RechargeComponent implements OnInit {
   @Output() complete: EventEmitter<any> = new EventEmitter<any>(); //完成触发
 
   @ViewChild('paycomp') paycomp!: PayCompComponent;
-  options: Array<number> = [30, 50, 100, 200, 500, 1000, 2000, 5000];
+  options: Array<number> = [30, 50, 100, 200, 500, 1000, 2000, 5000, 10000];
   price: any = 0;
   loading: any;
   company = localStorage.getItem('company');
@@ -36,15 +40,26 @@ export class RechargeComponent implements OnInit {
   showPay: boolean = false;
   tradeNo: string = ''; //支付单号
   orderId?: string;
+  registerAgreement: any;
   constructor(
     private toastController: ToastController,
+    private modalController: ModalController,
     public loadingController: LoadingController,
     private router: Router
   ) {}
   ngOnInit() {
     this.getAccount();
+    this.getAgreement();
+  }
+  getAgreement() {
+    let Agreement = new Parse.Query('ContractAgreement');
+    Agreement.equalTo('company', this.company);
+    Agreement.equalTo('type', 'recharge');
+    Agreement.first().then((res) => {
+      console.log(res);
+      this.registerAgreement = res;
+    });
   }
-
   back() {
     history.back();
   }
@@ -55,7 +70,16 @@ export class RechargeComponent implements OnInit {
     this.account = await Account.first();
     console.log(this.account);
   }
-
+  async showAgreement() {
+    const modal = await this.modalController.create({
+      component: AgreementComponent,
+      cssClass: 'my-custom-class',
+      componentProps: {
+        agreement: this.registerAgreement,
+      },
+    });
+    return await modal.present();
+  }
   onChange(val: number) {
     console.log(val);
     this.price = val;

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

@@ -2,26 +2,38 @@
 <ion-content class="content">
   <div class="bar">
     <div class="title">可提现收益</div>
-    <div class="total">¥{{income.balance}}</div>
-    <div class="tp">累计总收益¥{{income.total}}</div>
+    <div class="total">¥{{ income.balance }}</div>
+    <div class="tp">累计总收益¥{{ income.total }}</div>
   </div>
   <div class="way">
     <div class="icon"></div>
-    提现方式
+    <ion-select
+      label="提现方式"
+      [placeholder]="type"
+      cancelText="关闭"
+      okText="确定"
+      (ionChange)="onChangeSex($event)"
+      interface="action-sheet"
+    >
+      <ion-select-option value="银行卡">银行卡</ion-select-option>
+      <!-- <ion-select-option value="支付宝">支付宝</ion-select-option> -->
+    </ion-select>
   </div>
   <div class="choose">
     <div class="type">
       <div style="display: flex">
         <div class="icon"></div>
-        银行卡
+        {{ type }}
       </div>
+      @if (type == '银行卡') {
       <div class="bank">
         <div class="name">银行名称:</div>
         <input
           type="text"
-          [(ngModel)]="bankinfo.bankname"
-          maxlength="8"
+          [(ngModel)]="bankInfo.bankname"
+          maxlength="20"
           name="bankName"
+          disabled="true"
           autocomplete="off"
           placeholder="请输入所属银行"
           class="input"
@@ -31,8 +43,9 @@
         <div class="name">姓名:</div>
         <input
           type="text"
-          [(ngModel)]="bankinfo.name"
-          maxlength="8"
+          [(ngModel)]="bankInfo.name"
+          maxlength="10"
+          disabled="true"
           name="names"
           autocomplete="off"
           placeholder="请输入姓名"
@@ -43,9 +56,10 @@
         <div class="name">联系电话:</div>
         <input
           type="number"
-          [(ngModel)]="bankinfo.mobile"
-          maxlength="8"
+          [(ngModel)]="bankInfo.mobile"
+          maxlength="11"
           name="mobile"
+          disabled="true"
           autocomplete="off"
           placeholder="请输入联系电话"
           class="input"
@@ -55,14 +69,42 @@
         <div class="name">卡号:</div>
         <input
           type="text"
-          [(ngModel)]="bankinfo.bankcard"
-          maxlength="8"
+          [(ngModel)]="bankInfo.bankcard"
+          maxlength="20"
           name="accountId"
+          disabled="true"
           autocomplete="off"
           placeholder="请输入卡号"
           class="input"
         />
       </div>
+      } @else if (type == '支付宝') {
+
+      <div class="bank">
+        <div class="name">支付宝账号:</div>
+        <input
+          type="text"
+          [(ngModel)]="alipayInfo.alipay"
+          maxlength="8"
+          name="bankName"
+          autocomplete="off"
+          placeholder="请输入支付宝账号"
+          class="input"
+        />
+      </div>
+      <div class="bank">
+        <div class="name">姓名:</div>
+        <input
+          type="text"
+          [(ngModel)]="alipayInfo.name"
+          maxlength="8"
+          name="names"
+          autocomplete="off"
+          placeholder="请输入支付宝真实姓名"
+          class="input"
+        />
+      </div>
+      }
     </div>
   </div>
   <div class="way">
@@ -82,6 +124,35 @@
       (blur)="onChangePrice()"
     />
   </div>
-  <div class="withdrawal" (click)="withdrawal()">立即提现</div>
-  <div class="tips">温馨提示:提现需收取10%手续费</div>
+  <div class="withdrawal" (click)="openModal()">立即提现</div>
+  <div class="tips">
+    温馨提示:因用户信息填写错误导致的转账失败或转错,由用户自行承担;提现需收取{{rate * 100}}%手续费。
+  </div>
 </ion-content>
+@if (isOpenModal) {
+<div class="custom-modal">
+  <div class="custom-modal-box">
+    <div class="modal-content">
+      <div class="title">提现</div>
+      <div class="price-tips">金额</div>
+      <div class="confrim-price">¥{{price}}</div>
+      <!-- <div class="row">
+        <div class="label">手续费</div>
+        <div class="val">¥{{service}}</div>
+      </div> -->
+      <div class="row">
+        <div class="label">手续费费率</div>
+        <div class="val">{{rate * 100}}%</div>
+      </div>
+    </div>
+    <ion-toolbar>
+      <ion-buttons slot="start">
+        <ion-button (click)="isOpenModal = false">取消</ion-button>
+      </ion-buttons>
+      <ion-buttons slot="end">
+        <ion-button (click)="confirm()">确认</ion-button>
+      </ion-buttons>
+    </ion-toolbar>
+  </div>
+</div>
+}

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

@@ -27,14 +27,14 @@
   background-position: center top;
   background-size: 100% 100%;
   height: 100%;
-  padding-bottom: 10.2564vw;
+  --padding-bottom: 10.2564vw;
   width: 100%;
   --background: #ffffff00;
   .way {
     margin: 5.1282vw;
     display: flex;
     color: #e7435c;
-
+    align-items: center;
     .icon {
       background: #e7435c;
       width: 0.7692vw;
@@ -42,7 +42,9 @@
       margin-right: 1.2821vw;
     }
   }
-
+  ion-select {
+    width: 160px;
+  }
   .choose {
     margin: 5.1282vw;
     border-radius: 2.3077vw;
@@ -114,5 +116,54 @@
     text-align: center;
     font-size: 3.0769vw;
     color: #8f8f8f;
+    width: 300px;
+    margin: auto;
+  }
+}
+.custom-modal {
+  position: fixed;
+  top: 0;
+  z-index: 999;
+  width: 100%;
+  height: 100%;
+  display: flex;
+  justify-content: center;
+  align-items: center;
+  background: rgb(0 0 0 / 55%);
+  .custom-modal-box {
+    background: white;
+    height: 220px;
+    width: 89.7436vw;
+    border-radius: 4.1026vw;
+    overflow: hidden;
+    box-shadow: 0 2.5641vw 3.8462vw -0.7692vw rgb(0 0 0 / 0.1),
+      0 1.0256vw 1.5385vw -1.0256vw rgb(0 0 0 / 0.1);
+    display: flex;
+    flex-direction: column;
+    justify-content: space-between;
+  }
+  .title {
+    text-align: center;
+    font-size: 16px;
+    margin: 10px auto;
+    font-weight: bold;
+  }
+  .price-tips{
+    font-size: 14px;
+    text-align: center;
+  }
+  .confrim-price{
+    font-size: 20px;
+    margin-bottom: 20px;
+    text-align: center;
+  }
+  .row{
+    display: flex;
+    justify-content: space-between;
+    padding: 0 10px;
+    margin-top: 6px;
+    .label{
+      color: #8f8f8f;
+    }
   }
 }

+ 76 - 50
projects/live-app/src/modules/account/withdrawal/withdrawal.component.ts

@@ -4,6 +4,7 @@ import { FormsModule } from '@angular/forms';
 import * as Parse from 'parse';
 import { NavComponent } from '../../../app/components/nav/nav.component';
 import { AiChatService } from '../../../services/aichart.service';
+import { HttpService } from '../../../services/http.service';
 import {
   ionicStandaloneModules,
   ToastController,
@@ -16,22 +17,22 @@ import {
   imports: [...ionicStandaloneModules, NavComponent, CommonModule, FormsModule],
 })
 export class WithdrawalComponent implements OnInit {
-  constructor(
-    private toastController: ToastController,
-    private aiServ: AiChatService
-  ) {}
+  rate: number = 0.1; //提现手续费率
+  service: number = 0; //提现手续费
+  received_price: number = 0; //实际到账金额
   price: number = 0;
-  income:{
-    balance:number,
-    used:number,
-    total:number
+
+  income: {
+    balance: number;
+    used: number;
+    total: number;
   } = {
-    balance:0,
-    used:0,
-    total:0
-  }
+    balance: 0,
+    used: 0,
+    total: 0,
+  };
 
-  bankinfo: {
+  bankInfo: {
     bankname: string;
     name: string;
     mobile: string;
@@ -42,12 +43,22 @@ export class WithdrawalComponent implements OnInit {
     mobile: '',
     bankcard: '',
   };
-  data: any = [
-    { value: 0, name: '银行卡' },
-    { value: 1, name: '微信' },
-  ];
+  alipayInfo: {
+    alipay: string;
+    name: string;
+  } = {
+    alipay: '',
+    name: '',
+  };
   value: Number = 0;
   account?: Parse.Object;
+  type: string = '银行卡'; //提现方式
+  isOpenModal: boolean = false;
+  constructor(
+    private toastController: ToastController,
+    private http: HttpService,
+    private aiServ: AiChatService
+  ) {}
   ngOnInit() {
     this.getAccount();
   }
@@ -58,56 +69,71 @@ export class WithdrawalComponent implements OnInit {
     query.equalTo('company', this.aiServ.company);
     this.account = await query.first();
     if (this.account?.get('bank')) {
-      this.bankinfo = this.account?.get('bank')[0];
+      this.bankInfo = this.account?.get('bank')[0];
     }
     console.log(this.account);
     let anthorWallet = await this.aiServ.getAuthorWallet(id!);
     this.income = anthorWallet;
   }
-  onChangePrice(){
+  onChangeSex(e: any) {
+    this.type = e.detail.value;
+    console.log(this.type);
+  }
+  onChangePrice() {
     this.price = Math.round(this.price * 100) / 100;
   }
-  async withdrawal() {
+  openModal() {
     if (
-      !this.bankinfo.bankname ||
-      !this.bankinfo.bankcard ||
-      !this.bankinfo.mobile
+      this.type == '支付宝' &&
+      Object.values(this.alipayInfo).some(
+        (item) => item == '' || item == undefined
+      )
     ) {
-      this.toast('请先绑定银行卡', 1500);
+      this.toast('请填写提现信息', 1500);
       return;
+    } else if (
+      this.type == '银行卡' &&
+      Object.values(this.bankInfo).some(
+        (item) => item == '' || item == undefined
+      )
+    ) {
+      this.toast('请填写提现信息', 1500);
+      return
     }
-    if (!this.price || this.price < 0) {
-      this.toast('请输入正确金额', 1500);
+    if (this.price < 200) {
+      this.toast('最低提现金额为200', 1500);
       return;
     }
     if (this.income.balance < this.price) {
-      this.toast('提现金额不得超过余额!', 1500);
+      this.toast('申请提现金额不得超过可提现余额', 1500);
       return;
     }
-    if (this.price < 100) {
-      this.toast('最低提现金额为100', 1500);
-      return;
+    // this.service = Math.round(this.price * this.rate * 100) / 100;
+    this.isOpenModal = true;
+  }
+  async confirm() {
+    // if (!this.price || this.price < 0) {
+    //   this.toast('请输入正确金额', 1500);
+    //   return;
+    // }
+    let params = {
+      uid: Parse.User.current()?.id,
+      price: this.price,
+      bankInfo: this.bankInfo,
+    };
+    let res = await this.http.httpRequst(
+      'https://server.fmode.cn/api/ailiao/withdraw',
+      params,
+      'POST'
+    );
+    console.log(res);
+    if (res.code == 200) {
+      this.toast('申请成功', 1500, 'success');
+    } else {
+      this.toast(res.message, 1500);
+      return
     }
-    let UserAgentWithdraw = Parse.Object.extend('UserAgentWithdraw');
-    let userAgentWithdraw = new UserAgentWithdraw();
-    userAgentWithdraw.set('count', Number(this.data.price));
-    userAgentWithdraw.set('type', 'bank');
-    userAgentWithdraw.set('name', this.bankinfo.name);
-    userAgentWithdraw.set('count', this.price);
-    userAgentWithdraw.set('status', '100');
-    userAgentWithdraw.set('company', {
-      __type: 'Pointer',
-      className: 'Company',
-      objectId: this.aiServ.company,
-    });
-    userAgentWithdraw.set('user', {
-      __type: 'Pointer',
-      className: '_User',
-      objectId: Parse.User.current()?.id,
-    });
-    userAgentWithdraw.set('bank', this.bankinfo);
-    await userAgentWithdraw.save();
-    this.toast('申请成功', 1500);
+    this.isOpenModal = false;
     history.back();
   }
 

+ 4 - 4
projects/live-app/src/modules/tabs/space/space.component.scss

@@ -105,12 +105,12 @@
         }
         .imgs {
           display: grid;
-          grid-template-columns: repeat(4, 17.9487vw);
+          grid-template-columns: repeat(2, 35.8974vw);
           justify-content: space-between;
           flex-wrap: wrap;
           img {
-            height: 17.9487vw;
-            width: 17.9487vw;
+            height: 51.2821vw;
+            width: 35.8974vw;
             object-fit: cover;
             margin-top: 2.5641vw;
           }
@@ -127,7 +127,7 @@
           color: #a3a3a3;
           // margin-right: 7.6923vw;
           ion-icon {
-            font-size: 7.6923vw;
+            font-size: 6.6667vw;
           }
         }
         .action-icon {

+ 13 - 5
projects/live-app/src/modules/user/profile/profile.component.html

@@ -108,10 +108,10 @@
     <div class="user-fans">
       <span>关注:{{ numsObject.follow }}</span>
       <span>粉丝:{{ profile?.get("degreeNumber") || numsObject.fans }}</span>
-      <span>送出:{{ numsObject.gift }}</span>
+      <!-- <span>送出:{{ numsObject.gift }}</span>
       @if (profile?.get('identyType') == 'anchor') {
       <span>累计通话:{{ connectTime | secondsToTime }}</span>
-      }
+      } -->
     </div>
     <div class="bar"></div>
   </div>
@@ -230,15 +230,23 @@
     } @if (uid !== currentUser?.id &&
     !accServ.userVip?.rights?.['view-profile']) {
     <div class="view-auth">
-      <ion-icon name="lock-closed"></ion-icon>
-      <div class="auth-text">开通高级会员查看更多</div>
+      <div class="lock-tips">
+        <ion-icon name="lock-closed"></ion-icon>
+        <div class="auth-text">开通高级会员查看更多</div>
+      </div>
+      <div class="auth-text-url" (click)="tourl('/goods/vip')">去开通</div>
     </div>
     }
   </div>
 </ion-content>
 <ion-footer class="footer">
   <ion-toolbar class="footer-tool">
-    <div class="btns">
+    <div
+      [ngClass]="{
+        btns: true,
+        'pad-bottom': deviceSer.isIOS
+      }"
+    >
       @if (user?.id == currentUser?.id) {
       <div class="round" (click)="onEdit()">
         <ion-icon name="create-outline"></ion-icon>编辑资料

+ 13 - 0
projects/live-app/src/modules/user/profile/profile.component.scss

@@ -235,7 +235,17 @@
       display: flex;
       align-items: center;
       justify-content: center;
+      flex-direction: column;
       min-height: 115.3846vw;
+      .lock-tips{
+        display: flex;
+        align-items: center;
+        justify-content: center;
+      }
+      .auth-text-url{
+        margin-top: 10px;
+        color: #156bfd;
+      }
     }
     .tabs {
       display: flex;
@@ -428,6 +438,9 @@
       }
     }
   }
+  .pad-bottom {
+    padding-bottom: 10px;
+  }
 }
 ion-modal {
   --height: 50%;

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

@@ -152,12 +152,12 @@ export class ProfileComponent implements OnInit {
     let res = await this.aiChatServ.getFansAndFollow(this.uid);
     this.numsObject.fans = res.data[0].fans;
     this.numsObject.follow = res.data[0].follow;
-    let res1 = await this.aiChatServ.getGiftLogCount(this.uid);
-    this.numsObject.gift = res1.data[0].sum ?? 0;
+    // let res1 = await this.aiChatServ.getGiftLogCount(this.uid);
+    // this.numsObject.gift = res1.data[0].sum ?? 0;
     this.giftList = await this.aiChatServ.getGiftList(this.uid, 16);
-    if(this.profile?.get('identyType') == 'anchor'){
-      this.connectTime = await this.aiChatServ.getLiveActiveLog(null,this.uid)
-    }
+    // if(this.profile?.get('identyType') == 'anchor'){
+    //   this.connectTime = await this.aiChatServ.getLiveActiveLog(null,this.uid)
+    // }
     await this.getCommentLeng()
     this.browseLog()
     // this.getRoom();
@@ -400,8 +400,12 @@ export class ProfileComponent implements OnInit {
   toMsg() {
     this.router.navigate(['live/chat/' + this.friends?.get('channel')]);
   }
-  tourl(url:string, params:object){
-    this.router.navigate([url,params]);
+  tourl(url:string, params?:object){
+    if(params){
+      this.router.navigate([url,params]);
+    }else{
+      this.router.navigate([url]);
+    }
   }
   onSendGift() {
     console.log('点击送出礼物');

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

@@ -13,7 +13,7 @@
       ></ion-textarea>
       <span>{{ inputNum }}/500</span>
     </div>
-    <div class="title">图片</div>
+    <div class="title">分享图片</div>
     <div class="upload">
       <app-upload
         (onChange)="onFilesChange($event)"

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

@@ -204,7 +204,7 @@ export class LiveService {
         console.log('进入频道当前uid:', uid, '状态:', this.connection_state);
         let user = Parse.User.current();
         this.msgSer?.publishMessage(
-          `${user?.get('name') || user?.get('nickname')}加入频道直播`,
+          `${user?.get('nickname')}加入频道直播`,
           this.room?.get('user')?.id
         );
         if (!this.isAnchor) {
@@ -375,7 +375,7 @@ export class LiveService {
     let profile = JSON.parse(localStorage.getItem('profile') || '{}');
     let obj = Parse.Object.extend('LiveLog');
     let liveLog = new obj();
-    liveLog.set('title', `与${profile?.name || profile?.mobile}进行直播`);
+    liveLog.set('title', `与${Parse.User.current()?.get('nickname')}进行直播`);
     liveLog.set('uid', String(uid));
     liveLog.set('company', {
       __type: 'Pointer',

+ 238 - 0
projects/live-app/src/styles.scss

@@ -30,4 +30,242 @@ body{
 .pad-top-ios{
   padding-top: 44px !important;
   background-color: #f7f7f7;
+}
+
+/* 充值组件样式,防止用户在ion-modal打开时直接返回路由后样式丢失问题 */
+.recharge-modal{
+  --height: 80%;
+}
+.gift-modal {
+  --height: 102.5641vw;
+}
+.gift-region {
+  position: relative;
+  .gift-tabs {
+    display: flex;
+    font-size: 3.5897vw;
+    font-weight: bold;
+    padding: 0 2.5641vw;
+    .tab {
+      margin-right: 2.5641vw;
+    }
+  }
+  .gift-content {
+    overflow-y: scroll;
+    padding-bottom: 25.641vw;
+    height: 91.2821vw;
+    .gift-list {
+      display: grid;
+      grid-template-columns: repeat(4, 1fr);
+      grid-gap: 2.5641vw;
+      padding: 1.5385vw;
+      .gift-item {
+        display: flex;
+        flex-direction: column;
+        justify-content: center;
+        align-items: center;
+        border-radius: 2.5641vw;
+        border: 0.2564vw solid #fff;
+        font-size: 3.5897vw;
+        .img {
+          width: 10.2564vw;
+          height: 10.2564vw;
+          border-radius: 2.5641vw;
+        }
+        .info {
+          text-align: center;
+          .name {
+            margin: 1.5385vw 0;
+          }
+          .extra{
+            font-size: 10px;
+            color: #ff7800;
+            border-radius: 4px;
+          }
+          .price {
+            display: flex;
+            align-items: center;
+            justify-content: center;
+            color: #6b6b6b;
+            font-family: PingFang SC;
+            font-size: 3.0769vw;
+            .credit {
+              width: 2.5641vw;
+              height: 2.5641vw;
+            }
+          }
+        }
+      }
+      .gift-item-acitve {
+        border: 0.2564vw solid #fc3651 !important;
+      }
+    }
+  }
+  .gift-footer {
+    position: absolute;
+    bottom: 0;
+    width: 100%;
+    display: flex;
+    align-items: center;
+    justify-content: space-between;
+    height: 20.5128vw;
+    padding: 5.1282vw;
+    padding-bottom: 5.1282vw;
+    background: linear-gradient(
+      rgb(255 255 255 / 31%),
+      rgb(255 255 255 / 86%),
+      #ffffff,
+      #fdfdfd
+    );
+    align-items: flex-end;
+    .left {
+      display: flex;
+      align-items: center;
+      font-size: 3.0769vw;
+      .credit {
+        width: 2.5641vw;
+        height: 2.5641vw;
+        margin-right: 1.5385vw;
+      }
+      .recharge{
+        background: #0054e9;
+        color: white;
+        padding: 2px 4px;
+        border-radius: 4px;
+        margin-left: 4px;
+      }
+    }
+    .btns {
+      display: flex;
+      align-items: flex-end;
+      .chang-gift {
+        font-size: 3.0769vw;
+      }
+      .input-num {
+        width: 12.8205vw;
+        height: 6.1538vw;
+        margin-right: 2.5641vw;
+        border-radius: 1.5385vw;
+        border: 0.2564vw solid #dcdcdc;
+      }
+      .btn-item {
+        background-color: #fc3651;
+        color: white;
+        padding: 1.0256vw 4.1026vw;
+        border-radius: 4.1026vw;
+        font-size: 3.5897vw;
+      }
+      .btn-disabled{
+        background-color: #dcdcdc;
+      }
+    }
+  }
+}
+.recharge-content {
+  background-image: url("https://file-cloud.fmode.cn/Qje9D4bqol/20241220/b313ov054708770.png");
+  background-repeat: no-repeat;
+  background-position: center top;
+  background-size: 100% 100%;
+  height: 100%;
+  padding-top: 2.5641vw;
+  width: 100%;
+  text-align: center;
+  .options {
+    display: grid;
+    grid-template-columns: repeat(3, 1fr);
+    grid-gap: 2.5641vw;
+    padding: 1.5385vw;
+		background: white;
+    width: 94.8718vw;
+    margin: auto;
+    border-radius: 2.6667vw;
+    .select {
+      display: flex;
+      flex-direction: column;
+      padding: 2.5641vw 0;
+      border: 0.2564vw solid #ebebeb;
+      border-radius: 1.0256vw;
+      font-size: 3.5897vw;
+      span {
+        font-size: 3.0769vw;
+        color: #c5000f;
+      }
+    }
+		.select-active{
+      border: 0.2564vw solid #c5000f;
+      color: #c5000f;
+		}
+  }
+  .h3 {
+    margin-top: 5.1282vw;
+    text-align: left;
+    padding: 2.6667vw;
+    span {
+      // color: #000000;
+      font-size: 3.0769vw;
+    }
+  }
+  .li {
+		background: white;
+    // border: 0.2564vw solid #000000;
+    padding: 2.6667vw;
+    width: 94.8718vw;
+    margin: 0 auto;
+    border-radius: 2.6667vw;
+    margin-top: 20px;
+    .int {
+      display: flex;
+      align-items: center;
+      // margin-top: 5.1282vw;
+      font-size: 3.5897vw;
+      font-family: Source Han Sans CN;
+      font-weight: 500;
+      // color: #FFFFFF;
+      // background: #353C4D;
+      .input {
+				padding: 1.0256vw 1.5385vw;
+        margin-left: 2.5641vw;
+        border-radius: 1.6vw;
+        border: 0.2564vw solid #d3d3d3;
+        // background: #353c4d;
+        color: #c5000f;
+        font-size: 4.1026vw;
+        flex: 1;
+        width: 51.2821vw;
+        background: none;
+				outline: none;
+      }
+    }
+		.desc{
+			margin-top: 1.0256vw;
+			font-size: 3.0769vw;
+			text-align: left;
+		}
+  }
+
+  .confirm {
+    width: 71.7949vw;
+    background: #92a1ff;
+    border-radius: 1.0256vw;
+    padding: 2.5641vw 0 2.5641vw 0;
+    margin: 0 auto;
+    margin-top: 17.9487vw;
+    color: #fff;
+  }
+
+  modal {
+    margin-top: -25.641vw;
+
+    .confirm {
+      margin-top: 2.5641vw;
+      margin-bottom: -2.5641vw;
+      color: #fff;
+      text-align: center;
+      background: #d81e06;
+
+      &:active {
+        background: #a11d0b;
+      }
+    }
+  }
 }