Compare commits

3 Commits

Author SHA1 Message Date
24df46f2a3 Merge branch 'fix-109' of https://git.nianxx.cn/zoujing/YGChatCS
# Conflicts:
#	src/pages/index/components/chat/ChatQuickAccess/index.vue
2025-10-16 19:19:16 +08:00
b11b5888a7 feat: 样式调整 2025-10-16 18:57:48 +08:00
duanshuwen
afb124ee19 feat: 新增更多服务弹窗 2025-10-15 21:35:54 +08:00
15 changed files with 175 additions and 21 deletions

View File

@@ -18,7 +18,6 @@
.loading-container { .loading-container {
display: flex; display: flex;
align-items: center; align-items: center;
padding: 4px 0;
max-width: 100%; // ✅ 限制最大宽度 max-width: 100%; // ✅ 限制最大宽度
} }

View File

@@ -5,7 +5,6 @@
display: flex; display: flex;
flex-direction: column; flex-direction: column;
min-width: 100px;
max-width: 100%; // ✅ 限制最大宽度 max-width: 100%; // ✅ 限制最大宽度
overflow-x: hidden; // ✅ 防止横向撑开 overflow-x: hidden; // ✅ 防止横向撑开
} }

View File

@@ -1,6 +1,8 @@
<template> <template>
<view class="chat-other border-box flex flex-col overflow-hidden pl-12"> <view
<text class="font-size-14 color-33">{{ text }}</text> class="chat-other border-box flex flex-col overflow-hidden pl-12 mt-6 mb-6"
>
<text class="font-size-14 color-333">{{ text }}</text>
<slot></slot> <slot></slot>
</view> </view>
</template> </template>
@@ -15,6 +17,4 @@ defineProps({
}); });
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped></style>
@import "./styles/index.scss";
</style>

View File

@@ -1,3 +0,0 @@
.chat-other {
margin: 6px 0;
}

View File

@@ -103,7 +103,7 @@
</scroll-view> </scroll-view>
<!-- 输入框区域 --> <!-- 输入框区域 -->
<view class="footer"> <view class="pb-safe-area">
<ChatQuickAccess @replySent="handleReplyInstruct" /> <ChatQuickAccess @replySent="handleReplyInstruct" />
<ChatInputArea <ChatInputArea
ref="inputAreaRef" ref="inputAreaRef"
@@ -275,7 +275,7 @@ const handleReply = (text) => {
const handleReplyInstruct = async (item) => { const handleReplyInstruct = async (item) => {
await checkToken(); await checkToken();
if (item.type === "MyOrder") { if (item.type === "Command.myOrder") {
// 订单 // 订单
uni.navigateTo({ uni.navigateTo({
url: "/pages-order/order/list", url: "/pages-order/order/list",
@@ -775,6 +775,4 @@ const resetConfig = () => {
}; };
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped></style>
@import "./styles/index.scss";
</style>

View File

@@ -1,3 +0,0 @@
.footer {
padding-bottom: Max(env(safe-area-inset-bottom), 12px);
}

View File

@@ -36,7 +36,7 @@ const itemList = ref([
{ {
icon: "", icon: "",
title: "呼叫服务", title: "呼叫服务",
type: "Command.callService", type: "Command.createWorkOrderCard",
}, },
{ {
icon: "https://oss.nianxx.cn/mp/static/version_101/home/more.png", icon: "https://oss.nianxx.cn/mp/static/version_101/home/more.png",
@@ -48,6 +48,10 @@ const itemList = ref([
const emits = defineEmits(["replySent"]); const emits = defineEmits(["replySent"]);
const sendReply = (item) => { const sendReply = (item) => {
if (item.type === "Command.more") {
uni.$emit("SHOW_MORE_POPUP");
return;
}
emits("replySent", item); // 向父组件传递数据 emits("replySent", item); // 向父组件传递数据
}; };
@@ -85,7 +89,7 @@ const initData = () => {
showIcon: false, showIcon: false,
title: "订单/工单", title: "订单/工单",
content: "我的订单/工单", content: "我的订单/工单",
type: "MyOrder", type: "Command.myOrder",
}, },
] ]
: [ : [
@@ -108,7 +112,7 @@ const initData = () => {
showIcon: false, showIcon: false,
title: "订单/工单", title: "订单/工单",
content: "我的订单/工单", content: "我的订单/工单",
type: "MyOrder", type: "Command.myOrder",
}, },
{ {
icon: "https://oss.nianxx.cn/mp/static/quick/quick_icon_call.png", icon: "https://oss.nianxx.cn/mp/static/quick/quick_icon_call.png",

View File

@@ -0,0 +1,99 @@
<template>
<uni-popup ref="popup" type="bottom" :safe-area="false">
<view class="popup-content border-box pt-12 pl-12 pr-12">
<view class="header flex flex-items-center pb-12">
<view class="title flex-full font-size-17 color-000 font-500"
>更多服务</view
>
<uni-icons type="close" size="20" color="#CACFD8" @click="close" />
</view>
<view class="list bg-white border-box pl-20 pr-20">
<view
class="item border-box border-bottom pt-20 pb-20"
v-for="(item, index) in list"
:key="index"
@click="close"
>
<view class="flex flex-items-center flex-justify-center">
<image v-if="item.icon" class="left" :src="item.icon" />
<view class="center flex-full">
<view class="font-size-16 color-000 line-height-24 font-500">
{{ item.title }}
</view>
<view class="font-size-12 color-A3A3A3 line-height-16">
{{ item.content }}
</view>
</view>
<view
class="right border-box font-size-12 color-white line-height-16"
>
{{ item.btnText }}
</view>
</view>
</view>
</view>
</view>
</uni-popup>
</template>
<script setup>
import { ref } from "vue";
const popup = ref(null);
const list = ref([
{
icon: "https://oss.nianxx.cn/mp/static/version_101/home/ksyd.png",
title: "快速预定",
content: "预定门票、房间、餐食",
btnText: "去预定",
type: "Command.quickBooking",
},
{
icon: "https://oss.nianxx.cn/mp/static/version_101/home/tsfx.png",
title: "探索发现",
content: "发现景点、活动、特色内容",
btnText: "去探索",
type: "Command.discovery",
},
{
icon: "https://oss.nianxx.cn/mp/static/version_101/home/mddd.png",
title: "我的订单",
content: "查看门票、住宿、餐饮等订单",
btnText: "去查看",
type: "Command.myOrder",
},
{
icon: "https://oss.nianxx.cn/mp/static/version_101/home/wdgd.png",
title: "我的工单",
content: "查看服务工单、进度与处理情况",
btnText: "去查看",
type: "Command.myWorkOrder",
},
{
icon: "https://oss.nianxx.cn/mp/static/version_101/home/fkyj.png",
title: "反馈意见",
content: "提交使用问题、建议与需求",
btnText: "去反馈",
type: "Command.feedbackCard",
},
]);
const open = () => {
popup.value && popup.value.open();
};
const close = () => {
popup.value && popup.value.close();
};
// 接收更多服务
uni.$on("SHOW_MORE_POPUP", () => {
open();
});
</script>
<style lang="scss" scoped>
@import "./styles/index.scss";
</style>

View File

@@ -0,0 +1,29 @@
.popup-content {
background-color: #f5f7fa;
border-radius: 15px 15px 0 0;
padding-bottom: Max(env(safe-area-inset-bottom), 12px) !important;
}
.list {
border-radius: 15px;
}
.item {
gap: 20px;
&:last-child {
border-bottom: none;
}
}
.left {
width: 24px;
height: 24px;
margin-right: 12px;
}
.right {
background-color: #2d91ff;
border-radius: 5px;
padding: 6px;
}

View File

@@ -11,6 +11,9 @@
@close="handleCalendarClose" @close="handleCalendarClose"
@select="handleDateSelect" @select="handleDateSelect"
/> />
<!-- 更多服务 -->
<MoreService />
</template> </template>
<script setup> <script setup>
@@ -20,6 +23,7 @@ import { getUrlParams } from "@/utils/UrlParams";
import { useAppStore } from "@/store"; import { useAppStore } from "@/store";
import ChatMainList from "./components/chat/ChatMainList/index.vue"; import ChatMainList from "./components/chat/ChatMainList/index.vue";
import Calender from "@/components/Calender/index.vue"; import Calender from "@/components/Calender/index.vue";
import MoreService from "./components/module/MoreService/index.vue";
const appStore = useAppStore(); const appStore = useAppStore();

View File

@@ -2,3 +2,7 @@
.border { .border {
border: 1px solid #000; border: 1px solid #000;
} }
.border-bottom {
border-bottom: 1px solid #e5e8ee;
}

View File

@@ -20,6 +20,10 @@
color: #999; color: #999;
} }
.color-A3A3A3 {
color: #a3a3a3;
}
.color-525866 { .color-525866 {
color: #525866; color: #525866;
} }

View File

@@ -1,4 +1,8 @@
// 行高 // 行高
.line-height-16 {
line-height: 16px;
}
.line-height-17 { .line-height-17 {
line-height: 17px; line-height: 17px;
} }
@@ -18,3 +22,7 @@
.line-height-22 { .line-height-22 {
line-height: 22px; line-height: 22px;
} }
.line-height-24 {
line-height: 24px;
}

View File

@@ -19,6 +19,14 @@
margin-bottom: 12px; margin-bottom: 12px;
} }
.mt-6 {
margin-top: 6px;
}
.mb-6 {
margin-bottom: 6px;
}
.ml-12 { .ml-12 {
margin-left: 12px; margin-left: 12px;
} }

View File

@@ -58,3 +58,7 @@
.pb-20 { .pb-20 {
padding-bottom: 20px; padding-bottom: 20px;
} }
.pb-safe-area {
padding-bottom: Max(env(safe-area-inset-bottom), 12px);
}