15 Commits a3df28f939 ... f9cce2dbef

Author SHA1 Message Date
  yunxing f9cce2dbef doc: 添加注意事项 3 years ago
  yunxing 221dfde17e 进入H5页面时,参数,蜂鸟接口异常进行提示 3 years ago
  yunxing fd2c613925 3 years ago
  yunxing 47f683081a 开发环境使用通州万达广场 3 years ago
  yunxing c14f6f7ff7 fix: 修复 设备设施-->供电系统-->配电室低压出线柜及出线明细中 Swiper不显示分页器,页面导航的问题 3 years ago
  yunxing 43561e1d25 3 years ago
  yunxing 1b737eb1d4 IOS崩溃时,返回项目概况页面 3 years ago
  yunxing 71e6f801b1 MapView页面,ios多次切换楼层,崩溃时,退出到APP首页 3 years ago
  yunxing be79faf41d feat: App.vue获取工程信息化参数后,页面逻辑优化 4 years ago
  yunxing e4f981a67b 加密方法参数修改 4 years ago
  yunxing be4c3e6eca 生产域名修改,vue.config.js 代理修改 4 years ago
  yunxing 44ff9ecbcf APP扫码进入H5页面逻辑修改 4 years ago
  yunxing bf302be5b4 商管APP url参数改为 cordova插件方法传参, 逻辑修改 4 years ago
  yunxing 7daa0cf9cb 解密方法修改 4 years ago
  yunxing d261f16f8c url解密 4 years ago

+ 2 - 1
.env.aly

@@ -1,4 +1,5 @@
 NODE_ENV=production
 VUE_APP_RealEnv=aly
 VUE_APP_BaseURL=
-VUE_APP_PublicPath=/wandaBmGuideH5
+VUE_APP_PublicPath=/wandaBmGuideH5
+VUE_APP_URL=

+ 2 - 2
.env.development

@@ -1,4 +1,4 @@
 VUE_APP_RealEnv=development
+VUE_APP_BaseURL=
 VUE_APP_PublicPath=/wandaBmGuideH5
-VUE_APP_BaseURL=/glsms
-VUE_APP_PublicPath=/wandaBmGuideH5
+VUE_APP_URL=developmentUrl

+ 2 - 1
.env.production

@@ -1,4 +1,5 @@
 NODE_ENV=production
 VUE_APP_RealEnv=production
 VUE_APP_BaseURL=/glsms
-VUE_APP_PublicPath=/glsms/wandaBmGuideH5
+VUE_APP_PublicPath=/glsms/wandaBmGuideH5
+VUE_APP_URL=

+ 2 - 1
.env.test

@@ -1,4 +1,5 @@
 NODE_ENV=production
 VUE_APP_RealEnv=test
 VUE_APP_BaseURL=
-VUE_APP_PublicPath=/wandaBmGuideH5
+VUE_APP_PublicPath=/wandaBmGuideH5
+VUE_APP_URL=

+ 26 - 2
README.md

@@ -2,13 +2,33 @@
 
 ## 启动项目
 
+### . 安装依赖
+
+1. 删除package.json中的 saga包
+
 ``` 
-yarn install 或  npm i 
+
+   "@saga-web/base": "2.1.27",
+    "@saga-web/big": "1.0.120",
+    "@saga-web/draw": "2.1.110",
+    "@saga-web/feng-map": "1.0.52",
+    "@saga-web/graph": "2.1.136",
+```
+
+2. 安装依赖 npm i 
+3. 将删除的saga包还原
+4. npm换源到 `http://dev.dp.sagacloud.cn:8082/repository/npm-saga/`
+
+``` shell
+  npm config set registry http://dev.dp.sagacloud.cn:8082/repository/npm-saga/
 ```
 
+5. 安装saga依赖 npm i 
+
 ### 启动开发环境
 
 ``` 
+
 yarn serve 或 npm run serve 
 ```
 
@@ -36,7 +56,6 @@ npm run publish # 只能发布到阿里云环境(需要外网支持)
 
 - - -
 
-
 ### 目录结构
 
 ``` shell
@@ -97,3 +116,8 @@ npm run publish # 只能发布到阿里云环境(需要外网支持)
 
  }
 ```
+
+### 开发注意事项
+
+1. 广场,用户等参数,是由工程管理APP,通过cordova插件传入,故打包部署后,只能在APP内部访问该项目
+2. 开发时,在APP.vue中进行模拟广场,用户等参数,进行开发.(handleUrl方法内, 开发环境,参数修改)

+ 8 - 7
package.json

@@ -19,10 +19,10 @@
   },
   "dependencies": {
     "@saga-web/base": "2.1.27",
-    "@saga-web/big": "1.0.119",
+    "@saga-web/big": "1.0.120",
     "@saga-web/draw": "2.1.110",
-    "@saga-web/feng-map": "1.0.51",
-    "@saga-web/graph": "2.1.133",
+    "@saga-web/feng-map": "1.0.52",
+    "@saga-web/graph": "2.1.136",
     "axios": "^0.20.0",
     "compression-webpack-plugin": "^5.0.2",
     "core-js": "^3.6.5",
@@ -45,15 +45,16 @@
     "@vue/cli-plugin-vuex": "~4.5.0",
     "@vue/cli-service": "~4.5.0",
     "babel-plugin-import": "^1.13.0",
+    "crypto-js": "^4.0.0",
+    "fengmap": "^2.5.3",
     "less": "^3.0.4",
     "less-loader": "^5.0.0",
+    "node-ssh": "^6.0.0",
+    "polybooljs": "^1.2.0",
     "postcss-pxtorem": "^5.1.1",
     "terser-webpack-plugin": "^4.1.0",
     "typescript": "~3.9.3",
     "vue-template-compiler": "^2.6.11",
-    "webpack-bundle-analyzer": "^3.8.0",
-    "fengmap": "^2.5.3",
-    "polybooljs": "^1.2.0",
-    "node-ssh": "^6.0.0"
+    "webpack-bundle-analyzer": "^3.8.0"
   }
 }

+ 88 - 85
src/App.vue

@@ -57,7 +57,10 @@ import { Tabbar, TabbarItem, Loading } from 'vant'
 Vue.use(Tabbar).use(TabbarItem).use(Loading)
 import store from './store/index'
 import NarBar from './components/Navbar'
-import { osInfo } from './utils/util'
+import { decrypted, encrypted } from "./utils/crypto.js";
+import  axios from "axios";
+import { Toast } from "vant";
+Vue.use(Toast)
 window.fengmapData = null
 export default {
     name: 'App',
@@ -81,7 +84,6 @@ export default {
                 2: '设备设施',
                 3: '其他事项',
             },
-            isIOS: false, //是否是IOS
             key: '23f30a832a862c58637a4aadbf50a566',
             appName: '万达可视化系统',
             mapServerURL: `http://mapapp.wanda.cn/editor`,
@@ -89,57 +91,100 @@ export default {
             urlFlag: false,
         }
     },
-    beforeMount() {},
-    created() {
-        // window.vm = this
-        this.handleUrl()
-        // 路径无参数,不执行后续逻辑
-        if(!this.urlFlag){
-            // this.loadComplete = true
-            return
-        }
-        // store.commit('SETSSOTOKEN', 'admin:liujiandong')
-        // console.log(window.location.href)
-        this.SETHAVEFENGMAP(false)
-        // 判断 安卓,ios
-        const { os } = osInfo()
-        if (os === 'iOS') {
-            this.isIOS = true
-        } else {
-            this.isIOS = false
+     watch: {
+        url: {
+            // 监听url,有url时再进行接口查询
+            handler(newV){
+                if(newV){
+                    this.initPage()
+                }
+            },
+            immediate:true
         }
-        // 获取楼层列表
-        this.getFloorList()
     },
-    mounted() {
-        // 路径无参数,不执行后续逻辑
-        if(!this.urlFlag){
-            // this.loadComplete = true
-            return
-        }
-        // console.log('环境变量', process.env.VUE_APP_RealEnv)
-        if (this.plazaId) {
-            this.getFengMap()
-            store.dispatch('getBrand')
-        } else {
-            window.fengmapData = null
-            this.loadComplete = true
-        }
+    beforeMount() {},
+    created(){
+        window.vmh5 = this
     },
     computed: {
-        ...mapGetters(['plazaId', 'fmapID']),
+        ...mapGetters(['plazaId', 'fmapID', 'url']),
     },
     methods: {
         ...mapActions(['getfmapID', 'getFloors']),
-        ...mapMutations(['SETHAVEFENGMAP', 'SETCATEGORYID', 'SETSMSXT', 'SETSSOTOKEN', 'SETPLAZAID']),
+        ...mapMutations(['SETHAVEFENGMAP', 'SETCATEGORYID', 'SETSMSXT', 'SETSSOTOKEN', 'SETPLAZAID', 'SETURL']),
+        // 获取到APP参入的参数之后,渲染页面
+        initPage() {
+            // window.vm = this
+            this.handleUrl()
+            // 路径无参数,不执行后续逻辑
+            if(!this.urlFlag){
+                this.loadComplete = true
+                Toast.fail('参数错误!')
+                return
+            }
+            this.SETHAVEFENGMAP(false)
+            // 获取楼层列表
+            this.getFloors()
+            // 
+            if (this.plazaId) {
+                this.getFengMap()
+                store.dispatch('getBrand')
+            } else {
+                window.fengmapData = null
+                this.loadComplete = true
+            }
+        },
+        /**
+         * 处理工程信息化APP返回的参数
+         */
+        handleUrl() {
+            // 从vuex中获取url(开发环境使用模拟的参数,)
+            let href =  this.url
+            if(!href){
+                this.urlFlag =  false 
+                return
+            }
+            // TODO: 开发环境,参数修改
+            if (process.env.VUE_APP_RealEnv === 'development') {   
+                href = encrypted('username=liujiandong&plazaId=1000772')
+            }
+            let url = decrypted(href) // window.location.href
+            // console.log('url: '+ url )
+            
+            let params = this.queryURLParams(url)
+            let { username, plazaId, assetid } = params
+            if (username) {
+                this.SETSSOTOKEN(`admin:${username}`)
+            }
+            if (plazaId) {
+                //  设置广场
+                this.SETPLAZAID(plazaId)
+            }
+            // 进入H5页面时,如果有assetid,跳转到设备详情页面
+            if (assetid) {
+                this.$router.push({ name:'AssetDetail', query: { assetid, first: true } })
+            }
+            this.urlFlag = true 
+        },
         getFengMap() {
+            // 查询一次蜂鸟接口,蜂鸟接口不通,进行提示,关闭loading
+            const axiosFeng = axios.create({ timeout: 3000})
+            axiosFeng.get(`http://mapapp.wanda.cn/sgmap/mapversion?mapId=${this.plazaId}`).then(res=>{
+                console.log('蜂鸟接口正常!')
+            }).catch(error=>{
+                console.log('蜂鸟接口异常!')
+                this.loadComplete = true
+                Toast.fail('平面图加载失败!')
+            })
+            // 加载底图
             this.getfmapID().then(() => {
                 this.getMap()
             })
         },
         getMap() {
-            console.log('%c时间:', 'color:blue;background:#fff')
-            console.time('蜂鸟下载,解析')
+            console.log('%c蜂鸟下载,解析耗时: ', 'color:blue;background:#fff')
+            console.time('蜂鸟下载,解析') 
+            const startTime = new Date().getTime()
             window.fengmapData = new SFengParser(
                 'fengMap',
                 `${this.mapServerURL}/fmap/${this.fmapID}`,
@@ -161,6 +206,7 @@ export default {
                     this.SETHAVEFENGMAP(1)
                 })
                 console.timeEnd('蜂鸟下载,解析')
+                console.log(new Date().getTime() - startTime + ' ms')
                 this.loadComplete = true
                 // 缓存楼层数据
                 if (dataArr.length) {
@@ -184,34 +230,7 @@ export default {
             this.$router.push({ name: this.routeDict[active] })
             store.commit('SETAPPTITLE', this.titleDict[active])
         },
-        /**
-         * 查询楼层列表
-         */
-        getFloorList() {
-            this.getFloors()
-        },
-        /**
-         * 处理url参数
-         */
-        handleUrl() {
-            let url = window.location.href
-            let params = this.queryURLParams(url)
-            // console.log('%c 路径参数:', 'color:blue')
-            // console.log(params)
-            let { username, plazaId } = params
-            if(! (username && plazaId)){
-                this.urlFlag =  false 
-                return
-            }
-            if (username) {
-                this.SETSSOTOKEN(`admin:${username}`)
-            }
-            if (plazaId) {
-                //  设置广场
-                this.SETPLAZAID(plazaId)
-            }
-            this.urlFlag =  true 
-        },
+        
         /**
          * 查询url参数
          */
@@ -222,23 +241,7 @@ export default {
             return obj
         },
     },
-    watch: {
-        plazaId(plazaId) {
-            // console.log('项目id', plazaId)
-            window.fengmapData = null
-            // 当获取到到项目id,请求底图
-            if (plazaId) {
-                // 请求该项目下的楼层数据
-                this.getFengMap()
-                store.dispatch('getBrand')
-            } else {
-                window.fengmapData = null
-            }
-        },
-        $route(to, from) {
-            // console.log(to, from)
-        },
-    },
+   
 }
 </script>
 <style lang="less">

+ 0 - 4
src/components/Navbar.vue

@@ -20,8 +20,6 @@ import store from '@/store'
 import { debounce } from 'lodash'
 // 扫一扫回到函数
 window.__scanCallback = function (data) {
-    console.log('__scanCallback')
-    console.log(data)
     switch (data.code) {
         // 扫描的⾮设备⼆维码
         case 0:
@@ -72,7 +70,6 @@ export default {
         ...mapMutations(['SCANASSETID']),
         // 返回工程信息化主菜单
         backApp() {
-            console.log('backApp')
             window.webkit &&
                 webkit.messageHandlers.cordova_iab.postMessage(
                     JSON.stringify({
@@ -82,7 +79,6 @@ export default {
         },
         // 扫码,300ms触发一次
         scan: debounce(function () {
-            console.log('扫码')
             window.webkit &&
                 webkit.messageHandlers.cordova_iab.postMessage(
                     JSON.stringify({

+ 8 - 1
src/components/equipmentFacilities/MSwiper.vue

@@ -21,6 +21,11 @@
 import Vue from 'vue'
 import { Swiper, SwiperSlide, directive } from 'vue-awesome-swiper'
 import 'swiper/swiper-bundle.css'
+
+// 修复Swiper不显示分页器,页面导航的问题
+import Swiper2,{ Navigation,Pagination } from "swiper";
+Swiper2.use(Navigation).use(Pagination)
+
 import { cloneDeep } from 'lodash'
 let swiperVm = null
 export default {
@@ -80,6 +85,7 @@ export default {
     },
     created() {
         swiperVm = this
+        this.list.forEach((v,index) => v.index = index)
         this.swiperList = cloneDeep(this.list)
         let swiperData = []
         swiperData = this.group(this.swiperList, 15)
@@ -94,7 +100,7 @@ export default {
             let currentInfo = {}
             this.swiperList.map((item, index) => {
                 item.active = false
-                if (detail.drawernum === item.drawernum) {
+                if (detail.drawernum === item.drawernum && detail.index === item.index ) {
                     item.active = true
                     currentInfo = cloneDeep(item)
                 }
@@ -137,6 +143,7 @@ export default {
     height: 30px;
     line-height: 30px;
     background: #ebeded;
+    overflow: hidden;
 }
 .card:not(:nth-child(3n)) {
     margin-right: 8px;

+ 30 - 26
src/main.ts

@@ -14,6 +14,16 @@ if (process.env.NODE_ENV === 'production' && process.env.VUE_APP_RealEnv !== 'pr
     // TODO: vConsole
     // new VConsole()
 }
+
+// url传参(在工程信息化 商管APP中 才能调用到的方法),存放store
+window.__keyCallback = function (data) {
+    if(data.text){
+        store.commit('SETURL', data.text)
+    }else{
+        store.commit('SETURL', null)
+    }
+}
+
 const ua = navigator.userAgent
 let flag = false
 // 打包后,使用cordova插件,需要监听deviceready事件
@@ -32,31 +42,25 @@ if (process.env.NODE_ENV === 'production' && ua.match(/(iPhone | Android)/)) {
         router,
         store,
         render: (h) => h(App),
-    }).$mount('#app')
+    }).$mount('#app')        
 }
 // 如果直接在电脑上预览,2s后,dispatch deviceready
-setTimeout(() => {
-    if (flag) {
-        return
-    }
-    const myEvent = new CustomEvent('deviceready', {
-        detail: {
-            title: 'This is deviceready!',
-        },
-    })
-    window.addEventListener('deviceready', function(event) {
-        console.log('deviceready success')
-    })
-    // 随后在对应的元素上触发该事件
-    if (window.dispatchEvent) {
-        window.dispatchEvent(myEvent)
-    } else {
-        window.fireEvent(myEvent)
-    }
-}, 2000)
-
-// new Vue({
-//     router,
-//     store,
-//     render: (h) => h(App),
-// }).$mount('#app')
+// setTimeout(() => {
+//     if (flag) {
+//         return
+//     }
+//     const myEvent = new CustomEvent('deviceready', {
+//         detail: {
+//             title: 'This is deviceready!',
+//         },
+//     })
+//     window.addEventListener('deviceready', function(event) {
+//         // console.log('deviceready success')
+//     })
+//     // 随后在对应的元素上触发该事件
+//     if (window.dispatchEvent) {
+//         window.dispatchEvent(myEvent)
+//     } else {
+//         window.fireEvent(myEvent)
+//     }
+// }, 2000)

+ 0 - 11
src/router/index.ts

@@ -24,17 +24,6 @@ const routes: Array<RouteConfig> = [
             keepAlive: true,
             showTabbar: true,
         },
-        // 进入H5页面时,如果有assetid,跳转到设备详情页面
-        beforeEnter(to, from, next) {
-            if (to.query.assetid) {
-                let assetid = to.query.assetid
-                let query = { assetid, first: true }
-                // @ts-ignore
-                next({ name: 'AssetDetail', query })
-            } else {
-                next()
-            }
-        },
     },
     // 项目概况
     {

+ 6 - 0
src/store/index.ts

@@ -33,6 +33,7 @@ export default new Vuex.Store({
             5: '其他事项',
         },
         scanAssetid: null, //扫码返回的assetid
+        url: process.env.VUE_APP_URL,
     },
     getters: {
         ssoToken: (state) => state.ssoToken,
@@ -50,6 +51,7 @@ export default new Vuex.Store({
         oldSmsxt: (state) => state.oldSmsxt,
         isGlobal: (state) => state.isGlobal,
         scanAssetid: (state) => state.scanAssetid,
+        url: (state) => state.url,
     },
     mutations: {
         SETSSOTOKEN(state, data) {
@@ -100,6 +102,10 @@ export default new Vuex.Store({
         SCANASSETID(state, data) {
             state.scanAssetid = data
         },
+        // 设置返回的url
+        SETURL(state, data) {
+            state.url = data
+        },
     },
     actions: {
         async getfmapID(context) {

+ 20 - 0
src/utils/crypto.js

@@ -0,0 +1,20 @@
+import CryptoJS from 'crypto-js'
+import moment from 'moment'
+// 密钥
+const secretKey = 'B447B88D5AF5A99A' + moment().format('YYYYMMDD');
+
+//模拟参数
+// const url = `username=wangjintao&plazaId=1000772&time=1611198103138&assead=1231231`
+const url = `username=wangjintao&plazaId=1000772&time=1611198103138`
+
+// 加密
+export  function encrypted (url){
+    const encJson =CryptoJS.AES.encrypt(url,secretKey).toString();
+    return CryptoJS.enc.Base64.stringify(CryptoJS.enc.Utf8.parse(encJson));
+}
+// 解密
+export function decrypted (url) {
+    const decData = CryptoJS.enc.Base64.parse(url).toString(CryptoJS.enc.Utf8)
+    return CryptoJS.AES.decrypt(decData, secretKey).toString(CryptoJS.enc.Utf8);
+}
+// window.encrypted = encrypted

+ 1 - 1
src/views/AssetDetail.vue

@@ -190,7 +190,7 @@ export default {
           Toast({
             message: "未查询到该设备内容!",
             type: "fail",
-            duration: 2000,
+            duration: 3000,
             onClose: () => {
               this.$router.push({ path: "/" });
             }

+ 0 - 10
src/views/equipmentFacilities/LowVoltageCabinetDetail.vue

@@ -8,7 +8,6 @@
             <van-search class='equipment-search' v-model='keyword' placeholder='请输入抽屉编号/控制回路/楼层' @search='onSearch'></van-search>
         </div>
         <div class='card-container'>
-            <!-- 解决input搜索,页面卡顿的情况,将swiper抽离成组件 -->
             <MSwiper :list='list' v-if='list.length' @itemClick='itemClick' />
         </div>
         <div class='info-container' v-show='list.length'>
@@ -53,8 +52,6 @@
 import Vue from 'vue'
 import { NavBar, Search } from 'vant'
 Vue.use(NavBar).use(Search)
-import { Swiper, SwiperSlide, directive } from 'vue-awesome-swiper'
-import 'swiper/swiper-bundle.css'
 import { queryDygjcxline } from '@/api/equipmentList'
 import { mapGetters } from 'vuex'
 import { cloneDeep } from 'lodash'
@@ -64,13 +61,8 @@ export default {
     name: 'LowVoltageCabinetDetail',
     props: {},
     components: {
-        Swiper,
-        SwiperSlide,
         MSwiper,
     },
-    directives: {
-        swiper: directive,
-    },
     data() {
         return {
             pageKey: `key_${new Date().getTime()}`,
@@ -86,8 +78,6 @@ export default {
         ...mapGetters(['plazaId', 'smsxt', 'categoryId']),
     },
     created() {
-        // 将this指向swiperVm,供swiper点击事件使用
-        // swiperVm = this
         this.control = '步行街分区2中庭用电'
         this.drawernum = '1-5AA-2'
         this.floor = '1F'

+ 6 - 0
src/views/overview/MapView.vue

@@ -586,6 +586,12 @@ export default {
   watch: {
     '$route.params.floor': {
       handler(floor) {
+        // IOS崩溃时,会重新走逻辑,无floor参数, 返回项目概况页面
+        if (!floor) {
+            console.error('IOS崩溃,无floor')
+            this.$router.replace('/')
+            return
+        }
         this.$nextTick(() => {
           this.floorid = floor.FloorId;
           this.floorName = floor.FloorName;

+ 14 - 3
src/views/overview/index.vue

@@ -243,7 +243,7 @@ export default {
         }
     },
     computed: {
-        ...mapGetters(['plazaId']),
+        ...mapGetters(['plazaId', 'url']),
     },
     watch: {
         /**
@@ -261,10 +261,21 @@ export default {
                 }, 1000)
             })
         },
+        plazaId: {
+            // 监听广场ID,有id时再进行接口查询
+            handler(newV){
+                if(newV){
+                    this.queryBaseInfo()
+                    this.queryRecordCountFunc()
+                }
+            },
+            immediate:true
+        }
     },
     created() {
-        this.queryBaseInfo()
-        this.queryRecordCountFunc()
+        // console.log('overview created')
+        // this.queryBaseInfo()
+        // this.queryRecordCountFunc()
     },
 
     beforeMount() {},

+ 27 - 27
vue.config.js

@@ -11,45 +11,45 @@ module.exports = {
         port: 8092,
         open: true,
         // 生产后台服务 ,使用此服务 需要更改环境变量.env.development 改为 ==> VUE_APP_BaseURL=/glsms
-        proxy: {
-            'glsms/data': {
-                // target: 'http://10.199.143.126', //生产环境
-                target: 'http://gcgl.wanda.cn/glsms',
-                changeOrigin: true,
-                secure: false,
-                pathRewrite: {
-                    '^/glsms/data': '/data',
-                },
-            },
-            // 绘图服务
-            'glsms/serve': {
-                //  target: 'http://10.199.143.129:8080', //生产环境
-                target: 'http://gcgl.wanda.cn/glsms',
-                changeOrigin: true,
-                pathRewrite: {
-                    '^/glsms/serve': '/serve',
-                },
-            },
-        },
-        // 阿里云后台服务 使用此服务 需要更改环境变量.env.development 改为  ==> VUE_APP_BaseURL=
         // proxy: {
-        //     '/data': {
-        //         target: 'http://60.205.177.43', //阿里云
+        //     'glsms/data': {
+        //         // target: 'http://10.199.143.126', //生产环境
+        //         target: 'http://app.gcgl.wanda.cn/glsms',
         //         changeOrigin: true,
         //         secure: false,
         //         pathRewrite: {
-        //             '^/data': '/data',
+        //             '^/glsms/data': '/data',
         //         },
         //     },
         //     // 绘图服务
-        //     '/serve': {
-        //         target: 'http://60.205.177.43:8080', //阿里云
+        //     'glsms/serve': {
+        //         //  target: 'http://10.199.143.129:8080', //生产环境
+        //         target: 'http://app.gcgl.wanda.cn/glsms',
         //         changeOrigin: true,
         //         pathRewrite: {
-        //             '^/serve': '',
+        //             '^/glsms/serve': '/serve',
         //         },
         //     },
         // },
+        // 阿里云后台服务 使用此服务 需要更改环境变量.env.development 改为  ==> VUE_APP_BaseURL=
+        proxy: {
+            '/data': {
+                target: 'http://60.205.177.43', //阿里云
+                changeOrigin: true,
+                secure: false,
+                pathRewrite: {
+                    '^/data': '/data',
+                },
+            },
+            // 绘图服务
+            '/serve': {
+                target: 'http://60.205.177.43:8080', //阿里云
+                changeOrigin: true,
+                pathRewrite: {
+                    '^/serve': '',
+                },
+            },
+        },
         hot: true,
         // 关闭esline
         overlay: {