Browse Source

no message

sosoyi 4 years ago
parent
commit
4e80e5f73c
1 changed files with 6 additions and 5 deletions
  1. 6 5
      public/android-mobile.html

+ 6 - 5
public/android-mobile.html

3
<head>
3
<head>
4
  <meta charset="UTF-8">
4
  <meta charset="UTF-8">
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
  <title>漫步今日益行</title>
6
  <title>开心0元购</title>
7
  <style>
7
  <style>
8
    * {
8
    * {
9
      padding: 0;
9
      padding: 0;
69
    xhr.setRequestHeader("content-type", "application/json");
69
    xhr.setRequestHeader("content-type", "application/json");
70
70
71
    xhr.onload = () => {
71
    xhr.onload = () => {
72
      console.log('xhr.response = ', xhr.response)
72
      // console.log('xhr.response = ', xhr.response)
73
      if (xhr.status == 200) {
73
      if (xhr.status == 200) {
74
        var result = JSON.parse(xhr.response);
74
        var result = JSON.parse(xhr.response);
75
        console.log(222,result)
75
        // console.log(222,result)
76
        if (result && result.data && result.data.src) {
76
        if (result && result.data && result.data.src) {
77
          downUrl = result.data.src;
77
          downUrl = result.data.src;
78
          //if(callback)callback(result.src);
78
          //if(callback)callback(result.src);
79
          console.log('得到的下载地址是 = ' + downUrl)
79
          // console.log('得到的下载地址是 = ' + downUrl)
80
        }
80
        }
81
      }
81
      }
82
    }
82
    }
97
      document.getElementById('adr-mask').style.display = 'block';
97
      document.getElementById('adr-mask').style.display = 'block';
98
      return true;
98
      return true;
99
    } else {
99
    } else {
100
      //不是微信环境,直接下载
100
      // TODO 这里弱网环境会有问题
101
      //不是微信环境,直接下载,
101
      window.location.href = downUrl;
102
      window.location.href = downUrl;
102
      return false;
103
      return false;
103
    }
104
    }