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": "快告诉智念您在想什么~", "placeholder": "快告诉智念您在想什么~",
"loginDesc": "您好,欢迎来到智念科技", "loginDesc": "您好,欢迎来到智念科技",
"logo": "https://oss.nianxx.cn/mp/static/version_101/login/dh_logo.png", "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", "ipSmallImage": "https://oss.nianxx.cn/mp/static/version_101/dh/dh_small.png",
"ipLargeImageHeight": 19687, "ipLargeImageHeight": 19687,
"ipSmallImageHeight": 3744, "ipSmallImageHeight": 3744,

View File

@@ -1,6 +1,6 @@
<script setup> <script setup>
import { onLaunch, onShow, onHide } from "@dcloudio/uni-app"; 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 { refreshToken } from "@/hooks/useGoLogin";
import { getAccessToken } from "@/constant/token"; import { getAccessToken } from "@/constant/token";

View File

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

View File

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

View File

@@ -19,7 +19,7 @@
<text class="font-size-12 line-height-16 color-99A0AE"> <text class="font-size-12 line-height-16 color-99A0AE">
/{{ item.stockUnitLabel }} /{{ item.stockUnitLabel }}
</text> </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> </view>
</view> </view>
@@ -63,7 +63,6 @@ const navigateToPage = (commodityId, path) => {
const handleClick = ({ commodityId }) => navigateToPage(commodityId, "/pages/goods/index") const handleClick = ({ commodityId }) => navigateToPage(commodityId, "/pages/goods/index")
const handleBooking = ({ commodityId }) => navigateToPage(commodityId, "/pages-booking/index")
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">

View File

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

View File

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

View File

@@ -2,13 +2,9 @@ v
<template> <template>
<view class="welcome-content border-box p-12"> <view class="welcome-content border-box p-12">
<view class="wrap rounded-20"> <view class="wrap rounded-20">
<view <view class="flex flex-items-center flex-justify-between border-box pl-12 pr-12">
class="flex flex-items-center flex-justify-between border-box pl-12 pr-12"
>
<view class="ip" :style="getStyle"></view> <view class="ip" :style="getStyle"></view>
<view <view class="welcome-text font-size-14 font-500 font-family-misans-vf color-171717 line-height-24">
class="welcome-text font-size-14 font-500 font-family-misans-vf color-171717 line-height-24"
>
{{ welcomeContent }} {{ welcomeContent }}
</view> </view>
</view> </view>
@@ -49,19 +45,27 @@ const props = defineProps({
}, },
}); });
const getStyle = computed(() => { const initPageImages = computed(() => {
const config = getCurrentConfig(); return props.mainPageDataModel?.initPageImages || {};
});
return { const config = getCurrentConfig();
"--ipLargeImageStep": config.ipLargeImageStep,
"--ipLargeImageHeight": config.ipLargeImageHeight, const getStyle = computed(() => {
"--ipLargeTime": config.ipLargeTime, const images = initPageImages.value;
backgroundImage: `url(${config.ipLargeImage})`, 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", backgroundRepeat: "no-repeat",
backgroundSize: "158px auto", backgroundSize: "158px auto",
backgroundPosition: "0 0", backgroundPosition: "0 0",
}; };
console.log("welcome image style:", style);
return style;
}); });
const welcomeContent = computed(() => props.mainPageDataModel.welcomeContent); const welcomeContent = computed(() => props.mainPageDataModel.welcomeContent);
const guideWords = computed(() => props.mainPageDataModel.guideWords); 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 { isZhiNian } from "@/constant/base";
import { useAppStore } from "@/store"; 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 () => { const getEvnUrl = async () => {
/// 智念客户端不需要获取环境地址 /// 智念客户端不需要获取环境地址
if (isZhiNian) { if (isZhiNian || developVersion) {
const appStore = useAppStore(); const appStore = useAppStore();
appStore.setServerConfig({ appStore.setServerConfig({
baseUrl: devUrl, // 服务器基础地址 baseUrl: devUrl, // 服务器基础地址
@@ -18,12 +21,8 @@ const getEvnUrl = async () => {
return; return;
} }
const apiUrl = proUrl + "/hotelBiz/mainScene/getServiceUrl"; /// 正式环境获取服务地址
const res = await request.post(apiUrl, { versionValue: versionValue }); await getServiceUrl(versionValue);
if (res && res.code == 0 && res.data) {
const appStore = useAppStore();
appStore.setServerConfig(res.data);
}
}; };
export { getEvnUrl }; export { getEvnUrl };

View File

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