瀏覽代碼

子账号权限

wangxy 3 周之前
父節點
當前提交
9d5a80c8f2
共有 1 個文件被更改,包括 4 次插入2 次删除
  1. 4 2
      pages/admin/ShouYe/shouye.vue

+ 4 - 2
pages/admin/ShouYe/shouye.vue

@@ -38,7 +38,8 @@
 		 	<icon class="index-icon jz-icon"></icon>
 		 	<text>家政人员</text>
 		 </view>
-		 <view @click="goToPage('zzh')" class="card-item-box">
+		 <!-- 添加子账号权限只有主账号拥有,其他子账号无法查看 -->
+		 <view @click="goToPage('zzh')" class="card-item-box" v-if="auth.type == 2">
 		 	<icon class="index-icon zzh-icon"></icon>
 		 	<text>创建子账号</text>
 		 </view>
@@ -73,6 +74,7 @@
 </template>
 
 <script setup>
+import cacheManager from "@/utils/cacheManager.js";
 import {onLoad,onShow} from '@dcloudio/uni-app';
 import {reactive,ref} from "vue";
 import customTabbarAdminVue from "@/components/custom-tabbar/custom-tabbar-admin.vue";
@@ -84,7 +86,7 @@ const version = config.appInfo.version;
 const tipDialogRef = ref(null);
 const tipTitle = '升级提醒';
 const tipContent = '您的APP不是最新版本,部分功能不能使用,请升级至最新版本!';
-	
+const auth = cacheManager.get('auth');
 const tjBtn = ref(1);
 const tzNum = ref(0);
 const tzContent = ref('');