Authored by 郭成尧

app-close-pwa

1 import $ from 'yoho-jquery'; 1 import $ from 'yoho-jquery';
  2 +import yoho from 'yoho-app';
2 3
3 const isHttps = location.protocol === 'https:'; 4 const isHttps = location.protocol === 'https:';
4 5
@@ -48,7 +49,7 @@ window.addEventListener('load', function() { @@ -48,7 +49,7 @@ window.addEventListener('load', function() {
48 dataType: 'jsonp', 49 dataType: 'jsonp',
49 cache: false, 50 cache: false,
50 success(res) { 51 success(res) {
51 - const usePwa = isHttps && res && res.usePwa; 52 + const usePwa = isHttps && res && !yoho.isApp && res.usePwa;
52 53
53 if (usePwa) { 54 if (usePwa) {
54 register(); 55 register();