Browse Source

fix: 修复 设备设施-->供电系统-->配电室低压出线柜及出线明细中 Swiper不显示分页器,页面导航的问题

yunxing 3 years ago
parent
commit
c14f6f7ff7
5 changed files with 18 additions and 12 deletions
  1. 1 1
      .env.development
  2. 5 4
      package.json
  3. 5 6
      src/App.vue
  4. 6 0
      src/components/equipmentFacilities/MSwiper.vue
  5. 1 1
      src/utils/crypto.js

+ 1 - 1
.env.development

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

+ 5 - 4
package.json

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

+ 5 - 6
src/App.vue

@@ -57,7 +57,7 @@ import { Tabbar, TabbarItem, Loading } from 'vant'
 Vue.use(Tabbar).use(TabbarItem).use(Loading)
 import store from './store/index'
 import NarBar from './components/Navbar'
-import { decrypted } from "./utils/crypto.js";
+import { decrypted, encrypted } from "./utils/crypto.js";
 import  axios from "axios";
 import { Toast } from "vant";
 Vue.use(Toast)
@@ -144,14 +144,13 @@ export default {
                 this.urlFlag =  false 
                 return
             }
-            // 解密url
-            // console.log(href)
-            let url = decrypted(href) // window.location.href
-            // console.log('url: '+ url )
             // TODO: 开发环境,参数修改
             if (process.env.VUE_APP_RealEnv === 'development') {   
-                url = `username=wangjintao&plazaId=1000772`
+                href = encrypted('username=liujiandong&plazaId=1000423')
             }
+            let url = decrypted(href) // window.location.href
+            // console.log('url: '+ url )
+            
             let params = this.queryURLParams(url)
             let { username, plazaId, assetid } = params
             if (username) {

+ 6 - 0
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 {
@@ -137,6 +142,7 @@ export default {
     height: 30px;
     line-height: 30px;
     background: #ebeded;
+    overflow: hidden;
 }
 .card:not(:nth-child(3n)) {
     margin-right: 8px;

+ 1 - 1
src/utils/crypto.js

@@ -8,7 +8,7 @@ const secretKey = 'B447B88D5AF5A99A' + moment().format('YYYYMMDD');
 const url = `username=wangjintao&plazaId=1000772&time=1611198103138`
 
 // 加密
-export  function encrypted (){
+export  function encrypted (url){
     const encJson =CryptoJS.AES.encrypt(url,secretKey).toString();
     return CryptoJS.enc.Base64.stringify(CryptoJS.enc.Utf8.parse(encJson));
 }