Ver Fonte

贷款-信息提交按钮拦截

panyong há 4 anos atrás
pai
commit
99ac19cc6e

+ 2 - 1
htmldev/loan/src/api/wx.js

@@ -23,6 +23,7 @@ export const getWxSign = (url = location.href) => request({
   method: 'GET',
   url: '/wechat/signature',
   params: {
-    url: url
+    url: url,
+    wechatAccount: 'default'
   }
 })

+ 19 - 1
htmldev/loan/src/views/loan/apply/index.vue

@@ -198,7 +198,11 @@
         getChinaArea().then(res => {
           if (res.status) {
             this.columns = res.data
+          } else {
+            Toast(res.msg)
           }
+        }).catch(err => {
+          Toast(err)
         })
       },
       funGetProductDetail () {
@@ -316,14 +320,28 @@
           })
           return
         }
+        const myToast = Toast.loading({
+          message: '提交中...',
+          duration: 1000 * 100,
+          forbidClick: true
+        })
         createOrder(postData).then(res => {
+          myToast.clear()
           if (res.status) {
             const { id } = res.data
-            this.$router.replace({ path: '/loan/detail/' + id })
+            Toast({
+              type: 'success',
+              message: '提交成功',
+              forbidClick: true,
+              onClose: () => {
+                this.$router.replace({ path: '/loan/detail/' + id })
+              }
+            })
             return
           }
           Toast(res.msg)
         }).catch(err => {
+          myToast.clear()
           Toast(err)
         })
       }

+ 15 - 1
htmldev/loan/src/views/loan/attest/index.vue

@@ -92,13 +92,27 @@
           })
           return
         }
+        const myToast = Toast.loading({
+          message: '提交中...',
+          duration: 1000 * 100,
+          forbidClick: true
+        })
         submitData(postData).then(res => {
+          myToast.clear()
           if (res.status) {
-            this.$router.replace({ path: `/loan/detail/${this.id}` })
+            Toast({
+              type: 'success',
+              message: '提交成功',
+              forbidClick: true,
+              onClose: () => {
+                this.$router.replace({ path: `/loan/detail/${this.id}` })
+              }
+            })
             return
           }
           Toast(res.msg)
         }).catch(err => {
+          myToast.clear()
           Toast(err.msg)
         })
       }

+ 19 - 1
htmldev/loan/src/views/loan/bespeak/index.vue

@@ -146,7 +146,11 @@
         getBankList(this.id).then(res => {
           if (res.status) {
             this.columnsOfStore = res.data.map(item => item.bankName)
+          } else {
+            Toast(res.msg)
           }
+        }).catch(err => {
+          Toast(err)
         })
       },
       funSubmit () {
@@ -163,13 +167,27 @@
           Toast('请选择办理网点')
           return
         }
+        const myToast = Toast.loading({
+          message: '提交中...',
+          duration: 1000 * 100,
+          forbidClick: true
+        })
         postBespeak(postData).then(res => {
+          myToast.clear()
           if (res.status) {
-            this.$router.push({ path: `/loan/detail/${postData.id}` })
+            Toast({
+              type: 'success',
+              message: '提交成功',
+              forbidClick: true,
+              onClose: () => {
+                this.$router.push({ path: `/loan/detail/${postData.id}` })
+              }
+            })
             return
           }
           Toast(res.msg)
         }).catch(err => {
+          myToast.clear()
           Toast(err.msg)
         })
       }

+ 19 - 1
htmldev/loan/src/views/loan/register/index.vue

@@ -254,7 +254,11 @@
                 children: province.children.filter(city => city.text === '杭州')
               }
             })
+          } else {
+            Toast(res.msg)
           }
+        }).catch(err => {
+          Toast(err)
         })
       },
       handleTextarea (el, auto) {
@@ -385,13 +389,27 @@
           })
           return
         }
+        const myToast = Toast.loading({
+          message: '提交中...',
+          duration: 1000 * 100,
+          forbidClick: true
+        })
         register(postData).then(res => {
+          myToast.clear()
           if (res.status) {
-            this.$router.replace({ path: '/loan/mine' })
+            Toast({
+              type: 'success',
+              message: '提交成功',
+              forbidClick: true,
+              onClose: () => {
+                this.$router.replace({ path: '/loan/mine' })
+              }
+            })
             return
           }
           Toast(res.msg)
         }).catch(err => {
+          myToast.clear()
           Toast(err)
         })
       }