15 Commits

Author SHA1 Message Date
3f803b662a feat: 首页的动效的修复 2025-11-26 23:58:18 +08:00
84b77b3fe6 feat: 商品数量的计算问题 2025-11-26 23:35:31 +08:00
92f981769f feat: 商品计算报错问题 2025-11-26 22:47:17 +08:00
f69225dbff feat: 商品的计算问题 2025-11-26 22:24:04 +08:00
f422dbaa00 feat:工单的校验问题处理 2025-11-20 14:02:54 +08:00
14fee13568 feat: 快速预定栏的样式处理 2025-11-20 13:48:59 +08:00
ed62f3fbbc feat: 呼叫服务和反馈意见样式调整 2025-11-19 18:06:36 +08:00
duanshuwen
8f79f5aecf feat: 异常问题处理 2025-11-18 20:01:25 +08:00
duanshuwen
c2c4f323dc feat: 授权token保持登录 2025-11-18 19:44:55 +08:00
duanshuwen
de412aed9c feat: 授权后token刷新保持 2025-11-18 19:40:28 +08:00
duanshuwen
de272b1160 feat: 修改登录界面文案 2025-11-15 10:17:12 +08:00
duanshuwen
47d1c5ab6f feat: 服务地址动态获取 2025-11-13 21:22:37 +08:00
duanshuwen
1028e20d42 feat: 服务接口地址动态获取 2025-11-13 19:43:03 +08:00
duanshuwen
48932e3851 feat: 工单服务数据回显 2025-11-13 18:40:15 +08:00
duanshuwen
9749e20971 feat: 完善首页顶部交互 2025-11-13 17:54:35 +08:00
28 changed files with 457 additions and 2187 deletions

View File

@@ -1,7 +1 @@
NODE_ENV = development NODE_ENV = development
# 测试
VITE_BASE_URL = https://onefeel.brother7.cn/ingress
# 测试
VITE_WSS_URL = wss://onefeel.brother7.cn/ingress/agent/ws/chat

View File

@@ -1,7 +1 @@
NODE_ENV = production NODE_ENV = production
# 生产
VITE_BASE_URL = https://biz.nianxx.cn
# 生产
VITE_WSS_URL = wss://biz.nianxx.cn/agent/ws/chat

View File

@@ -1,7 +1 @@
NODE_ENV = staging NODE_ENV = staging
# 生产
VITE_BASE_URL = https://biz.nianxx.cn
# 生产
VITE_WSS_URL = wss://biz.nianxx.cn/agent/ws/chat

View File

@@ -1,6 +1,6 @@
{ {
"zhinian": { "zhinian": {
"clientId": "2", "clientId": "6",
"appId": "wx5e79df5996572539", "appId": "wx5e79df5996572539",
"name": "智念", "name": "智念",
"placeholder": "快告诉智念您在想什么~", "placeholder": "快告诉智念您在想什么~",

View File

@@ -1,8 +1,11 @@
<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 { refreshToken } from "@/hooks/useGoLogin";
onLaunch(async () => { onLaunch(() => {
console.log("App Launch"); getEvnUrl({ versionValue: "1.0.1" });
refreshToken();
}); });
onShow(() => { onShow(() => {

View File

@@ -15,7 +15,7 @@
/> />
</view> </view>
<view v-if="!isCallSuccess" class="order-content border-box p-12"> <view v-if="!isCallSuccess" class="border-box p-12">
<view <view
class="bg-F5F7FA border-box flex flex-items-center p-12 rounded-10 font-size-14 color-171717 mb-12" class="bg-F5F7FA border-box flex flex-items-center p-12 rounded-10 font-size-14 color-171717 mb-12"
> >
@@ -27,7 +27,11 @@
class="bg-F5F7FA border-box flex flex-items-center p-12 rounded-10 font-size-14 color-171717 mb-12" class="bg-F5F7FA border-box flex flex-items-center p-12 rounded-10 font-size-14 color-171717 mb-12"
> >
<text class="font-500 line-height-22 mr-20">联系电话</text> <text class="font-500 line-height-22 mr-20">联系电话</text>
<input placeholder="请填写联系电话" v-model="contactPhone" /> <input
placeholder="请填写联系电话"
v-model="contactPhone"
@input="handleContactPhoneInput"
/>
</view> </view>
<view <view
@@ -115,19 +119,56 @@
</template> </template>
<script setup> <script setup>
import { ref, onMounted, nextTick } from "vue"; import { ref, computed, onMounted, nextTick, defineProps, watch } from "vue";
import { SCROLL_TO_BOTTOM } from "@/constant/constant"; import { SCROLL_TO_BOTTOM } from "@/constant/constant";
import { createWorkOrder } from "@/request/api/WorkOrderApi"; import { createWorkOrder } from "@/request/api/WorkOrderApi";
import { updateImageFile } from "@/request/api/UpdateFile"; import { updateImageFile } from "@/request/api/UpdateFile";
import { zniconsMap } from "@/static/fonts/znicons.js"; import { zniconsMap } from "@/static/fonts/znicons.js";
const props = defineProps({
toolCall: {
type: Object,
default: () => ({}),
},
});
const workOrderTypeId = ref(""); const workOrderTypeId = ref("");
const roomId = ref(""); const roomId = ref("");
const contactPhone = ref("");
const contactText = ref("");
const contentImgUrl = ref(""); const contentImgUrl = ref("");
const isCallSuccess = ref(false); // 呼叫成功状态 const isCallSuccess = ref(false); // 呼叫成功状态
const workOrderId = ref(0); // 工单ID const workOrderId = ref(0); // 工单ID
const toolResult = computed(() => {
if (props.toolCall?.toolResult) {
return JSON.parse(props.toolCall?.toolResult);
} else {
return {};
}
});
// 原始手机号(未脱敏)
const originalPhone = ref("");
// 展示与输入绑定的手机号(初始为脱敏)
const contactPhone = ref("");
// 是否用户已编辑过手机号(一旦编辑则不再脱敏)
const hasEditedPhone = ref(false);
// 需求信息描述:使用可写的 ref并从工具结果初始化
const contactText = ref("");
// 手机号脱敏138****1234仅对11位数字进行处理
const maskPhone = (phone) => {
if (!phone) return "";
return String(phone).replace(/(\d{3})\d{4}(\d{4})/, "$1****$2");
};
// 监听工具返回结果,初始化原始与脱敏显示
watch(
toolResult,
(val) => {
originalPhone.value = val?.userPhone || "";
hasEditedPhone.value = false;
contactPhone.value = maskPhone(originalPhone.value);
contactText.value = val?.callServiceContent || "";
},
{ immediate: true }
);
// 处理图片上传 // 处理图片上传
const handleChooseImage = () => { const handleChooseImage = () => {
@@ -143,6 +184,11 @@ const handleChooseImage = () => {
}); });
}; };
// 标记用户已编辑手机号
const handleContactPhoneInput = () => {
hasEditedPhone.value = true;
};
const handleDeleteImage = () => { const handleDeleteImage = () => {
contentImgUrl.value = ""; contentImgUrl.value = "";
}; };
@@ -168,7 +214,10 @@ const handleCall = async () => {
return; return;
} }
if (!contactPhone.value.trim()) { const phoneToSubmit = hasEditedPhone.value
? contactPhone.value
: originalPhone.value;
if (!phoneToSubmit.trim()) {
uni.showToast({ title: "请填写联系电话", icon: "none" }); uni.showToast({ title: "请填写联系电话", icon: "none" });
return; return;
} }
@@ -178,19 +227,22 @@ const handleCall = async () => {
return; return;
} }
sendCreateWorkOrder(); sendCreateWorkOrder(phoneToSubmit);
}; };
/// 创建工单 /// 创建工单
const sendCreateWorkOrder = async () => { const sendCreateWorkOrder = async (phoneToSubmit) => {
try { try {
const res = await createWorkOrder({ const params = {
workOrderTypeId: workOrderTypeId.value, workOrderTypeId: workOrderTypeId.value,
roomNo: roomId.value, roomNo: roomId.value,
userPhone: contactPhone.value, userPhone: phoneToSubmit,
content: contactText.value, content: contactText.value,
contentImgUrl: contentImgUrl.value, contentImgUrl: contentImgUrl.value,
}); };
console.log("🚀 ~ sendCreateWorkOrder ~ params:", params);
const res = await createWorkOrder(params);
if (res.code === 0) { if (res.code === 0) {
// 保存工单ID // 保存工单ID

View File

@@ -6,9 +6,6 @@
width: 98px; width: 98px;
height: 48px; height: 48px;
} }
.order-content {
width: 335px;
}
.help-icon { .help-icon {
width: 16px; width: 16px;

View File

@@ -15,7 +15,7 @@
/> />
</view> </view>
<view v-if="!isCallSuccess" class="order-content border-box p-12"> <view v-if="!isCallSuccess" class="border-box p-12">
<view <view
class="bg-F5F7FA border-box flex flex-items-center p-12 rounded-10 font-size-14 color-171717 mb-12" class="bg-F5F7FA border-box flex flex-items-center p-12 rounded-10 font-size-14 color-171717 mb-12"
> >

View File

@@ -7,10 +7,6 @@
height: 48px; height: 48px;
} }
.order-content {
width: 335px;
}
.help-icon { .help-icon {
width: 16px; width: 16px;
height: 16px; height: 16px;

View File

@@ -1,6 +1,7 @@
import { wxLogin } from "../request/api/LoginApi";
import { loginAuth, bindPhone, checkPhone } from "@/manager/LoginManager"; import { loginAuth, bindPhone, checkPhone } from "@/manager/LoginManager";
import { clientId } from "@/constant/base"; import { clientId } from "@/constant/base";
import { useAppStore } from "@/store"; import { NOTICE_EVENT_LOGIN_SUCCESS } from "@/constant/constant";
// 跳转登录 // 跳转登录
export const goLogin = () => uni.navigateTo({ url: "/pages/login/index" }); export const goLogin = () => uni.navigateTo({ url: "/pages/login/index" });
@@ -46,14 +47,44 @@ export const onLogin = async (e) => {
// 检测token // 检测token
export const checkToken = () => { export const checkToken = () => {
const token = uni.getStorageSync("token");
return new Promise((resolve) => { return new Promise((resolve) => {
const appStore = useAppStore(); if (!token) {
console.log("appStore.hasToken: ", appStore.hasToken);
if (!appStore.hasToken) {
console.log("没有token跳转到登录页");
goLogin(); goLogin();
return; return;
} }
resolve(); resolve();
}); });
}; };
// 刷新token
export const refreshToken = () => {
const token = uni.getStorageSync("token");
if (!token) {
return;
}
uni.login({
provider: "weixin", //使用微信登录
success: async ({ code }) => {
console.log("refreshToken", code);
const params = {
openIdCode: [code],
grant_type: "wechat",
scope: "server",
clientId: clientId,
};
console.log("获取到的微信授权params:", JSON.stringify(params));
const response = await wxLogin(params);
if (response.access_token) {
uni.setStorageSync("token", response.access_token);
// 登录成功后,触发登录成功事件
uni.$emit(NOTICE_EVENT_LOGIN_SUCCESS);
}
},
});
};

View File

@@ -22,12 +22,8 @@ export const getWeChatAuthCode = (e) => {
uni.login({ uni.login({
provider, provider,
onlyAuthorize: true, onlyAuthorize: true,
success: (res) => { success: (res) => resolve(res.code),
resolve(res.code); fail: (err) => reject(err),
},
fail: (err) => {
reject(err);
},
}); });
}); });
}; };

View File

@@ -11,7 +11,6 @@ import { NOTICE_EVENT_LOGIN_SUCCESS } from "@/constant/constant";
const loginAuth = (e) => { const loginAuth = (e) => {
uni.setStorageSync("token", ""); uni.setStorageSync("token", "");
const appStore = useAppStore(); const appStore = useAppStore();
appStore.setHasToken(false);
return new Promise(async (resolve, reject) => { return new Promise(async (resolve, reject) => {
const openIdCode = await getWeChatAuthCode(e); const openIdCode = await getWeChatAuthCode(e);
@@ -28,8 +27,6 @@ const loginAuth = (e) => {
if (response.access_token) { if (response.access_token) {
uni.setStorageSync("token", response.access_token); uni.setStorageSync("token", response.access_token);
const appStore = useAppStore();
appStore.setHasToken(true);
// 登录成功后,触发登录成功事件 // 登录成功后,触发登录成功事件
uni.$emit(NOTICE_EVENT_LOGIN_SUCCESS); uni.$emit(NOTICE_EVENT_LOGIN_SUCCESS);
resolve(); resolve();

View File

@@ -57,7 +57,6 @@ const count = computed({
const totalAmt = computed(() => { const totalAmt = computed(() => {
const { totalDays } = props.selectedDate; const { totalDays } = props.selectedDate;
const { specificationPrice } = props.orderData; const { specificationPrice } = props.orderData;
return count.value * Number(specificationPrice) * totalDays; return count.value * Number(specificationPrice) * totalDays;
}); });
</script> </script>

View File

@@ -128,11 +128,6 @@ const isDeleting = ref(false); // 标志位防止删除时watch冲突
watch( watch(
quantity, quantity,
async (newQuantity) => { async (newQuantity) => {
// 非酒店类型,不处理
if (orderData.value.commodityTypeCode !== "0") {
return;
}
// 如果正在执行删除操作跳过watch逻辑 // 如果正在执行删除操作跳过watch逻辑
if (isDeleting.value) { if (isDeleting.value) {
isDeleting.value = false; isDeleting.value = false;

View File

@@ -100,8 +100,6 @@ const handleLogout = () => {
success: (res) => { success: (res) => {
if (res.confirm) { if (res.confirm) {
uni.clearStorageSync(); uni.clearStorageSync();
appStore.setHasToken(false);
appStore.setTokenExpired(true);
emits("close"); emits("close");
uni.$emit(NOTICE_EVENT_LOGOUT); uni.$emit(NOTICE_EVENT_LOGOUT);
} }

View File

@@ -46,6 +46,7 @@
v-else-if=" v-else-if="
item.toolCall.componentName === CompName.callServiceCard item.toolCall.componentName === CompName.callServiceCard
" "
:toolCall="item.toolCall"
/> />
<Feedback <Feedback
v-else-if=" v-else-if="
@@ -132,7 +133,6 @@ import {
NOTICE_EVENT_LOGOUT, NOTICE_EVENT_LOGOUT,
NOTICE_EVENT_LOGIN_SUCCESS, NOTICE_EVENT_LOGIN_SUCCESS,
} from "@/constant/constant"; } from "@/constant/constant";
import { WSS_URL } from "@/request/base/baseUrl";
import { MessageRole, MessageType, CompName } from "@/model/ChatModel"; import { MessageRole, MessageType, 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";
@@ -346,7 +346,9 @@ onLoad(() => {
// token存在初始化数据 // token存在初始化数据
const initHandler = () => { const initHandler = () => {
console.log("initHandler"); console.log("initHandler");
if (!appStore.hasToken) return; const token = uni.getStorageSync("token");
if (!token) return;
loadRecentConversation(); loadRecentConversation();
///loadConversationMsgList(); ///loadConversationMsgList();
initWebSocket(); initWebSocket();
@@ -413,7 +415,7 @@ const initWebSocket = () => {
// 使用配置的WebSocket服务器地址 // 使用配置的WebSocket服务器地址
const token = uni.getStorageSync("token"); const token = uni.getStorageSync("token");
const wsUrl = `${WSS_URL}?access_token=${token}`; const wsUrl = `${appStore.serverConfig.wssUrl}?access_token=${token}`;
// 初始化WebSocket管理器 // 初始化WebSocket管理器
webSocketManager = new WebSocketManager({ webSocketManager = new WebSocketManager({

View File

@@ -1,6 +1,6 @@
<template> <template>
<view <view
class="quick-access border-box flex flex-nowrap items-center ml-12 pt-8 pb-8" class="quick-access flex flex-row ml-12 pt-8 pb-8 scroll-x whitespace-nowrap"
> >
<view <view
class="item border-box rounded-50 flex flex-row items-center" class="item border-box rounded-50 flex flex-row items-center"

View File

@@ -12,10 +12,13 @@
></view> ></view>
<text <text
v-show="show" v-show="show"
class="font-size-14 font-500 color-171717 ml-10" :class="[
:class="{ 'text-animated': show }" 'font-size-14 font-500 color-171717 ml-10',
>沐沐</text { 'text-animated': show },
]"
> >
{{ config.name }}
</text>
</view> </view>
<view class="w-24 h-24"></view> <view class="w-24 h-24"></view>
@@ -34,10 +37,8 @@ const props = defineProps({
}); });
const show = ref(false); const show = ref(false);
const config = getCurrentConfig();
const getStyle = computed(() => { const getStyle = computed(() => {
const config = getCurrentConfig();
return { return {
"--ipSmallImageStep": config.ipSmallImageStep, "--ipSmallImageStep": config.ipSmallImageStep,
"--ipSmallImageHeight": config.ipSmallImageHeight, "--ipSmallImageHeight": config.ipSmallImageHeight,

View File

@@ -3,11 +3,21 @@
} }
.ip { .ip {
position: relative;
flex: 0 0 158px; flex: 0 0 158px;
width: 158px; width: 158px;
height: 134px; height: 134px;
animation: sprite-play calc(var(--ipLargeTime) * 1s) animation: sprite-play calc(var(--ipLargeTime) * 1s)
steps(var(--ipLargeImageStep)) infinite; steps(var(--ipLargeImageStep)) infinite;
&::before {
content: "";
position: absolute;
background-color: #f9fcfd;
top: 0;
left: 0;
right: 0;
height: 3px;
}
} }
@keyframes sprite-play { @keyframes sprite-play {

View File

@@ -43,8 +43,7 @@
type="primary" type="primary"
@click="handleAgreeAndGetPhone" @click="handleAgreeAndGetPhone"
> >
<uni-icons type="weixin" size="20" color="#fff"></uni-icons> 手机号快捷登录
微信一键登录
</button> </button>
<button <button
@@ -54,18 +53,7 @@
open-type="getPhoneNumber" open-type="getPhoneNumber"
@getphonenumber="getPhoneNumber" @getphonenumber="getPhoneNumber"
> >
<uni-icons type="weixin" size="20" color="#fff"></uni-icons> 手机号快捷登录
微信一键登录
</button>
<button
v-if="isAgree && appStore.tokenExpired"
class="login-btn"
type="primary"
@click="handleLogin"
>
<uni-icons type="weixin" size="20" color="#fff"></uni-icons>
微信一键登录
</button> </button>
</view> </view>
@@ -123,20 +111,6 @@ const getPhoneNumber = (e) => {
.catch(() => {}); .catch(() => {});
}; };
const handleLogin = () => {
console.log("handleLogin");
onLogin()
.then(() => {
uni.showToast({
title: "登录成功",
icon: "success",
});
appStore.setTokenExpired(false);
goBack();
})
.catch(() => {});
};
// 处理同意协议点击事件 // 处理同意协议点击事件
const handleAgreeClick = (type) => { const handleAgreeClick = (type) => {
visible.value = true; visible.value = true;

View File

@@ -1,5 +1,5 @@
import { BASE_URL } from "@/request/base/baseUrl";
import { goLogin } from "@/hooks/useGoLogin"; import { goLogin } from "@/hooks/useGoLogin";
import { useAppStore } from "@/store";
/// 请求流式数据的API /// 请求流式数据的API
const API = "/agent/assistant/chat"; const API = "/agent/assistant/chat";
@@ -93,8 +93,9 @@ const agentChatStream = (params, onChunk) => {
}; };
// #ifdef MP-WEIXIN // #ifdef MP-WEIXIN
const { serverConfig } = useAppStore();
requestTask = uni.request({ requestTask = uni.request({
url: BASE_URL + API, // 替换为你的接口地址 url: serverConfig.baseUrl + API, // 替换为你的接口地址
method: "POST", method: "POST",
data: params, data: params,
enableChunked: true, enableChunked: true,

View File

@@ -1,8 +1,9 @@
import { BASE_URL } from "@/request/base/baseUrl";
import { getCurrentConfig } from "@/constant/base"; import { getCurrentConfig } from "@/constant/base";
import { useAppStore } from "@/store";
export const updateImageFile = (file) => { export const updateImageFile = (file) => {
const url = BASE_URL + "/hotelBiz/hotBizCommon/upload"; const { serverConfig } = useAppStore();
const url = serverConfig.baseUrl + "/hotelBiz/hotBizCommon/upload";
const token = uni.getStorageSync("token"); const token = uni.getStorageSync("token");
const clientId = getCurrentConfig().clientId; const clientId = getCurrentConfig().clientId;

17
src/request/api/config.js Normal file
View File

@@ -0,0 +1,17 @@
import request from "../base/request";
import { isProd } from "@/constant/base";
import { useAppStore } from "@/store";
// 获取服务地址
const getEvnUrl = (args) => {
if (isProd) {
const appStore = useAppStore();
request
.post("https://biz.nianxx.cn/hotelBiz/mainScene/getServiceUrl", args)
.then(({ data }) => {
appStore.setServerConfig(data);
});
}
};
export { getEvnUrl };

View File

@@ -1,19 +1 @@
import { isProd } from '@/constant/base.js';
// 测试
const VITE_BASE_URL_TEST = "https://onefeel.brother7.cn/ingress";
const VITE_WSS_URL_TEST = "wss://onefeel.brother7.cn/ingress/agent/ws/chat";
// 生产
const VITE_BASE_URL_PRO = "https://biz.nianxx.cn";
const VITE_WSS_URL_PRO = "wss://biz.nianxx.cn/agent/ws/chat";
// 环境配置 - 根据客户端配置动态决定环境
export const BASE_URL = isProd ? VITE_BASE_URL_PRO : VITE_BASE_URL_TEST;
export const WSS_URL = isProd ? VITE_WSS_URL_PRO : VITE_WSS_URL_TEST;
// =====================================
// 环境配置文件使用方法
// console.log("当前环境:", import.meta.env);
// export const BASE_URL = import.meta.env.VITE_BASE_URL;
// export const WSS_URL = import.meta.env.VITE_WSS_URL;

View File

@@ -1,5 +1,4 @@
import { goLogin } from "../../hooks/useGoLogin"; import { goLogin } from "../../hooks/useGoLogin";
import { BASE_URL } from "./baseUrl";
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";
@@ -14,9 +13,10 @@ const defaultConfig = {
}; };
function request(url, args = {}, method = "POST", customConfig = {}) { function request(url, args = {}, method = "POST", customConfig = {}) {
const appStore = useAppStore();
// 判断 url 是否以 http 开头 // 判断 url 是否以 http 开头
if (!/^http/.test(url)) { if (!/^http/.test(url)) {
url = BASE_URL + url; url = appStore.serverConfig?.baseUrl + url;
} }
// 动态获取 token // 动态获取 token
const token = uni.getStorageSync("token"); const token = uni.getStorageSync("token");
@@ -25,6 +25,7 @@ function request(url, args = {}, method = "POST", customConfig = {}) {
...defaultConfig.header, ...defaultConfig.header,
...customConfig.header, ...customConfig.header,
}; };
// 判断是否需要 token // 判断是否需要 token
if (customConfig.noToken) { if (customConfig.noToken) {
delete header.Authorization; delete header.Authorization;
@@ -58,9 +59,6 @@ function request(url, args = {}, method = "POST", customConfig = {}) {
if (res.statusCode && res.statusCode === 424) { if (res.statusCode && res.statusCode === 424) {
console.log("424错误重新登录"); console.log("424错误重新登录");
uni.setStorageSync("token", ""); uni.setStorageSync("token", "");
const appStore = useAppStore();
appStore.setHasToken(false);
appStore.setTokenExpired(true);
uni.$emit(NOTICE_EVENT_LOGOUT); uni.$emit(NOTICE_EVENT_LOGOUT);
goLogin(); goLogin();
} }

View File

@@ -4,10 +4,12 @@ export const useAppStore = defineStore("app", {
state() { state() {
return { return {
title: "", title: "",
sceneId: "", /// 分身场景id sceneId: "", // 分身场景id
hasToken: false, /// 是否有token previewImageData: [], // 预览图片数据
tokenExpired: false, /// token是否过期 serverConfig: {
previewImageData: [], /// 预览图片数据 baseUrl: "https://onefeel.brother7.cn/ingress", // 服务器基础地址
wssUrl: "wss://onefeel.brother7.cn/ingress/agent/ws/chat", // 服务器ws地址
}, // 服务器配置
}; };
}, },
getters: {}, getters: {},
@@ -19,15 +21,12 @@ export const useAppStore = defineStore("app", {
setSceneId(data) { setSceneId(data) {
this.sceneId = data; this.sceneId = data;
}, },
setHasToken(status) {
this.hasToken = status;
},
setTokenExpired(status) {
this.tokenExpired = status;
},
setPreviewImageData(data) { setPreviewImageData(data) {
this.previewImageData = data; this.previewImageData = data;
}, },
setServerConfig(data) {
this.serverConfig = data;
},
}, },
unistorage: true, unistorage: true,

View File

@@ -3,7 +3,11 @@ import { defineStore } from "pinia";
export const useSelectedDateStore = defineStore("selectedDate", { export const useSelectedDateStore = defineStore("selectedDate", {
state() { state() {
return { return {
selectedDate: {}, selectedDate: {
startDate: "",
endDate: "",
totalDays: 1,
},
}; };
}, },

2331
yarn.lock

File diff suppressed because it is too large Load Diff