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

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

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