Purpose 9 luni în urmă
părinte
comite
7dd446748b
2 a modificat fișierele cu 16 adăugiri și 3 ștergeri
  1. 2 2
      src/api/TagApplyApi.js
  2. 14 1
      src/views/TagApply.vue

+ 2 - 2
src/api/TagApplyApi.js

@@ -5,7 +5,7 @@ class TagApplyApi extends CurdApi {
     const formData = new FormData()
     formData.append('file', data.file)
     return this.api({
-      url: `${this.basePath}`,
+      url: `${this.basePath}/data/import`,
       method: 'POST',
       data: formData,
       headers: {
@@ -21,7 +21,7 @@ class TagApplyApi extends CurdApi {
   })
 
   confirmPay = (data) => this.api({
-    url: `${this.basePath}/pay`,
+    url: `${this.basePath}/confirm/pay`,
     method: 'POST',
     data: data
   })

+ 14 - 1
src/views/TagApply.vue

@@ -237,7 +237,20 @@ export default {
       this.$$api.downloadTemplate().then(() => {}).catch(console.error).finally(() => {})
     },
     onConfirmPayBtnClick () {
-      this.$$api.confirmPay().then((flag) => {
+      const { selectedList } = this
+      if (selectedList.length === 0) {
+        this.$notify({
+          title: '提示',
+          message: '请先勾选列表中的数据',
+          type: 'info',
+          position: 'bottom-right'
+        })
+
+        return
+      }
+
+      const { $$idProp } = this
+      this.$$api.confirmPay(selectedList.map(data => data[$$idProp])).then((flag) => {
         if (flag) {
           this.$notify({
             title: '成功',