3 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
7 changed files with 66 additions and 62 deletions

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

@@ -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

@@ -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.4"; 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";