|
Uncaught TypeError:Cannot call method 'initMeChat' of undefiend at .....
- <!DOCTYPE html>
- <html>
- <head>
- <meta charset="utf-8">
- <meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0"/>
- <title>title</title>
- <link rel="stylesheet" type="text/css" href="../css/api.css" />
- <link rel="stylesheet" type="text/css" href="../css/common.css" />
- <style>
- </style>
- </head>
- <body>
- <div class="con" >
- <input type="button" onclick="showAlert()" value="Click To Show Message" />
- </div>
- </body>
- <script type="text/javascript" src="../script/api.js"></script>
- <script type="text/javascript">
- var mechat;
- function showAlert() {
- mechat.specifyAlloc({
- groupId : '2',
- agentId : '1682'
- });
- mechat.addUserInfo({
- realName : '特教360',
- job : '客服服务',
- tel : '028-64641360',
- appUserName : '123123',
- appUserId : '123123'
- });
- mechat.addOtherInfo({
- foo : 'bar',
- hello : 'world',
- 你好 : '世界'
- });
- mechat.show();
- }
- apiready = function() {
- mechat = api.require('meChat');
- mechat.initMeChat({
- appkey : "54bd17dc4ea......"
- });
- };
- </script>
- </html>
复制代码 |
|