boka-human-cliend-v3 0.0.50 → 0.0.52
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 +10 -0
- package/dist/boka-human-v3.umd.js +36 -24
- package/package.json +1 -1
- package/src/demo/App.vue +2 -2
|
@@ -480,9 +480,11 @@
|
|
|
480
480
|
.humanMainView {
|
|
481
481
|
position: fixed;
|
|
482
482
|
min-width: 360px;
|
|
483
|
+
width: 400px;
|
|
483
484
|
max-width: 600px;
|
|
484
485
|
min-height: 360px;
|
|
485
486
|
height: 80vh;
|
|
487
|
+
box-shadow: 0 0 20px rgba(0, 0, 0, 0.2);
|
|
486
488
|
}
|
|
487
489
|
.humanMainView.full {
|
|
488
490
|
padding-top: env(safe-area-inset-top);
|
|
@@ -496,6 +498,7 @@
|
|
|
496
498
|
left: 0;
|
|
497
499
|
z-index: 999;
|
|
498
500
|
overflow: hidden;
|
|
501
|
+
box-shadow: none;
|
|
499
502
|
}
|
|
500
503
|
.humanMainView .humanMainHeader {
|
|
501
504
|
width: 100%;
|
|
@@ -516,6 +519,13 @@
|
|
|
516
519
|
.humanMainView .humanMainHeader .humanMainHeaderRight {
|
|
517
520
|
text-align: right;
|
|
518
521
|
}
|
|
522
|
+
.humanMainView .humanMainHeader .humanMainHeaderLeft {
|
|
523
|
+
text-align: left;
|
|
524
|
+
}
|
|
525
|
+
.humanMainView .humanMainHeader .humanMainHeaderLeft .reload {
|
|
526
|
+
cursor: pointer;
|
|
527
|
+
color: #0074ff;
|
|
528
|
+
}
|
|
519
529
|
.humanMainView .humanMainHeader .humanMainHeaderLeft,
|
|
520
530
|
.humanMainView .humanMainHeader .humanMainHeaderRight {
|
|
521
531
|
width: 20%;
|
|
@@ -5229,15 +5229,16 @@
|
|
|
5229
5229
|
return "https://human.shboka.com";
|
|
5230
5230
|
},
|
|
5231
5231
|
src() {
|
|
5232
|
-
let { token, product, custType = "", subCustType, source, terminal = "" } = this;
|
|
5232
|
+
let { token, product, custType = "", subCustType, source, terminal = "", reloadTime } = this;
|
|
5233
5233
|
let { protocol, host } = location;
|
|
5234
5234
|
let domain = `${protocol}//${host}`;
|
|
5235
|
-
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()}`;
|
|
5235
|
+
return `${this.host}?token=${token}&product=${product}&custType=${custType}&subCustType=${subCustType}&source=${source}&human=1&isIFrame=true&terminal=${terminal}&domain=${encodeURIComponent(domain)}&time=${reloadTime || (/* @__PURE__ */ new Date()).getTime()}`;
|
|
5236
5236
|
}
|
|
5237
5237
|
},
|
|
5238
5238
|
data() {
|
|
5239
5239
|
return {
|
|
5240
5240
|
visible: false,
|
|
5241
|
+
reloadTime: (/* @__PURE__ */ new Date()).getTime(),
|
|
5241
5242
|
unreadCount: 0
|
|
5242
5243
|
};
|
|
5243
5244
|
},
|
|
@@ -5376,18 +5377,18 @@
|
|
|
5376
5377
|
restriction: "#humanViewOuter",
|
|
5377
5378
|
endOnly: true
|
|
5378
5379
|
/*restriction: () => {
|
|
5379
|
-
|
|
5380
|
-
|
|
5381
|
-
|
|
5382
|
-
|
|
5383
|
-
|
|
5384
|
-
|
|
5385
|
-
|
|
5386
|
-
|
|
5387
|
-
|
|
5388
|
-
|
|
5389
|
-
|
|
5390
|
-
|
|
5380
|
+
const scrollTop = window.pageYOffset || document.documentElement.scrollTop;
|
|
5381
|
+
const scrollLeft = window.pageXOffset || document.documentElement.scrollLeft;
|
|
5382
|
+
|
|
5383
|
+
return {
|
|
5384
|
+
left: scrollLeft,
|
|
5385
|
+
top: scrollTop,
|
|
5386
|
+
right: scrollLeft + window.innerWidth,
|
|
5387
|
+
bottom: scrollTop + window.innerHeight
|
|
5388
|
+
};
|
|
5389
|
+
},
|
|
5390
|
+
elementRect: { left: 0, right: 1, top: 0, bottom: 1 },
|
|
5391
|
+
endOnly: false*/
|
|
5391
5392
|
})
|
|
5392
5393
|
],
|
|
5393
5394
|
autoScroll: true,
|
|
@@ -5404,14 +5405,19 @@
|
|
|
5404
5405
|
}
|
|
5405
5406
|
}
|
|
5406
5407
|
});
|
|
5408
|
+
},
|
|
5409
|
+
reloadFrame() {
|
|
5410
|
+
console.log(this.$refs.humanFrame);
|
|
5411
|
+
this.reloadTime = (/* @__PURE__ */ new Date()).getTime();
|
|
5407
5412
|
}
|
|
5408
5413
|
}
|
|
5409
5414
|
};
|
|
5410
5415
|
const _hoisted_1 = { class: "boka-human-v2" };
|
|
5411
5416
|
const _hoisted_2 = { class: "humanMainHeader my-dialog__header" };
|
|
5412
|
-
const _hoisted_3 = { class: "
|
|
5413
|
-
const _hoisted_4 = { class: "
|
|
5414
|
-
const _hoisted_5 =
|
|
5417
|
+
const _hoisted_3 = { class: "humanMainHeaderLeft" };
|
|
5418
|
+
const _hoisted_4 = { class: "humanMainHeaderCenter" };
|
|
5419
|
+
const _hoisted_5 = { class: "humanMainHeaderRight" };
|
|
5420
|
+
const _hoisted_6 = ["src"];
|
|
5415
5421
|
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
5416
5422
|
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1, [
|
|
5417
5423
|
_cache[6] || (_cache[6] = vue.createElementVNode("div", {
|
|
@@ -5438,14 +5444,19 @@
|
|
|
5438
5444
|
class: vue.normalizeClass(["humanMainView", $props.fullScreen ? "full" : ""])
|
|
5439
5445
|
}, [
|
|
5440
5446
|
vue.createElementVNode("div", _hoisted_2, [
|
|
5441
|
-
|
|
5442
|
-
|
|
5443
|
-
|
|
5447
|
+
vue.createElementVNode("div", _hoisted_3, [
|
|
5448
|
+
vue.createElementVNode("span", {
|
|
5449
|
+
class: "reload",
|
|
5450
|
+
onClick: _cache[2] || (_cache[2] = (...args) => $options.reloadFrame && $options.reloadFrame(...args))
|
|
5451
|
+
}, "刷新")
|
|
5452
|
+
]),
|
|
5453
|
+
vue.createElementVNode("div", _hoisted_4, vue.toDisplayString($props.viewTitle || "客服"), 1),
|
|
5454
|
+
vue.createElementVNode("div", _hoisted_5, [
|
|
5444
5455
|
!$props.hideClose ? (vue.openBlock(), vue.createElementBlock("span", {
|
|
5445
5456
|
key: 0,
|
|
5446
|
-
onClick: _cache[
|
|
5447
|
-
onTouchstart: _cache[
|
|
5448
|
-
}, [..._cache[
|
|
5457
|
+
onClick: _cache[3] || (_cache[3] = ($event) => $data.visible = false),
|
|
5458
|
+
onTouchstart: _cache[4] || (_cache[4] = vue.withModifiers(($event) => $data.visible = false, ["stop"]))
|
|
5459
|
+
}, [..._cache[5] || (_cache[5] = [
|
|
5449
5460
|
vue.createElementVNode("img", {
|
|
5450
5461
|
src: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAYAAAByDd+UAAABzUlEQVR4AbzV207DQAwE0MKPA18Oe6ydKCnZdJNWRXFsj+ei9IXP25v/Evjdcn9b6a299OG5eCfwq0foCH19uvHiyah6An8gvRwQ+3q58eAVg8pIoGMB/YoI6+vpRssjQt6wWwIdAA5mRQAznyka2mh4wmpfBwIcEMyKEGaeKVyacHnBsm++MCACYnYGsOyjjoObOw9Y9ur3X1hgeyEStLEeRrBadl5uODnRwrIvfRSIQEBoVgxh5nXB3ILRwLJv+lEgIiEDs2IMMyszzKxwYebdehRIxICRWQmAKTNM4cDMw5oJJGbE0KwEKbNywzEf1mwgE4aMzeuCua2x4XwmcGhy5nAm0Fesf8bkwNyyH/bZQIaMY+ZnVNndcLIP+0wgI4YxEQRT5uA4sOy7/VEgA0YRC4BlN8Oy48Ky/+tHgYQMImIMy54Oc8tOA8u+6aNAAsKQGcKy33c3nOC0sOxL3wtEJAiJESz7qOPg5s4Dlr36fSACYh3biwGsjVMPLk3IvGDZN/8PHRByJIRln+00tOHzhNWeLwQ4FNheBLA2XnpoeUTMG7Z8ISBHxDoGuNh58Iq8MvKFOeiIIT3befHkUz2BDh8N1Vt76cNz8f4DAAD//8lliLUAAAAGSURBVAMAfghcOXqadykAAAAASUVORK5CYII=",
|
|
5451
5462
|
alt: "",
|
|
@@ -5456,10 +5467,11 @@
|
|
|
5456
5467
|
]),
|
|
5457
5468
|
vue.createElementVNode("iframe", {
|
|
5458
5469
|
id: "iframe",
|
|
5470
|
+
ref: "humanFrame",
|
|
5459
5471
|
src: $options.src,
|
|
5460
5472
|
frameborder: "0",
|
|
5461
5473
|
allowfullscreen: ""
|
|
5462
|
-
}, null, 8,
|
|
5474
|
+
}, null, 8, _hoisted_6)
|
|
5463
5475
|
], 2), [
|
|
5464
5476
|
[vue.vShow, $data.visible]
|
|
5465
5477
|
])
|
package/package.json
CHANGED
package/src/demo/App.vue
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div id="app">
|
|
3
|
-
<BokaHuman :token="'
|
|
3
|
+
<BokaHuman :token="'bearer 53b2251627e82b29b521d78c5ac9a9ea'" :product="'manageCenterPlus'" :cust-type="'manageCenterPlus'" :sub-cust-type="'standard'" source="pc" :full-screen="0"/>
|
|
4
4
|
<div style="height: 200vh; width: 100vw; background: #fff;"></div>
|
|
5
5
|
</div>
|
|
6
6
|
</template>
|
|
@@ -14,7 +14,7 @@ export default {
|
|
|
14
14
|
BokaHuman:BokaHumanRaw
|
|
15
15
|
},
|
|
16
16
|
mounted() {
|
|
17
|
-
|
|
17
|
+
|
|
18
18
|
}
|
|
19
19
|
}
|
|
20
20
|
</script>
|