Browse Source

Update choice-coupon.tsx

lex 2 năm trước cách đây
mục cha
commit
1727098181
1 tập tin đã thay đổi với 2 bổ sung4 xóa
  1. 2 4
      src/views/order-detail/use-coupons/choice-coupon.tsx

+ 2 - 4
src/views/order-detail/use-coupons/choice-coupon.tsx

@@ -37,12 +37,10 @@ export default defineComponent({
   },
   methods: {
     async getList() {
+      if (this.dataLoading) return
       this.dataLoading = true
       try {
-        // 判断是哪个端
-        const url =
-          state.platformType === 'STUDENT' ? '/api-student' : '/api-teacher'
-        const res = await request.post(`${url}/couponInfo/page`, {
+        const res = await request.post(`${state.platformApi}/couponInfo/page`, {
           data: {
             useState: 'USABLE',
             page: 1,