Commit 59eaf80b by cocomilk2012

update

parent 60de14f1
...@@ -86,7 +86,7 @@ async function getToken(access_token, appid, redirectPath) { ...@@ -86,7 +86,7 @@ async function getToken(access_token, appid, redirectPath) {
} }
) )
.catch(err => { .catch(err => {
console.log("456err=", err); console.log("err0716=", err);
}); });
} }
......
...@@ -257,19 +257,7 @@ export default { ...@@ -257,19 +257,7 @@ export default {
//TODO:安卓的单独判断 //TODO:安卓的单独判断
try { try {
const userAgent = navigator.userAgent.toLowerCase(); const userAgent = navigator.userAgent.toLowerCase();
let isAndroid = userAgent.indexOf("android") > -1 || userAgent.indexOf("adr") > -1; //android终端 if (userAgent.indexOf("qqxbua") != -1) {
if (isAndroid) {
console.log('android');
let temp = userAgent.split("teammix/")[1];
let version = temp.split("(android")[0];
console.log("version=", version);
if (version < "2.1.9") {
this.toPay_old();
} else {
this.toPay_new();
}
} else if (userAgent.indexOf("qqxbua") != -1) {
console.log('ios'); console.log('ios');
let tempArr = userAgent.split("qqxbua:"); let tempArr = userAgent.split("qqxbua:");
if (tempArr.length > 1) { if (tempArr.length > 1) {
...@@ -293,7 +281,6 @@ export default { ...@@ -293,7 +281,6 @@ export default {
}, },
toPay_new() { toPay_new() {
console.log("topay_new"); console.log("topay_new");
//TODO:先弹出一个遮罩层,点击任意按钮刷新页面
this.$bridge.getActionUrl(this.nativePayUrl).then(res => { this.$bridge.getActionUrl(this.nativePayUrl).then(res => {
console.log("getActionUrl in bill index"); console.log("getActionUrl in bill index");
}); });
......
...@@ -10,11 +10,11 @@ ...@@ -10,11 +10,11 @@
<div class="header_content"> <div class="header_content">
<div class="fund"> <div class="fund">
<span>账户余额</span> <span>账户余额</span>
<i>{{ summary.balance|moneyNum }}</i> <i>{{ summary.balance | moneyNum }}</i>
</div> </div>
<div class="paid"> <div class="paid">
<span>待付金额</span> <span>待付金额</span>
<i class="paid_color">{{ summary.waitPay|moneyNum }}</i> <i class="paid_color">{{ summary.waitPay | moneyNum }}</i>
</div> </div>
</div> </div>
<div class="header_info"> <div class="header_info">
...@@ -37,11 +37,11 @@ ...@@ -37,11 +37,11 @@
</div> </div>
<p> <p>
<span>应付金额</span> <span>应付金额</span>
<i>{{ item.totalAmount|moneyNum }}</i> <i>{{ item.totalAmount | moneyNum }}</i>
</p> </p>
<p> <p>
<span>待付金额</span> <span>待付金额</span>
<i>{{ item.waitPayAmount |moneyNum}}</i> <i>{{ item.waitPayAmount | moneyNum }}</i>
</p> </p>
</div> </div>
</div> </div>
...@@ -75,6 +75,44 @@ export default { ...@@ -75,6 +75,44 @@ export default {
methods: { methods: {
...mapActions(["loadMoreList", "loadMoreSummary", "loadPayUrl"]), ...mapActions(["loadMoreList", "loadMoreSummary", "loadPayUrl"]),
toPay() { toPay() {
window.onpageshow = null;
window.onpageshow = function(event) {
//event.persisted是否是缓存
location.reload();
};
//根据UA判断:如果App版本<2.1.9就走原来的充值逻辑;如果App版本>=2.1.9就走新的充值逻辑;
//TODO:安卓的单独判断
try {
const userAgent = navigator.userAgent.toLowerCase();
if (userAgent.indexOf("qqxbua") != -1) {
console.log("ios");
let tempArr = userAgent.split("qqxbua:");
if (tempArr.length > 1) {
const tempStr = tempArr[1];
const QQXBUA = JSON.parse(tempStr);
let version = QQXBUA.version;
console.log("version=", version);
if (version < "2.1.9") {
this.toPay_old();
} else {
this.toPay_new();
}
}
} else {
this.toPay_old();
}
} catch (error) {
console.log(error);
this.toPay_old();
}
},
toPay_new() {
console.log("topay_new");
this.$bridge.getActionUrl(this.nativePayUrl).then(res => {
console.log("getActionUrl in bill index");
});
},
toPay_old() {
this.$bridge.setPageNavState({ this.$bridge.setPageNavState({
headerColor: "#fff", headerColor: "#fff",
isShowClose: false, isShowClose: false,
...@@ -98,10 +136,10 @@ export default { ...@@ -98,10 +136,10 @@ export default {
); );
let payUrl = `${this.payUrl}&accountType=19&selected=0&failUrl=${failUrl}&successUrl=${successUrl}`; let payUrl = `${this.payUrl}&accountType=19&selected=0&failUrl=${failUrl}&successUrl=${successUrl}`;
console.log("payUrl=", payUrl); console.log("payUrl=", payUrl);
window.onpageshow=null; window.onpageshow = null;
window.onpageshow=function(event){ window.onpageshow = function(event) {
location.reload(); location.reload();
} };
window.location.href = payUrl; window.location.href = payUrl;
}, },
toPage() { toPage() {
...@@ -119,6 +157,8 @@ export default { ...@@ -119,6 +157,8 @@ export default {
data => { data => {
this.summary = data; this.summary = data;
console.log("this.summary=", this.summary); console.log("this.summary=", this.summary);
this.nativePayUrl = `hrs100://native/SelectRechargeMode?periodId=${this.currentPerId}&fee=${this.summary.waitPay}`;
console.log("this.nativePayUrl=", this.nativePayUrl);
}, },
err => { err => {
console.log(err); console.log(err);
......
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