Ver código fonte

静态页面

xcx 4 anos atrás
pai
commit
4fe0a5b59e
1 arquivos alterados com 16 adições e 3 exclusões
  1. 16
    3
      src/pages/WoDe/ChongZhi/index.vue

+ 16
- 3
src/pages/WoDe/ChongZhi/index.vue Ver arquivo

@@ -7,14 +7,19 @@
7 7
           <span>¥</span>
8 8
           <input style="width: calc(100% - 24px); display: inline-block;" type="number" placeholder="请输入充值金额" v-model="rmb">
9 9
         </div>
10
-       <div>
10
+        <div>
11 11
           <span class="tip">当前充值: {{Amount}} 牛币</span><br>
12 12
           <span class="tip">充值金额不能低于 ¥1.00元 </span><br>
13 13
           <span class="tip">1人民币=100牛币 且 充值金额不能用于提现</span><br>
14
-       </div>
14
+        </div>
15 15
         <div class="Btn">
16 16
           <a @click="ToPayForAli">确定</a>
17 17
         </div>
18
+        <form id="AliForm" style="display: none">
19
+          <input type="text" name="amount" v-model="Amount">
20
+          <input type="text" name="returnURL" v-model="ReturnUrl">
21
+          <input type="text" name="token" v-model="Token">
22
+        </form>
18 23
       </div>
19 24
     </MainPageContainer>
20 25
   </div>
@@ -30,6 +35,8 @@ export default {
30 35
   name: '',
31 36
   data () {
32 37
     return {
38
+      ReturnUrl: encodeURIComponent(`${window.location.origin}/#/WoDe/ChongZhiZhuangTai`),
39
+      Token: null,
33 40
       rmb: '',
34 41
       Amount: '0',
35 42
       Password: '',
@@ -64,6 +71,7 @@ export default {
64 71
       'CashOut'
65 72
     ]),
66 73
     Init () {
74
+      this.Token = window.localStorage.Jwt
67 75
     },
68 76
     ToPayForAli () {
69 77
       if (this.Amount === '') {
@@ -74,7 +82,12 @@ export default {
74 82
         this.Toast('充值牛币数量不能低于100')
75 83
         return false
76 84
       }
77
-      window.location.href = `${APIBase}api/app/alipay/deposit?amount=${this.Amount - 0}&returnURL=${encodeURIComponent(`${window.location.origin}/#/WoDe/ChongZhiZhuangTai`)}&token=${window.localStorage.Jwt}`
85
+      let Url = `${APIBase}api/app/alipay/deposit`
86
+      let Form = document.getElementById('AliForm')
87
+      Form.method = 'get'
88
+      Form.action = Url
89
+      // console.log(Url)
90
+      Form.submit()
78 91
     }
79 92
   }
80 93
 }