Compare commits

..

No commits in common. "931511b0cfede7796f4d324777a76e18c8bf836e" and "81c86586217ffdce615b8bb40303968e5e3a55f9" have entirely different histories.

21 changed files with 116 additions and 160 deletions

View File

@ -1,7 +1,6 @@
<script setup>
import { onLaunch, onShow, onHide } from "@dcloudio/uni-app";
import { checkPhone } from "@/manager/LoginManager";
import { goLogin } from "@/hooks/useGoLogin";
import { goHome } from "@/hooks/useGoHome";
onLaunch(async () => {
@ -10,12 +9,6 @@ onLaunch(async () => {
const token = uni.getStorageSync("token");
// token
if (!token) {
goLogin();
return;
}
if (token) {
const res = await checkPhone();

View File

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

View File

@ -1 +0,0 @@
export const goLogin = () => uni.reLaunch({ url: "/pages/login/index" });

View File

@ -8,7 +8,7 @@
<textarea
class="textarea"
type="text"
:placeholder="placeholder"
placeholder="快速订票,呼叫服务"
cursor-spacing="65"
confirm-type='done'
v-model="inputMessage"
@ -35,7 +35,6 @@ 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, RECOMMEND_POSTS_TITLE } from '@/constant/constant'
import { SCROLL_TO_BOTTOM } from '../../constant/constant'
import { MessageRole, MessageType, CompName } from '../../model/ChatModel';
import ChatTopWelcome from './ChatTopWelcome.vue';
@ -231,13 +231,6 @@
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,5 +1,6 @@
<template>
<view class="top-bg">
<image src="/static/top_bg_icon.png" mode="aspectFit" class="top-bg-img"></image>
</view>
</template>
@ -11,7 +12,6 @@
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')">
<uni-icons type="bars" size="24" color="#333"></uni-icons>
<image class="nav-item-icon" src="/static/drawer_icon.png" mode="aspectFit"></image>
</view>
<uni-drawer ref="showLeft" mode="left" :width="320">

View File

@ -1,9 +1,14 @@
<template>
<view class="top-bg-content">
<view class="top-item" >
<view class="top-item1" >
<!-- :style="backgroundStyle" -->
<image class="top-item-left" :src="initPageImages.welcomeImageUrl"></image>
<image class="top-item-right" :src="initPageImages.logoImageUrl"></image>
<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>
</view>
<ChatCardAI :text='welcomeContent'/>
</view>
@ -28,6 +33,13 @@
}
})
//
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 {
@ -48,23 +60,40 @@
flex-direction: column;
}
.top-item {
.top-item1 {
display: flex;
flex-direction: row;
justify-content: space-between;
align-items: center;
padding: 0 32px;
margin-bottom: -8px;
}
padding: 0 32px 0 32px;
margin-bottom: -6px;
.top-item-left {
.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-item-right {
.top-item1-right {
image {
width: 130px;
height: 130px;
margin: -12px 0;
margin-bottom: -20px;
}
}
}
</style>

View File

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

View File

@ -10,7 +10,6 @@
<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>
@ -46,32 +45,15 @@
border-radius: 8px;
}
.swiper-item {
position: relative;
display: block;
height: 120px;
line-height: 120px;
text-align: center;
image {
}
.swiper-item 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;
}
}
}
</style>

View File

@ -1,7 +1,7 @@
<template>
<view class="container">
<view v-for="item in themeDTOList" :key="item.title">
<RecommendPostsList :recommendTheme="item" />
<DiscoveryCradContentList :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" @click="sendReply(item)">
<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>
@ -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: {
@ -21,11 +21,6 @@
}
})
const sendReply = (item) => {
const topic = item.userInputContent || item.topic.replace(/^#/, '');
uni.$emit(RECOMMEND_POSTS_TITLE, topic);
}
</script>
<style lang="scss" scoped>

View File

@ -2,11 +2,9 @@
<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" @click="sendReply(item)">
<image :src="item.coverPhoto" mode="aspectFill"></image>
<view class="overlay-gradient">
<text class="overlay-text">{{ item.topic }}</text>
</view>
<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>
</view>
</view>
@ -15,8 +13,6 @@
<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,
@ -24,16 +20,10 @@
}
})
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;
@ -48,47 +38,27 @@
}
.mk-card-item {
flex-shrink: 0; /* 关键:防止 flex 布局压缩子元素宽度 */
width: 142px;
height: 126px;
display: flex;
flex-direction: column;
align-items: start;
width: 188px;
height: 154px;
background-color: #ffffff;
border-radius: 10px;
overflow: hidden;
margin-right: 8px;
position: relative;
image {
width: 100%;
height: 100%;
display: block;
width: 188px;
height: 112px;
}
/* 渐变背景层 */
.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;
text {
padding: 12px;
text-align: center;
font-weight: 500;
font-size: 12px;
text-align: left;
width: 100%;
color: #333333;
}
}
}
}
</style>

BIN
static/drawer_icon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 51 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

BIN
static/logo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

BIN
static/test/mk_img_1.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 164 KiB

BIN
static/top_bg_icon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB