forked from easemob/kefu-webim
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdemo.html
executable file
·70 lines (58 loc) · 2.02 KB
/
demo.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
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">
<meta name="format-detection" content="telephone=no">
<meta name="viewport" content="width=device-width,initial-scale=1.0,minimum-scale=1.0,user-scalable=no">
<style>
body { background-color: #eee;color: #555; }
button, a { display: block;margin: 20px 0;background: #00CEB9;border: none;color: #fff;line-height: 40px;width: 200px;cursor: pointer;outline: none;text-align: center; }
button:hover, a:hover { box-shadow: 0 0 5px #33CEB9; }
button:active, a:active { background: #fff;color: #00CEB9; }
input { height: 40px;outline: none;width: 300px;text-align: center;font-size: 16px;color: #00CEB9; float: left;border: 1px solid #fff; }
</style>
</head>
<body>
<h1>Demo</h1>
<a target='_blank' href='http://docs.easemob.com/cs/300visitoraccess/20webplugin'>集成文档</a>
<br><br><br><br><br><br><br>
<a href='javascript:;' onclick='easemobim.bind({
tenantId: 10954,
dialogWidth: "500px"
})'>窗口加宽示例</a>
<a href='javascript:;' onclick='easemobim.bind({
tenantId: 10954,
emgroup: "技能组1"
})'>绑定技能组示例</a>
<br><br><br><h1>测试</h1>
<div><input id='testvalue' type='text' placeholder='请输入您的tenantId,点击测试按钮'/></div>
<a id='test'>测试</a>
<br><br><br>
<script>
var v = document.getElementById('testvalue');
v.value = localStorage.getItem('easemobtest') || '';
document.getElementById('test').onclick = function () {
if (/\d+/.test(v.value)) {
localStorage.setItem('easemobtest', v.value);
easemobim.bind({ tenantId: v.value.replace(/\s/g, '') })
}
};
</script>
<script>
window.easemobim = window.easemobim || {};
easemobim.config = {
// domain: '//sandbox5.kefu.easemob.com',
// domain: '//kefu.easemob.com',
// 访客自动上报
// eventCollector: true,
satisfaction: true,
// hide: false,
// minimum: false,
tenantId: 11885,
unused: ''
};
</script>
<script src='easemob.js'></script>
</body>
</html>