boka-human-cliend-v3 0.0.34 → 0.0.36
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/dist/boka-human-cliend-v3.css +0 -1
- package/dist/boka-human-v3.umd.js +48 -51
- package/package.json +1 -1
- package/src/demo/App.vue +3 -3
|
@@ -5216,8 +5216,8 @@
|
|
|
5216
5216
|
},
|
|
5217
5217
|
src() {
|
|
5218
5218
|
let { token, product, custType, subCustType, source, terminal = "" } = this;
|
|
5219
|
-
let { protocol, host
|
|
5220
|
-
let domain = `${protocol}//${host}
|
|
5219
|
+
let { protocol, host } = location;
|
|
5220
|
+
let domain = `${protocol}//${host}`;
|
|
5221
5221
|
return `${this.host}?token=${token}&product=${product}&custType=${custType}&subCustType=${subCustType}&source=${source}&human=1&isIFrame=true&terminal=${terminal}&domain=${encodeURIComponent(domain)}&time=${(/* @__PURE__ */ new Date()).getTime()}`;
|
|
5222
5222
|
}
|
|
5223
5223
|
},
|
|
@@ -5353,8 +5353,21 @@
|
|
|
5353
5353
|
inertia: true,
|
|
5354
5354
|
modifiers: [
|
|
5355
5355
|
interact.modifiers.restrictRect({
|
|
5356
|
-
restriction: "
|
|
5356
|
+
restriction: "#humanViewOuter",
|
|
5357
5357
|
endOnly: true
|
|
5358
|
+
/*restriction: () => {
|
|
5359
|
+
const scrollTop = window.pageYOffset || document.documentElement.scrollTop;
|
|
5360
|
+
const scrollLeft = window.pageXOffset || document.documentElement.scrollLeft;
|
|
5361
|
+
|
|
5362
|
+
return {
|
|
5363
|
+
left: scrollLeft,
|
|
5364
|
+
top: scrollTop,
|
|
5365
|
+
right: scrollLeft + window.innerWidth,
|
|
5366
|
+
bottom: scrollTop + window.innerHeight
|
|
5367
|
+
};
|
|
5368
|
+
},
|
|
5369
|
+
elementRect: { left: 0, right: 1, top: 0, bottom: 1 },
|
|
5370
|
+
endOnly: false*/
|
|
5358
5371
|
})
|
|
5359
5372
|
],
|
|
5360
5373
|
autoScroll: true,
|
|
@@ -5375,63 +5388,47 @@
|
|
|
5375
5388
|
}
|
|
5376
5389
|
};
|
|
5377
5390
|
const _hoisted_1 = { class: "boka-human-v2" };
|
|
5378
|
-
const _hoisted_2 = {
|
|
5379
|
-
|
|
5380
|
-
|
|
5381
|
-
viewBox: "0 0 1051 1024",
|
|
5382
|
-
version: "1.1",
|
|
5383
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
5384
|
-
"p-id": "1470",
|
|
5385
|
-
width: "32",
|
|
5386
|
-
height: "32"
|
|
5387
|
-
};
|
|
5388
|
-
const _hoisted_3 = { class: "humanMainHeader my-dialog__header" };
|
|
5389
|
-
const _hoisted_4 = { class: "humanMainHeaderRight" };
|
|
5390
|
-
const _hoisted_5 = {
|
|
5391
|
-
style: { "display": "inline-block", "vertical-align": "middle" },
|
|
5392
|
-
t: "1759046770151",
|
|
5393
|
-
class: "icon",
|
|
5394
|
-
viewBox: "0 0 1024 1024",
|
|
5395
|
-
version: "1.1",
|
|
5396
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
5397
|
-
"p-id": "9352",
|
|
5398
|
-
width: "14",
|
|
5399
|
-
height: "14"
|
|
5400
|
-
};
|
|
5401
|
-
const _hoisted_6 = ["src"];
|
|
5391
|
+
const _hoisted_2 = { class: "humanMainHeader my-dialog__header" };
|
|
5392
|
+
const _hoisted_3 = { class: "humanMainHeaderRight" };
|
|
5393
|
+
const _hoisted_4 = ["src"];
|
|
5402
5394
|
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
5403
5395
|
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1, [
|
|
5396
|
+
_cache[7] || (_cache[7] = vue.createElementVNode("div", {
|
|
5397
|
+
id: "humanViewOuter",
|
|
5398
|
+
style: { "position": "fixed", "width": "100vw", "height": "100vh", "top": "0", "left": "0", "display": "none" }
|
|
5399
|
+
}, null, -1)),
|
|
5404
5400
|
vue.createElementVNode("div", {
|
|
5405
5401
|
class: vue.normalizeClass(["humanEnterIcon", [$data.unreadCount > 0 ? "unreadCount" : ""]]),
|
|
5406
|
-
id: "humanEnterIcon"
|
|
5407
|
-
onClick: _cache[0] || (_cache[0] = (...args) => $options.changeChatViewVisible && $options.changeChatViewVisible(...args))
|
|
5402
|
+
id: "humanEnterIcon"
|
|
5408
5403
|
}, [
|
|
5409
|
-
$data.unreadCount < 1 ? (vue.openBlock(), vue.createElementBlock("
|
|
5410
|
-
|
|
5411
|
-
|
|
5412
|
-
|
|
5413
|
-
|
|
5414
|
-
|
|
5415
|
-
|
|
5416
|
-
|
|
5404
|
+
$data.unreadCount < 1 ? (vue.openBlock(), vue.createElementBlock("img", {
|
|
5405
|
+
key: 0,
|
|
5406
|
+
onClick: _cache[0] || (_cache[0] = (...args) => $options.changeChatViewVisible && $options.changeChatViewVisible(...args)),
|
|
5407
|
+
src: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEIAAABACAYAAACunKHjAAAF70lEQVR4Aeyai5HbIBCGrasnPeSuipQTp5t0kUsRqUf5P45lFoRkJMtInnGGNYjHsvuxoMfl7dLp3ziO75JrlD/KTVQMya6tz7WTaWGah4KQezgfHNRsfyQ/o7wrN1ExJLu2Pj81nsR44NAeOj7i5yEgZD2GjzIY53EA0eWmxFjgAESqx4dEyq4gZKUBwPA5rz/V4OWXrk2sXlWziUgByq5AdgEhAGELyPQ5ADj4ofaPYRhKuQ7DYPKhMjLQVwIgxqqYpRAlmhfwlLPGLRd3g8AYTWxbQMWUcCA4FZ37VE5d6rBUoK8EQEGH+gJFWZYAv0t03AVCEACAMd46nMV4hLJv21yOUIiUKhDZctdW2QRCk9pWKMPylwzeFUBJTvqJkhoQzo7NMDaBkHFEQgkBAJsNkc5VCSAaUEYHMLBNTevSahCKhnIiwh8I5Otmv7P3DAyidfWCrAIhCEzgI4ED8BAIxjDC4I5kVeREBrZSbpJmEBFCdjDKiNKApkn37iQ7iMbSFmD4RVuctglEDYK0lhOr6rgUYUzOjFaLmkBUlHF3YB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So4hKIPhu2DrrrO9Ylm+CKAfccy3jMRxhPyNz6ghzO/lTP40P20D5qIH0UZYSh/cmCGjoBkLGs4LJKSZvFCKHCAEgUtNx9+HdBUSEMFlBgeAuVRM1ZYmxNQC2FYCcDVh70QVExaiwgjp/OJRrwiGNk5WhoYo2tgFCOVTe89MLhH+rBULLChIppW84jfMI5bJ983UvEN5AD8XXl+VyKwBwdwA26REgOPlLJ82e2ZxtNNu4Q0MvEGWY250gQNFhWubcHTggzcVdt4Ep9XkXEFpNHEH83DiKwzUpI6YE6fXsUu4CIlqKMyWM2LSYcTZsGLeoc9LYDQRRIeGNtRUIznM4ttxhJo6tregGwgwTDJ4bcJBnBcBkonZL9AGGDX1o/h8AAP//85TBrAAAAAZJREFUAwCgHqvQJpFL5wAAAABJRU5ErkJggg==",
|
|
5408
|
+
alt: "",
|
|
5409
|
+
style: { "width": "100%" }
|
|
5410
|
+
})) : (vue.openBlock(), vue.createElementBlock("span", {
|
|
5411
|
+
key: 1,
|
|
5412
|
+
onClick: _cache[1] || (_cache[1] = (...args) => $options.changeChatViewVisible && $options.changeChatViewVisible(...args))
|
|
5413
|
+
}, vue.toDisplayString($data.unreadCount > 99 ? "99+" : $data.unreadCount), 1))
|
|
5417
5414
|
], 2),
|
|
5418
5415
|
vue.withDirectives(vue.createElementVNode("div", {
|
|
5419
5416
|
class: vue.normalizeClass(["humanMainView", $props.fullScreen ? "full" : ""])
|
|
5420
5417
|
}, [
|
|
5421
|
-
vue.createElementVNode("div",
|
|
5422
|
-
_cache[
|
|
5423
|
-
_cache[
|
|
5424
|
-
vue.createElementVNode("div",
|
|
5418
|
+
vue.createElementVNode("div", _hoisted_2, [
|
|
5419
|
+
_cache[5] || (_cache[5] = vue.createElementVNode("div", { class: "humanMainHeaderLeft" }, null, -1)),
|
|
5420
|
+
_cache[6] || (_cache[6] = vue.createElementVNode("div", { class: "humanMainHeaderCenter" }, "客服", -1)),
|
|
5421
|
+
vue.createElementVNode("div", _hoisted_3, [
|
|
5425
5422
|
vue.createElementVNode("span", {
|
|
5426
|
-
onClick: _cache[
|
|
5427
|
-
|
|
5428
|
-
|
|
5429
|
-
|
|
5430
|
-
|
|
5431
|
-
|
|
5432
|
-
|
|
5433
|
-
|
|
5434
|
-
])
|
|
5423
|
+
onClick: _cache[2] || (_cache[2] = ($event) => $data.visible = false),
|
|
5424
|
+
onTouchstart: _cache[3] || (_cache[3] = vue.withModifiers(($event) => $data.visible = false, ["stop"]))
|
|
5425
|
+
}, [..._cache[4] || (_cache[4] = [
|
|
5426
|
+
vue.createElementVNode("img", {
|
|
5427
|
+
src: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAYAAAByDd+UAAABzUlEQVR4AbzV207DQAwE0MKPA18Oe6ydKCnZdJNWRXFsj+ei9IXP25v/Evjdcn9b6a299OG5eCfwq0foCH19uvHiyah6An8gvRwQ+3q58eAVg8pIoGMB/YoI6+vpRssjQt6wWwIdAA5mRQAznyka2mh4wmpfBwIcEMyKEGaeKVyacHnBsm++MCACYnYGsOyjjoObOw9Y9ur3X1hgeyEStLEeRrBadl5uODnRwrIvfRSIQEBoVgxh5nXB3ILRwLJv+lEgIiEDs2IMMyszzKxwYebdehRIxICRWQmAKTNM4cDMw5oJJGbE0KwEKbNywzEf1mwgE4aMzeuCua2x4XwmcGhy5nAm0Fesf8bkwNyyH/bZQIaMY+ZnVNndcLIP+0wgI4YxEQRT5uA4sOy7/VEgA0YRC4BlN8Oy48Ky/+tHgYQMImIMy54Oc8tOA8u+6aNAAsKQGcKy33c3nOC0sOxL3wtEJAiJESz7qOPg5s4Dlr36fSACYh3biwGsjVMPLk3IvGDZN/8PHRByJIRln+00tOHzhNWeLwQ4FNheBLA2XnpoeUTMG7Z8ISBHxDoGuNh58Iq8MvKFOeiIIT3befHkUz2BDh8N1Vt76cNz8f4DAAD//8lliLUAAAAGSURBVAMAfghcOXqadykAAAAASUVORK5CYII=",
|
|
5428
|
+
alt: "",
|
|
5429
|
+
style: { "width": "14px" }
|
|
5430
|
+
}, null, -1)
|
|
5431
|
+
])], 32)
|
|
5435
5432
|
])
|
|
5436
5433
|
]),
|
|
5437
5434
|
vue.createElementVNode("iframe", {
|
|
@@ -5439,7 +5436,7 @@
|
|
|
5439
5436
|
src: $options.src,
|
|
5440
5437
|
frameborder: "0",
|
|
5441
5438
|
allowfullscreen: ""
|
|
5442
|
-
}, null, 8,
|
|
5439
|
+
}, null, 8, _hoisted_4)
|
|
5443
5440
|
], 2), [
|
|
5444
5441
|
[vue.vShow, $data.visible]
|
|
5445
5442
|
])
|
package/package.json
CHANGED
package/src/demo/App.vue
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div id="app">
|
|
3
|
-
<BokaHuman :token="'
|
|
3
|
+
<BokaHuman :token="'4e9d58f42ceab334b3b24d31ec437bef'" :product="'web'" :cust-type="''" :sub-cust-type="''" source="bkWeb-PC" :full-screen="0"/>
|
|
4
|
+
<div style="height: 200vh; width: 100vw; background: #fff;"></div>
|
|
4
5
|
</div>
|
|
5
6
|
</template>
|
|
6
7
|
|
|
7
8
|
<script>
|
|
8
9
|
import BokaHumanRaw from '../../../v2/src/BokaHumanV2.vue'
|
|
9
|
-
const BokaHuman = BokaHumanRaw
|
|
10
10
|
|
|
11
11
|
export default {
|
|
12
12
|
name: 'App',
|
|
13
13
|
components: {
|
|
14
|
-
BokaHuman
|
|
14
|
+
BokaHuman:BokaHumanRaw
|
|
15
15
|
},
|
|
16
16
|
mounted() {
|
|
17
17
|
|