吉安感知网项目-前端
张含笑
2026-04-08 397688fe693abacf48a126f1323e754af8d655ac
feat:嵌套页面工单分享链接,代理地址修改
6 files modified
21 ■■■■ changed files
applications/mobile-web-view/env/.env 2 ●●●●● patch | view | raw | blame | history
applications/mobile-web-view/env/.env.development 2 ●●● patch | view | raw | blame | history
applications/mobile-web-view/src/api/work/index.js 1 ●●●● patch | view | raw | blame | history
applications/mobile-web-view/src/axios.js 10 ●●●● patch | view | raw | blame | history
applications/mobile-web-view/src/config/env.js 4 ●●● patch | view | raw | blame | history
applications/mobile-web-view/vite.config.mjs 2 ●●● patch | view | raw | blame | history
applications/mobile-web-view/env/.env
@@ -4,6 +4,8 @@
#代理用的
VITE_APP_API = /api
VITE_APP_API_JALS = /jals/api
#线上用的
VITE_APP_XT_URL=http://220.177.172.27:8100/yisuanzhijian
applications/mobile-web-view/env/.env.development
@@ -8,7 +8,7 @@
VITE_APP_XT_URL = http://220.177.172.27:8100/yisuanzhijian
#工单详情(分享链接)
VITE_APP_XT_URL_GD = http://220.177.172.27:8100
VITE_APP_XT_URL_GD = https://wrj.shuixiongit.com
# ws地址
VITE_APP_WS_API_URL = wss://wrj.shuixiongit.com/drone-wss/api/v1/ws
applications/mobile-web-view/src/api/work/index.js
@@ -8,5 +8,6 @@
        url: '/drone-gd/workOrder/gdPatrolTask/get-share-cache-data',
        method: 'get',
        params,
        isUseJals: true
    })
}
applications/mobile-web-view/src/axios.js
@@ -17,7 +17,7 @@
import crypto from '@/utils/crypto'
import { getStore } from '@/utils/store'
import { showToast } from 'vant'
import { baseUrl } from '@/config/env'
import { baseUrl, baseUrlJals } from '@/config/env'
let { VITE_APP_ENV,VITE_APP_XT_URL,VITE_APP_API } = import.meta.env
// 全局未授权错误提示状态,只提示一次
@@ -47,8 +47,14 @@
        //     config.url = VITE_APP_XT_URL + config.url
        // }
        if (config.isUseJals) {
            if (!isURL(config.url) && !config.url.startsWith(baseUrlJals)) {
                config.url = baseUrlJals + config.url
            }
        }
        //地址为已经配置状态则不添加前缀
        if (!isURL(config.url) && !config.url.startsWith(baseUrl)) {
        if (!isURL(config.url) && !config.url.startsWith(baseUrl) && !config.isUseJals) {
            config.url = baseUrl + config.url
        }
applications/mobile-web-view/src/config/env.js
@@ -1,2 +1,4 @@
let baseUrl = import.meta.env.VITE_APP_API;
export { baseUrl };
let baseUrlJals = import.meta.env.VITE_APP_API_JALS;
export { baseUrl, baseUrlJals };
applications/mobile-web-view/vite.config.mjs
@@ -114,7 +114,7 @@
          rewrite: path => path.replace(/^\/webservice/, '/webservice'),
        },
        '/api/drone-gd': {
        '/jals/api/drone-gd': {
          target: VITE_APP_XT_URL_GD,
          changeOrigin: true,
          rewrite: path => path.replace(/^\/drone-gd/, '/drone-gd'),