|
|
|
|
@@ -0,0 +1,80 @@
|
|
|
|
|
"use strict";
|
|
|
|
|
const common_vendor = require("../../../../../common/vendor.js");
|
|
|
|
|
const TUIKit_components_TUIChat_config = require("../../config.js");
|
|
|
|
|
const common_assets = require("../../../../../common/assets.js");
|
|
|
|
|
const TUIKit_components_TUIChat_utils_utils = require("../../utils/utils.js");
|
|
|
|
|
const TUIKit_components_TUIChat_offlinePushInfoManager_index = require("../../offlinePushInfoManager/index.js");
|
|
|
|
|
if (!Math) {
|
|
|
|
|
ToolbarItemContainer();
|
|
|
|
|
}
|
|
|
|
|
const ToolbarItemContainer = () => "../toolbar-item-container/index.js";
|
|
|
|
|
const _sfc_main = {
|
|
|
|
|
__name: "CustomMessage",
|
|
|
|
|
emits: ["onDialogPopupShowOrHide"],
|
|
|
|
|
setup(__props, { emit: __emit }) {
|
|
|
|
|
const evaluateIcon = TUIKit_components_TUIChat_config.ChatConfig.getTheme() === "dark" ? common_assets.InvitationDark : common_assets.InvitationLight;
|
|
|
|
|
const emits = __emit;
|
|
|
|
|
const onDialogShow = () => {
|
|
|
|
|
emits("onDialogPopupShowOrHide", true);
|
|
|
|
|
};
|
|
|
|
|
const onDialogClose = () => {
|
|
|
|
|
emits("onDialogPopupShowOrHide", false);
|
|
|
|
|
};
|
|
|
|
|
const currentConversation = common_vendor.ref();
|
|
|
|
|
common_vendor.Jt.watch(common_vendor.o.CONV, {
|
|
|
|
|
currentConversation: (conversation) => {
|
|
|
|
|
currentConversation.value = conversation;
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
const container = common_vendor.ref();
|
|
|
|
|
const submitEvaluate = () => {
|
|
|
|
|
var _a, _b, _c, _d, _e, _f;
|
|
|
|
|
const payload = {
|
|
|
|
|
data: JSON.stringify({
|
|
|
|
|
businessID: "pk",
|
|
|
|
|
title: "PK邀请",
|
|
|
|
|
buttonText1: "接受邀请",
|
|
|
|
|
buttonText2: "拒绝邀请"
|
|
|
|
|
}),
|
|
|
|
|
description: "",
|
|
|
|
|
extension: ""
|
|
|
|
|
};
|
|
|
|
|
const options = {
|
|
|
|
|
to: ((_b = (_a = currentConversation == null ? void 0 : currentConversation.value) == null ? void 0 : _a.groupProfile) == null ? void 0 : _b.groupID) || ((_d = (_c = currentConversation == null ? void 0 : currentConversation.value) == null ? void 0 : _c.userProfile) == null ? void 0 : _d.userID),
|
|
|
|
|
conversationType: (_e = currentConversation == null ? void 0 : currentConversation.value) == null ? void 0 : _e.type,
|
|
|
|
|
payload,
|
|
|
|
|
needReadReceipt: TUIKit_components_TUIChat_utils_utils.isEnabledMessageReadReceiptGlobal()
|
|
|
|
|
};
|
|
|
|
|
const offlinePushInfoCreateParams = {
|
|
|
|
|
conversation: currentConversation.value,
|
|
|
|
|
payload: options.payload,
|
|
|
|
|
messageType: common_vendor.qt.TYPES.MSG_CUSTOM
|
|
|
|
|
};
|
|
|
|
|
const sendMessageOptions = {
|
|
|
|
|
offlinePushInfo: TUIKit_components_TUIChat_offlinePushInfoManager_index.OfflinePushInfoManager.create(offlinePushInfoCreateParams)
|
|
|
|
|
};
|
|
|
|
|
common_vendor.Qt.sendCustomMessage(options, sendMessageOptions);
|
|
|
|
|
(_f = container == null ? void 0 : container.value) == null ? void 0 : _f.toggleDialogDisplay(false);
|
|
|
|
|
};
|
|
|
|
|
return (_ctx, _cache) => {
|
|
|
|
|
return {
|
|
|
|
|
a: common_vendor.o$1(submitEvaluate),
|
|
|
|
|
b: common_vendor.sr(container, "241228dc-0", {
|
|
|
|
|
"k": "container"
|
|
|
|
|
}),
|
|
|
|
|
c: common_vendor.o$1(onDialogShow),
|
|
|
|
|
d: common_vendor.o$1(onDialogClose),
|
|
|
|
|
e: common_vendor.p({
|
|
|
|
|
iconFile: common_vendor.unref(evaluateIcon),
|
|
|
|
|
title: "邀请",
|
|
|
|
|
needBottomPopup: true,
|
|
|
|
|
iconWidth: _ctx.isUniFrameWork ? "36px" : "30px",
|
|
|
|
|
iconHeight: _ctx.isUniFrameWork ? "36px" : "30px"
|
|
|
|
|
})
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-241228dc"]]);
|
|
|
|
|
wx.createComponent(Component);
|
|
|
|
|
//# sourceMappingURL=../../../../../../.sourcemap/mp-weixin/TUIKit/components/TUIChat/message-input-toolbar/evaluate/CustomMessage.js.map
|