Explorar o código

修复挤压等相关bug

wzh hai 1 ano
pai
achega
1b84eb814c
Modificáronse 12 ficheiros con 1105 adicións e 594 borrados
  1. 3 0
      App.vue
  2. 2 2
      manifest.json
  3. 8 1
      pages.json
  4. 34 10
      pages/device/detail.vue
  5. 1020 568
      pages/device/detail1.vue
  6. 11 3
      pages/device/index.vue
  7. 13 4
      pages/index.vue
  8. 11 3
      pages/work/index.vue
  9. 3 3
      permission.js
  10. BIN=BIN
      static/img/ble.png
  11. BIN=BIN
      static/img/ecble.png
  12. BIN=BIN
      static/img/logo.png

+ 3 - 0
App.vue

@@ -55,6 +55,9 @@
         })
       },
       checkLogin() {
+        const pages = uni.getCurrentPages();
+        const currentPage = pages[pages.length - 1]; // 当前页面
+        const currentPagePath = currentPage.$route.path; // 当前页面的路径
         if (!getToken()) {
           this.$tab.reLaunch('/pages/login')
         }

+ 2 - 2
manifest.json

@@ -1,5 +1,5 @@
 {
-    "name" : "天目云平台",
+    "name" : "老药师云平台",
     "appid" : "__UNI__E4C911E",
     "description" : "",
     "versionName" : "1.1.0",
@@ -41,7 +41,7 @@
     },
     "quickapp" : {},
     "mp-weixin" : {
-        "appid" : "wxc4471e86d14666b8",
+        "appid" : "wx0ef8e17314eb2764",
         "plugins" : {},
         "setting" : {
             "urlCheck" : false,

+ 8 - 1
pages.json

@@ -28,7 +28,7 @@
     {
       "path": "pages/index",
       "style": {
-        "navigationBarTitleText": "若依移动端框架",
+        "navigationBarTitleText": "登录中",
         "navigationStyle": "custom"
       }
     },
@@ -105,6 +105,13 @@
         "navigationStyle": "custom"
       }
     },
+    {
+      "path": "pages/device/detail_6",
+      "style": {
+        "navigationBarTitleText": "详情",
+        "navigationStyle": "custom"
+      }
+    },
     {
       "path": "pages/wifi/index",
       "style": {

+ 34 - 10
pages/device/detail.vue

@@ -2,6 +2,12 @@
   <view class="content"  >
     <view class="header" :style='"background-image:url("+imgUrl+"/detail/bg.png);background-repeat: no-repeat;background-size: 100% 200%;"'>
 
+      <view  @click='goBack()' style="font-size: 17px;
+    padding-top: 7px;
+    position: absolute;">
+        返回
+      </view>
+
       <view class="status_info">
         <view class="status_detail">
           <view class="status_text">{{ getStatusText() }}</view>
@@ -1117,7 +1123,7 @@ export default {
       pressTurn:0,
       resetTurn:0,
       canGetPrsValue:false,//可以接收挤压的动画
-      devicePlanInfo:null,//设备后台预约任务
+      devicePlanInfo: {},//设备后台预约任务
       devicePlanPopDlg:false,
       deviceYuyueIngPop:false,
       baowenPopDlg:false,
@@ -1150,6 +1156,17 @@ export default {
       this.lineProgreeStyle = "width:"+newvalue+"%;background:#50ACFF;height: 100%;";
     },
     pressTurn(newVal,oldValue) {
+        // this.pressTurnChangeEvent(newVal);
+    },
+    resetTurn(newVal){
+        // this.resetTurnChnageEvent(newVal);
+    }
+  },
+  methods:{
+	  goBack(){
+	uni.navigateBack();
+	  },
+    pressTurnChangeEvent(newVal){
       let self= this;
       if(newVal == 1){
         setTimeout(function(){
@@ -1160,19 +1177,17 @@ export default {
         this.turnPercent = 0;
       }
     },
-    resetTurn(newVal){
+    resetTurnChnageEvent(newVal){
       let self= this;
       if(newVal == 1){
-       setTimeout(function(){
-         self.startProgressTimer(2);
-       },200);
+        setTimeout(function(){
+          self.startProgressTimer(2);
+        },200);
       }else{
         clearInterval(this.lineTimer)
         this.turnPercent = 0;
       }
-    }
-  },
-  methods:{
+    },
     closeDeviceYuyueIngPop(){
       this.deviceYuyueIngPop = false;
     },
@@ -1655,7 +1670,7 @@ export default {
       })
     },
     showBaowenProp(){
-      if(!this.jianyaoIng()){
+      if(this.jianyaoIng()){
         this.$modal.showToast('必须煎药模式下才能设置')
         return;
       }
@@ -1750,7 +1765,7 @@ export default {
 
        });
      }else{
-
+       this.resetResetFunc();
        let arr = ["a","b","c"]
        if(this.isMulTab(index)){
          this.childId =arr[index-1];
@@ -1774,6 +1789,13 @@ export default {
 
      }
     },
+    resetResetFunc(){
+      let self = this;
+      if(self.lineTimer != null){
+        clearInterval(self.lineTimer)
+      }
+      this.turnPercent = 0;
+    },
     resetChoose(){
           this.tabIndex = 0;
       for (let i = 0; i < 3; i++) {
@@ -2911,6 +2933,7 @@ export default {
             }else{
               this.pressTurn = 0;
             }
+            this.pressTurnChangeEvent(shadow);
           }
 
           if(id == 'ResetTurn'){
@@ -2924,6 +2947,7 @@ export default {
             }else{
               this.resetTurn = 0;
             }
+            this.resetTurnChnageEvent(shadow);
           }
         }
 

A diferenza do arquivo foi suprimida porque é demasiado grande
+ 1020 - 568
pages/device/detail1.vue


+ 11 - 3
pages/device/index.vue

@@ -81,9 +81,17 @@ export default {
   },
   methods:{
     goDeviceDetail(item){
-      uni.navigateTo({
-        url: '/pages/device/detail?id='+item.deviceId
-      });
+      let type = item.type;
+      if(type == 16){
+        uni.navigateTo({
+          url: '/pages/device/detail_6?id='+item.deviceId
+        });
+      }else{
+        uni.navigateTo({
+          url: '/pages/device/detail?id='+item.deviceId
+        });
+      }
+
     },
     searchDevice(){
       console.log(this.search.deviceName)

+ 13 - 4
pages/index.vue

@@ -1,15 +1,24 @@
 <template>
   <view class="content">
-    <image class="logo" src="@/static/logo.png"></image>
     <view class="text-area">
-      <text class="title">Hello RuoYi</text>
+      <text class="title">跳转中。。</text>
     </view>
   </view>
 </template>
 
 <script>
+import { getToken, setToken, removeToken } from '@/utils/auth'
   export default {
-    onLoad: function() {
+    onLoad: function(opt) {
+      let token = opt.token;
+
+      if(token){
+        let deptNum = opt.deptId;
+        setToken(token)
+        uni.reLaunch({
+          url: '/pages/device/index?deptId='+deptNum
+        });
+      }
     }
   }
 </script>
@@ -40,4 +49,4 @@
     font-size: 36rpx;
     color: #8f8f94;
   }
-</style>
+</style>

+ 11 - 3
pages/work/index.vue

@@ -234,9 +234,17 @@ export default {
               }
 
               if(device != null){
-                uni.navigateTo({
-                  url: '/pages/device/detail?id='+device.deviceId
-                });
+                let type =device.type;
+                if(type == 16){
+                  uni.navigateTo({
+                    url: '/pages/device/detail_6?id='+device.deviceId
+                  });
+                }else{
+                  uni.navigateTo({
+                    url: '/pages/device/detail?id='+device.deviceId
+                  });
+                }
+
               }else{
                 self.$modal.showToast('设备不存在或无权限')
               }

+ 3 - 3
permission.js

@@ -1,11 +1,11 @@
 import { getToken } from '@/utils/auth'
 
-// 登录页面
+// 登录页面
 const loginPage = "/pages/login"
   
 // 页面白名单
 const whiteList = [
-  '/pages/login', '/pages/common/webview/index'
+  '/pages/login', '/pages/common/webview/index','/pages/index'
 ]
 
 // 检查地址白名单
@@ -36,4 +36,4 @@ list.forEach(item => {
       console.log(err)
     }
   })
-})
+})

BIN=BIN
static/img/ble.png


BIN=BIN
static/img/ecble.png


BIN=BIN
static/img/logo.png