-
Notifications
You must be signed in to change notification settings - Fork 6
/
index.html
executable file
·50 lines (50 loc) · 1.6 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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Weex Preview</title>
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<meta name="apple-touch-fullscreen" content="yes">
<meta name="format-detection" content="telephone=no, email=no">
<link rel="stylesheet" href="./assets/style.css">
<script src="./config.js"></script>
<script src="./assets/url.js"></script>
<script src="./assets/qrcode.js"></script>
<script src="./node_modules/vue/dist/vue.js"></script>
</head>
<body>
<h1>Weex Preview</h1>
<div id="app"></div>
<template id="app-template">
<div id="app">
<div class="mock-phone">
<div class="inner">
<iframe id="preview" src="./weex.html"></iframe>
</div>
<div class="camera"></div>
<div class="earpiece"></div>
<div class="home-btn"></div>
</div>
<div id="qrcode">
<h2>QRCode</h2>
<a :href="val" target="_blank"><canvas ref="canvas" width="200" height="200"></canvas></a>
<p class="bundle-url"><a :href="val" target="_blank">{{val}}</a></p>
</div>
</div>
</template>
<script>
console.log('QR CODE URL: ' + url)
new Vue({
el: '#app',
template: '#app-template',
data: { val: url },
mounted: function () {
var qrcodedraw = new QRCodeLib.QRCodeDraw()
qrcodedraw.draw(this.$refs.canvas, this.val, function () {})
}
})
</script>
</body>
</html>