Commit ddd8fbb3 authored by superman's avatar superman

去除Promise

parent 195ea91a
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
(function(ua){ (function(ua){
var isAndroid = /(?:Android)/gi.test(ua); var isAndroid = /(?:Android)/gi.test(ua);
var isIPhone = /(?:iPhone)/gi.test(ua); var isIPhone = /(?:iPhone)/gi.test(ua);
function deserialize(str = location.search) { function deserialize(str) {
var query = {}; var query = {};
var arr = (str + '').replace(/^\?/g, '').split('&'); var arr = (str + '').replace(/^\?/g, '').split('&');
if(arr.length){ if(arr.length){
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
} }
return query; return query;
} }
var viewPc = deserialize().vpc; var viewPc = deserialize(location.search).vpc;
if(!viewPc && (isAndroid || isIPhone)){ if(!viewPc && (isAndroid || isIPhone)){
location.href = '/h5'; location.href = '/h5';
} }
......
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 to comment