单应用项目,可以创建很多独立工具类页面 ,不用登录 初始化的页面
zhangchen
2025-08-12 5c46e69f4753cc03a7d72524dfc76eca482bebbb
ID1975-修改获取版本号接口
2个文件已修改
12 ■■■■■ 已修改文件
src/utils/httpApi.ts 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/mobile/bedsideAuxiliaryScreen/index.vue 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/utils/httpApi.ts
@@ -82,9 +82,9 @@
 * 获取副屏最新的版本号Api
 * @returns 
 */
export const getServiceVersionApi = async() => {
export const getServiceVersionApi = async(version: string) => {
    try {
        const response = await axios.post(`${apiBaseUrl}/system/version/subscreen/showVersionDiff`, {}, {
        const response = await axios.post(`${apiBaseUrl}/system/version/subscreen/showVersionDiff`, { version }, {
            headers: {
                'Content-Type': 'application/x-www-form-urlencoded'
            }
src/views/mobile/bedsideAuxiliaryScreen/index.vue
@@ -136,9 +136,11 @@
const getServiceVersionFun = async () => {
  try {
    const { version } = await getServiceVersionApi();
    if (version !== bedsideAuxiliaryScreenStore.version) {
      bedsideAuxiliaryScreenStore.refreshVersion(version);
    const { data } = await getServiceVersionApi(bedsideAuxiliaryScreenStore.version);
    if (data?.version && data?.version !== bedsideAuxiliaryScreenStore.version) {
      bedsideAuxiliaryScreenStore.refreshVersion(data.version);
    } else if (!data?.version) {
      ElMessage.error("获取版本号失败,请联系管理员!");
    }
  } catch (error) {
    ElMessage.error("获取版本号失败,请联系管理员!");