|
|
@@ -5,12 +5,15 @@
|
|
|
<span class="blue-header-bar__title">智惠映AI自动拍照机 <span class="blue-header-bar__version" @click="openOTA">{{ currentVersion }}</span></span>
|
|
|
</div>
|
|
|
<div class="blue-header-bar__right">
|
|
|
+ <div class="blue-header-bar__manual" @click="openManual" title="点击查看使用手册">
|
|
|
+ 使用手册
|
|
|
+ </div>
|
|
|
<div class="blue-header-bar__user">
|
|
|
<span class="blue-header-bar__user-label">昵称:</span>
|
|
|
<span class="blue-header-bar__user-name">
|
|
|
- {{ useUserInfoStore.userInfo.account_name
|
|
|
- || useUserInfoStore.userInfo.real_name
|
|
|
- || useUserInfoStore.userInfo.login_name
|
|
|
+ {{ (useUserInfoStore.userInfo as any).account_name
|
|
|
+ || (useUserInfoStore.userInfo as any).real_name
|
|
|
+ || (useUserInfoStore.userInfo as any).login_name
|
|
|
|| '未登录' }}
|
|
|
</span>
|
|
|
</div>
|
|
|
@@ -28,6 +31,7 @@ import client from '@/stores/modules/client'
|
|
|
import {useRouter} from "vue-router";
|
|
|
import icpList from '@/utils/ipc'
|
|
|
import { getRouterUrl } from '@/utils/appfun'
|
|
|
+import { getCameraMachineDoc } from '@/apis/other'
|
|
|
|
|
|
const useUserInfoStore = useUserInfo()
|
|
|
const tokenInfoStore = tokenInfo();
|
|
|
@@ -38,7 +42,7 @@ const Router = useRouter()
|
|
|
onMounted(async ()=>{
|
|
|
|
|
|
if (tokenInfoStore.getToken /* 已登录 */) {
|
|
|
- if(!useUserInfoStore.userInfo.id){
|
|
|
+ if(!(useUserInfoStore.userInfo as any).id){
|
|
|
await useUserInfoStore.getInfo()
|
|
|
}
|
|
|
}
|
|
|
@@ -60,6 +64,28 @@ function openOTA() {
|
|
|
}
|
|
|
clientStore.ipc.send(icpList.utils.openMain, params)
|
|
|
}
|
|
|
+
|
|
|
+async function openManual() {
|
|
|
+ try {
|
|
|
+ const response = await getCameraMachineDoc({
|
|
|
+ machine_type: 0
|
|
|
+ });
|
|
|
+
|
|
|
+ if (response.data && response.data.url) {
|
|
|
+ // 使用系统默认浏览器打开URL
|
|
|
+ clientStore.ipc.removeAllListeners(icpList.utils.shellFun);
|
|
|
+ let params = {
|
|
|
+ action: 'openExternal',
|
|
|
+ params: response.data.url
|
|
|
+ };
|
|
|
+ clientStore.ipc.send(icpList.utils.shellFun, params);
|
|
|
+ } else {
|
|
|
+ console.error('获取使用手册URL失败');
|
|
|
+ }
|
|
|
+ } catch (error) {
|
|
|
+ console.error('获取使用手册失败:', error);
|
|
|
+ }
|
|
|
+}
|
|
|
</script>
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
@@ -117,6 +143,20 @@ function openOTA() {
|
|
|
-webkit-app-region: no-drag;
|
|
|
}
|
|
|
|
|
|
+ &__manual {
|
|
|
+ background: rgba(255,255,255,0.2);
|
|
|
+ border-radius: 12px;
|
|
|
+ font-size: 12px;
|
|
|
+ padding: 6px 12px;
|
|
|
+ color: #fff;
|
|
|
+ cursor: pointer;
|
|
|
+ transition: background-color 0.2s;
|
|
|
+
|
|
|
+ &:hover {
|
|
|
+ background: rgba(255,255,255,0.3);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
&__user {
|
|
|
display: flex;
|
|
|
align-items: center;
|