Commit 0324c86c authored by superman's avatar superman

update index mobile to /h5/

parent f3330218
...@@ -61,7 +61,7 @@ app.use(function (err, req, res, next) { ...@@ -61,7 +61,7 @@ app.use(function (err, req, res, next) {
res.status(err.status || 500); res.status(err.status || 500);
res.render('error', { res.render('error', {
message: err.message, message: err.message,
error: {} layout: false
}); });
}); });
......
<script>
(function(ua){
var isAndroid = /(?:Android)/gi.test(ua);
var isIPhone = /(?:iPhone)/gi.test(ua);
function deserialize(str = location.search) {
var query = {};
var arr = (str + '').replace(/^\?/g, '').split('&');
if(arr.length){
for(var i=0, len = arr.length;i<len; i++){
var item = arr[i];
var tmp = (item + '').split('=');
if (tmp.length) {
query[decodeURIComponent(tmp[0])] = decodeURIComponent(tmp[1]);
}
}
}
return query;
}
var viewPc = deserialize().vpc;
if(!viewPc && (isAndroid || isIPhone)){
location.href = '/h5';
}
})(navigator.userAgent);
</script>
<div class="banner"> <div class="banner">
<div class="banner-box"> <div class="banner-box">
<h1>海量资源 轻松抢单</h1> <h1>海量资源 轻松抢单</h1>
......
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