Payment method consolidated

This commit is contained in:
Vion
2022-01-27 16:55:00 +08:00
parent 7912abdabc
commit 300788a552
6 changed files with 104 additions and 167 deletions

View File

@@ -178,9 +178,12 @@ import {
repayOrde
} from "../../ajax/getData";
import util from "@/ajax/util";
export default {
data() {
return {
util,
goldmedal: [],
userproductId: "",
logisticsDate: "",
@@ -332,8 +335,8 @@ export default {
}
},
async repayOrde(ordernumber) {
let mobileResult = this.isMobile();
let res = await repayOrde(ordernumber, mobileResult);
let payType = this.util.pickPaytype();
let res = await repayOrde(ordernumber, payType);
if (res) {
return res;
}
@@ -353,22 +356,6 @@ export default {
// console.log(this.list);
},
isMobile () {
var sUserAgent = navigator.userAgent.toLowerCase();
var bIsIpad = sUserAgent.match(/ipad/i) == "ipad";
var bIsIphoneOs = sUserAgent.match(/iphone os/i) == "iphone os";
var bIsMidp = sUserAgent.match(/midp/i) == "midp";
var bIsUc7 = sUserAgent.match(/rv:1.2.3.4/i) == "rv:1.2.3.4";
var bIsUc = sUserAgent.match(/ucweb/i) == "ucweb";
var bIsAndroid = sUserAgent.match(/android/i) == "android";
var bIsCE = sUserAgent.match(/windows ce/i) == "windows ce";
var bIsWM = sUserAgent.match(/windows mobile/i) == "windows mobile";
if (!(bIsIpad || bIsIphoneOs || bIsMidp || bIsUc7 || bIsUc || bIsAndroid || bIsCE || bIsWM)) {
return false;
} else {
return true;
}
}
},
mounted() {
this.checkIsLogin();