-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
executable file
·151 lines (143 loc) · 4.41 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=640,user-scalable = no"/>
<title>微信场景</title>
<link href="css.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="main">
<div id="loading">
<ul><li></li><li></li><li></li><li></li><li></li><li></li></ul>
<div>你的技能是否已经载满....</div>
</div>
<canvas id="c1" width="640" height="960"></canvas>
<ul id="list">
<li>
<ul class="li1Child">
<li>
<p>曾经做为前端开发的你</p>
<p>解决PC兼容性而焦头烂额</p>
</li>
<li>
<p>而今</p>
<p>移动端H5应用疯狂来袭</p>
</li>
<li>
<p>你是否已准备充分</p>
<p>学习新技能</p>
</li>
<li>
<p>曾破茧成蝶、重获新生?</p>
</li>
</ul>
</li>
<li>
<ul class="li2Child">
<li></li><li></li><li></li><li></li><li></li><li></li>
</ul>
</li>
<li>
<div class="li3Child"></div>
</li>
<li>
<ul class="li4Child">
<li>
transform transition rotate scale translate keyframes animation webkitTransitionEnd webkitAnimationIteration elapsedTime perspective…
</li>
<li>
drawImage lineWidth strokeStyle lineCap globalCompositeOperation moveTo lineTo stroke arc getImageData…
</li>
<li>
audio autoplay loop paused play pause…
</li>
</ul>
</li>
<li></li>
<li>
<div id="jsOpenLocation" class="jsjdkbtn">查看地理位置</div>
</li>
</ul>
<div id="arrow"></div>
<div id="music">
<audio src="img/music.mp3" loop preload="auto" id="audio1"></audio>
</div>
</div>
</body>
</html>
<script src="//corali1.github.io/web/js/jquery-2.1.3.min.js" type="text/javascript"></script>
<script src = "js.js" type = "text/javascript"></script>
<script src="//corali1.github.io/web/js/jweixin-1.js"></script>
<script>
//获取时间戳
$.ajax({
type:'get',
url:'./jdkinfo/jdkdemo.php',
data:{appUrl:'index.html'},
cache:false, //显式的要求如果当前请求有缓存的话,直接使用缓存。如果该属性设置为 false,则每次都会向服务器请求
async:true,//异步调用
dataType:'json',
/* xml:返回XML文档,可用JQuery处理。
html:返回纯文本HTML信息;包含的script标签会在插入DOM时执行。
script:返回纯文本JavaScript代码。不会自动缓存结果。除非设置了cache参数。注意在远程请求时(不在同一个域下),所有post请求都将转为get请求。
json:返回JSON数据。
jsonp:JSONP格式。使用SONP形式调用函数时,例如myurl?callback=?,JQuery将自动替换后一个“?”为正确的函数名,以执行回调函数。
text:返回纯文本字符串。
*/
success:function(data){
wx.config({
debug: false,//true
appId: data.appId,
timestamp: data.timestamp,
nonceStr: data.nonceStr,
signature: data.signature,
jsApiList: [
'checkJsApi',
'getLocation',
'openLocation'//,
//'onMenuShareTimeline',
]
});
wx.ready(function () {
// 1 判断当前版本是否支持指定 JS 接口,支持批量判断
wx.checkJsApi({
jsApiList: [
//'getNetworkType',
//'previewImage',
'getLocation',
'openLocation'
],
success: function (res) {
//alert(JSON.stringify(res));
}
});
//获取你所在的地理位置
wx.getLocation({//22.538 114.0085 accuracy 30
success: function (res) {
//alert(JSON.stringify(res));
},
cancel: function (res) {
alert('用户拒绝授权获取地理位置');
}
});
});
wx.error(function (res) {
//alert(res.errMsg);
});
}
});
$(function(){
$('#jsOpenLocation').on('click',function(){
alert(12);
wx.openLocation({
latitude: 22.538,
longitude: 114.0085,
name: '我的位置',
address: '深圳市福田区竹子林益华大厦',
scale: 14,
infoUrl: 'http://weixin.qq.com'
});
});
});
</script>