boka-human-cliend-v2 0.0.22 → 0.0.24

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "boka-human-cliend-v2",
3
- "version": "0.0.22",
3
+ "version": "0.0.24",
4
4
  "main": "dist/boka-human-v2.umd.js",
5
5
  "scripts": {
6
6
  "serve": "vue-cli-service serve src/demo/main.js",
@@ -38,6 +38,10 @@ export default {
38
38
  type: String,
39
39
  default: ''
40
40
  },
41
+ custType: {
42
+ type: String,
43
+ default: ''
44
+ },
41
45
  subCustType: {
42
46
  type: String,
43
47
  default: ''
@@ -54,12 +58,13 @@ export default {
54
58
  return "https://service.mase.cloud"
55
59
  }
56
60
  return "https://human.shboka.com"
61
+ // return "https://baidu.com"
57
62
  // return "http://192.168.3.12:5173"
58
63
  },
59
64
  src(){
60
- let {token,product,subCustType,source} = this;
65
+ let {token,product,custType,subCustType,source} = this;
61
66
  // return `https://human.shboka.com/?token=${token}&product=${product}&subCustType=${subCustType}&human=1&isIFrame=true&time=${new Date().getTime()}`;
62
- return `${this.host}?token=${token}&product=${product}&subCustType=${subCustType}&source=${source}&human=1&isIFrame=true&time=${new Date().getTime()}`;
67
+ return `${this.host}?token=${token}&product=${product}&custType=${custType}&subCustType=${subCustType}&source=${source}&human=1&isIFrame=true&time=${new Date().getTime()}`;
63
68
  }
64
69
  },
65
70
  data() {
@@ -69,8 +74,10 @@ export default {
69
74
  }
70
75
  },
71
76
  mounted() {
72
- this.icon();
73
- this.chatMainInitDrag();
77
+ setTimeout(()=>{
78
+ this.icon();
79
+ this.chatMainInitDrag();
80
+ })
74
81
 
75
82
  window.humanFunction = {
76
83
  showChatView: this.showChat
@@ -139,7 +146,7 @@ export default {
139
146
  icon(){
140
147
  const container = document.body;
141
148
  let defx = container.clientWidth-40;
142
- let defy = container.clientHeight-150;
149
+ let defy = Math.min(screen.availHeight,container.clientHeight)-300;
143
150
  let tmpIcon = document.querySelector('#humanEnterIcon');
144
151
  tmpIcon.style.transform = `translate(${defx}px, ${defy}px)`;
145
152
  tmpIcon.setAttribute('data-x', defx);