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`); } // 唤起微信支付