Commit 341b0d7e2bc2b42c592765c51b28b67b70ad12af

Authored by ly525
1 parent fc8ffc47

fix #156

back-end/h5-api/views/engine.ejs
1 1 <!--
2 2 * @Author: ly525
3 3 * @Date: 2019-12-04 20:24:04
4   - * @LastEditors : ly525
5   - * @LastEditTime : 2020-01-24 21:03:29
  4 + * @LastEditors: ly525
  5 + * @LastEditTime: 2020-05-03 14:30:37
6 6 * @FilePath: /luban-h5/back-end/h5-api/views/engine.ejs
7 7 * @Github: https://github.com/ly525/luban-h5
8 8 * @Description: 手机端预览模板
... ... @@ -212,8 +212,9 @@
212 212 function updateViewport() {
213 213 var scale = 1;
214 214 var w = document.documentElement.clientWidth || 320;
215   - var h = document.documentElement.clientHeight || 568;
216   - scale = w/h >= 320/568 ? h/568 : w/320;
  215 + // var h = document.documentElement.clientHeight || 568;
  216 + // scale = w/h >= 320/568 ? h/568 : w/320;
  217 + scale = w/320;
217 218 var viewport = "width=320, initial-scale=" + scale + ", maximum-scale=" + scale + ", user-scalable=no";
218 219 document.getElementById("viewport").setAttribute("content", viewport)
219 220 }
... ...