@fle-ui/plus-im-record 0.0.7-beta.0 → 0.0.8-beta.0
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 +2 -2
- package/es/@types/index.d.ts +0 -620
- package/es/CardTag/index.d.ts +0 -3
- package/es/CardTag/index.js +0 -18
- package/es/ChatMessageItem/index.d.ts +0 -17
- package/es/ChatMessageItem/index.js +0 -130
- package/es/ChatMessageItem/index.less +0 -108
- package/es/ChatMessageList/index.d.ts +0 -26
- package/es/ChatMessageList/index.js +0 -56
- package/es/ChatMessageList/index.less +0 -33
- package/es/GoodsCard/index.d.ts +0 -14
- package/es/GoodsCard/index.js +0 -93
- package/es/GoodsCard/index.less +0 -49
- package/es/GoodsOrderCard/index.d.ts +0 -17
- package/es/GoodsOrderCard/index.js +0 -161
- package/es/GoodsOrderCard/index.less +0 -81
- package/es/Icon/index.d.ts +0 -8
- package/es/Icon/index.js +0 -11
- package/es/ParseSession/index.d.ts +0 -21
- package/es/ParseSession/index.js +0 -454
- package/es/ParseSession/index.less +0 -181
- package/es/api/index.d.ts +0 -29
- package/es/api/index.js +0 -48
- package/es/common/const/index.d.ts +0 -46
- package/es/common/const/index.js +0 -82
- package/es/common/utils/index.d.ts +0 -33
- package/es/common/utils/index.js +0 -169
- package/es/index.d.ts +0 -25
- package/es/index.js +0 -76
- package/es/styles/extends.less +0 -50
- package/es/styles/index.less +0 -35
- package/es/styles/vars.less +0 -8
- package/es/utils/index.d.ts +0 -14
- package/es/utils/index.js +0 -50
- package/lib/@types/index.d.ts +0 -620
- package/lib/CardTag/index.d.ts +0 -3
- package/lib/CardTag/index.js +0 -25
- package/lib/ChatMessageItem/index.d.ts +0 -17
- package/lib/ChatMessageItem/index.js +0 -136
- package/lib/ChatMessageItem/index.less +0 -108
- package/lib/ChatMessageList/index.d.ts +0 -26
- package/lib/ChatMessageList/index.js +0 -63
- package/lib/ChatMessageList/index.less +0 -33
- package/lib/GoodsCard/index.d.ts +0 -14
- package/lib/GoodsCard/index.js +0 -103
- package/lib/GoodsCard/index.less +0 -49
- package/lib/GoodsOrderCard/index.d.ts +0 -17
- package/lib/GoodsOrderCard/index.js +0 -169
- package/lib/GoodsOrderCard/index.less +0 -81
- package/lib/Icon/index.d.ts +0 -8
- package/lib/Icon/index.js +0 -18
- package/lib/ParseSession/index.d.ts +0 -21
- package/lib/ParseSession/index.js +0 -456
- package/lib/ParseSession/index.less +0 -181
- package/lib/api/index.d.ts +0 -29
- package/lib/api/index.js +0 -55
- package/lib/common/const/index.d.ts +0 -46
- package/lib/common/const/index.js +0 -88
- package/lib/common/utils/index.d.ts +0 -33
- package/lib/common/utils/index.js +0 -183
- package/lib/index.d.ts +0 -25
- package/lib/index.js +0 -85
- package/lib/styles/extends.less +0 -50
- package/lib/styles/index.less +0 -35
- package/lib/styles/vars.less +0 -8
- package/lib/utils/index.d.ts +0 -14
- package/lib/utils/index.js +0 -56
|
@@ -1,456 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
|
5
|
-
value: true
|
|
6
|
-
});
|
|
7
|
-
exports.pauseOtherVideo = exports.pauseAllVideo = exports.pauseAllAudio = exports.default = void 0;
|
|
8
|
-
var _react = _interopRequireWildcard(require("react"));
|
|
9
|
-
var _antd = require("antd");
|
|
10
|
-
var _reactStringReplace = _interopRequireDefault(require("react-string-replace"));
|
|
11
|
-
var _utils = require("../utils");
|
|
12
|
-
var _proComponents = require("@ant-design/pro-components");
|
|
13
|
-
var _icons = require("@ant-design/icons");
|
|
14
|
-
var _const = require("../common/const");
|
|
15
|
-
var _utils2 = require("../common/utils");
|
|
16
|
-
var _Icon = _interopRequireDefault(require("../Icon"));
|
|
17
|
-
var _GoodsCard = _interopRequireDefault(require("../GoodsCard"));
|
|
18
|
-
var _GoodsOrderCard = _interopRequireDefault(require("../GoodsOrderCard"));
|
|
19
|
-
var _2 = require("..");
|
|
20
|
-
require("./index.less");
|
|
21
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
22
|
-
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
23
|
-
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
24
|
-
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == _typeof(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(_typeof(e) + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, catch: function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }
|
|
25
|
-
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
|
26
|
-
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
|
27
|
-
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
28
|
-
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
29
|
-
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
30
|
-
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
31
|
-
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
32
|
-
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
33
|
-
var pauseAllAudio = exports.pauseAllAudio = function pauseAllAudio() {
|
|
34
|
-
var audio = document.getElementById('fxMessageAudio');
|
|
35
|
-
audio === null || audio === void 0 ? void 0 : audio.pause();
|
|
36
|
-
return audio;
|
|
37
|
-
};
|
|
38
|
-
var pauseOtherVideo = exports.pauseOtherVideo = function pauseOtherVideo(idClient) {
|
|
39
|
-
var videoElements = document.getElementsByTagName('video');
|
|
40
|
-
for (var i = 0; i < videoElements.length; i++) {
|
|
41
|
-
if (videoElements[i].id !== "fxMessageVideo-".concat(idClient)) {
|
|
42
|
-
videoElements[i].pause();
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
};
|
|
46
|
-
var pauseAllVideo = exports.pauseAllVideo = function pauseAllVideo() {
|
|
47
|
-
var videoElements = document.getElementsByTagName('video');
|
|
48
|
-
for (var i = 0; i < videoElements.length; i++) {
|
|
49
|
-
if (videoElements[i].id.startsWith('fxMessageVideo-')) {
|
|
50
|
-
videoElements[i].pause();
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
};
|
|
54
|
-
//
|
|
55
|
-
var ParseSession = function ParseSession(_ref) {
|
|
56
|
-
var prefix = _ref.prefix,
|
|
57
|
-
keyword = _ref.keyword,
|
|
58
|
-
msg = _ref.msg,
|
|
59
|
-
h5 = _ref.h5,
|
|
60
|
-
isSessionEnd = _ref.isSessionEnd,
|
|
61
|
-
onChartHistoryClick = _ref.onChartHistoryClick,
|
|
62
|
-
recordSession = _ref.recordSession;
|
|
63
|
-
var _useContext = (0, _react.useContext)(_2.ImContext),
|
|
64
|
-
api = _useContext.api;
|
|
65
|
-
var formRef = (0, _react.useRef)();
|
|
66
|
-
var audioRef = (0, _react.useRef)(null);
|
|
67
|
-
var _useState = (0, _react.useState)(false),
|
|
68
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
69
|
-
animationFlag = _useState2[0],
|
|
70
|
-
setAnimationFlag = _useState2[1];
|
|
71
|
-
var _useState3 = (0, _react.useState)(),
|
|
72
|
-
_useState4 = _slicedToArray(_useState3, 2),
|
|
73
|
-
contactInfo = _useState4[0],
|
|
74
|
-
setContactInfo = _useState4[1];
|
|
75
|
-
var attach = msg.attach || {};
|
|
76
|
-
var renderText = function renderText(preset) {
|
|
77
|
-
var text = (0, _reactStringReplace.default)(attach.content, /(https?:\/\/\S+)/gi, function (match) {
|
|
78
|
-
return /*#__PURE__*/_react.default.createElement("a", {
|
|
79
|
-
key: msg.idClient,
|
|
80
|
-
href: match,
|
|
81
|
-
target: "_blank",
|
|
82
|
-
rel: "noreferrer"
|
|
83
|
-
}, match);
|
|
84
|
-
});
|
|
85
|
-
var renderKeywordText = function renderKeywordText(str) {
|
|
86
|
-
if (!str || !keyword || typeof str !== 'string') return str;
|
|
87
|
-
var strArr = str.split(keyword);
|
|
88
|
-
return strArr.map(function (item, index) {
|
|
89
|
-
var isKeyword = index < strArr.length - 1;
|
|
90
|
-
return /*#__PURE__*/_react.default.createElement("span", {
|
|
91
|
-
key: index
|
|
92
|
-
}, item, isKeyword && /*#__PURE__*/_react.default.createElement("span", {
|
|
93
|
-
style: {
|
|
94
|
-
backgroundColor: 'orange',
|
|
95
|
-
borderRadius: 3
|
|
96
|
-
}
|
|
97
|
-
}, keyword));
|
|
98
|
-
});
|
|
99
|
-
};
|
|
100
|
-
return /*#__PURE__*/_react.default.createElement("div", {
|
|
101
|
-
className: "".concat(prefix, "-text")
|
|
102
|
-
}, preset || text.map(renderKeywordText));
|
|
103
|
-
};
|
|
104
|
-
var renderImage = function renderImage() {
|
|
105
|
-
return /*#__PURE__*/_react.default.createElement(_antd.Image, {
|
|
106
|
-
loading: "lazy",
|
|
107
|
-
className: "".concat(prefix, "-image"),
|
|
108
|
-
fallback: "https://yx-web-nosdn.netease.im/common/33d3e1fa8de771277ea4466564ef37aa/emptyImg.png",
|
|
109
|
-
src: "".concat(attach.content.url, "?x-oss-process=image/resize,h_150,m_lfit"),
|
|
110
|
-
height: 150,
|
|
111
|
-
preview: {
|
|
112
|
-
src: attach.content.url,
|
|
113
|
-
toolbarRender: function toolbarRender(originalNode) {
|
|
114
|
-
var _originalNode$props;
|
|
115
|
-
return h5 ? null : /*#__PURE__*/_react.default.createElement(_antd.Space, {
|
|
116
|
-
size: 12,
|
|
117
|
-
className: "fx-preview-toolbar-wrapper"
|
|
118
|
-
}, /*#__PURE__*/_react.default.createElement(_icons.DownloadOutlined, {
|
|
119
|
-
onClick: function onClick() {
|
|
120
|
-
attach.content.url && (0, _utils2.downloadByUrl)(attach.content.url);
|
|
121
|
-
}
|
|
122
|
-
}), (_originalNode$props = originalNode.props) === null || _originalNode$props === void 0 ? void 0 : _originalNode$props.children);
|
|
123
|
-
}
|
|
124
|
-
}
|
|
125
|
-
});
|
|
126
|
-
};
|
|
127
|
-
var renderFaq = function renderFaq() {
|
|
128
|
-
var faqList = attach.content || [];
|
|
129
|
-
return /*#__PURE__*/_react.default.createElement("div", {
|
|
130
|
-
className: "".concat(prefix, "-helps")
|
|
131
|
-
}, /*#__PURE__*/_react.default.createElement("img", {
|
|
132
|
-
src: "https://qa-oss.elebuys.com/tmpdir/202402241614290002520093.png"
|
|
133
|
-
}), faqList.map(function (item) {
|
|
134
|
-
return /*#__PURE__*/_react.default.createElement("p", {
|
|
135
|
-
key: item.id,
|
|
136
|
-
onClick: function onClick() {}
|
|
137
|
-
}, /*#__PURE__*/_react.default.createElement("span", {
|
|
138
|
-
className: "title"
|
|
139
|
-
}, item.title), /*#__PURE__*/_react.default.createElement(_Icon.default, {
|
|
140
|
-
type: 'icon-zhankaishouqi',
|
|
141
|
-
rotate: -90,
|
|
142
|
-
style: {
|
|
143
|
-
color: '#aaa',
|
|
144
|
-
fontSize: 13,
|
|
145
|
-
flexShrink: 0,
|
|
146
|
-
fontWeight: 400
|
|
147
|
-
}
|
|
148
|
-
}));
|
|
149
|
-
}));
|
|
150
|
-
};
|
|
151
|
-
var renderFaqLink = function renderFaqLink() {
|
|
152
|
-
var _attach$content, _attach$content2, _attach$content3;
|
|
153
|
-
return /*#__PURE__*/_react.default.createElement("div", {
|
|
154
|
-
className: "".concat(prefix, "-faqlink")
|
|
155
|
-
}, /*#__PURE__*/_react.default.createElement("h3", null, (_attach$content = attach.content) === null || _attach$content === void 0 ? void 0 : _attach$content.title), /*#__PURE__*/_react.default.createElement("a", {
|
|
156
|
-
href: (_attach$content2 = attach.content) === null || _attach$content2 === void 0 ? void 0 : _attach$content2.url,
|
|
157
|
-
target: "_blank",
|
|
158
|
-
rel: "noreferrer"
|
|
159
|
-
}, (_attach$content3 = attach.content) === null || _attach$content3 === void 0 ? void 0 : _attach$content3.url));
|
|
160
|
-
};
|
|
161
|
-
(0, _react.useEffect)(function () {
|
|
162
|
-
if (attach.type === 'formCustomer' && msg.idServer) {
|
|
163
|
-
api.getContact({
|
|
164
|
-
msgId: msg.idServer
|
|
165
|
-
}).then(function (res) {
|
|
166
|
-
var _formRef$current;
|
|
167
|
-
setContactInfo(res.data);
|
|
168
|
-
(_formRef$current = formRef.current) === null || _formRef$current === void 0 ? void 0 : _formRef$current.setFieldsValue(res.data || {});
|
|
169
|
-
});
|
|
170
|
-
}
|
|
171
|
-
}, [msg.idServer, attach.type, attach.submission]);
|
|
172
|
-
var isSubmitForm = (0, _react.useMemo)(function () {
|
|
173
|
-
if (contactInfo && contactInfo.contactName && contactInfo.contactPhone || attach.submission) {
|
|
174
|
-
return true;
|
|
175
|
-
} else {
|
|
176
|
-
return false;
|
|
177
|
-
}
|
|
178
|
-
}, [contactInfo, attach]);
|
|
179
|
-
var renderFormCustomer = function renderFormCustomer() {
|
|
180
|
-
return /*#__PURE__*/_react.default.createElement("div", {
|
|
181
|
-
className: "".concat(prefix, "-form")
|
|
182
|
-
}, /*#__PURE__*/_react.default.createElement("img", {
|
|
183
|
-
src: "https://qa-oss.elebuys.com/tmpdir/202402261955060002520212.png"
|
|
184
|
-
}), /*#__PURE__*/_react.default.createElement(_proComponents.ProForm, {
|
|
185
|
-
formRef: formRef,
|
|
186
|
-
autoFocusFirstInput: false,
|
|
187
|
-
disabled: isSubmitForm || isSessionEnd,
|
|
188
|
-
initialValues: contactInfo || {},
|
|
189
|
-
submitter: {
|
|
190
|
-
render: function render() {
|
|
191
|
-
return /*#__PURE__*/_react.default.createElement(_antd.Button, {
|
|
192
|
-
style: {
|
|
193
|
-
width: '100%'
|
|
194
|
-
},
|
|
195
|
-
type: "primary",
|
|
196
|
-
size: "large",
|
|
197
|
-
onClick: /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
198
|
-
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
199
|
-
while (1) switch (_context.prev = _context.next) {
|
|
200
|
-
case 0:
|
|
201
|
-
case "end":
|
|
202
|
-
return _context.stop();
|
|
203
|
-
}
|
|
204
|
-
}, _callee);
|
|
205
|
-
}))
|
|
206
|
-
}, isSubmitForm ? '已提交' : '提交');
|
|
207
|
-
}
|
|
208
|
-
}
|
|
209
|
-
}, /*#__PURE__*/_react.default.createElement(_proComponents.ProFormText, {
|
|
210
|
-
rules: [{
|
|
211
|
-
required: true,
|
|
212
|
-
message: '请输入企业名称'
|
|
213
|
-
}],
|
|
214
|
-
name: "enterpriseName",
|
|
215
|
-
placeholder: "\u8BF7\u8F93\u5165\u4F01\u4E1A\u540D\u79F0"
|
|
216
|
-
}), /*#__PURE__*/_react.default.createElement(_proComponents.ProFormText, {
|
|
217
|
-
rules: [{
|
|
218
|
-
required: true,
|
|
219
|
-
message: '请输入姓名'
|
|
220
|
-
}],
|
|
221
|
-
name: "contactName",
|
|
222
|
-
placeholder: "\u8BF7\u8F93\u5165\u8054\u7CFB\u4EBA\u59D3\u540D"
|
|
223
|
-
}), /*#__PURE__*/_react.default.createElement(_proComponents.ProFormText, {
|
|
224
|
-
rules: [{
|
|
225
|
-
required: true,
|
|
226
|
-
message: '请输入手机号'
|
|
227
|
-
}, {
|
|
228
|
-
validator: function () {
|
|
229
|
-
var _validator = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(_, value) {
|
|
230
|
-
var reg;
|
|
231
|
-
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
232
|
-
while (1) switch (_context2.prev = _context2.next) {
|
|
233
|
-
case 0:
|
|
234
|
-
reg = /^1\d{10}$/;
|
|
235
|
-
if (!(value && (value === null || value === void 0 ? void 0 : value.length) !== 11 && !reg.test(value))) {
|
|
236
|
-
_context2.next = 5;
|
|
237
|
-
break;
|
|
238
|
-
}
|
|
239
|
-
return _context2.abrupt("return", Promise.reject(new Error('手机号格式不正确')));
|
|
240
|
-
case 5:
|
|
241
|
-
return _context2.abrupt("return", Promise.resolve());
|
|
242
|
-
case 6:
|
|
243
|
-
case "end":
|
|
244
|
-
return _context2.stop();
|
|
245
|
-
}
|
|
246
|
-
}, _callee2);
|
|
247
|
-
}));
|
|
248
|
-
function validator(_x, _x2) {
|
|
249
|
-
return _validator.apply(this, arguments);
|
|
250
|
-
}
|
|
251
|
-
return validator;
|
|
252
|
-
}()
|
|
253
|
-
}],
|
|
254
|
-
name: "contactPhone",
|
|
255
|
-
placeholder: "\u8BF7\u8F93\u5165\u60A8\u7684\u8054\u7CFB\u7535\u8BDD"
|
|
256
|
-
})));
|
|
257
|
-
};
|
|
258
|
-
var renderNotification = function renderNotification() {
|
|
259
|
-
return null;
|
|
260
|
-
};
|
|
261
|
-
var renderAudio = function renderAudio() {
|
|
262
|
-
var flow = msg.flow;
|
|
263
|
-
var duration = Math.floor(attach.content.dur) || 0;
|
|
264
|
-
var durations = {
|
|
265
|
-
mm: Math.floor(duration / 60),
|
|
266
|
-
ss: duration % 60
|
|
267
|
-
};
|
|
268
|
-
return /*#__PURE__*/_react.default.createElement("div", {
|
|
269
|
-
className: "".concat(prefix, "-audio"),
|
|
270
|
-
ref: audioRef
|
|
271
|
-
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
272
|
-
className: flow === 'in' ? "".concat(prefix, "-audio-in") : "".concat(prefix, "-audio-out"),
|
|
273
|
-
onClick: function onClick() {
|
|
274
|
-
var _audioRef$current;
|
|
275
|
-
pauseAllVideo();
|
|
276
|
-
var oldAudio = pauseAllAudio();
|
|
277
|
-
var msgId = oldAudio === null || oldAudio === void 0 ? void 0 : oldAudio.getAttribute('msgId');
|
|
278
|
-
if (msgId === msg.idClient) {
|
|
279
|
-
setAnimationFlag(false);
|
|
280
|
-
return;
|
|
281
|
-
}
|
|
282
|
-
var audio = new Audio(attach.content.url);
|
|
283
|
-
audio.id = 'fxMessageAudio';
|
|
284
|
-
audio.setAttribute('msgId', msg.idClient);
|
|
285
|
-
audio.play();
|
|
286
|
-
(_audioRef$current = audioRef.current) === null || _audioRef$current === void 0 ? void 0 : _audioRef$current.appendChild(audio);
|
|
287
|
-
audio.addEventListener('ended', function () {
|
|
288
|
-
var _audio$parentNode;
|
|
289
|
-
setAnimationFlag(false);
|
|
290
|
-
(_audio$parentNode = audio.parentNode) === null || _audio$parentNode === void 0 ? void 0 : _audio$parentNode.removeChild(audio);
|
|
291
|
-
});
|
|
292
|
-
audio.addEventListener('pause', function () {
|
|
293
|
-
var _audio$parentNode2;
|
|
294
|
-
setAnimationFlag(false);
|
|
295
|
-
(_audio$parentNode2 = audio.parentNode) === null || _audio$parentNode2 === void 0 ? void 0 : _audio$parentNode2.removeChild(audio);
|
|
296
|
-
});
|
|
297
|
-
setAnimationFlag(true);
|
|
298
|
-
}
|
|
299
|
-
}, /*#__PURE__*/_react.default.createElement("span", null, "".concat(durations.mm > 0 ? "".concat(durations.mm, "'") : '', " ").concat(durations.ss, "\"")), /*#__PURE__*/_react.default.createElement("span", {
|
|
300
|
-
className: "".concat(prefix, "-audio-icon")
|
|
301
|
-
}, animationFlag ? /*#__PURE__*/_react.default.createElement("img", {
|
|
302
|
-
src: "https://qa-oss.elebuys.com/tmpdir/202401152050070000640984.gif"
|
|
303
|
-
}) : /*#__PURE__*/_react.default.createElement(_Icon.default, {
|
|
304
|
-
type: "icon-a-yuyin2"
|
|
305
|
-
}))));
|
|
306
|
-
};
|
|
307
|
-
var renderVideo = function renderVideo() {
|
|
308
|
-
var _attach$content4;
|
|
309
|
-
var url = "".concat(attach.content.url, "?download=").concat(msg.idClient, ".").concat((_attach$content4 = attach.content) === null || _attach$content4 === void 0 ? void 0 : _attach$content4.ext);
|
|
310
|
-
var poster = "".concat(attach.content.url, "?x-oss-process=video/snapshot,t_100,f_jpg,m_fast");
|
|
311
|
-
return /*#__PURE__*/_react.default.createElement("video", {
|
|
312
|
-
poster: poster,
|
|
313
|
-
playsInline: true,
|
|
314
|
-
preload: "auto",
|
|
315
|
-
src: url,
|
|
316
|
-
id: "fxMessageVideo-".concat(msg.idClient),
|
|
317
|
-
controls: true,
|
|
318
|
-
onPlay: function onPlay() {
|
|
319
|
-
pauseOtherVideo(msg.idClient);
|
|
320
|
-
pauseAllAudio();
|
|
321
|
-
}
|
|
322
|
-
// onCanPlay={(e: any) => {
|
|
323
|
-
// setTimeout(() => {
|
|
324
|
-
// e.target?.pause();
|
|
325
|
-
// }, 0);
|
|
326
|
-
// }}
|
|
327
|
-
,
|
|
328
|
-
onError: function onError() {
|
|
329
|
-
_antd.message.warning('视频播放失败');
|
|
330
|
-
}
|
|
331
|
-
});
|
|
332
|
-
};
|
|
333
|
-
var renderFile = function renderFile() {
|
|
334
|
-
var _attach$content5, _attach$content6, _attach$content7;
|
|
335
|
-
if (_const.fileTypes.video.includes((_attach$content5 = attach.content) === null || _attach$content5 === void 0 ? void 0 : _attach$content5.ext)) {
|
|
336
|
-
return renderVideo();
|
|
337
|
-
}
|
|
338
|
-
if (_const.fileTypes.audio.includes((_attach$content6 = attach.content) === null || _attach$content6 === void 0 ? void 0 : _attach$content6.ext)) {
|
|
339
|
-
return renderAudio();
|
|
340
|
-
}
|
|
341
|
-
if (_const.fileTypes.img.includes((_attach$content7 = attach.content) === null || _attach$content7 === void 0 ? void 0 : _attach$content7.ext)) {
|
|
342
|
-
return renderImage();
|
|
343
|
-
}
|
|
344
|
-
return /*#__PURE__*/_react.default.createElement("div", {
|
|
345
|
-
className: "".concat(prefix, "-file")
|
|
346
|
-
}, /*#__PURE__*/_react.default.createElement(_Icon.default, {
|
|
347
|
-
className: "".concat(prefix, "-file-icon"),
|
|
348
|
-
type: 'icon-wenjian'
|
|
349
|
-
}), /*#__PURE__*/_react.default.createElement("div", {
|
|
350
|
-
className: "".concat(prefix, "-file-info")
|
|
351
|
-
}, /*#__PURE__*/_react.default.createElement("a", {
|
|
352
|
-
download: attach.content.fileName,
|
|
353
|
-
href: (0, _utils.addUrlSearch)(attach.content.url, "download=".concat(attach.content.fileName)),
|
|
354
|
-
target: "_blank",
|
|
355
|
-
rel: "noreferrer"
|
|
356
|
-
}, attach.content.fileName), /*#__PURE__*/_react.default.createElement("span", null, (0, _utils.parseFileSize)(attach.content.size))));
|
|
357
|
-
};
|
|
358
|
-
var renderOrderCard = function renderOrderCard() {
|
|
359
|
-
var _attach$content8, _attach$content9;
|
|
360
|
-
return /*#__PURE__*/_react.default.createElement(_GoodsOrderCard.default, {
|
|
361
|
-
prefix: prefix,
|
|
362
|
-
recordSession: recordSession,
|
|
363
|
-
orderSn: (_attach$content8 = attach.content) === null || _attach$content8 === void 0 ? void 0 : _attach$content8.orderSn,
|
|
364
|
-
orderId: (_attach$content9 = attach.content) === null || _attach$content9 === void 0 ? void 0 : _attach$content9.orderId
|
|
365
|
-
});
|
|
366
|
-
};
|
|
367
|
-
var renderGoodsCard = function renderGoodsCard() {
|
|
368
|
-
return /*#__PURE__*/_react.default.createElement(_GoodsCard.default, {
|
|
369
|
-
prefix: prefix,
|
|
370
|
-
content: attach.content || {}
|
|
371
|
-
});
|
|
372
|
-
};
|
|
373
|
-
var renderChartRecord = function renderChartRecord() {
|
|
374
|
-
var _attach$content10, _attach$content11, _attach$content12;
|
|
375
|
-
var records = ((_attach$content10 = attach.content) === null || _attach$content10 === void 0 ? void 0 : _attach$content10.items) || [];
|
|
376
|
-
var msgIds = ((_attach$content11 = attach.content) === null || _attach$content11 === void 0 ? void 0 : _attach$content11.msgIds) || [];
|
|
377
|
-
var title = (_attach$content12 = attach.content) === null || _attach$content12 === void 0 ? void 0 : _attach$content12.title;
|
|
378
|
-
var list = records.filter(function (v) {
|
|
379
|
-
var _v$attach;
|
|
380
|
-
return ![_const.imMsgTypes.event].includes((_v$attach = v.attach) === null || _v$attach === void 0 ? void 0 : _v$attach.type);
|
|
381
|
-
}).slice(0, 4);
|
|
382
|
-
return /*#__PURE__*/_react.default.createElement("div", {
|
|
383
|
-
className: "".concat(prefix, "-charthistory"),
|
|
384
|
-
onClick: function onClick() {
|
|
385
|
-
return onChartHistoryClick === null || onChartHistoryClick === void 0 ? void 0 : onChartHistoryClick({
|
|
386
|
-
title: title,
|
|
387
|
-
msgIds: msgIds
|
|
388
|
-
});
|
|
389
|
-
}
|
|
390
|
-
}, /*#__PURE__*/_react.default.createElement("h4", null, title), list.map(function (item, i) {
|
|
391
|
-
return /*#__PURE__*/_react.default.createElement("p", {
|
|
392
|
-
key: i,
|
|
393
|
-
className: "one-line-text"
|
|
394
|
-
}, item.from, ": ", (0, _utils2.getSimplifyMsg)(item));
|
|
395
|
-
}), /*#__PURE__*/_react.default.createElement("div", {
|
|
396
|
-
className: "".concat(prefix, "-charthistory-from")
|
|
397
|
-
}, /*#__PURE__*/_react.default.createElement("span", {
|
|
398
|
-
className: "".concat(prefix, "-charthistory-from-icon")
|
|
399
|
-
}, /*#__PURE__*/_react.default.createElement(_Icon.default, {
|
|
400
|
-
type: 'icon-kefu',
|
|
401
|
-
style: {
|
|
402
|
-
fontSize: 12,
|
|
403
|
-
color: '#fff'
|
|
404
|
-
}
|
|
405
|
-
})), "\u7CFB\u7EDF\u8F6C\u53D1"));
|
|
406
|
-
};
|
|
407
|
-
var renderOfflineSupport = function renderOfflineSupport() {
|
|
408
|
-
var _attach$content13, _attach$content14;
|
|
409
|
-
return /*#__PURE__*/_react.default.createElement("div", {
|
|
410
|
-
className: "".concat(prefix, "-text")
|
|
411
|
-
}, (_attach$content13 = attach.content) === null || _attach$content13 === void 0 ? void 0 : _attach$content13.supportDesc, ((_attach$content14 = attach.content) === null || _attach$content14 === void 0 ? void 0 : _attach$content14.contact) && /*#__PURE__*/_react.default.createElement("a", {
|
|
412
|
-
href: "tel:".concat(attach.content.contact),
|
|
413
|
-
rel: "noreferrer"
|
|
414
|
-
}, attach.content.contact));
|
|
415
|
-
};
|
|
416
|
-
var renderMsgContent = function renderMsgContent() {
|
|
417
|
-
try {
|
|
418
|
-
switch (attach.type) {
|
|
419
|
-
case _const.imMsgTypes.text:
|
|
420
|
-
return renderText();
|
|
421
|
-
case _const.imMsgTypes.image:
|
|
422
|
-
return renderImage();
|
|
423
|
-
case _const.imMsgTypes.video:
|
|
424
|
-
return renderVideo();
|
|
425
|
-
case _const.imMsgTypes.audio:
|
|
426
|
-
return renderAudio();
|
|
427
|
-
case _const.imMsgTypes.link:
|
|
428
|
-
return renderText();
|
|
429
|
-
case _const.imMsgTypes.file:
|
|
430
|
-
return renderFile();
|
|
431
|
-
case _const.imMsgTypes.faq:
|
|
432
|
-
return renderFaq();
|
|
433
|
-
case _const.imMsgTypes.faqLink:
|
|
434
|
-
return renderFaqLink();
|
|
435
|
-
case _const.imMsgTypes.formCustomer:
|
|
436
|
-
return renderFormCustomer();
|
|
437
|
-
case _const.imMsgTypes.tip:
|
|
438
|
-
return renderNotification();
|
|
439
|
-
case _const.imMsgTypes.order:
|
|
440
|
-
return renderOrderCard();
|
|
441
|
-
case _const.imMsgTypes.product:
|
|
442
|
-
return renderGoodsCard();
|
|
443
|
-
case _const.imMsgTypes.chatrecord:
|
|
444
|
-
return renderChartRecord();
|
|
445
|
-
case _const.imMsgTypes.offlineSupport:
|
|
446
|
-
return renderOfflineSupport();
|
|
447
|
-
default:
|
|
448
|
-
return '';
|
|
449
|
-
}
|
|
450
|
-
} catch (error) {
|
|
451
|
-
return '';
|
|
452
|
-
}
|
|
453
|
-
};
|
|
454
|
-
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, renderMsgContent());
|
|
455
|
-
};
|
|
456
|
-
var _default = exports.default = ParseSession;
|
|
@@ -1,181 +0,0 @@
|
|
|
1
|
-
@prefix: chart-messages-item;
|
|
2
|
-
|
|
3
|
-
.@{prefix} {
|
|
4
|
-
&-text {
|
|
5
|
-
padding: 8px;
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
&-image {
|
|
9
|
-
// padding: 4px;
|
|
10
|
-
border-radius: 6px;
|
|
11
|
-
max-width: 200px;
|
|
12
|
-
max-height: 200px;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
video {
|
|
16
|
-
width: 100%;
|
|
17
|
-
height: 100%;
|
|
18
|
-
max-width: 200px;
|
|
19
|
-
max-height: 200px;
|
|
20
|
-
border-radius: 6px;
|
|
21
|
-
object-fit: fill;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
&-audio {
|
|
25
|
-
padding: 8px;
|
|
26
|
-
|
|
27
|
-
&-in,
|
|
28
|
-
&-out {
|
|
29
|
-
width: 90px;
|
|
30
|
-
display: flex;
|
|
31
|
-
justify-content: space-between;
|
|
32
|
-
cursor: pointer;
|
|
33
|
-
.@{prefix}-audio-icon {
|
|
34
|
-
display: flex;
|
|
35
|
-
justify-content: center;
|
|
36
|
-
align-items: center;
|
|
37
|
-
margin-top: 2px;
|
|
38
|
-
width: 16px;
|
|
39
|
-
height: 16px;
|
|
40
|
-
font-size: 16px;
|
|
41
|
-
img {
|
|
42
|
-
display: block;
|
|
43
|
-
height: 100%;
|
|
44
|
-
transform: translate(2px, 0);
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
&-in {
|
|
49
|
-
flex-direction: row-reverse;
|
|
50
|
-
.@{prefix}-audio-icon {
|
|
51
|
-
transform: rotate(180deg);
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
&-file {
|
|
57
|
-
display: flex;
|
|
58
|
-
justify-content: space-between;
|
|
59
|
-
padding: 8px 8px 8px 12px;
|
|
60
|
-
&-icon {
|
|
61
|
-
font-size: 28px;
|
|
62
|
-
color: #2c6bffff;
|
|
63
|
-
}
|
|
64
|
-
&-info {
|
|
65
|
-
padding-left: 10px;
|
|
66
|
-
display: flex;
|
|
67
|
-
flex-direction: column;
|
|
68
|
-
color: #777;
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
&-helps {
|
|
73
|
-
width: 276px;
|
|
74
|
-
color: #333;
|
|
75
|
-
img {
|
|
76
|
-
display: block;
|
|
77
|
-
width: 276px;
|
|
78
|
-
}
|
|
79
|
-
p {
|
|
80
|
-
margin: 0;
|
|
81
|
-
padding: 10px 8px;
|
|
82
|
-
font-size: 14px;
|
|
83
|
-
border-top: 1px solid #e4ecff;
|
|
84
|
-
cursor: pointer;
|
|
85
|
-
display: flex;
|
|
86
|
-
gap: 8px;
|
|
87
|
-
.title {
|
|
88
|
-
flex: 1;
|
|
89
|
-
word-break: break-all;
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
&-faqlink {
|
|
95
|
-
padding: 8px;
|
|
96
|
-
h3 {
|
|
97
|
-
margin: 0;
|
|
98
|
-
font-size: 14px;
|
|
99
|
-
color: #333;
|
|
100
|
-
font-weight: 600;
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
&-form {
|
|
105
|
-
width: 272px;
|
|
106
|
-
.fx-form {
|
|
107
|
-
padding: 0 10px 10px 10px;
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
img {
|
|
111
|
-
display: block;
|
|
112
|
-
width: 272px;
|
|
113
|
-
margin-bottom: 16px;
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
&-code {
|
|
117
|
-
display: flex;
|
|
118
|
-
justify-content: space-between;
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
.fx-form-item {
|
|
122
|
-
margin-bottom: 20px;
|
|
123
|
-
.fx-form-item-explain-error {
|
|
124
|
-
font-size: 12px;
|
|
125
|
-
}
|
|
126
|
-
.fx-input[disabled] {
|
|
127
|
-
color: #999;
|
|
128
|
-
}
|
|
129
|
-
}
|
|
130
|
-
.fx-btn-primary:disabled {
|
|
131
|
-
color: #999;
|
|
132
|
-
}
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
&-charthistory {
|
|
136
|
-
padding: 8px;
|
|
137
|
-
min-width: 272px;
|
|
138
|
-
max-width: 400px;
|
|
139
|
-
cursor: pointer;
|
|
140
|
-
h4 {
|
|
141
|
-
font-weight: 600;
|
|
142
|
-
margin-bottom: 5px;
|
|
143
|
-
color: #333;
|
|
144
|
-
}
|
|
145
|
-
p {
|
|
146
|
-
margin-bottom: 4px;
|
|
147
|
-
font-size: 12px;
|
|
148
|
-
color: #777;
|
|
149
|
-
}
|
|
150
|
-
&-from {
|
|
151
|
-
display: flex;
|
|
152
|
-
align-items: center;
|
|
153
|
-
border-top: 1px solid #eee;
|
|
154
|
-
padding-top: 5px;
|
|
155
|
-
color: #777;
|
|
156
|
-
font-size: 12px;
|
|
157
|
-
&-icon {
|
|
158
|
-
display: flex;
|
|
159
|
-
justify-content: center;
|
|
160
|
-
align-items: center;
|
|
161
|
-
width: 16px;
|
|
162
|
-
height: 16px;
|
|
163
|
-
border-radius: 50%;
|
|
164
|
-
margin-right: 3px;
|
|
165
|
-
background-color: #2c6bffff;
|
|
166
|
-
}
|
|
167
|
-
}
|
|
168
|
-
}
|
|
169
|
-
}
|
|
170
|
-
|
|
171
|
-
.fx-preview-toolbar-wrapper {
|
|
172
|
-
position: fixed;
|
|
173
|
-
bottom: 32px;
|
|
174
|
-
left: 50%;
|
|
175
|
-
padding: 0 24px;
|
|
176
|
-
color: #fff;
|
|
177
|
-
font-size: 20px;
|
|
178
|
-
background-color: rgba(0, 0, 0, 0.1);
|
|
179
|
-
border-radius: 100px;
|
|
180
|
-
transform: translateX(-50%);
|
|
181
|
-
}
|
package/lib/api/index.d.ts
DELETED
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
declare const baseURLMap: {
|
|
2
|
-
dev: string;
|
|
3
|
-
test: string;
|
|
4
|
-
qa: string;
|
|
5
|
-
prod: string;
|
|
6
|
-
};
|
|
7
|
-
export type Env = keyof typeof baseURLMap;
|
|
8
|
-
interface ApiMethods {
|
|
9
|
-
getAccountInfoByAccid: (data: {
|
|
10
|
-
accids: string[];
|
|
11
|
-
}) => Promise<any>;
|
|
12
|
-
getProductById: (data: {
|
|
13
|
-
productId: number;
|
|
14
|
-
relationId: string | number;
|
|
15
|
-
relationType: string | number;
|
|
16
|
-
}) => Promise<any>;
|
|
17
|
-
getCSOrder: (data: {
|
|
18
|
-
orderSn: number | string;
|
|
19
|
-
orderId: any;
|
|
20
|
-
accid: string;
|
|
21
|
-
relationId?: string | number;
|
|
22
|
-
relationType?: number;
|
|
23
|
-
}) => Promise<any>;
|
|
24
|
-
getContact: (params: {
|
|
25
|
-
msgId?: string;
|
|
26
|
-
}) => Promise<any>;
|
|
27
|
-
}
|
|
28
|
-
export declare const apiCreate: (_env?: Env, token?: string) => ApiMethods;
|
|
29
|
-
export {};
|