// 截取多个等号里面的code
getCode() {
var url = location.search; //获取url中"?"符后的字串
var theRequest = new Object();
if (url.indexOf("?") != -1) {
var str = url.substr(1);
strs = str.split("&");
for (var i = 0; i < strs.length; i++) {
theRequest[strs[i].split("=")[0]] = unescape(strs[i].split("=")[1]);
}
}
return theRequest;
},
},
mounted(){
let object = this.getCode(location.href);
this.getOrderAdopt(object.out_trade_no);
前端拿取三方回调url地址多个值的情况
最新推荐文章于 2024-11-11 23:50:26 发布