Commit 1ff6c3a1 by cocomilk2012

update

parent 53969273
Showing with 16 additions and 11 deletions
......@@ -168,7 +168,7 @@
</template>
<script>
import { Icon, Loading,Toast } from "vant";
import { Icon, Loading, Toast } from "vant";
import { TabHeader } from "@/components";
import * as utils from "../../utils/common";
import { mapGetters, mapActions } from "vuex";
......@@ -248,6 +248,11 @@ export default {
"loadPayUrl"
]),
toPay() {
window.onpageshow = null;
window.onpageshow = function(event) {
//event.persisted是否是缓存
location.reload();
};
//TODO:根据UA判断:如果App版本<2.1.9就走原来的充值逻辑;如果App版本>=2.1.9就走新的充值逻辑;
const userAgent = navigator.userAgent.toLowerCase();
if (userAgent.indexOf("qqxbua") != -1) {
......@@ -296,23 +301,23 @@ export default {
})
.then(res => {});
console.log("setBarColor");
const failUrl = encodeURIComponent("https://pay.qinqinxiaobao.com/callback/fail");
const successUrl = encodeURIComponent("https://pay.qinqinxiaobao.com/callback/success");
const failUrl = encodeURIComponent(
"https://pay.qinqinxiaobao.com/callback/fail"
);
const successUrl = encodeURIComponent(
"https://pay.qinqinxiaobao.com/callback/success"
);
const payMethod = 0;
const payType = 4;
const selected = 0;
const fee = this.data.waitPay;
let payUrl = `${this.payUrl}&accountId=${this.currentPerId}&payMethod=${payMethod}&payType=${payType}&fee=${fee}&selected=0&failUrl=${failUrl}&successUrl=${successUrl}`;
console.log("old_pay_url=", payUrl);
window.onpageshow = null;
window.onpageshow = function(event) {
//event.persisted是否是缓存
location.reload();
};
console.log('window.onpageshow ');
Toast.loading({message:'正在跳转到支付页面,请等待...'})
console.log("window.onpageshow ");
Toast.loading({ message: "正在跳转到支付页面,请等待..." });
window.location.href = payUrl;
console.log('页面跳转走了');
console.log("页面跳转走了");
},
toPage(flag) {
switch (flag) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment