-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest.html
More file actions
55 lines (54 loc) · 2.17 KB
/
Copy pathtest.html
File metadata and controls
55 lines (54 loc) · 2.17 KB
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
<html><head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<link rel="canonical" href="https://weather-pwa-sample.firebaseapp.com/final/">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Weather PWA</title>
<link rel="stylesheet" type="text/css" href="styles/inline.css">
<!-- TODO add manifest here -->
<link rel="manifest" href="./manifest.json">
<!-- Add to home screen for Safari on iOS -->
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<meta name="apple-mobile-web-app-title" content="Weather PWA">
<link rel="apple-touch-icon" href="./images/icons/icon-152x152.png">
<meta name="msapplication-TileImage" content="./images/icons/icon-144x144.png">
<meta name="msapplication-TileColor" content="#2F3BA2">
<script src='https://cdn.bootcdn.net/ajax/libs/vConsole/3.3.4/vconsole.min.js'></script>
<!--<script type="text/javascript" src="https://appx/web-view.min.js"></script>-->
<script src="https://res.wx.qq.com/open/js/jweixin-1.3.0.js"></script>
</head>
<body>
<p>测试上传1: <input type='file' onchange="" onchange="test(this, '测试1')"/></p>
<p>测试上传2: <input type='file' accept="image/*" onchange="test(this, '测试2')"/></p>
<p>测试上传3: <input type='file' accept="image/*" capture onchange="test(this, '测试3')"/></p>
<a onclick="testPhone">测试通讯录</a>
<script>
// 初始化
var vConsole = new VConsole();
function test(e, a) {
console.log(a, e.files[0])
}
window.onhashchange = function() {
console.log(window.location.href)
}
function testPhone() {
wx.miniProgram.postMessage({ data: {foo: 'bar'} })
// console.log('my', my)
// console.log('my.choosePhoneContact', my.choosePhoneContact)
// my.choosePhoneContact({
// success: (res) => {
// my.alert({
// content: 'choosePhoneContact response: ' + JSON.stringify(res)
// });
// },
// fail: (res) => {
// my.alert({
// content: 'choosePhoneContact response: ' + JSON.stringify(res)
// });
// },
// });
}
</script>
</body>
</html>