优化页面

This commit is contained in:
pengxiaolong
2025-06-11 22:16:44 +08:00
parent 3c2d7e5959
commit 931d867c09
806 changed files with 87462 additions and 331 deletions

View File

@@ -0,0 +1,41 @@
"use strict";
const TUIKit_tuiCustomerServicePlugin_utils_env = require("../utils/env.js");
const common_vendor = require("../../../common/vendor.js");
const _sfc_main = {
props: {
src: {
type: String,
default: ""
},
width: {
type: String,
default: "16px"
},
height: {
type: String,
default: "16px"
}
},
setup(props) {
return {
props,
isApp: TUIKit_tuiCustomerServicePlugin_utils_env.isApp
};
}
};
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
return common_vendor.e({
a: $setup.isApp
}, $setup.isApp ? {
b: $setup.props.src,
c: $setup.props.width,
d: $setup.props.height
} : {
e: $setup.props.src,
f: $setup.props.width,
g: $setup.props.height
});
}
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-d0031c07"]]);
wx.createComponent(Component);
//# sourceMappingURL=../../../../.sourcemap/mp-weixin/TUIKit/tui-customer-service-plugin/components/customer-icon.js.map

View File

@@ -0,0 +1,4 @@
{
"component": true,
"usingComponents": {}
}

View File

@@ -0,0 +1 @@
<view class="common-icon-container data-v-d0031c07"><image wx:if="{{a}}" class="common-icon data-v-d0031c07" src="{{b}}" style="{{'width:' + c + ';' + ('height:' + d)}}"/><image wx:else class="common-icon data-v-d0031c07" src="{{e}}" style="{{'width:' + f + ';' + ('height:' + g)}}"></image></view>

View File

@@ -0,0 +1,30 @@
/**
* 这里是uni-app内置的常用样式变量
*
* uni-app 官方扩展插件及插件市场https://ext.dcloud.net.cn上很多三方插件均使用了这些样式变量
* 如果你是插件开发者建议你使用scss预处理并在插件代码中直接使用这些变量无需 import 这个文件方便用户通过搭积木的方式开发整体风格一致的App
*
*/
/**
* 如果你是App开发者插件使用者你可以通过修改这些变量来定制自己的插件主题实现自定义主题功能
*
* 如果你的项目同样使用了scss预处理你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
*/
/* 颜色变量 */
/* 行为相关颜色 */
/* 文字基本颜色 */
/* 背景颜色 */
/* 边框颜色 */
/* 尺寸变量 */
/* 文字尺寸 */
/* 图片尺寸 */
/* Border Radius */
/* 水平间距 */
/* 垂直间距 */
/* 透明度 */
/* 文章场景相关 */
.common-icon-container.data-v-d0031c07 {
display: flex;
justify-content: center;
align-items: center;
}

View File

@@ -0,0 +1,62 @@
"use strict";
const TUIKit_tuiCustomerServicePlugin_adapterVue = require("../adapter-vue.js");
const common_assets = require("../../../common/assets.js");
const common_vendor = require("../../../common/vendor.js");
const Icon = () => "./customer-icon.js";
const { computed } = TUIKit_tuiCustomerServicePlugin_adapterVue.vue;
const _sfc_main = {
components: {
Icon
},
props: {
payload: {
type: Object,
default: () => ({})
}
},
emits: ["sendMessage"],
setup(props, { emit }) {
const content = computed(() => {
var _a;
return ((_a = props == null ? void 0 : props.payload) == null ? void 0 : _a.content) || {
header: void 0,
items: []
};
});
const handleContentListItemClick = (branch) => {
emit("sendMessage", { text: branch.content });
};
return {
content,
handleContentListItemClick,
iconRight: common_assets.iconRight
};
}
};
if (!Array) {
const _component_Icon = common_vendor.resolveComponent("Icon");
_component_Icon();
}
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
return common_vendor.e({
a: $setup.content.header || $setup.content.title
}, $setup.content.header || $setup.content.title ? {
b: common_vendor.t($setup.content.header || $setup.content.title)
} : {}, {
c: common_vendor.f($setup.content.items, (item, index, i0) => {
return {
a: common_vendor.t(item.content),
b: "00f6aa80-0-" + i0,
c: index,
d: common_vendor.o$1(($event) => $setup.handleContentListItemClick(item), index)
};
}),
d: common_vendor.p({
src: $setup.iconRight
}),
e: $setup.content.header ? "1px 0 0px 0" : "0px 0 1px 0"
});
}
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render]]);
wx.createComponent(Component);
//# sourceMappingURL=../../../../.sourcemap/mp-weixin/TUIKit/tui-customer-service-plugin/components/message-branch.js.map

View File

@@ -0,0 +1,6 @@
{
"component": true,
"usingComponents": {
"icon": "./customer-icon"
}
}

View File

@@ -0,0 +1 @@
<view class="branch-card"><view wx:if="{{a}}" class="branch-title">{{b}}</view><view wx:for="{{c}}" wx:for-item="item" wx:key="c" class="branch-item" style="{{'border-width:' + e}}" bindtap="{{item.d}}">{{item.a}} <icon wx:if="{{d}}" u-i="{{item.b}}" bind:__l="__l" u-p="{{d}}"/></view></view>

View File

@@ -0,0 +1,44 @@
/**
* 这里是uni-app内置的常用样式变量
*
* uni-app 官方扩展插件及插件市场https://ext.dcloud.net.cn上很多三方插件均使用了这些样式变量
* 如果你是插件开发者建议你使用scss预处理并在插件代码中直接使用这些变量无需 import 这个文件方便用户通过搭积木的方式开发整体风格一致的App
*
*/
/**
* 如果你是App开发者插件使用者你可以通过修改这些变量来定制自己的插件主题实现自定义主题功能
*
* 如果你的项目同样使用了scss预处理你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
*/
/* 颜色变量 */
/* 行为相关颜色 */
/* 文字基本颜色 */
/* 背景颜色 */
/* 边框颜色 */
/* 尺寸变量 */
/* 文字尺寸 */
/* 图片尺寸 */
/* Border Radius */
/* 水平间距 */
/* 垂直间距 */
/* 透明度 */
/* 文章场景相关 */
.branch-card {
min-width: 250px;
max-width: 350px;
}
.branch-card .branch-title {
margin-bottom: 8px;
border-radius: 0 10px 10px;
}
.branch-card .branch-item {
display: flex;
justify-content: space-between;
border-style: dotted;
border-color: #d8d8d8;
font-weight: 400;
color: #368dff;
padding-top: 5px;
cursor: pointer;
padding-bottom: 5px;
}

View File

@@ -0,0 +1,97 @@
"use strict";
const TUIKit_tuiCustomerServicePlugin_adapterVue = require("../adapter-vue.js");
const TUIKit_tuiCustomerServicePlugin_utils_index = require("../utils/index.js");
const TUIKit_tuiCustomerServicePlugin_constant = require("../constant.js");
const common_vendor = require("../../../common/vendor.js");
const MessageBranch = () => "./message-branch.js";
const MessageForm = () => "./message-form/index.js";
const MessageIMRobotWelcome = () => "./message-robot-welcome.js";
const MessageProductCard = () => "./message-product-card.js";
const MessageRichText = () => "./message-rich-text.js";
const MessageStream = () => "./message-stream.js";
const { computed } = TUIKit_tuiCustomerServicePlugin_adapterVue.vue;
const _sfc_main = {
components: {
MessageBranch,
MessageForm,
MessageProductCard,
MessageRichText,
MessageIMRobotWelcome,
MessageStream
},
props: {
message: {
type: Object,
default: () => ({})
}
},
emits: ["sendMessage"],
setup(props, { emit }) {
const payload = computed(() => {
var _a, _b;
return props.message && TUIKit_tuiCustomerServicePlugin_utils_index.JSONToObject((_b = (_a = props.message) == null ? void 0 : _a.payload) == null ? void 0 : _b.data);
});
const sendTextMessage = (text) => {
emit("sendMessage", text);
};
return {
payload,
sendTextMessage,
CUSTOM_MESSAGE_SRC: TUIKit_tuiCustomerServicePlugin_constant.CUSTOM_MESSAGE_SRC
};
}
};
if (!Array) {
const _component_MessageBranch = common_vendor.resolveComponent("MessageBranch");
const _component_MessageIMRobotWelcome = common_vendor.resolveComponent("MessageIMRobotWelcome");
const _component_MessageForm = common_vendor.resolveComponent("MessageForm");
const _component_MessageProductCard = common_vendor.resolveComponent("MessageProductCard");
const _component_MessageRichText = common_vendor.resolveComponent("MessageRichText");
const _component_MessageStream = common_vendor.resolveComponent("MessageStream");
(_component_MessageBranch + _component_MessageIMRobotWelcome + _component_MessageForm + _component_MessageProductCard + _component_MessageRichText + _component_MessageStream)();
}
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
return common_vendor.e({
a: $setup.payload.src === $setup.CUSTOM_MESSAGE_SRC.BRANCH || $setup.payload.src === $setup.CUSTOM_MESSAGE_SRC.BRANCH_NUMBER || $setup.payload.src === $setup.CUSTOM_MESSAGE_SRC.ROBOT_MSG && $setup.payload.subtype !== "welcome_msg"
}, $setup.payload.src === $setup.CUSTOM_MESSAGE_SRC.BRANCH || $setup.payload.src === $setup.CUSTOM_MESSAGE_SRC.BRANCH_NUMBER || $setup.payload.src === $setup.CUSTOM_MESSAGE_SRC.ROBOT_MSG && $setup.payload.subtype !== "welcome_msg" ? {
b: common_vendor.o$1($setup.sendTextMessage),
c: common_vendor.p({
payload: $setup.payload
})
} : {}, {
d: $setup.payload.src === $setup.CUSTOM_MESSAGE_SRC.ROBOT_MSG && $setup.payload.subtype === "welcome_msg"
}, $setup.payload.src === $setup.CUSTOM_MESSAGE_SRC.ROBOT_MSG && $setup.payload.subtype === "welcome_msg" ? {
e: common_vendor.o$1($setup.sendTextMessage),
f: common_vendor.p({
payload: $setup.payload
})
} : {}, {
g: $setup.payload.src === $setup.CUSTOM_MESSAGE_SRC.FROM_INPUT
}, $setup.payload.src === $setup.CUSTOM_MESSAGE_SRC.FROM_INPUT ? {
h: common_vendor.o$1($setup.sendTextMessage),
i: common_vendor.p({
payload: $setup.payload
})
} : {}, {
j: $setup.payload.src === $setup.CUSTOM_MESSAGE_SRC.PRODUCT_CARD
}, $setup.payload.src === $setup.CUSTOM_MESSAGE_SRC.PRODUCT_CARD ? {
k: common_vendor.p({
payload: $setup.payload
})
} : {}, {
l: $setup.payload.src === $setup.CUSTOM_MESSAGE_SRC.RICH_TEXT
}, $setup.payload.src === $setup.CUSTOM_MESSAGE_SRC.RICH_TEXT ? {
m: common_vendor.p({
payload: $setup.payload
})
} : {}, {
n: $setup.payload.src === $setup.CUSTOM_MESSAGE_SRC.STREAM_TEXT
}, $setup.payload.src === $setup.CUSTOM_MESSAGE_SRC.STREAM_TEXT ? {
o: common_vendor.p({
payload: $setup.payload
})
} : {});
}
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render]]);
wx.createComponent(Component);
//# sourceMappingURL=../../../../.sourcemap/mp-weixin/TUIKit/tui-customer-service-plugin/components/message-customer-service.js.map

View File

@@ -0,0 +1,11 @@
{
"component": true,
"usingComponents": {
"message-branch": "./message-branch",
"message-form": "./message-form/index",
"message-i-m-robot-welcome": "./message-robot-welcome",
"message-product-card": "./message-product-card",
"message-rich-text": "./message-rich-text",
"message-stream": "./message-stream"
}
}

View File

@@ -0,0 +1 @@
<view class="custom"><view wx:if="{{a}}"><message-branch wx:if="{{c}}" bindsendMessage="{{b}}" u-i="7db9e138-0" bind:__l="__l" u-p="{{c}}"/></view><view wx:if="{{d}}"><message-i-m-robot-welcome wx:if="{{f}}" bindsendMessage="{{e}}" u-i="7db9e138-1" bind:__l="__l" u-p="{{f}}"/></view><view wx:if="{{g}}"><message-form wx:if="{{i}}" bindsendMessage="{{h}}" u-i="7db9e138-2" bind:__l="__l" u-p="{{i}}"/></view><view wx:if="{{j}}"><message-product-card wx:if="{{k}}" u-i="7db9e138-3" bind:__l="__l" u-p="{{k}}"/></view><view wx:if="{{l}}"><message-rich-text wx:if="{{m}}" u-i="7db9e138-4" bind:__l="__l" u-p="{{m}}"/></view><view wx:if="{{n}}"><message-stream wx:if="{{o}}" u-i="7db9e138-5" bind:__l="__l" u-p="{{o}}"/></view></view>

View File

@@ -0,0 +1,42 @@
"use strict";
const common_vendor = require("../../../../common/vendor.js");
const _sfc_main = {
props: {
title: {
type: String,
default: ""
},
list: {
type: Array,
default: () => []
}
},
emits: ["input-click"],
setup(props, { emit }) {
const listItemClick = (branch) => {
emit("input-click", branch);
};
return {
props,
listItemClick
};
}
};
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
return common_vendor.e({
a: $setup.props.title
}, $setup.props.title ? {
b: common_vendor.t($setup.props.title)
} : {}, {
c: common_vendor.f($setup.props.list, (item, index, i0) => {
return {
a: common_vendor.t(item.content),
b: index,
c: common_vendor.o$1(($event) => $setup.listItemClick(item), index)
};
})
});
}
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render]]);
wx.createComponent(Component);
//# sourceMappingURL=../../../../../.sourcemap/mp-weixin/TUIKit/tui-customer-service-plugin/components/message-form/form-branch.js.map

View File

@@ -0,0 +1,4 @@
{
"component": true,
"usingComponents": {}
}

View File

@@ -0,0 +1 @@
<view class="form-branch-container"><view wx:if="{{a}}" class="card-title">{{b}}</view><view wx:for="{{c}}" wx:for-item="item" wx:key="b" class="form-branch-item" bindtap="{{item.c}}">{{item.a}}</view></view>

View File

@@ -0,0 +1,35 @@
/**
* 这里是uni-app内置的常用样式变量
*
* uni-app 官方扩展插件及插件市场https://ext.dcloud.net.cn上很多三方插件均使用了这些样式变量
* 如果你是插件开发者建议你使用scss预处理并在插件代码中直接使用这些变量无需 import 这个文件方便用户通过搭积木的方式开发整体风格一致的App
*
*/
/**
* 如果你是App开发者插件使用者你可以通过修改这些变量来定制自己的插件主题实现自定义主题功能
*
* 如果你的项目同样使用了scss预处理你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
*/
/* 颜色变量 */
/* 行为相关颜色 */
/* 文字基本颜色 */
/* 背景颜色 */
/* 边框颜色 */
/* 尺寸变量 */
/* 文字尺寸 */
/* 图片尺寸 */
/* Border Radius */
/* 水平间距 */
/* 垂直间距 */
/* 透明度 */
/* 文章场景相关 */
.form-branch-container .card-title {
margin-bottom: 8px;
}
.form-branch-container .form-branch-item {
font-weight: 400;
color: #368dff;
padding-top: 5px;
cursor: pointer;
padding-bottom: 5px;
}

View File

@@ -0,0 +1,39 @@
"use strict";
const TUIKit_tuiCustomerServicePlugin_adapterVue = require("../../adapter-vue.js");
const common_vendor = require("../../../../common/vendor.js");
const { ref } = TUIKit_tuiCustomerServicePlugin_adapterVue.vue;
const _sfc_main = {
props: {
title: {
type: String,
default: ""
}
},
emits: ["input-submit"],
setup(props, { emit }) {
const disabled = ref(false);
const text = ref("");
const listItemClick = () => {
disabled.value = true;
emit("input-submit", text.value);
};
return {
disabled,
text,
listItemClick,
props
};
}
};
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
return {
a: common_vendor.t($setup.props.title),
b: $setup.text,
c: common_vendor.o$1(($event) => $setup.text = $event.detail.value),
d: $setup.disabled,
e: common_vendor.o$1((...args) => $setup.listItemClick && $setup.listItemClick(...args))
};
}
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render]]);
wx.createComponent(Component);
//# sourceMappingURL=../../../../../.sourcemap/mp-weixin/TUIKit/tui-customer-service-plugin/components/message-form/form-input.js.map

View File

@@ -0,0 +1,4 @@
{
"component": true,
"usingComponents": {}
}

View File

@@ -0,0 +1 @@
<view class="form-input-container"><view class="card-title">{{a}}</view><view class="form-input-box"><input class="form-input" value="{{b}}" bindinput="{{c}}"></input><button class="form-button" disabled="{{d}}" bindtap="{{e}}"/></view></view>

View File

@@ -0,0 +1,62 @@
/**
* 这里是uni-app内置的常用样式变量
*
* uni-app 官方扩展插件及插件市场https://ext.dcloud.net.cn上很多三方插件均使用了这些样式变量
* 如果你是插件开发者建议你使用scss预处理并在插件代码中直接使用这些变量无需 import 这个文件方便用户通过搭积木的方式开发整体风格一致的App
*
*/
/**
* 如果你是App开发者插件使用者你可以通过修改这些变量来定制自己的插件主题实现自定义主题功能
*
* 如果你的项目同样使用了scss预处理你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
*/
/* 颜色变量 */
/* 行为相关颜色 */
/* 文字基本颜色 */
/* 背景颜色 */
/* 边框颜色 */
/* 尺寸变量 */
/* 文字尺寸 */
/* 图片尺寸 */
/* Border Radius */
/* 水平间距 */
/* 垂直间距 */
/* 透明度 */
/* 文章场景相关 */
.form-input-container .card-title {
margin-bottom: 8px;
}
.form-input-container .form-input-box {
display: flex;
}
.form-input-container .form-input-box button:disabled {
background: #d8d8d8;
}
.form-input-container .form-input {
width: 100%;
height: 36px;
border-radius: 8px 0 0 8px;
border: 1px #dddddd solid;
}
.form-input-container .form-button {
position: relative;
height: 40px;
width: 42px;
font-size: 16px;
border-radius: 0 8px 8px 0;
border: 0 #dddddd solid;
background: #006eff;
color: white;
cursor: pointer;
}
.form-input-container .form-button::before {
content: "";
position: absolute;
width: 10px;
height: 10px;
top: 50%;
right: 40%;
border-left: 2px solid #fff;
border-bottom: 2px solid #fff;
transform: translate(0, -50%) rotate(-135deg);
}

View File

@@ -0,0 +1,64 @@
"use strict";
const TUIKit_tuiCustomerServicePlugin_adapterVue = require("../../adapter-vue.js");
const common_vendor = require("../../../../common/vendor.js");
const FormBranch = () => "./form-branch.js";
const FormInput = () => "./form-input.js";
const { computed } = TUIKit_tuiCustomerServicePlugin_adapterVue.vue;
const _sfc_main = {
components: {
FormBranch,
FormInput
},
props: {
payload: {
type: Object,
default: () => ({})
}
},
emits: ["sendMessage"],
setup(props, { emit }) {
const content = computed(() => {
var _a;
return ((_a = props.payload) == null ? void 0 : _a.content) || {
type: 0,
header: "",
items: []
};
});
const handleContentListItemClick = (branch) => {
emit("sendMessage", { text: branch.content });
};
const handleFormSaveInputSubmit = (text) => {
emit("sendMessage", { text });
};
return {
content,
handleContentListItemClick,
handleFormSaveInputSubmit
};
}
};
if (!Array) {
const _component_FormBranch = common_vendor.resolveComponent("FormBranch");
const _component_FormInput = common_vendor.resolveComponent("FormInput");
(_component_FormBranch + _component_FormInput)();
}
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
return common_vendor.e({
a: $setup.content.type === 1
}, $setup.content.type === 1 ? {
b: common_vendor.o$1($setup.handleContentListItemClick),
c: common_vendor.p({
title: $setup.content.header,
list: $setup.content.items
})
} : {
d: common_vendor.o$1($setup.handleFormSaveInputSubmit),
e: common_vendor.p({
title: $setup.content.header
})
});
}
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render]]);
wx.createComponent(Component);
//# sourceMappingURL=../../../../../.sourcemap/mp-weixin/TUIKit/tui-customer-service-plugin/components/message-form/index.js.map

View File

@@ -0,0 +1,7 @@
{
"component": true,
"usingComponents": {
"form-branch": "./form-branch",
"form-input": "./form-input"
}
}

View File

@@ -0,0 +1 @@
<view wx:if="{{a}}" class="message-form"><form-branch wx:if="{{c}}" bindinputClick="{{b}}" u-i="6e5fe136-0" bind:__l="__l" u-p="{{c}}"/></view><view wx:else class="message-form"><form-input wx:if="{{e}}" bindinputSubmit="{{d}}" u-i="6e5fe136-1" bind:__l="__l" u-p="{{e}}"/></view>

View File

@@ -0,0 +1,28 @@
/**
* 这里是uni-app内置的常用样式变量
*
* uni-app 官方扩展插件及插件市场https://ext.dcloud.net.cn上很多三方插件均使用了这些样式变量
* 如果你是插件开发者建议你使用scss预处理并在插件代码中直接使用这些变量无需 import 这个文件方便用户通过搭积木的方式开发整体风格一致的App
*
*/
/**
* 如果你是App开发者插件使用者你可以通过修改这些变量来定制自己的插件主题实现自定义主题功能
*
* 如果你的项目同样使用了scss预处理你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
*/
/* 颜色变量 */
/* 行为相关颜色 */
/* 文字基本颜色 */
/* 背景颜色 */
/* 边框颜色 */
/* 尺寸变量 */
/* 文字尺寸 */
/* 图片尺寸 */
/* Border Radius */
/* 水平间距 */
/* 垂直间距 */
/* 透明度 */
/* 文章场景相关 */
.message-form {
max-width: 300px;
}

View File

@@ -0,0 +1,42 @@
"use strict";
const common_vendor = require("../../../common/vendor.js");
const TUIKit_tuiCustomerServicePlugin_utils_env = require("../utils/env.js");
const _sfc_main = {
props: {
payload: {
type: Object,
default: () => ({})
}
},
emits: ["sendMessage"],
setup(props) {
const jumpProductCard = () => {
if (window) {
window.open(props.payload.content.url, "_blank");
} else {
common_vendor.index && common_vendor.index.navigateTo({ url: `/TUIKit/components/TUIChat/web-view?url=${props.payload.content.url}` });
}
};
return {
props,
isApp: TUIKit_tuiCustomerServicePlugin_utils_env.isApp,
jumpProductCard
};
}
};
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
return common_vendor.e({
a: $setup.isApp
}, $setup.isApp ? {
b: $setup.props.payload.content.pic
} : {
c: $setup.props.payload.content.pic
}, {
d: common_vendor.t($setup.props.payload.content.header),
e: common_vendor.t($setup.props.payload.content.desc),
f: common_vendor.o$1((...args) => $setup.jumpProductCard && $setup.jumpProductCard(...args))
});
}
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-24d6579f"]]);
wx.createComponent(Component);
//# sourceMappingURL=../../../../.sourcemap/mp-weixin/TUIKit/tui-customer-service-plugin/components/message-product-card.js.map

View File

@@ -0,0 +1,4 @@
{
"component": true,
"usingComponents": {}
}

View File

@@ -0,0 +1 @@
<view class="message-product-card data-v-24d6579f" bindtap="{{f}}"><image wx:if="{{a}}" class="product-img data-v-24d6579f" src="{{b}}"/><image wx:else class="product-img data-v-24d6579f" src="{{c}}"></image><view class="product-card-information data-v-24d6579f"><view class="product-card-title data-v-24d6579f">{{d}}</view><view class="product-card-description data-v-24d6579f">{{e}}</view></view></view>

View File

@@ -0,0 +1,62 @@
/**
* 这里是uni-app内置的常用样式变量
*
* uni-app 官方扩展插件及插件市场https://ext.dcloud.net.cn上很多三方插件均使用了这些样式变量
* 如果你是插件开发者建议你使用scss预处理并在插件代码中直接使用这些变量无需 import 这个文件方便用户通过搭积木的方式开发整体风格一致的App
*
*/
/**
* 如果你是App开发者插件使用者你可以通过修改这些变量来定制自己的插件主题实现自定义主题功能
*
* 如果你的项目同样使用了scss预处理你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
*/
/* 颜色变量 */
/* 行为相关颜色 */
/* 文字基本颜色 */
/* 背景颜色 */
/* 边框颜色 */
/* 尺寸变量 */
/* 文字尺寸 */
/* 图片尺寸 */
/* Border Radius */
/* 水平间距 */
/* 垂直间距 */
/* 透明度 */
/* 文章场景相关 */
.message-product-card.data-v-24d6579f {
min-width: 224px;
max-width: 288px;
background: #fff;
border: 1px solid #ddd;
display: flex;
padding: 12px;
border-radius: 5px;
}
.message-product-card .product-img.data-v-24d6579f {
width: 86px;
height: 86px;
}
.message-product-card .product-card-information.data-v-24d6579f {
margin-left: 12px;
display: flex;
flex-direction: column;
justify-content: space-between;
}
.message-product-card .product-card-information .product-card-title.data-v-24d6579f {
font-size: 12px;
max-width: 165px;
display: -webkit-box;
overflow: hidden;
text-overflow: ellipsis;
-webkit-line-clamp: 3;
-webkit-box-orient: vertical;
word-break: break-all;
}
.message-product-card .product-card-information .product-card-description.data-v-24d6579f {
font-size: 16px;
max-width: 165px;
color: #ff6c2e;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}

View File

@@ -0,0 +1,58 @@
"use strict";
const TUIKit_tuiCustomerServicePlugin_adapterVue = require("../../adapter-vue.js");
const TUIKit_tuiCustomerServicePlugin_utils_index = require("../../utils/index.js");
const TUIKit_tuiCustomerServicePlugin_constant = require("../../constant.js");
const common_vendor = require("../../../../common/vendor.js");
const RatingStar = () => "./message-rating-star.js";
const RatingNumber = () => "./message-rating-number.js";
const { computed } = TUIKit_tuiCustomerServicePlugin_adapterVue.vue;
const _sfc_main = {
components: {
RatingStar,
RatingNumber
},
props: {
message: {
type: Object,
default: () => ({})
}
},
emits: ["sendMessage"],
setup(props, { emit }) {
const ratingTemplate = computed(() => {
const data = props.message && TUIKit_tuiCustomerServicePlugin_utils_index.JSONToObject(props.message.payload.data);
return data == null ? void 0 : data.menuContent;
});
const sendCustomMessage = (data) => {
emit("sendMessage", data);
};
return {
sendCustomMessage,
ratingTemplate,
RATING_TEMPLATE_TYPE: TUIKit_tuiCustomerServicePlugin_constant.RATING_TEMPLATE_TYPE
};
}
};
if (!Array) {
const _component_RatingStar = common_vendor.resolveComponent("RatingStar");
const _component_RatingNumber = common_vendor.resolveComponent("RatingNumber");
(_component_RatingStar + _component_RatingNumber)();
}
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
return common_vendor.e({
a: $setup.ratingTemplate.type === $setup.RATING_TEMPLATE_TYPE.STAR
}, $setup.ratingTemplate.type === $setup.RATING_TEMPLATE_TYPE.STAR ? {
b: common_vendor.o$1($setup.sendCustomMessage),
c: common_vendor.p({
ratingTemplate: $setup.ratingTemplate
})
} : {
d: common_vendor.o$1($setup.sendCustomMessage),
e: common_vendor.p({
ratingTemplate: $setup.ratingTemplate
})
});
}
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render]]);
wx.createComponent(Component);
//# sourceMappingURL=../../../../../.sourcemap/mp-weixin/TUIKit/tui-customer-service-plugin/components/message-rating/index.js.map

View File

@@ -0,0 +1,7 @@
{
"component": true,
"usingComponents": {
"rating-star": "./message-rating-star",
"rating-number": "./message-rating-number"
}
}

View File

@@ -0,0 +1 @@
<rating-star wx:if="{{a}}" bindsendMessage="{{b}}" u-i="26f3a104-0" bind:__l="__l" u-p="{{c}}"/><rating-number wx:else bindsendMessage="{{d}}" u-i="26f3a104-1" bind:__l="__l" u-p="{{e||''}}"/>

View File

@@ -0,0 +1,115 @@
"use strict";
const TUIKit_tuiCustomerServicePlugin_adapterVue = require("../../adapter-vue.js");
const TUIKit_tuiCustomerServicePlugin_constant = require("../../constant.js");
const common_vendor = require("../../../../common/vendor.js");
const { computed, ref, watchEffect } = TUIKit_tuiCustomerServicePlugin_adapterVue.vue;
const _sfc_main = {
props: {
ratingTemplate: {
type: Object,
default: () => ({})
}
},
emits: ["sendMessage"],
setup(props, { emit }) {
const hasReply = ref(false);
const sessionId = ref("");
const selectValue = ref(-1);
const hoverValue = ref(-1);
const hasExpire = ref(false);
const desc = computed(() => {
var _a;
return (_a = props.ratingTemplate) == null ? void 0 : _a.menu.map((item) => item.content);
});
const numberList = computed(() => {
var _a;
return (_a = props.ratingTemplate) == null ? void 0 : _a.menu.map((item, index) => index);
});
watchEffect(() => {
sessionId.value = props.ratingTemplate.sessionId || "";
if (props.ratingTemplate.selected != void 0) {
for (let i = 0; i < props.ratingTemplate.menu.length; i++) {
if (props.ratingTemplate.menu[i].id == props.ratingTemplate.selected.id) {
hasReply.value = true;
selectValue.value = i;
break;
}
}
}
const timestamp = Math.floor((/* @__PURE__ */ new Date()).getTime() / 1e3);
if (timestamp > props.ratingTemplate.expireTime) {
hasExpire.value = true;
}
});
const setValue = (val) => {
if (!hasReply.value) {
selectValue.value = val;
}
};
const setHoverValue = (value) => {
if (!hasReply.value) {
hoverValue.value = value;
}
};
const submitRatingStar = () => {
if (selectValue.value >= 0) {
const submitData = {
data: JSON.stringify({
src: TUIKit_tuiCustomerServicePlugin_constant.CUSTOM_MESSAGE_SRC.MENU_SELECTED,
menuSelected: {
id: props.ratingTemplate.menu[selectValue.value].id,
content: props.ratingTemplate.menu[selectValue.value].content,
sessionId: sessionId.value
},
customerServicePlugin: 0
})
};
hasReply.value = true;
emit("sendMessage", submitData);
}
};
return {
props,
hasReply,
sessionId,
selectValue,
hoverValue,
hasExpire,
desc,
numberList,
setValue,
setHoverValue,
submitRatingStar
};
}
};
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
return common_vendor.e({
a: common_vendor.t($setup.props.ratingTemplate.head),
b: common_vendor.f($setup.numberList, (item, index, i0) => {
return {
a: common_vendor.t(item + 1),
b: index,
c: !(index !== $setup.selectValue && index !== $setup.hoverValue) ? 1 : "",
d: index !== $setup.selectValue && index !== $setup.hoverValue ? 1 : "",
e: index === 0 ? "0px" : "20px",
f: common_vendor.o$1(($event) => $setup.setValue(index), index),
g: common_vendor.o$1(($event) => $setup.setHoverValue(index), index),
h: common_vendor.o$1(($event) => $setup.setHoverValue(-1), index)
};
}),
c: "5px",
d: common_vendor.t($setup.hoverValue === -1 ? $setup.selectValue === -1 ? "如果满意请给好评哦~" : $setup.desc[$setup.selectValue] : $setup.desc[$setup.hoverValue]),
e: "10px",
f: "10px",
g: $setup.hasReply || $setup.hasExpire,
h: common_vendor.o$1((...args) => $setup.submitRatingStar && $setup.submitRatingStar(...args)),
i: $setup.hasReply
}, $setup.hasReply ? {
j: common_vendor.t($setup.props.ratingTemplate.tail),
k: "20px"
} : {});
}
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-1a21fdf4"]]);
wx.createComponent(Component);
//# sourceMappingURL=../../../../../.sourcemap/mp-weixin/TUIKit/tui-customer-service-plugin/components/message-rating/message-rating-number.js.map

View File

@@ -0,0 +1,4 @@
{
"component": true,
"usingComponents": {}
}

View File

@@ -0,0 +1 @@
<view class="message-rating-star data-v-1a21fdf4"><view class="rating-head data-v-1a21fdf4">{{a}}</view><view class="rating-card data-v-1a21fdf4"><label class="card-title data-v-1a21fdf4">请对本次服务进行评价</label><view class="card-wrapper data-v-1a21fdf4"><view class="data-v-1a21fdf4" style="max-width:250px"><view wx:for="{{b}}" wx:for-item="item" wx:key="b" class="{{['data-v-1a21fdf4', item.c && 'active', item.d && 'de-active']}}" style="{{'margin-left:' + item.e + ';' + ('margin:' + c)}}" bindtap="{{item.f}}" bindmouseenter="{{item.g}}" bindmouseleave="{{item.h}}">{{item.a}}</view></view></view><view class="data-v-1a21fdf4" style="{{'margin-top:' + e + ';' + ('margin-bottom:' + f)}}">{{d}}</view><button class="submit-button data-v-1a21fdf4" disabled="{{g}}" bindtap="{{h}}"> 提交评价 </button></view><view wx:if="{{i}}" class="rating-tail data-v-1a21fdf4" style="{{'margin-top:' + k}}">{{j}}</view></view>

View File

@@ -0,0 +1,103 @@
/**
* 这里是uni-app内置的常用样式变量
*
* uni-app 官方扩展插件及插件市场https://ext.dcloud.net.cn上很多三方插件均使用了这些样式变量
* 如果你是插件开发者建议你使用scss预处理并在插件代码中直接使用这些变量无需 import 这个文件方便用户通过搭积木的方式开发整体风格一致的App
*
*/
/**
* 如果你是App开发者插件使用者你可以通过修改这些变量来定制自己的插件主题实现自定义主题功能
*
* 如果你的项目同样使用了scss预处理你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
*/
/* 颜色变量 */
/* 行为相关颜色 */
/* 文字基本颜色 */
/* 背景颜色 */
/* 边框颜色 */
/* 尺寸变量 */
/* 文字尺寸 */
/* 图片尺寸 */
/* Border Radius */
/* 水平间距 */
/* 垂直间距 */
/* 透明度 */
/* 文章场景相关 */
.rating-head.data-v-1a21fdf4 {
font-size: 14px;
font-weight: 400;
color: #999;
}
.rating-tail.data-v-1a21fdf4 {
font-size: 14px;
font-weight: 400;
color: #999;
}
.card-title.data-v-1a21fdf4 {
font-size: 14px;
font-weight: 500;
}
.rating-card.data-v-1a21fdf4 {
min-width: 270px;
width: 50%;
background: #fbfbfb;
border-radius: 20px;
border: 0;
margin-top: 10px;
padding-top: 20px;
padding-bottom: 20px;
}
.rating-card button.data-v-1a21fdf4:disabled {
background: #d8d8d8;
}
.message-rating-star.data-v-1a21fdf4 {
text-align: center;
display: flex;
flex-flow: column wrap;
justify-content: center;
padding-bottom: 30px;
align-items: center;
}
.card-wrapper.data-v-1a21fdf4 {
display: flex;
flex-wrap: wrap;
justify-content: center;
padding-top: 10px;
}
.submit-button.data-v-1a21fdf4 {
width: 50%;
height: 50px;
background-color: #0365f9;
font-size: 18px;
font-weight: 400;
color: white;
border: 0;
border-radius: 8px;
cursor: pointer;
}
.de-active.data-v-1a21fdf4 {
height: 34px;
width: 34px;
display: inline-block;
border: 0 solid #006eff0d;
border-radius: 5px;
color: #006eff;
font-weight: 400;
font-size: 16px;
text-align: center;
line-height: 34px;
background: #006eff0d;
}
.active.data-v-1a21fdf4 {
width: 34px;
height: 34px;
display: inline-block;
background: linear-gradient(136.96deg, rgba(10, 124, 255, 0.3) -39.64%, #0a7cff 131.39%);
border-radius: 5px;
color: white;
font-weight: 400;
font-size: 16px;
border: 0 solid #0a7cff;
text-align: center;
line-height: 34px;
}

View File

@@ -0,0 +1,148 @@
"use strict";
const TUIKit_tuiCustomerServicePlugin_adapterVue = require("../../adapter-vue.js");
const TUIKit_tuiCustomerServicePlugin_constant = require("../../constant.js");
const common_assets = require("../../../../common/assets.js");
const common_vendor = require("../../../../common/vendor.js");
const Icon = () => "../customer-icon.js";
const { computed, ref, watchEffect } = TUIKit_tuiCustomerServicePlugin_adapterVue.vue;
const _sfc_main = {
components: {
Icon
},
props: {
ratingTemplate: {
type: Object,
default: () => ({})
}
},
emits: ["sendMessage"],
setup(props, { emit }) {
const hasReply = ref(false);
const sessionId = ref("");
const value = ref(-1);
const hoverValue = ref(-1);
const hasExpire = ref(false);
watchEffect(() => {
sessionId.value = props.ratingTemplate.sessionId || "";
if (props.ratingTemplate.selected != void 0) {
for (let i = 0; i < props.ratingTemplate.menu.length; i++) {
if (props.ratingTemplate.menu[i].id == props.ratingTemplate.selected.id) {
hasReply.value = true;
value.value = i;
break;
}
}
}
const timestamp = Math.floor((/* @__PURE__ */ new Date()).getTime() / 1e3);
if (timestamp > props.ratingTemplate.expireTime) {
hasExpire.value = true;
}
});
const desc = computed(() => {
var _a;
return (_a = props.ratingTemplate) == null ? void 0 : _a.menu.map((item) => {
return item.content;
});
});
const starList = computed(() => {
var _a;
return (_a = props.ratingTemplate) == null ? void 0 : _a.menu.map((item, index) => {
if (hoverValue.value !== -1) {
return index <= hoverValue.value ? 1 : 0;
} else {
return index <= value.value ? 1 : 0;
}
});
});
const setValue = (val) => {
if (hasReply.value) {
return;
}
value.value = val;
};
const setHoverValue = (value2) => {
if (hasReply.value) {
return;
}
hoverValue.value = value2;
};
const submitRatingStar = async () => {
if (value.value < 0) {
return;
}
const submitData = {
data: JSON.stringify({
src: TUIKit_tuiCustomerServicePlugin_constant.CUSTOM_MESSAGE_SRC.MENU_SELECTED,
menuSelected: {
id: props.ratingTemplate.menu[value.value].id,
content: props.ratingTemplate.menu[value.value].content,
sessionId: sessionId.value
},
customerServicePlugin: 0
})
};
hasReply.value = true;
emit("sendMessage", submitData);
};
return {
props,
hasReply,
sessionId,
value,
hoverValue,
hasExpire,
desc,
starList,
setValue,
setHoverValue,
submitRatingStar,
star: common_assets.star$1,
starLine: common_assets.starLine
};
}
};
if (!Array) {
const _component_Icon = common_vendor.resolveComponent("Icon");
_component_Icon();
}
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
return common_vendor.e({
a: common_vendor.t($setup.props.ratingTemplate.head),
b: common_vendor.f($setup.starList, (item, index, i0) => {
return common_vendor.e({
a: item === 1
}, item === 1 ? {
b: "da3c7d81-0-" + i0,
c: common_vendor.p({
src: $setup.star,
width: "30px",
height: "30px"
})
} : {
d: "da3c7d81-1-" + i0,
e: common_vendor.p({
src: $setup.starLine,
width: "30px",
height: "30px"
})
}, {
f: index,
g: common_vendor.o$1(($event) => $setup.setValue(index), index),
h: common_vendor.o$1(($event) => $setup.setHoverValue(index), index),
i: common_vendor.o$1(($event) => $setup.setHoverValue(-1), index)
});
}),
c: common_vendor.t($setup.hoverValue === -1 ? $setup.value === -1 ? "如果满意请给好评哦~" : $setup.desc[$setup.value] : $setup.desc[$setup.hoverValue]),
d: "10px",
e: "10px",
f: $setup.hasReply || $setup.hasExpire,
g: common_vendor.o$1((...args) => $setup.submitRatingStar && $setup.submitRatingStar(...args)),
h: $setup.hasReply
}, $setup.hasReply ? {
i: common_vendor.t($setup.props.ratingTemplate.tail),
j: "20px"
} : {});
}
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-da3c7d81"]]);
wx.createComponent(Component);
//# sourceMappingURL=../../../../../.sourcemap/mp-weixin/TUIKit/tui-customer-service-plugin/components/message-rating/message-rating-star.js.map

View File

@@ -0,0 +1,6 @@
{
"component": true,
"usingComponents": {
"icon": "../customer-icon"
}
}

View File

@@ -0,0 +1 @@
<view class="message-rating-star data-v-da3c7d81"><view class="rating-head data-v-da3c7d81">{{a}}</view><view class="rating-card data-v-da3c7d81"><label class="card-title data-v-da3c7d81">请对本次服务进行评价</label><view class="card-wrapper data-v-da3c7d81"><view class="data-v-da3c7d81" style="max-width:200px"><view wx:for="{{b}}" wx:for-item="item" wx:key="f" class="data-v-da3c7d81" style="display:inline-block" bindtap="{{item.g}}" bindmouseenter="{{item.h}}" bindmouseleave="{{item.i}}"><icon wx:if="{{item.a}}" class="data-v-da3c7d81" u-i="{{item.b}}" bind:__l="__l" u-p="{{item.c}}"/><icon wx:else class="data-v-da3c7d81" u-i="{{item.d}}" bind:__l="__l" u-p="{{item.e||''}}"/></view></view></view><view class="data-v-da3c7d81" style="{{'margin-top:' + d + ';' + ('margin-bottom:' + e)}}">{{c}}</view><button class="submit-button data-v-da3c7d81" disabled="{{f}}" bindtap="{{g}}"> 提交评价 </button></view><view wx:if="{{h}}" class="rating-tail data-v-da3c7d81" style="{{'margin-top:' + j}}">{{i}}</view></view>

View File

@@ -0,0 +1,77 @@
/**
* 这里是uni-app内置的常用样式变量
*
* uni-app 官方扩展插件及插件市场https://ext.dcloud.net.cn上很多三方插件均使用了这些样式变量
* 如果你是插件开发者建议你使用scss预处理并在插件代码中直接使用这些变量无需 import 这个文件方便用户通过搭积木的方式开发整体风格一致的App
*
*/
/**
* 如果你是App开发者插件使用者你可以通过修改这些变量来定制自己的插件主题实现自定义主题功能
*
* 如果你的项目同样使用了scss预处理你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
*/
/* 颜色变量 */
/* 行为相关颜色 */
/* 文字基本颜色 */
/* 背景颜色 */
/* 边框颜色 */
/* 尺寸变量 */
/* 文字尺寸 */
/* 图片尺寸 */
/* Border Radius */
/* 水平间距 */
/* 垂直间距 */
/* 透明度 */
/* 文章场景相关 */
.rating-head.data-v-da3c7d81 {
font-size: 14px;
font-weight: 400;
color: #999;
}
.rating-tail.data-v-da3c7d81 {
font-size: 14px;
font-weight: 400;
color: #999;
}
.card-title.data-v-da3c7d81 {
font-size: 14px;
font-weight: 500;
}
.rating-card.data-v-da3c7d81 {
min-width: 270px;
width: 50%;
background: #fbfbfb;
border-radius: 20px;
border: 0;
margin-top: 10px;
padding-top: 20px;
padding-bottom: 20px;
}
.rating-card button.data-v-da3c7d81:disabled {
background: #d8d8d8;
}
.message-rating-star.data-v-da3c7d81 {
text-align: center;
display: flex;
flex-flow: column wrap;
justify-content: center;
padding-bottom: 30px;
align-items: center;
}
.card-wrapper.data-v-da3c7d81 {
display: flex;
flex-wrap: wrap;
justify-content: center;
padding-top: 10px;
}
.submit-button.data-v-da3c7d81 {
width: 50%;
height: 50px;
background-color: #0365f9;
font-size: 18px;
font-weight: 400;
color: white;
border: 0;
border-radius: 8px;
cursor: pointer;
}

View File

@@ -0,0 +1,32 @@
"use strict";
const TUIKit_tuiCustomerServicePlugin_adapterVue = require("../adapter-vue.js");
const common_vendor = require("../../../common/vendor.js");
const { computed } = TUIKit_tuiCustomerServicePlugin_adapterVue.vue;
const _sfc_main = {
props: {
payload: {
type: Object,
default: () => ({})
}
},
setup(props) {
const formatedContent = computed(() => {
let richtext = common_vendor.marked.parse(props.payload.content);
const regex = new RegExp("<img", "gi");
richtext = richtext.replace(regex, `<img style="max-width: 100%;"`);
return richtext;
});
return {
props,
formatedContent
};
}
};
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
return {
a: $setup.formatedContent
};
}
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render]]);
wx.createComponent(Component);
//# sourceMappingURL=../../../../.sourcemap/mp-weixin/TUIKit/tui-customer-service-plugin/components/message-rich-text.js.map

View File

@@ -0,0 +1,4 @@
{
"component": true,
"usingComponents": {}
}

View File

@@ -0,0 +1 @@
<view class="rich-text"><rich-text nodes="{{a}}"/></view>

View File

@@ -0,0 +1,44 @@
/**
* 这里是uni-app内置的常用样式变量
*
* uni-app 官方扩展插件及插件市场https://ext.dcloud.net.cn上很多三方插件均使用了这些样式变量
* 如果你是插件开发者建议你使用scss预处理并在插件代码中直接使用这些变量无需 import 这个文件方便用户通过搭积木的方式开发整体风格一致的App
*
*/
/**
* 如果你是App开发者插件使用者你可以通过修改这些变量来定制自己的插件主题实现自定义主题功能
*
* 如果你的项目同样使用了scss预处理你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
*/
/* 颜色变量 */
/* 行为相关颜色 */
/* 文字基本颜色 */
/* 背景颜色 */
/* 边框颜色 */
/* 尺寸变量 */
/* 文字尺寸 */
/* 图片尺寸 */
/* Border Radius */
/* 水平间距 */
/* 垂直间距 */
/* 透明度 */
/* 文章场景相关 */
.rich-text div,
.rich-text ul,
.rich-text ol,
.rich-text dt,
.rich-text dd,
.rich-text li,
.rich-text dl,
.rich-text h1,
.rich-text h2,
.rich-text h3,
.rich-text h4,
.rich-text p,
.rich-text img,
.rich-text a {
max-width: 100%;
}
.rich-text a {
color: blue;
}

View File

@@ -0,0 +1,86 @@
"use strict";
const TUIKit_tuiCustomerServicePlugin_adapterVue = require("../adapter-vue.js");
const common_assets = require("../../../common/assets.js");
const common_vendor = require("../../../common/vendor.js");
const Icon = () => "./customer-icon.js";
const { reactive, toRefs } = TUIKit_tuiCustomerServicePlugin_adapterVue.vue;
const _sfc_main = {
components: {
Icon
},
props: {
payload: {
type: Object,
default: () => ({ content: { title: "", items: [] } })
}
},
emits: ["sendMessage"],
setup(props, { emit }) {
var _a, _b, _c, _d, _e, _f;
const data = reactive({
// title
title: ((_b = (_a = props.payload) == null ? void 0 : _a.content) == null ? void 0 : _b.title) || "",
// all branch list
list: ((_d = (_c = props.payload) == null ? void 0 : _c.content) == null ? void 0 : _d.items) || [],
// current branch list
showList: (((_f = (_e = props.payload) == null ? void 0 : _e.content) == null ? void 0 : _f.items) || []).slice(0, 5),
// current page number
pageNumber: 1
});
const handleContentListItemClick = (branch) => {
emit("sendMessage", { text: branch.content });
};
const changeBranchList = () => {
var _a2, _b2;
if (data.pageNumber * 5 >= ((_a2 = data.list) == null ? void 0 : _a2.length)) {
data.pageNumber = 0;
}
data.showList = (_b2 = data.list) == null ? void 0 : _b2.slice(
data.pageNumber * 5,
data.pageNumber * 5 + 5
);
data.pageNumber += 1;
};
return {
...toRefs(data),
handleContentListItemClick,
imRobotGuess: common_assets.imRobotGuess,
refresh: common_assets.refresh,
iconRight: common_assets.iconRight,
changeBranchList
};
}
};
if (!Array) {
const _component_Icon = common_vendor.resolveComponent("Icon");
_component_Icon();
}
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
return common_vendor.e({
a: common_vendor.p({
src: $setup.imRobotGuess
}),
b: _ctx.title
}, _ctx.title ? {
c: common_vendor.t(_ctx.title)
} : {}, {
d: common_vendor.p({
src: $setup.refresh
}),
e: common_vendor.o$1(($event) => $setup.changeBranchList()),
f: common_vendor.f(_ctx.showList, (item, index, i0) => {
return {
a: common_vendor.t(item.content),
b: "4cb3a3d1-2-" + i0,
c: index,
d: common_vendor.o$1(($event) => $setup.handleContentListItemClick(item), index)
};
}),
g: common_vendor.p({
src: $setup.iconRight
})
});
}
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render]]);
wx.createComponent(Component);
//# sourceMappingURL=../../../../.sourcemap/mp-weixin/TUIKit/tui-customer-service-plugin/components/message-robot-welcome.js.map

View File

@@ -0,0 +1,6 @@
{
"component": true,
"usingComponents": {
"icon": "./customer-icon"
}
}

View File

@@ -0,0 +1 @@
<view class="welcome-card"><view class="welcome-title"><view class="welcome-title-left-container"><icon wx:if="{{a}}" u-i="4cb3a3d1-0" bind:__l="__l" u-p="{{a}}"/><view wx:if="{{b}}" class="card-title">{{c}}</view></view><view class="change-wrapper" bindtap="{{e}}"><icon wx:if="{{d}}" u-i="4cb3a3d1-1" bind:__l="__l" u-p="{{d}}"/></view></view><view wx:for="{{f}}" wx:for-item="item" wx:key="c" class="welcome-item" bindtap="{{item.d}}"><view>{{item.a}}</view><icon wx:if="{{g}}" u-i="{{item.b}}" bind:__l="__l" u-p="{{g}}"/></view></view>

View File

@@ -0,0 +1,77 @@
/**
* 这里是uni-app内置的常用样式变量
*
* uni-app 官方扩展插件及插件市场https://ext.dcloud.net.cn上很多三方插件均使用了这些样式变量
* 如果你是插件开发者建议你使用scss预处理并在插件代码中直接使用这些变量无需 import 这个文件方便用户通过搭积木的方式开发整体风格一致的App
*
*/
/**
* 如果你是App开发者插件使用者你可以通过修改这些变量来定制自己的插件主题实现自定义主题功能
*
* 如果你的项目同样使用了scss预处理你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
*/
/* 颜色变量 */
/* 行为相关颜色 */
/* 文字基本颜色 */
/* 背景颜色 */
/* 边框颜色 */
/* 尺寸变量 */
/* 文字尺寸 */
/* 图片尺寸 */
/* Border Radius */
/* 水平间距 */
/* 垂直间距 */
/* 透明度 */
/* 文章场景相关 */
.welcome-card {
min-width: 250px;
max-width: 350px;
/* stylelint-disable */
/* stylelint-enable */
}
.welcome-card .welcome-title {
display: flex;
height: 40px;
justify-content: space-between;
align-items: center;
}
.welcome-card .welcome-title-left-container {
display: flex;
align-items: center;
}
.welcome-card .card-title {
display: inline-block;
margin-left: 8px;
font-size: 16px;
}
.welcome-card .el-link {
display: block;
font-weight: 400;
padding-top: 5px;
padding-bottom: 5px;
}
.welcome-card .el-link__inner {
display: flex;
justify-content: space-between;
align-items: center;
}
.welcome-card .branch-number {
margin-left: 15px;
margin-right: 15px;
font-size: 20px;
display: inline-block;
}
.welcome-card .change-wrapper {
cursor: pointer;
}
.welcome-card .welcome-item {
padding: 6px;
color: #999;
display: flex;
justify-content: space-between;
align-items: center;
cursor: pointer;
}
.welcome-card .welcome-item:hover {
background: #f2f7ff;
}

View File

@@ -0,0 +1,71 @@
"use strict";
const TUIKit_tuiCustomerServicePlugin_adapterVue = require("../adapter-vue.js");
const common_vendor = require("../../../common/vendor.js");
const { ref, watchEffect, onBeforeUnmount, onMounted } = TUIKit_tuiCustomerServicePlugin_adapterVue.vue;
const _sfc_main = {
props: {
payload: {
type: Object,
default: () => ({})
}
},
setup(props) {
const content = ref("");
const displayedContent = ref("");
const isFinished = ref(false);
let intervalId = null;
let currentIndex = 0;
const updateDisplayedContent = () => {
if (intervalId) {
window.clearInterval(intervalId);
}
intervalId = window.setInterval(() => {
if (currentIndex < content.value.length) {
displayedContent.value += content.value[currentIndex];
currentIndex++;
} else {
window.clearInterval(intervalId);
intervalId = null;
}
}, 50);
};
onMounted(() => {
var _a, _b;
content.value = ((_b = (_a = props == null ? void 0 : props.payload) == null ? void 0 : _a.chunks) == null ? void 0 : _b.join("")) ?? "";
displayedContent.value = content.value;
currentIndex = content.value.length;
});
watchEffect(() => {
var _a, _b;
const newContent = ((_b = (_a = props == null ? void 0 : props.payload) == null ? void 0 : _a.chunks) == null ? void 0 : _b.join("")) ?? "";
if (newContent.length > currentIndex) {
content.value = newContent;
updateDisplayedContent();
}
});
watchEffect(() => {
var _a;
isFinished.value = ((_a = props == null ? void 0 : props.payload) == null ? void 0 : _a.isFinished) === 1;
});
onBeforeUnmount(() => {
if (intervalId) {
window.clearInterval(intervalId);
}
});
return {
content,
props,
isFinished,
displayedContent
};
}
};
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
return common_vendor.e({
a: common_vendor.t($setup.displayedContent),
b: !$setup.isFinished
}, !$setup.isFinished ? {} : {});
}
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-35feeb52"]]);
wx.createComponent(Component);
//# sourceMappingURL=../../../../.sourcemap/mp-weixin/TUIKit/tui-customer-service-plugin/components/message-stream.js.map

View File

@@ -0,0 +1,4 @@
{
"component": true,
"usingComponents": {}
}

View File

@@ -0,0 +1 @@
<view class="message-stream data-v-35feeb52">{{a}}<label wx:if="{{b}}" class="blinking-cursor data-v-35feeb52"/></view>

View File

@@ -0,0 +1,45 @@
/**
* 这里是uni-app内置的常用样式变量
*
* uni-app 官方扩展插件及插件市场https://ext.dcloud.net.cn上很多三方插件均使用了这些样式变量
* 如果你是插件开发者建议你使用scss预处理并在插件代码中直接使用这些变量无需 import 这个文件方便用户通过搭积木的方式开发整体风格一致的App
*
*/
/**
* 如果你是App开发者插件使用者你可以通过修改这些变量来定制自己的插件主题实现自定义主题功能
*
* 如果你的项目同样使用了scss预处理你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
*/
/* 颜色变量 */
/* 行为相关颜色 */
/* 文字基本颜色 */
/* 背景颜色 */
/* 边框颜色 */
/* 尺寸变量 */
/* 文字尺寸 */
/* 图片尺寸 */
/* Border Radius */
/* 水平间距 */
/* 垂直间距 */
/* 透明度 */
/* 文章场景相关 */
.message-stream.data-v-35feeb52 {
word-break: break-all;
font-size: 14px;
}
.message-stream .blinking-cursor.data-v-35feeb52 {
display: inline-block;
width: 1px;
height: 16px;
background-color: black;
animation: blink-35feeb52 1s step-end infinite;
vertical-align: sub;
}
@keyframes blink-35feeb52 {
0%, 100% {
background-color: transparent;
}
50% {
background-color: black;
}
}