Browse Source

mod:拍照页面 新增 开发者 调试页面 menu

panqiuyao 8 months ago
parent
commit
4626ae3b3e
1 changed files with 27 additions and 15 deletions
  1. 27 15
      frontend/src/views/Photography/shot.vue

+ 27 - 15
frontend/src/views/Photography/shot.vue

@@ -3,20 +3,7 @@
   <headerBar
       title="拍摄商品"
       showUser
-      :menu=" useUserInfoStore.userInfo.brand_company_code === '1300' ? [
-        {
-          type:'setting'
-        },
-        {
-          type:'developer'
-        }
-       ]
-        : [
-            {
-              type:'setting'
-            }
-        ]
-    ]"
+      :menu="menu"
   />
 
   <hardware-check/>
@@ -168,7 +155,7 @@
 </template>
 <script setup lang="ts">
 import headerBar from '@/components/header-bar/index.vue'
-import { ref, reactive, onMounted, onBeforeUnmount,watchEffect } from 'vue'
+import { ref, reactive, onMounted, onBeforeUnmount,watchEffect, computed} from 'vue'
 import icpList from '@/utils/ipc'
 import client from "@/stores/modules/client";
 import socket from "@/stores/modules/socket";
@@ -184,6 +171,31 @@ const runLoading = ref(false)
 const takePictureLoading = ref(false)
 
 
+import useUserInfo from "@/stores/modules/user";
+const useUserInfoStore = useUserInfo();
+
+const menu = computed(()=>{
+  if(useUserInfoStore.userInfo.brand_company_code === '1300'){
+    return [
+      {
+        type:'setting'
+      },
+      {
+        type:'developer'
+      }
+    ]
+  }
+
+
+  return [
+    {
+      type:'setting'
+    }
+  ]
+
+
+})
+
 const clientStore = client();
 
 const Router = useRouter()