feat: 提交创建服务工单组件封装

This commit is contained in:
duanshuwen
2025-07-11 14:01:13 +08:00
parent 875c60d3ec
commit fb6c258893
46 changed files with 573 additions and 411 deletions

View File

@@ -1,133 +0,0 @@
"use strict";
const common_vendor = require("../../common/vendor.js");
const common_assets = require("../../common/assets.js");
if (!Math) {
(ChatTopBgImg + ChatTopNavBar + ChatTopBanner + ChatCardAI + ChatCardMine + ChatMoreTips + ChatQuickAccess)();
}
const ChatTopBanner = () => "./ChatTopBanner.js";
const ChatTopBgImg = () => "./ChatTopBgImg.js";
const ChatTopNavBar = () => "./ChatTopNavBar.js";
const ChatCardAI = () => "./ChatCardAI.js";
const ChatCardMine = () => "./ChatCardMine.js";
const ChatQuickAccess = () => "./ChatQuickAccess2.js";
const ChatMoreTips = () => "./ChatMoreTips.js";
const _sfc_main = {
__name: "ChatList",
emits: ["openDrawer"],
setup(__props, { emit: __emit }) {
const statusBarHeight = common_vendor.ref(20);
const navBgColor = common_vendor.ref("rgba(66, 173, 249, 0)");
common_vendor.ref(0);
const timer = common_vendor.ref(null);
const holdKeyboard = common_vendor.ref(false);
const holdKeyboardFlag = common_vendor.ref(true);
common_vendor.ref("");
const chatMsgList = common_vendor.ref([]);
const inputMessage = common_vendor.ref("");
const lastMsgId = common_vendor.ref("");
holdKeyboard.value = true;
const emits = __emit;
const openDrawer = () => {
emits("openDrawer");
common_vendor.index.__f__("log", "at pages/chat/ChatList.vue:112", "=============打开抽屉");
};
common_vendor.onLoad(() => {
common_vendor.index.getSystemInfo({
success: (res) => {
statusBarHeight.value = res.statusBarHeight || 20;
}
});
});
common_vendor.onMounted(() => {
initData();
});
const initData = () => {
for (let i = 0; i < 30; i++) {
chatMsgList.value.push({
mid: `msg_${i}`,
msg: `消息${i}`
});
}
};
const handleTouchEnd = () => {
clearTimeout(timer.value);
timer.value = setTimeout(() => {
if (handleNoHideKeyboard.value) {
common_vendor.index.hideKeyboard();
}
holdKeyboardFlag.value = true;
}, 50);
};
const handleNoHideKeyboard = () => {
holdKeyboardFlag.value = false;
};
const sendMessage = () => {
handleNoHideKeyboard();
chatMsgList.value.push({
mid: `msg_${chatMsgList.value.length}`,
msg: `新消息${inputMessage.value}`
});
inputMessage.value = "";
common_vendor.index.__f__("log", "at pages/chat/ChatList.vue:231", JSON.stringify(chatMsgList.value));
};
common_vendor.watch(chatMsgList, (newVal) => {
if (newVal.length > 0) {
lastMsgId.value = newVal[newVal.length - 1].mid;
common_vendor.nextTick$1(() => {
lastMsgId.value = "";
common_vendor.nextTick$1(() => {
lastMsgId.value = newVal[newVal.length - 1].mid;
});
});
}
}, { deep: true });
return (_ctx, _cache) => {
return {
a: common_vendor.o(openDrawer),
b: statusBarHeight.value + "px",
c: navBgColor.value,
d: common_vendor.f(chatMsgList.value, (item, index, i0) => {
return common_vendor.e({
a: index === 0
}, index === 0 ? {
b: common_assets._imports_0,
c: "205c7d43-3-" + i0,
d: common_vendor.p({
text: "查信息、预定下单、探索玩法、呼叫服务、我通通可以满足,快试试问我问题吧!"
})
} : index === 1 ? {
f: "205c7d43-4-" + i0,
g: common_vendor.p({
text: "查信息、预定下单、探索玩法"
})
} : index === 3 ? {
i: "205c7d43-5-" + i0,
j: common_vendor.p({
text: "推荐双卧私汤套房。【房间十设施十服务能力】房问为两室一厅两卫房问为一个2米大床房和一个标问可2加床最多可 住6人 房问内带麻将机、带汗蒸房,带阳台泡池,厨房 可烹饪; 【内容玩法】房间内可打麻将、泡汤、长形茶几 可坐10人可打德州、惯蛋等娱乐活动阳台泡池旁可加碳火进行BBQ食材需自带带小朋友的家长小朋友可玩酒店内游乐场淘气堡。 【内容玩法】饮食方面酒店自助餐不限量供应提供西餐、泰餐、中餐自助距酒店10分钟车程可达老宇号息烽正宗辣子鸡。 【特别体验】近期“有为妃作歹”主题泼水活动。"
})
} : {
k: common_vendor.t(item.msg)
}, {
e: index === 1,
h: index === 3,
l: item.mid,
m: item.mid
});
}),
e: lastMsgId.value,
f: common_assets._imports_1,
g: common_vendor.o(sendMessage),
h: common_vendor.o(handleNoHideKeyboard),
i: holdKeyboard.value,
j: inputMessage.value,
k: common_vendor.o(($event) => inputMessage.value = $event.detail.value),
l: common_assets._imports_2,
m: common_vendor.o(sendMessage),
n: common_vendor.o(handleTouchEnd)
};
};
}
};
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-205c7d43"]]);
wx.createComponent(Component);
//# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/chat/ChatList.js.map

View File

@@ -1,12 +0,0 @@
{
"component": true,
"usingComponents": {
"chat-top-banner": "./ChatTopBanner",
"chat-top-bg-img": "./ChatTopBgImg",
"chat-top-nav-bar": "./ChatTopNavBar",
"chat-card-a-i": "./ChatCardAI",
"chat-card-mine": "./ChatCardMine",
"chat-quick-access": "./ChatQuickAccess",
"chat-more-tips": "./ChatMoreTips"
}
}

View File

@@ -1 +0,0 @@
<view class="chat-container data-v-205c7d43" bindtouchend="{{n}}"><chat-top-bg-img class="chat-container-bg data-v-205c7d43" u-i="205c7d43-0" bind:__l="__l"></chat-top-bg-img><view class="nav-bar-container data-v-205c7d43" style="{{'padding-top:' + b + ';' + ('background-color:' + c)}}"><chat-top-nav-bar class="data-v-205c7d43" bindopenDrawer="{{a}}" u-i="205c7d43-1" bind:__l="__l"></chat-top-nav-bar></view><view class="chat-container-msg-list data-v-205c7d43"><chat-top-banner class="chat-container-top-bannar data-v-205c7d43" u-i="205c7d43-2" bind:__l="__l"></chat-top-banner><view class="area-msg-list data-v-205c7d43" scroll-y="true" scroll-into-view="{{e}}"><view wx:for="{{d}}" wx:for-item="item" wx:key="l" class="data-v-205c7d43" id="{{item.m}}"><chat-card-a-i wx:if="{{item.a}}" u-s="{{['d']}}" class="message-item message-item-ai data-v-205c7d43" u-i="{{item.c}}" bind:__l="__l" u-p="{{item.d}}"><image class="data-v-205c7d43" src="{{item.b}}" style="width:100px;height:100px"></image></chat-card-a-i><chat-card-mine wx:elif="{{item.e}}" u-s="{{['d']}}" class="message-item message-item-mine data-v-205c7d43" u-i="{{item.f}}" bind:__l="__l" u-p="{{item.g}}"><text class="data-v-205c7d43"> MM </text></chat-card-mine><chat-card-a-i wx:elif="{{item.h}}" class="message-item message-item-ai data-v-205c7d43" u-i="{{item.i}}" bind:__l="__l" u-p="{{item.j}}"></chat-card-a-i><text wx:else class="message-item message-item-other data-v-205c7d43">{{item.k}}</text></view></view><view class="footer-area data-v-205c7d43"><chat-more-tips class="data-v-205c7d43" u-i="205c7d43-6" bind:__l="__l"></chat-more-tips><chat-quick-access class="data-v-205c7d43" u-i="205c7d43-7" bind:__l="__l"></chat-quick-access><view class="area-input data-v-205c7d43"><view class="input-container-voice data-v-205c7d43"><image class="data-v-205c7d43" src="{{f}}"></image></view><block wx:if="{{r0}}"><textarea class="textarea data-v-205c7d43" type="text" placeholder="快速订票,呼叫服务" cursor-spacing="65" confirm-type="done" bindconfirm="{{g}}" bindtouchend="{{h}}" confirm-hold="{{true}}" auto-height show-confirm-bar="{{false}}" hold-keyboard="{{i}}" maxlength="300" value="{{j}}" bindinput="{{k}}"/></block><view class="input-container-send data-v-205c7d43" bindtap="{{m}}"><image class="data-v-205c7d43" src="{{l}}"></image></view></view></view></view></view>

View File

@@ -1,156 +0,0 @@
/**
* 这里是uni-app内置的常用样式变量
*
* uni-app 官方扩展插件及插件市场https://ext.dcloud.net.cn上很多三方插件均使用了这些样式变量
* 如果你是插件开发者建议你使用scss预处理并在插件代码中直接使用这些变量无需 import 这个文件方便用户通过搭积木的方式开发整体风格一致的App
*
*/
/**
* 如果你是App开发者插件使用者你可以通过修改这些变量来定制自己的插件主题实现自定义主题功能
*
* 如果你的项目同样使用了scss预处理你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
*/
/* 颜色变量 */
/* 行为相关颜色 */
/* 文字基本颜色 */
/* 背景颜色 */
/* 边框颜色 */
/* 尺寸变量 */
/* 文字尺寸 */
/* 图片尺寸 */
/* Border Radius */
/* 水平间距 */
/* 垂直间距 */
/* 透明度 */
/* 文章场景相关 */
.chat-container.data-v-205c7d43 {
width: 100vw;
height: 100vh;
background-color: #E9F3F7;
display: flex;
flex-direction: column;
overflow: hidden;
position: relative;
/* 顶部导航栏样式 */
}
.chat-container .chat-container-bg.data-v-205c7d43 {
position: fixed;
top: 0;
left: 0;
right: 0;
z-index: 0;
height: 270px;
background: linear-gradient(180deg, #42ADF9 0%, #6CD1FF 51%, #E9F3F7 99%);
}
.chat-container .nav-bar-container.data-v-205c7d43 {
position: fixed;
top: 0;
left: 0;
right: 0;
z-index: 999;
transition: all 0.3s ease;
}
.chat-container .chat-container-msg-list.data-v-205c7d43 {
width: 100vw;
height: 100vh;
display: flex;
flex-direction: column;
justify-content: space-around;
z-index: 1;
overflow: hidden !important;
}
.chat-container .chat-container-top-bannar.data-v-205c7d43 {
width: 100vw;
height: auto;
overflow: hidden;
}
.chat-container .area-msg-list.data-v-205c7d43 {
overflow-y: auto;
width: 100vw;
min-height: 0;
flex: 1;
padding: 4px 0 0;
display: flex;
flex-direction: column;
}
.chat-container .area-msg-list .message-item.data-v-205c7d43 {
display: flex;
}
.chat-container .area-msg-list .message-item-ai.data-v-205c7d43 {
justify-content: flex-start;
}
.chat-container .area-msg-list .message-item-mine.data-v-205c7d43 {
justify-content: flex-end;
}
.chat-container .area-msg-list .message-item-other.data-v-205c7d43 {
justify-content: center;
background-color: white;
margin: 6px 12px;
padding: 8px 24px;
border-radius: 4px;
font-size: 14px;
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}
.chat-container .area-msg-list .message-item-other text.data-v-205c7d43 {
font-family: PingFang SC, PingFang SC;
font-weight: 400;
font-size: 14px;
color: #333333;
}
.footer-area.data-v-205c7d43 {
box-sizing: border-box;
padding: 12px 12px 24px 12px;
width: 100vw;
height: auto;
background-color: #E9F3F7;
}
.area-input.data-v-205c7d43 {
display: flex;
align-items: center;
border-radius: 22px;
background-color: #FFFFFF;
box-shadow: 0px 0px 20px 0px rgba(52, 25, 204, 0.05);
}
.area-input .input-container-voice.data-v-205c7d43 {
display: flex;
align-items: center;
justify-content: center;
width: 44px;
height: 44px;
flex-shrink: 0;
align-self: flex-end;
}
.area-input .input-container-voice image.data-v-205c7d43 {
width: 22px;
height: 22px;
}
.area-input .input-container-send.data-v-205c7d43 {
display: flex;
align-items: center;
justify-content: center;
width: 44px;
height: 44px;
flex-shrink: 0;
align-self: flex-end;
}
.area-input .input-container-send image.data-v-205c7d43 {
width: 28px;
height: 28px;
}
.area-input .textarea.data-v-205c7d43 {
flex: 1;
max-height: 92px;
min-height: 22px;
font-size: 16px;
line-height: 22px;
margin-bottom: 2px;
align-items: center;
}
.data-v-205c7d43::-webkit-scrollbar {
display: none;
width: 0 !important;
height: 0 !important;
-webkit-appearance: none;
background: transparent;
color: transparent;
}

View File

@@ -3,7 +3,7 @@ const common_vendor = require("../../common/vendor.js");
const common_assets = require("../../common/assets.js");
const model_ChatModel = require("../../model/ChatModel.js");
if (!Math) {
(ChatTopBgImg + ChatTopNavBar + ChatTopBanner + OneFeelMK001 + ChatCardAI + ChatCardMine + ChatMoreTips + ChatQuickAccess)();
(ChatTopBgImg + ChatTopNavBar + ChatTopBanner + OneFeelMK001 + ChatCardAI + ChatCardMine + CreateServiceOrder + ChatMoreTips + ChatQuickAccess)();
}
const ChatTopBanner = () => "./ChatTopBanner.js";
const ChatTopBgImg = () => "./ChatTopBgImg.js";
@@ -13,6 +13,7 @@ const ChatCardMine = () => "./ChatCardMine.js";
const ChatQuickAccess = () => "./ChatQuickAccess2.js";
const ChatMoreTips = () => "./ChatMoreTips.js";
const OneFeelMK001 = () => "../module/OneFeelMK001.js";
const CreateServiceOrder = () => "../../components/create-service-order/index.js";
const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
__name: "ChatMainList",
emits: ["openDrawer"],
@@ -30,7 +31,7 @@ const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
const emits = __emit;
const openDrawer = () => {
emits("openDrawer");
common_vendor.index.__f__("log", "at pages/chat/ChatMainList.vue:152", "=============打开抽屉");
common_vendor.index.__f__("log", "at pages/chat/ChatMainList.vue:165", "=============打开抽屉");
};
const handleReply = (text) => {
loadMessage(text);
@@ -96,7 +97,7 @@ const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
}
};
chatMsgList.value.push(newMsgAI);
common_vendor.index.__f__("log", "at pages/chat/ChatMainList.vue:239", "发送的新消息:", JSON.stringify(newMsg));
common_vendor.index.__f__("log", "at pages/chat/ChatMainList.vue:249", "发送的新消息:", JSON.stringify(newMsg));
};
const scrollToBottom = () => {
lastMsgId.value = `${chatMsgList.value[chatMsgList.value.length - 1].msgId}`;

View File

@@ -8,6 +8,7 @@
"chat-card-mine": "./ChatCardMine",
"chat-quick-access": "./ChatQuickAccess",
"chat-more-tips": "./ChatMoreTips",
"one-feel-m-k001": "../module/OneFeelMK001"
"one-feel-m-k001": "../module/OneFeelMK001",
"create-service-order": "../../components/create-service-order/index"
}
}

View File

@@ -1 +1 @@
<view class="chat-container data-v-d7316ec5" bindtouchend="{{q}}"><chat-top-bg-img class="chat-container-bg data-v-d7316ec5" u-i="d7316ec5-0" bind:__l="__l"></chat-top-bg-img><view class="nav-bar-container data-v-d7316ec5" style="{{'padding-top:' + b + ';' + ('background-color:' + c)}}"><chat-top-nav-bar class="data-v-d7316ec5" bindopenDrawer="{{a}}" u-i="d7316ec5-1" bind:__l="__l"></chat-top-nav-bar></view><view class="chat-container-msg-list data-v-d7316ec5"><chat-top-banner class="chat-container-top-bannar data-v-d7316ec5" u-i="d7316ec5-2" bind:__l="__l"></chat-top-banner><scroll-view scroll-y scroll-into-view="{{f}}" scroll-with-animation="{{true}}" class="area-msg-list data-v-d7316ec5"><view class="data-v-d7316ec5" style="padding:6px 12px"><one-feel-m-k001 class="data-v-d7316ec5" u-i="d7316ec5-3" bind:__l="__l"></one-feel-m-k001></view><view class="data-v-d7316ec5" style="padding:6px 12px"><one-feel-m-k001 class="data-v-d7316ec5" u-i="d7316ec5-4" bind:__l="__l"></one-feel-m-k001></view><view class="data-v-d7316ec5" style="padding:6px 12px"><one-feel-m-k001 class="data-v-d7316ec5" u-i="d7316ec5-5" bind:__l="__l"></one-feel-m-k001></view><view wx:for="{{d}}" wx:for-item="item" wx:key="k" class="area-msg-list-content data-v-d7316ec5" id="{{item.l}}"><block wx:if="{{item.a}}"><chat-card-a-i wx:if="{{item.f}}" u-s="{{['d']}}" class="message-item message-item-ai data-v-d7316ec5" u-i="{{item.e}}" bind:__l="__l" u-p="{{item.f}}"><image wx:if="{{item.b}}" class="data-v-d7316ec5" src="{{item.c}}" style="width:100px;height:100px"></image><one-feel-m-k001 class="data-v-d7316ec5" u-i="{{item.d}}" bind:__l="__l"></one-feel-m-k001></chat-card-a-i></block><block wx:elif="{{item.g}}"><chat-card-mine wx:if="{{item.i}}" class="message-item message-item-mine data-v-d7316ec5" u-i="{{item.h}}" bind:__l="__l" u-p="{{item.i}}"></chat-card-mine></block><block wx:else><text class="message-item message-item-other data-v-d7316ec5">{{item.j}}</text></block></view><view class="data-v-d7316ec5" id="{{e}}"></view></scroll-view><view class="footer-area data-v-d7316ec5"><chat-more-tips class="data-v-d7316ec5" bindreplySent="{{g}}" u-i="d7316ec5-9" bind:__l="__l"></chat-more-tips><chat-quick-access class="data-v-d7316ec5" bindreplySent="{{h}}" u-i="d7316ec5-10" bind:__l="__l"></chat-quick-access><view class="area-input data-v-d7316ec5"><view class="input-container-voice data-v-d7316ec5"><image class="data-v-d7316ec5" src="{{i}}"></image></view><block wx:if="{{r0}}"><textarea class="textarea data-v-d7316ec5" type="text" placeholder="快速订票,呼叫服务" cursor-spacing="65" confirm-type="done" bindconfirm="{{j}}" bindtouchend="{{k}}" confirm-hold="{{true}}" auto-height show-confirm-bar="{{false}}" hold-keyboard="{{l}}" maxlength="300" value="{{m}}" bindinput="{{n}}"/></block><view class="input-container-send data-v-d7316ec5" bindtap="{{p}}"><image class="data-v-d7316ec5" src="{{o}}"></image></view></view></view></view></view>
<view class="chat-container data-v-d7316ec5" bindtouchend="{{q}}"><chat-top-bg-img class="chat-container-bg data-v-d7316ec5" u-i="d7316ec5-0" bind:__l="__l"></chat-top-bg-img><view class="nav-bar-container data-v-d7316ec5" style="{{'padding-top:' + b + ';' + ('background-color:' + c)}}"><chat-top-nav-bar class="data-v-d7316ec5" bindopenDrawer="{{a}}" u-i="d7316ec5-1" bind:__l="__l"></chat-top-nav-bar></view><view class="chat-container-msg-list data-v-d7316ec5"><chat-top-banner class="chat-container-top-bannar data-v-d7316ec5" u-i="d7316ec5-2" bind:__l="__l"></chat-top-banner><scroll-view scroll-y scroll-into-view="{{f}}" scroll-with-animation="{{true}}" class="area-msg-list data-v-d7316ec5"><view class="data-v-d7316ec5" style="padding:6px 12px"><one-feel-m-k001 class="data-v-d7316ec5" u-i="d7316ec5-3" bind:__l="__l"></one-feel-m-k001></view><view class="data-v-d7316ec5" style="padding:6px 12px"><one-feel-m-k001 class="data-v-d7316ec5" u-i="d7316ec5-4" bind:__l="__l"></one-feel-m-k001></view><view class="data-v-d7316ec5" style="padding:6px 12px"><one-feel-m-k001 class="data-v-d7316ec5" u-i="d7316ec5-5" bind:__l="__l"></one-feel-m-k001></view><view wx:for="{{d}}" wx:for-item="item" wx:key="k" class="area-msg-list-content data-v-d7316ec5" id="{{item.l}}"><block wx:if="{{item.a}}"><chat-card-a-i wx:if="{{item.f}}" u-s="{{['d']}}" class="message-item message-item-ai data-v-d7316ec5" u-i="{{item.e}}" bind:__l="__l" u-p="{{item.f}}"><image wx:if="{{item.b}}" class="data-v-d7316ec5" src="{{item.c}}" style="width:100px;height:100px"></image><one-feel-m-k001 class="data-v-d7316ec5" u-i="{{item.d}}" bind:__l="__l"></one-feel-m-k001></chat-card-a-i></block><block wx:elif="{{item.g}}"><chat-card-mine wx:if="{{item.i}}" class="message-item message-item-mine data-v-d7316ec5" u-i="{{item.h}}" bind:__l="__l" u-p="{{item.i}}"></chat-card-mine></block><block wx:else><text class="message-item message-item-other data-v-d7316ec5">{{item.j}}</text></block></view><create-service-order class="data-v-d7316ec5" u-i="d7316ec5-9" bind:__l="__l"/><view class="data-v-d7316ec5" id="{{e}}"></view></scroll-view><view class="footer-area data-v-d7316ec5"><chat-more-tips class="data-v-d7316ec5" bindreplySent="{{g}}" u-i="d7316ec5-10" bind:__l="__l"></chat-more-tips><chat-quick-access class="data-v-d7316ec5" bindreplySent="{{h}}" u-i="d7316ec5-11" bind:__l="__l"></chat-quick-access><view class="area-input data-v-d7316ec5"><view class="input-container-voice data-v-d7316ec5"><image class="data-v-d7316ec5" src="{{i}}"></image></view><block wx:if="{{r0}}"><textarea class="textarea data-v-d7316ec5" type="text" placeholder="快速订票,呼叫服务" cursor-spacing="65" confirm-type="done" bindconfirm="{{j}}" bindtouchend="{{k}}" confirm-hold="{{true}}" auto-height show-confirm-bar="{{false}}" hold-keyboard="{{l}}" maxlength="300" value="{{m}}" bindinput="{{n}}"/></block><view class="input-container-send data-v-d7316ec5" bindtap="{{p}}"><image class="data-v-d7316ec5" src="{{o}}"></image></view></view></view></view></view>

View File

@@ -26,7 +26,7 @@
.chat-container.data-v-d7316ec5 {
width: 100vw;
height: 100vh;
background-color: #E9F3F7;
background-color: #e9f3f7;
display: flex;
flex-direction: column;
overflow: hidden !important;
@@ -40,7 +40,7 @@
right: 0;
z-index: 0;
height: 270px;
background: linear-gradient(180deg, #42ADF9 0%, #6CD1FF 51%, #E9F3F7 99%);
background: linear-gradient(180deg, #42adf9 0%, #6cd1ff 51%, #e9f3f7 99%);
}
.chat-container .nav-bar-container.data-v-d7316ec5 {
position: fixed;
@@ -110,7 +110,7 @@
width: 100vw;
flex-shrink: 0;
padding: 4px 0 24px 0;
background-color: #E9F3F7;
background-color: #e9f3f7;
touch-action: pan-x;
/* 仅允许横向触摸滚动 */
overflow-x: auto;
@@ -122,7 +122,7 @@
display: flex;
align-items: center;
border-radius: 22px;
background-color: #FFFFFF;
background-color: #ffffff;
box-shadow: 0px 0px 20px 0px rgba(52, 25, 204, 0.05);
margin: 0 12px;
}