From 73190da18ae878d2d735736e46dfd2319b4412f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E5=B8=85?= <6581896+oncream@user.noreply.gitee.com> Date: Tue, 1 Apr 2025 17:21:01 +0800 Subject: [PATCH] =?UTF-8?q?feat(1.0):=E9=99=A4=E5=BE=AE=E4=BF=A1=E6=94=AF?= =?UTF-8?q?=E4=BB=98=E5=A4=96=EF=BC=8C=E7=AC=AC=E4=B8=80=E7=89=88=E5=8A=9F?= =?UTF-8?q?=E8=83=BD=E5=AE=8C=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cls/src/app/services/payment.service.ts | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/cls/src/app/services/payment.service.ts b/cls/src/app/services/payment.service.ts index 1ffb32a..f7f94d4 100644 --- a/cls/src/app/services/payment.service.ts +++ b/cls/src/app/services/payment.service.ts @@ -13,24 +13,23 @@ declare const WeixinJSBridge: any; providedIn: 'root' }) export class PaymentService { - private apiUrl = `${environment.apiUrl}/payments`; constructor(private http: HttpClient) {} createPayment(request: PaymentRequest): Observable { - return this.http.post(this.apiUrl, request); + return this.http.post('', request); } getPayment(orderNo: string): Observable { - return this.http.get(`${this.apiUrl}/${orderNo}`); + return this.http.get(`${orderNo}`); } getPaymentStatus(orderNo: string): Observable<{ status: string }> { - return this.http.get<{ status: string }>(`${this.apiUrl}/${orderNo}/status`); + return this.http.get<{ status: string }>(`/${orderNo}/status`); } getWechatPayParams(orderNo: string): Observable { - return this.http.get(`${this.apiUrl}/${orderNo}/wechat-pay`); + return this.http.get(`/${orderNo}/wechat-pay`); } // 唤起微信支付