7 Commits

Author SHA1 Message Date
8211e0b91b feat: 改变了欢迎ip 的动态配置 2026-01-16 11:28:55 +08:00
17a05aab4c feat: 入住信息的样式优化 2026-01-16 10:26:22 +08:00
ff9227c3b8 feat: 环境地址配置 2026-01-16 10:25:55 +08:00
5aba9afdd5 feat: 调整商品的跳转问题 2026-01-16 09:36:44 +08:00
0351bd8dc6 feat: 更新版本号 2026-01-16 09:36:21 +08:00
3b8e604853 feat: 去掉无用的消息类型 2026-01-15 15:33:29 +08:00
fbb19c4603 feat: 智念的图替换 2026-01-13 16:38:58 +08:00
11 changed files with 71 additions and 83 deletions

View File

@@ -6,7 +6,7 @@
"placeholder": "快告诉智念您在想什么~",
"loginDesc": "您好,欢迎来到智念科技",
"logo": "https://oss.nianxx.cn/mp/static/version_101/login/dh_logo.png",
"ipLargeImage": "https://oss.nianxx.cn/mp/static/version_101/dh/dh_large.png",
"ipLargeImage": "https://oss.nianxx.cn/mp/static/version_101/zn/zn_large.png",
"ipSmallImage": "https://oss.nianxx.cn/mp/static/version_101/dh/dh_small.png",
"ipLargeImageHeight": 19687,
"ipSmallImageHeight": 3744,
@@ -47,4 +47,4 @@
"ipLargeTime": 4,
"ipSmallTime": 6
}
}
}

View File

@@ -1,6 +1,6 @@
<script setup>
import { onLaunch, onShow, onHide } from "@dcloudio/uni-app";
import { getEvnUrl } from "@/request/api/config";
import { getEvnUrl } from "@/request/base/config";
import { refreshToken } from "@/hooks/useGoLogin";
import { getAccessToken } from "@/constant/token";

View File

@@ -7,13 +7,6 @@ export const MessageRole = {
OTHER: "OTHER",
};
export const MessageType = {
// 文本消息
TEXT: "TEXT",
// 图片消息
IMAGE: "IMAGE",
};
/// 组件的名称
export const CompName = {
// 快速预定卡片

View File

@@ -1,40 +1,27 @@
<template>
<view class="bg-white rounded-12 overflow-hidden mb-12">
<view class="flex flex-items-center border-box p-12 border-bottom">
<view class="font-size-16 font-500 color-000 line-height-24 flex-full"
>入住信息</view
>
<view class="font-size-16 font-500 color-000 line-height-24 flex-full">入住信息</view>
<view class="right">
<Stepper v-model="count" unit="间" />
</view>
</view>
<view class="border-box pl-12 pr-12">
<view
class="border-box border-bottom pt-12 pb-12 flex flex-items-center"
v-for="(item, index) in userFormList"
:key="index"
>
<view class="border-box border-bottom pt-12 pb-12 flex flex-items-center" v-for="(item, index) in userFormList"
:key="index">
<view class="font-size-14 font-500 color-525866 mr-12"> 住客姓名 </view>
<view class="right">
<input
class="border-box rounded-8 px-4 py-2 font-size-15 color-000 line-height-20"
v-model.trim="item.visitorName"
placeholder="请输入姓名"
maxlength="11"
/>
<input class="border-box px-4 py-2 font-size-15 color-000 line-height-20" v-model.trim="item.visitorName"
placeholder="请输入姓名" maxlength="11" />
</view>
</view>
<view class="flex flex-items-center border-box pt-12 pb-12">
<view class="font-size-14 font-500 color-525866 mr-12"> 联系手机 </view>
<view class="right">
<input
class="border-box rounded-8 px-4 py-2 font-size-15 color-000 line-height-20"
v-model.trim="userFormList[0].contactPhone"
placeholder="请输入联系手机"
maxlength="11"
/>
<input class="border-box px-4 py-2 font-size-15 color-000 line-height-20"
v-model.trim="userFormList[0].contactPhone" placeholder="请输入联系手机" maxlength="11" />
</view>
</view>
</view>

View File

@@ -19,7 +19,7 @@
<text class="font-size-12 line-height-16 color-99A0AE">
/{{ item.stockUnitLabel }}
</text>
<text class="btn border-box rounded-10 color-white ml-16" @click.stop="handleBooking(item)"></text>
<text class="btn border-box rounded-10 color-white ml-16"></text>
</view>
</view>
</view>
@@ -63,7 +63,6 @@ const navigateToPage = (commodityId, path) => {
const handleClick = ({ commodityId }) => navigateToPage(commodityId, "/pages/goods/index")
const handleBooking = ({ commodityId }) => navigateToPage(commodityId, "/pages-booking/index")
</script>
<style scoped lang="scss">

View File

@@ -82,7 +82,7 @@ import {
NOTICE_EVENT_LOGOUT,
NOTICE_EVENT_LOGIN_SUCCESS,
} from "@/constant/constant";
import { MessageRole, MessageType, CompName } from "@/model/ChatModel";
import { MessageRole, CompName } from "@/model/ChatModel";
import ChatTopWelcome from "../ChatTopWelcome/index.vue";
import ChatTopNavBar from "../ChatTopNavBar/index.vue";
import ChatCardAI from "../ChatCardAi/index.vue";
@@ -608,10 +608,6 @@ const sendMessage = async (message, isInstruct = false) => {
msgId: `msg_${chatMsgList.value.length}`,
msgType: MessageRole.ME,
msg: message,
msgContent: {
type: MessageType.TEXT,
text: message,
},
};
chatMsgList.value.push(newMsg);
inputMessage.value = "";
@@ -744,10 +740,6 @@ const sendChat = async (message, isInstruct = false) => {
msgType: MessageRole.AI,
msg: "加载中",
isLoading: true,
msgContent: {
type: MessageType.TEXT,
url: "",
},
messageId: currentSessionMessageId,
};
chatMsgList.value.push(aiMsg);

View File

@@ -5,18 +5,11 @@
<!-- 隐藏 -->
<view class="flex-full h-full flex flex-items-center flex-justify-center">
<!-- ChatTopWelcome不在可视区显示并添加动画在可视区隐藏 -->
<view
v-show="show"
:class="['w-32 h-32', { 'image-animated': show }]"
:style="getStyle"
></view>
<text
v-show="show"
:class="[
'font-size-14 font-500 color-171717 ml-10',
{ 'text-animated': show },
]"
>
<view v-show="show" :class="['w-32 h-32', { 'image-animated': show }]" :style="getStyle"></view>
<text v-show="show" :class="[
'font-size-14 font-500 color-171717 ml-10',
{ 'text-animated': show },
]">
{{ config.name }}
</text>
</view>
@@ -32,22 +25,31 @@ import { getCurrentConfig } from "@/constant/base";
const props = defineProps({
mainPageDataModel: {
type: Object,
default: () => ({}),
default: () => ({
initPageImages: {},
}),
},
});
const initPageImages = computed(() => {
return props.mainPageDataModel?.initPageImages || {};
});
const show = ref(false);
const config = getCurrentConfig();
const getStyle = computed(() => {
return {
"--ipSmallImageStep": config.ipSmallImageStep,
"--ipSmallImageHeight": config.ipSmallImageHeight,
"--ipSmallTime": config.ipSmallTime,
backgroundImage: `url(${config.ipSmallImage})`,
const images = initPageImages.value;
const style = {
"--ipSmallImageStep": images.ipSmallImageStep ?? config.ipSmallImageStep,
"--ipSmallImageHeight": images.ipSmallImageHeight ?? config.ipSmallImageHeight,
"--ipSmallTime": images.ipSmallTime ?? config.ipSmallTime,
backgroundImage: `url(${images.ipSmallImage ?? config.ipSmallImage})`,
backgroundRepeat: "no-repeat",
backgroundSize: "32px auto",
backgroundPosition: "0 0",
};
console.log("top nav bar image style:", style);
return style;
});
const showDrawer = () => uni.$emit("SHOW_DRAWER");

View File

@@ -2,13 +2,9 @@ v
<template>
<view class="welcome-content border-box p-12">
<view class="wrap rounded-20">
<view
class="flex flex-items-center flex-justify-between border-box pl-12 pr-12"
>
<view class="flex flex-items-center flex-justify-between border-box pl-12 pr-12">
<view class="ip" :style="getStyle"></view>
<view
class="welcome-text font-size-14 font-500 font-family-misans-vf color-171717 line-height-24"
>
<view class="welcome-text font-size-14 font-500 font-family-misans-vf color-171717 line-height-24">
{{ welcomeContent }}
</view>
</view>
@@ -49,19 +45,27 @@ const props = defineProps({
},
});
const getStyle = computed(() => {
const config = getCurrentConfig();
const initPageImages = computed(() => {
return props.mainPageDataModel?.initPageImages || {};
});
return {
"--ipLargeImageStep": config.ipLargeImageStep,
"--ipLargeImageHeight": config.ipLargeImageHeight,
"--ipLargeTime": config.ipLargeTime,
backgroundImage: `url(${config.ipLargeImage})`,
const config = getCurrentConfig();
const getStyle = computed(() => {
const images = initPageImages.value;
const style = {
"--ipLargeImageStep": images.ipLargeImageStep ?? config.ipLargeImageStep,
"--ipLargeImageHeight": images.ipLargeImageHeight ?? config.ipLargeImageHeight,
"--ipLargeTime": images.ipLargeTime ?? config.ipLargeTime,
backgroundImage: `url(${images.ipLargeImage || config.ipLargeImage})`,
backgroundRepeat: "no-repeat",
backgroundSize: "158px auto",
backgroundPosition: "0 0",
};
console.log("welcome image style:", style);
return style;
});
const welcomeContent = computed(() => props.mainPageDataModel.welcomeContent);
const guideWords = computed(() => props.mainPageDataModel.guideWords);

View File

@@ -0,0 +1,13 @@
import request from "../base/request";
import { proUrl } from "../base/baseUrl";
import { useAppStore } from "@/store";
export const getServiceUrl = async (versionValue) => {
const apiUrl = proUrl + "/hotelBiz/mainScene/getServiceUrl";
const res = await request.post(apiUrl, { versionValue: versionValue });
if (res && res.code == 0 && res.data) {
const appStore = useAppStore();
appStore.setServerConfig(res.data);
}
};

View File

@@ -1,15 +1,18 @@
import request from "../base/request";
import { isZhiNian } from "@/constant/base";
import { useAppStore } from "@/store";
import { devUrl, proUrl, wssDevUrl } from "../base/baseUrl";
import { devUrl, wssDevUrl } from "./baseUrl";
import { getServiceUrl } from "../api/GetServiceUrlApi";
/// 版本号, 每次发版本前增加
const versionValue = "1.0.3";
const versionValue = "1.0.4";
/// 是否是测试版本, 测试版本为true 发布版本为false
const developVersion = false;
// 获取服务地址
const getEvnUrl = async () => {
/// 智念客户端不需要获取环境地址
if (isZhiNian) {
if (isZhiNian || developVersion) {
const appStore = useAppStore();
appStore.setServerConfig({
baseUrl: devUrl, // 服务器基础地址
@@ -18,12 +21,8 @@ const getEvnUrl = async () => {
return;
}
const apiUrl = proUrl + "/hotelBiz/mainScene/getServiceUrl";
const res = await request.post(apiUrl, { versionValue: versionValue });
if (res && res.code == 0 && res.data) {
const appStore = useAppStore();
appStore.setServerConfig(res.data);
}
/// 正式环境获取服务地址
await getServiceUrl(versionValue);
};
export { getEvnUrl };

View File

@@ -1,4 +1,3 @@
import { goLogin } from "../../hooks/useGoLogin";
import { getCurrentConfig } from "@/constant/base";
import { useAppStore } from "@/store";
import { NOTICE_EVENT_LOGOUT } from "@/constant/constant";