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