wangming il y a 3 semaines
Parent
commit
a6ff8dd3a9
1 fichiers modifiés avec 33 ajouts et 1 suppressions
  1. 33 1
      src/pagesA/deviceSetting/deviceSetting.vue

+ 33 - 1
src/pagesA/deviceSetting/deviceSetting.vue

@@ -85,9 +85,12 @@
             </view>
         </view>
         <view class="box">
-            <view class="handle-btn">
+            <view class="handle-btn" v-if="settingFlag">
                 <view class="btn1" @click="goMoreSetting">更多设置</view>
             </view>
+            <view class="handle-noflage" v-else>
+                <view class="btn1" @click="goNoSetting">更多设置</view>
+            </view>
         </view>
         <tenMinutes v-if="isIniTenMinutes" />
         <view class="modal-mask" v-if="removeDeviceModle">
@@ -137,6 +140,7 @@ export default {
             otaList: [],
             otaListName: [],
             otaIndex: 0,
+            settingFlag: false,
         };
     },
     methods: {
@@ -194,6 +198,12 @@ export default {
                     JSON.stringify(this.devInfo),
             });
         },
+        goNoSetting() {
+            uni.showToast({
+                title: "您没有设置权限",
+                icon: "none",
+            });
+        },
         goFailDetail() {
             uni.navigateTo({
                 url:
@@ -340,6 +350,8 @@ export default {
         this.isIniTenMinutes = true;
         this.getPosition(this.devInfo.installPosition);
         this.queryOtaList();
+        let userId = uni.getStorageSync("userId");
+        this.settingFlag = this.devInfo.userId == userId ? true : false;
     },
     onUnload() {
         this.isIniTenMinutes = false;
@@ -452,6 +464,26 @@ export default {
                 text-align: center;
             }
         }
+        .handle-noflage {
+            margin-top: 40rpx;
+            display: flex;
+            align-items: center;
+            justify-content: space-between;
+
+            .btn1 {
+                display: flex;
+                align-items: center;
+                justify-content: center;
+                width: 700rpx;
+                height: 94rpx;
+                border-radius: 28rpx;
+                font-weight: 500;
+                background: #f0f0f0;
+                color: #999999;
+                font-size: 32rpx;
+                text-align: center;
+            }
+        }
     }
     .modal-mask {
         position: fixed;