|
@@ -20,6 +20,7 @@ export class PayCompComponent implements OnInit {
|
|
|
isOpen: boolean = true; //打开弹窗
|
|
|
checkpay: string = 'wxpay';
|
|
|
userAgent?: string; //获取当前浏览器环境
|
|
|
+ codeLink?:string
|
|
|
|
|
|
constructor(
|
|
|
private accServ: AccountService,
|
|
@@ -80,15 +81,16 @@ export class PayCompComponent implements OnInit {
|
|
|
Parse.Cloud.run('pay_code2', params).then(async (res) => {
|
|
|
let nonce_str = res.nonce_str;
|
|
|
let codeLink = res.code_url[0];
|
|
|
- let order = await this.accServ.setOrder('service', {
|
|
|
- out_trade_no: this.tradeNo,
|
|
|
- payType: 'wxpay-pc',
|
|
|
- total_fee: this.price,
|
|
|
- code: codeLink,
|
|
|
- });
|
|
|
- window.open(
|
|
|
- `${location.protocol}//${location.host}/account/payment/${order.objectId}/${nonce_str}`
|
|
|
- );
|
|
|
+ console.log(codeLink);
|
|
|
+ // let order = await this.accServ.setOrder('service', {
|
|
|
+ // out_trade_no: this.tradeNo,
|
|
|
+ // payType: 'wxpay-pc',
|
|
|
+ // total_fee: this.price,
|
|
|
+ // code: codeLink,
|
|
|
+ // });
|
|
|
+ // window.open(
|
|
|
+ // `${location.protocol}//${location.host}/account/payment/${order.objectId}/${nonce_str}`
|
|
|
+ // );
|
|
|
this.isOpen = false;
|
|
|
});
|
|
|
} catch (error) {
|