浏览代码

静态页面

xcx 4 年前
父节点
当前提交
4fe0a5b59e
共有 1 个文件被更改,包括 16 次插入3 次删除
  1. 16
    3
      src/pages/WoDe/ChongZhi/index.vue

+ 16
- 3
src/pages/WoDe/ChongZhi/index.vue 查看文件

7
           <span>¥</span>
7
           <span>¥</span>
8
           <input style="width: calc(100% - 24px); display: inline-block;" type="number" placeholder="请输入充值金额" v-model="rmb">
8
           <input style="width: calc(100% - 24px); display: inline-block;" type="number" placeholder="请输入充值金额" v-model="rmb">
9
         </div>
9
         </div>
10
-       <div>
10
+        <div>
11
           <span class="tip">当前充值: {{Amount}} 牛币</span><br>
11
           <span class="tip">当前充值: {{Amount}} 牛币</span><br>
12
           <span class="tip">充值金额不能低于 ¥1.00元 </span><br>
12
           <span class="tip">充值金额不能低于 ¥1.00元 </span><br>
13
           <span class="tip">1人民币=100牛币 且 充值金额不能用于提现</span><br>
13
           <span class="tip">1人民币=100牛币 且 充值金额不能用于提现</span><br>
14
-       </div>
14
+        </div>
15
         <div class="Btn">
15
         <div class="Btn">
16
           <a @click="ToPayForAli">确定</a>
16
           <a @click="ToPayForAli">确定</a>
17
         </div>
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
       </div>
23
       </div>
19
     </MainPageContainer>
24
     </MainPageContainer>
20
   </div>
25
   </div>
30
   name: '',
35
   name: '',
31
   data () {
36
   data () {
32
     return {
37
     return {
38
+      ReturnUrl: encodeURIComponent(`${window.location.origin}/#/WoDe/ChongZhiZhuangTai`),
39
+      Token: null,
33
       rmb: '',
40
       rmb: '',
34
       Amount: '0',
41
       Amount: '0',
35
       Password: '',
42
       Password: '',
64
       'CashOut'
71
       'CashOut'
65
     ]),
72
     ]),
66
     Init () {
73
     Init () {
74
+      this.Token = window.localStorage.Jwt
67
     },
75
     },
68
     ToPayForAli () {
76
     ToPayForAli () {
69
       if (this.Amount === '') {
77
       if (this.Amount === '') {
74
         this.Toast('充值牛币数量不能低于100')
82
         this.Toast('充值牛币数量不能低于100')
75
         return false
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
 }