Advertisement
sb2014

LiveChat.vue

Sep 20th, 2022
43
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.14 KB | None | 0 0
  1. <template>
  2. <div></div>
  3. </template>
  4.  
  5. <script>
  6. const md5 = require('md5');
  7.  
  8. export default {
  9. name: 'LiveChat',
  10. mounted() {
  11. this.liveChat();
  12. },
  13. methods: {
  14. async liveChat() {
  15. const script1 = document.createElement('script');
  16. script1.setAttribute('src', 'https://chat-api.spartez-software.com/chat.js');
  17. document.head.appendChild(script1);
  18.  
  19.  
  20. const spartezSupportChat = {
  21. portal: 2,
  22. cloud: {
  23. jiraId: '786e56be-5813-3706-b993-88dcdc6c3012',
  24. jiraUrl: 'https://connbyte.atlassian.net',
  25. urls: {
  26. rest: 'https://chat-api.spartez-software.com',
  27. ws: 'https://chat-ws.spartez-software.com',
  28. },
  29. },
  30. };
  31.  
  32.  
  33. const script2 = document.createElement('script');
  34. script2.type = 'text/javascript';
  35. script2.text = `const spartezSupportChat = ${JSON.stringify(spartezSupportChat)}`;
  36. document.head.appendChild(script2);
  37. },
  38. },
  39. };
  40. </script>
  41.  
  42. <style lang="scss">
  43. .iziToast > .iziToast-progressbar > div {
  44. height: 5px;
  45. }
  46.  
  47. .iziToast {
  48. padding-bottom: 14px;
  49. }
  50. </style>
  51.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement