瀏覽代碼

Update choice-coupon.tsx

lex 2 年之前
父節點
當前提交
1727098181
共有 1 個文件被更改,包括 2 次插入4 次删除
  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,