Browse Source

更新pay-comp

warrior 2 months ago
parent
commit
b5b8d70ff1

+ 4 - 3
projects/live-app/src/app/components/pay-comp/pay-comp.component.ts

@@ -83,7 +83,7 @@ export class PayCompComponent implements OnInit {
       this.tradeNo = this.accServ.setTradeNo();
     } else {
       this.orderId = await this.getOrder();
-      if (this.orderType == 'service' && !this.orderId) {
+      if (this.orderType == 'vip' && !this.orderId) {
         this.tradeNo = this.accServ.setTradeNo();
       } else if (
         this.orderType == 'recharge' &&
@@ -116,6 +116,7 @@ export class PayCompComponent implements OnInit {
         await this.getOrderId();
         let params = {
           company: this.accServ.company,
+          body: this.title,
           out_trade_no: this.tradeNo,
           total_fee: +this.price,
           openid: openid,
@@ -227,9 +228,9 @@ export class PayCompComponent implements OnInit {
   }
 
   async getOrderId() {
-    if (this.orderType == 'service' && !this.orderId && this.gid) {
+    if (this.orderType == 'vip' && !this.orderId && this.gid) {
       let resulte = await this.accServ.setOrder({
-        type: 'service',
+        type: 'service',//创建服务类订单
         gid: this.gid,
         price: this.price,
         total_fee: this.price,

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

@@ -43,9 +43,10 @@
   <app-pay-comp
     (payResult)="onComplete($event)"
     [tradeNo]="tradeNo"
-    [orderType]="'balance'"
+    [orderType]="'recharge'"
     [price]="price"
     [credit]="price * 10"
+    [title]="'钻石充值'"
     #paycomp
   ></app-pay-comp>
   }

+ 2 - 1
projects/live-app/src/modules/goods/vip/vip.component.html

@@ -108,7 +108,8 @@
   (payResult)="onComplete($event)"
   [tradeNo]="tradeNo"
   [gid]="this.currentGoods?.id"
-  [orderType]="'service'"
+  [orderType]="'vip'"
+  [title]="this.currentGoods?.get('name')"
   [price]="price"
   #paycomp
 ></app-pay-comp>

+ 1 - 1
projects/live-app/src/modules/goods/vip/vip.component.ts

@@ -77,7 +77,7 @@ export class VipComponent implements OnInit {
   async getGoods() {
     let goods = new Parse.Query('ShopGoods');
     goods.equalTo('company', this.authSer.company);
-    goods.equalTo('type', 'service');
+    goods.equalTo('type', 'vip');
     goods.equalTo('status', true);
     goods.ascending('top');
     goods.notEqualTo('isDeleted', true);