xinfeng 5 jaren geleden
bovenliggende
commit
6ca2d7409a
4 gewijzigde bestanden met toevoegingen van 34 en 32 verwijderingen
  1. 15 15
      middleware/initialize.js
  2. 1 8
      pages/otherpage/money/uploadInvoice.vue
  3. 14 4
      pages/otherpage/money/withdraw.vue
  4. 4 5
      plugins/router.js

+ 15 - 15
middleware/initialize.js

@@ -179,19 +179,19 @@ export default function (context) {
   context.store.commit("updateIsWeixin", context.app.$deviceType.wx || false);
   // 301
   // Server-side
-  // if (process.server) {
-  //   console.log("server side redirect 301............");
-  //   const {
-  //     req,
-  //     redirect
-  //   } = context;
-  //   let reqUrl = new URL(req.url, url);
-  //   if (reqUrl.pathname.indexOf('/job/') !== -1 && url.indexOf('job.') === -1) {
-  //     redirect(301, jobUrl + reqUrl.pathname.replace('/job/', '/') + reqUrl.search)
-  //   }
-  //   if (reqUrl.pathname.indexOf('/kaifain/') !== -1 && url.indexOf('kaifain.') === -1) {
-  //     redirect(301, kaifainUrl + reqUrl.pathname.replace('/kaifain/', '/') + reqUrl.search)
-  //   }
-  //   // console.log("server", req.headers)
-  // }
+  if (process.server) {
+    console.log("server side redirect 301............");
+    const {
+      req,
+      redirect
+    } = context;
+    let reqUrl = new URL(req.url, url);
+    if (reqUrl.pathname.indexOf('/job/') === 0 && url.indexOf('job.') === -1) {
+      redirect(301, jobUrl + reqUrl.pathname.replace('/job/', '/') + reqUrl.search)
+    }
+    if (reqUrl.pathname.indexOf('/kaifain/') === 0 && url.indexOf('kaifain.') === -1) {
+      redirect(301, kaifainUrl + reqUrl.pathname.replace('/kaifain/', '/') + reqUrl.search)
+    }
+    // console.log("server", req.headers)
+  }
 }

+ 1 - 8
pages/otherpage/money/uploadInvoice.vue

@@ -98,14 +98,7 @@
           this._toast('请上传发票', 'error')
           return
         }
-        this.$axios.post('/api/recruit/addInvoiceWithdrawalApply', {
-          auth_code: '',
-          coins: this.coins,
-          invoice_url: this.invoiceImg
-        }).then(res=>{
-          this.invoiceImg = ""
-          this._toast('上传成功')
-        })
+        location.href = `/otherpage/money/withdraw?coins=${this.coins}&fpUrl=${encodeURIComponent(this.invoiceImg)}`
       }
     }
   }

+ 14 - 4
pages/otherpage/money/withdraw.vue

@@ -13,7 +13,7 @@
       <div class="amountArea">
         <div class="left">
           <div class="pre">¥</div>
-          <input class="nums" v-model="vCoins" type="text"/>
+          <input class="nums" v-model="vCoins" placeholder="最少提现10元,每日上限3万元" type="text"/>
         </div>
         <div class="rightClose"></div>
       </div>
@@ -85,7 +85,7 @@
     },
     methods: {
       getWithdrawType() {
-        this.$axios.post('/api/admin/kaifabao/getBuckleConfigList').then(res => {
+        this.$axios.post('/api/kaifabao/getBuckleConfigList').then(res => {
 
         }).catch(e => {
           console.log(e)
@@ -105,8 +105,18 @@
         this.vCoins = this.bankInfo.incomeTaxBalance
       },
       onJumpToUpload() {
-        location.href = '/otherpage/money/uploadInvoice.vue?coins=' + this.vCoins || 0
-      }
+        location.href = '/otherpage/money/uploadInvoice?coins=' + this.vCoins || 0
+      },
+      submitCommit() {
+        this.$axios.post('/api/recruit/addInvoiceWithdrawalApply', {
+          auth_code: '',
+          coins: this.coins,
+          invoice_url: this.invoiceImg
+        }).then(res=>{
+          this.invoiceImg = ""
+          this._toast('上传成功')
+        })
+      },
     }
   }
 </script>

+ 4 - 5
plugins/router.js

@@ -130,11 +130,10 @@ export default ({
 
     console.log('router', app.router)
 
-    // app.router.beforeEach((to, from, next) => {
-    //   console.log("location.href", to, from)
-    //   next()
-    // })
-
+    app.router.beforeEach((to, from, next) => {
+      console.log("beforeEach", to, from)
+      next()
+    })
   }
 }