Merge remote-tracking branch 'origin' into order-729

合并main分支代码
This commit is contained in:
duanshuwen
2025-08-05 18:24:16 +08:00
18 changed files with 151 additions and 115 deletions

View File

@@ -1,2 +1,5 @@
// 滚动到底部
export const SCROLL_TO_BOTTOM = 'SCROLL_TO_BOTTOM'
export const SCROLL_TO_BOTTOM = 'SCROLL_TO_BOTTOM'
// 推荐帖子
export const RECOMMEND_POSTS_TITLE = 'RECOMMEND_POSTS_TITLE'

View File

@@ -8,7 +8,7 @@
<textarea
class="textarea"
type="text"
placeholder="快速订票,呼叫服务"
:placeholder="placeholder"
cursor-spacing="65"
confirm-type='done'
v-model="inputMessage"
@@ -35,6 +35,7 @@ const props = defineProps({
})
const emit = defineEmits(['update:inputMessage', 'send', 'noHideKeyboard'])
const placeholder = ref('快告诉朵朵您在想什么~')
const inputMessage = ref(props.inputMessage || '')
// 保持和父组件同步

View File

@@ -76,7 +76,7 @@
import { ref } from 'vue'
import { defineEmits } from 'vue'
import { onLoad } from '@dcloudio/uni-app';
import { SCROLL_TO_BOTTOM } from '../../constant/constant'
import { SCROLL_TO_BOTTOM, RECOMMEND_POSTS_TITLE } from '@/constant/constant'
import { MessageRole, MessageType, CompName } from '../../model/ChatModel';
import ChatTopWelcome from './ChatTopWelcome.vue';
@@ -231,6 +231,13 @@
scrollToBottom()
}, 200)
})
uni.$on(RECOMMEND_POSTS_TITLE, (value) => {
console.log('RECOMMEND_POSTS_TITLE:', value)
if(value && value.length > 0) {
handleReply(value)
}
})
}
/// 获取最近一次的会话id

View File

@@ -31,27 +31,27 @@
itemList.value = [
{
icon: '/static/quick/quick_icon_yuding.png',
title: '预定门票',
content: '快速预定天沐温泉门票',
title: '快速预定',
content: '预定门票、房间、餐食',
type: 'Command.quickBooking'
},
{
icon: '/static/quick/quick_icon_find.png',
title: '探索发现',
content: '亲子、团建等更多玩法',
content: '探索玩法、出片佳地',
type: 'Command.discovery'
},
{
icon: '/static/quick/quick_icon_order.png',
title: '订单/工单',
content: '我的订单/工单',
type: 'MyOrder'
},
{
icon: '/static/quick/quick_icon_call.png',
title: '呼叫服务',
content: '加床、订麻将机...',
content: '加水、客房服务等',
type: 'Command.createWorkOrder'
},
{
icon: '/static/quick/quick_icon_order.png',
title: '我的订单',
content: '快速查看订单',
type: 'MyOrder'
}
]
}

View File

@@ -1,6 +1,5 @@
<template>
<view class="top-bg">
<image src="/static/top_bg_icon.png" mode="aspectFit" class="top-bg-img"></image>
</view>
</template>
@@ -12,6 +11,7 @@
width: 100%;
height: 270px;
overflow: hidden;
background: linear-gradient( 180deg, #42ADF9 0%, #6CD1FF 51%, #E9F3F7 99%);
.top-bg-img {
width: 100%;
height: 100%;

View File

@@ -1,7 +1,7 @@
<template>
<view class="nav-bar">
<view class="nav-item" @click="showDrawer('showLeft')">
<image class="nav-item-icon" src="/static/drawer_icon.png" mode="aspectFit"></image>
<uni-icons type="bars" size="24" color="#333"></uni-icons>
</view>
<uni-drawer ref="showLeft" mode="left" :width="320">

View File

@@ -1,14 +1,9 @@
<template>
<view class="top-bg-content">
<view class="top-item1" >
<view class="top-item" >
<!-- :style="backgroundStyle" -->
<view class="top-item1-left">
<image :src="initPageImages.welcomeImageUrl"></image>
<text>{{ currentDate }} 多云 -36 dd </text>
</view>
<view class="top-item1-right">
<image :src="initPageImages.logoImageUrl"></image>
</view>
<image class="top-item-left" :src="initPageImages.welcomeImageUrl"></image>
<image class="top-item-right" :src="initPageImages.logoImageUrl"></image>
</view>
<ChatCardAI :text='welcomeContent'/>
</view>
@@ -33,13 +28,6 @@
}
})
// 获取当前日期
const today = new Date();
const currentDate = ref(today.getFullYear() + '/' +
((today.getMonth() + 1) < 10 ? '0' : '') + (today.getMonth() + 1) + '/' +
(today.getDate() < 10 ? '0' : '') + today.getDate());
// 计算背景样式
const backgroundStyle = computed(() => {
return {
@@ -60,40 +48,23 @@
flex-direction: column;
}
.top-item1 {
.top-item {
display: flex;
flex-direction: row;
justify-content: space-between;
padding: 0 32px 0 32px;
margin-bottom: -6px;
.top-item1-left {
display: flex;
flex-direction: column;
justify-content: flex-end;
image {
width: 118px;
height: 52px;
}
text {
font-family: PingFang SC, PingFang SC;
font-weight: 400;
font-size: 12px;
color: #1E4C69;
line-height: 24px;
text-align: justify;
font-style: normal;
text-transform: none;
}
}
.top-item1-right {
image {
width: 130px;
height: 130px;
margin-bottom: -20px;
}
}
align-items: center;
padding: 0 32px;
margin-bottom: -8px;
}
.top-item-left {
width: 118px;
height: 52px;
}
.top-item-right {
width: 130px;
height: 130px;
margin: -12px 0;
}
</style>

View File

@@ -4,7 +4,8 @@
<view class="user-card">
<view class="row avatar-row">
<text class="label">头像 </text>
<image class="avatar" :src="userInfo.avatar" mode="aspectFill" />
<!-- <image class="avatar" :src="userInfo.avatar" mode="aspectFill" /> -->
<uni-icons type="contact" size="40" color="#ccc"></uni-icons>
</view>
<view class="row">
<text class="label">昵称</text>

View File

@@ -10,6 +10,7 @@
<swiper-item v-for="item in activityList" :key="item.id">
<view class="swiper-item">
<image :src="item.activityCover" mode="aspectFill"></image>
<view class="corner-btn">快速预定</view>
</view>
</swiper-item>
</swiper>
@@ -45,15 +46,32 @@
border-radius: 8px;
}
.swiper-item {
display: block;
height: 120px;
line-height: 120px;
text-align: center;
position: relative;
display: block;
height: 120px;
line-height: 120px;
text-align: center;
image {
width: 100%;
height: 100%;
border-radius: 8px;
display: block;
}
.corner-btn {
position: absolute;
right: 12px;
bottom: 12px;
background-color: #ffeb00;
color: #333;
font-size: 14px;
font-weight: 500;
padding: 4px 12px;
border-radius: 20px;
line-height: 1.5;
}
}
.swiper-item image {
width: 100%;
height: 100%;
border-radius: 8px;
}
}
</style>

View File

@@ -1,7 +1,7 @@
<template>
<view class="container">
<view v-for="item in themeDTOList" :key="item.title">
<DiscoveryCradContentList :recommendTheme="item" />
<RecommendPostsList :recommendTheme="item" />
</view>
</view>
</template>
@@ -10,8 +10,8 @@
import { ref, nextTick } from 'vue'
import { onMounted } from 'vue'
import { discoveryCradComponent } from '@/request/api/MainPageDataApi'
import RecommendPostsList from '../recommend/RecommendPostsList.vue'
import { SCROLL_TO_BOTTOM } from '@/constant/constant'
import DiscoveryCradContentList from './DiscoveryCradContentList.vue'
const themeDTOList = ref([])

View File

@@ -2,7 +2,7 @@
<view class="container">
<ModuleTitle :title="recommendTheme.themeName" />
<view class="container-scroll">
<view class="mk-card-item" v-for="(item, index) in recommendTheme.recommendPostsList" :key="index">
<view class="mk-card-item" v-for="(item, index) in recommendTheme.recommendPostsList" :key="index" @click="sendReply(item)">
<image :src="item.coverPhoto" mode="widthFix"></image>
<text>{{ item.topic }}</text>
</view>
@@ -12,7 +12,7 @@
<script setup>
import ModuleTitle from '@/components/ModuleTitle/index.vue'
import { RECOMMEND_POSTS_TITLE } from '@/constant/constant'
import { defineProps } from 'vue'
const props = defineProps({
recommendTheme: {
@@ -20,6 +20,11 @@
default: {}
}
})
const sendReply = (item) => {
const topic = item.userInputContent || item.topic.replace(/^#/, '');
uni.$emit(RECOMMEND_POSTS_TITLE, topic);
}
</script>

View File

@@ -2,9 +2,11 @@
<view class="container">
<ModuleTitle :title="recommendTheme.themeName" />
<view class="container-scroll">
<view class="mk-card-item" v-for="(item, index) in recommendTheme.recommendPostsList" :key="index">
<image :src="item.coverPhoto" mode="widthFix"></image>
<text>{{ item.topic }}</text>
<view class="mk-card-item" v-for="(item, index) in recommendTheme.recommendPostsList" :key="index" @click="sendReply(item)">
<image :src="item.coverPhoto" mode="aspectFill"></image>
<view class="overlay-gradient">
<text class="overlay-text">{{ item.topic }}</text>
</view>
</view>
</view>
</view>
@@ -13,6 +15,8 @@
<script setup>
import ModuleTitle from '@/components/ModuleTitle/index.vue'
import { defineProps } from 'vue'
import { RECOMMEND_POSTS_TITLE } from '@/constant/constant.js'
const props = defineProps({
recommendTheme: {
type: Object,
@@ -20,45 +24,71 @@
}
})
const sendReply = (item) => {
const topic = item.userInputContent || item.topic.replace(/^#/, '');
uni.$emit(RECOMMEND_POSTS_TITLE, topic);
}
</script>
<style lang="scss" scoped>
.container {
.container-scroll {
display: flex;
flex-direction: row;
overflow-x: auto;
margin-top: 4px;
/* 隐藏滚动条 */
scrollbar-width: none;
&::-webkit-scrollbar {
display: none;
}
.mk-card-item {
display: flex;
flex-direction: column;
align-items: start;
width: 188px;
height: 154px;
background-color: #ffffff;
border-radius: 10px;
margin-right: 8px;
image {
width: 188px;
height: 112px;
}
text {
padding: 12px;
text-align: center;
font-weight: 500;
font-size: 12px;
color: #333333;
}
}
}
}
.container-scroll {
display: flex;
flex-direction: row;
overflow-x: auto;
margin-top: 4px;
/* 隐藏滚动条 */
scrollbar-width: none;
&::-webkit-scrollbar {
display: none;
}
.mk-card-item {
flex-shrink: 0; /* 关键:防止 flex 布局压缩子元素宽度 */
width: 142px;
height: 126px;
border-radius: 10px;
overflow: hidden;
margin-right: 8px;
position: relative;
image {
width: 100%;
height: 100%;
display: block;
}
/* 渐变背景层 */
.overlay-gradient {
position: absolute;
bottom: 0;
left: 0;
width: 100%;
height: 50px; /* 渐变层高度,可调 */
background: linear-gradient(
to bottom,
rgba(0, 0, 0, 0.001) 0%,
rgba(0, 0, 0, 0.5) 100%
);
display: flex;
align-items: flex-end; /* 文字贴近底部 */
padding: 0 8px 6px; /* 内边距让文字与边缘保持距离 */
box-sizing: border-box;
}
/* 渐变层上的文字 */
.overlay-text {
color: #fff;
font-weight: 500;
font-size: 12px;
text-align: left;
width: 100%;
}
}
}
</style>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 51 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 164 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 30 KiB