|
@@ -1,6 +1,6 @@
|
|
|
<template>
|
|
|
<div class="app-header">
|
|
|
- <a class="logo" href="https://le5le.com" target="_blank">
|
|
|
+ <a class="logo" :href="assets.home" target="_blank">
|
|
|
<img src="/favicon.ico" />
|
|
|
<span>乐吾乐</span>
|
|
|
</a>
|
|
@@ -215,8 +215,8 @@
|
|
|
>
|
|
|
<a> 帮助 </a>
|
|
|
<t-dropdown-menu>
|
|
|
- <t-dropdown-item v-for="item in helpList" :divider="item.divider">
|
|
|
- <a :href="item.url" :target="item.target">{{ item.name }}</a>
|
|
|
+ <t-dropdown-item v-for="item in assets.helps" :divider="item.divider">
|
|
|
+ <a :href="item.url" target="_blank">{{ item.name }}</a>
|
|
|
</t-dropdown-item>
|
|
|
</t-dropdown-menu>
|
|
|
</t-dropdown>
|
|
@@ -230,29 +230,36 @@
|
|
|
:delay2="[10, 150]"
|
|
|
overlayClassName="custom-dropdown header"
|
|
|
>
|
|
|
- <a style="margin-left: 32px; margin-right: 0">
|
|
|
+ <a style="margin-left: 32px; margin-right: 12px">
|
|
|
<t-avatar
|
|
|
size="small"
|
|
|
:image="user.avatarUrl ? user.avatarUrl : baseUrl + 'img/avatar.png'"
|
|
|
/>
|
|
|
</a>
|
|
|
<t-dropdown-menu>
|
|
|
- <t-dropdown-item>
|
|
|
- <router-link to="/account/info">
|
|
|
+ <t-dropdown-item divider="true">
|
|
|
+ <a :href="assets.account">
|
|
|
{{ user.username }}
|
|
|
- </router-link>
|
|
|
+ <label class="ml-16 vip-label">VIP</label>
|
|
|
+ </a>
|
|
|
</t-dropdown-item>
|
|
|
- <t-dropdown-item>
|
|
|
- <router-link to="/account/info">我的图纸</router-link>
|
|
|
+ <t-dropdown-item divider="true">
|
|
|
+ <a :href="`${assets.account}/v`" target="_blank"> 我的大屏 </a>
|
|
|
</t-dropdown-item>
|
|
|
<t-dropdown-item>
|
|
|
- <router-link to="/account/teams">我的团队</router-link>
|
|
|
+ <a :href="`${assets.account}/account/teams`" target="_blank">
|
|
|
+ 我的团队
|
|
|
+ </a>
|
|
|
</t-dropdown-item>
|
|
|
<t-dropdown-item>
|
|
|
- <router-link to="/account/info">账号信息</router-link>
|
|
|
+ <a :href="`${assets.account}/account/info`" target="_blank">
|
|
|
+ 账号信息
|
|
|
+ </a>
|
|
|
</t-dropdown-item>
|
|
|
- <t-dropdown-item :divider="true">
|
|
|
- <router-link to="/account/security"> 安全设置 </router-link>
|
|
|
+ <t-dropdown-item divider="true">
|
|
|
+ <a :href="`${assets.account}/account/security`" target="_blank">
|
|
|
+ 安全设置
|
|
|
+ </a>
|
|
|
</t-dropdown-item>
|
|
|
<t-dropdown-item>
|
|
|
<a @click="signout">退出</a>
|
|
@@ -260,15 +267,15 @@
|
|
|
</t-dropdown-menu>
|
|
|
</t-dropdown>
|
|
|
<div class="flex middle" v-else>
|
|
|
- <a class="button primary solid" style="width: 80px" :href="login()"
|
|
|
- >登录</a
|
|
|
- >
|
|
|
+ <a class="button primary solid" style="width: 80px" :href="login()">
|
|
|
+ 登录
|
|
|
+ </a>
|
|
|
</div>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script lang="ts" setup>
|
|
|
-import { reactive, ref, onUnmounted, nextTick } from 'vue';
|
|
|
+import { reactive, ref, onBeforeMount, onUnmounted, nextTick } from 'vue';
|
|
|
import { useRouter, useRoute } from 'vue-router';
|
|
|
import { useUser } from '@/services/user';
|
|
|
import { MessagePlugin } from 'tdesign-vue-next';
|
|
@@ -308,12 +315,61 @@ const route = useRoute();
|
|
|
|
|
|
const baseUrl = import.meta.env.BASE_URL || '/';
|
|
|
|
|
|
+const assets = reactive({
|
|
|
+ home: 'https://le5le.com',
|
|
|
+ account: 'https://account.le5le.com',
|
|
|
+ helps: [
|
|
|
+ {
|
|
|
+ name: '产品介绍',
|
|
|
+ url: 'https://doc.le5le.com/document/118756411',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: '快速上手',
|
|
|
+ url: 'https://doc.le5le.com/document/119363000',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: '使用手册',
|
|
|
+ url: 'https://doc.le5le.com/document/118764244',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: '快捷键',
|
|
|
+ url: 'https://doc.le5le.com/document/119620214',
|
|
|
+ divider: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: '企业服务与支持',
|
|
|
+ url: 'https://doc.le5le.com/document/119296274',
|
|
|
+ divider: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: '关于我们',
|
|
|
+ url: 'https://le5le.com/about.html',
|
|
|
+ },
|
|
|
+ ],
|
|
|
+});
|
|
|
+
|
|
|
const { user, signout } = useUser();
|
|
|
const { setDot } = useDot();
|
|
|
const data = reactive({
|
|
|
name: '空白文件',
|
|
|
});
|
|
|
|
|
|
+onBeforeMount(async () => {
|
|
|
+ // 官网或安装包版本
|
|
|
+ if (
|
|
|
+ import.meta.env.VITE_TRIAL == undefined ||
|
|
|
+ import.meta.env.VITE_TRIAL == 1
|
|
|
+ ) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
+ // 企业版
|
|
|
+ const ret = await axios.get('/api/assets');
|
|
|
+ if (ret) {
|
|
|
+ Object.assign(assets, ret);
|
|
|
+ }
|
|
|
+});
|
|
|
+
|
|
|
const onInputName = () => {
|
|
|
(meta2d.store.data as Meta2dBackData).name = data.name;
|
|
|
setDot(true);
|
|
@@ -332,18 +388,7 @@ onUnmounted(() => {
|
|
|
});
|
|
|
|
|
|
function login() {
|
|
|
- //TODO 临时地址
|
|
|
- return `https://account.le5le.com/?cb=${encodeURIComponent(location.href)}`;
|
|
|
- // if (market) {
|
|
|
- // return `/account/login?cb=${encodeURIComponent(location.href)}`;
|
|
|
- // } else {
|
|
|
- // let arr = location.host.split('.');
|
|
|
- // arr[0] = 'http://account';
|
|
|
- // let accountUrl = arr.join('.');
|
|
|
- // return `${
|
|
|
- // loginUrl ? loginUrl : accountUrl
|
|
|
- // }?cb=${encodeURIComponent(location.href)}`;
|
|
|
- // }
|
|
|
+ return `${assets.account}?cb=${encodeURIComponent(location.href)}`;
|
|
|
}
|
|
|
|
|
|
function load(newT: boolean = false) {
|
|
@@ -1000,41 +1045,6 @@ const changeDisableAnchor = () => {
|
|
|
onAutoAnchor();
|
|
|
}
|
|
|
};
|
|
|
-
|
|
|
-const helpList = [
|
|
|
- {
|
|
|
- name: '产品介绍',
|
|
|
- url: 'https://doc.le5le.com/document/118756411',
|
|
|
- target: '_blank',
|
|
|
- },
|
|
|
- {
|
|
|
- name: '快速上手',
|
|
|
- url: 'https://doc.le5le.com/document/119363000',
|
|
|
- target: '_blank',
|
|
|
- },
|
|
|
- {
|
|
|
- name: '使用手册',
|
|
|
- url: 'https://doc.le5le.com/document/118764244',
|
|
|
- target: '_blank',
|
|
|
- },
|
|
|
- {
|
|
|
- name: '快捷键',
|
|
|
- url: 'https://doc.le5le.com/document/119620214',
|
|
|
- target: '_blank',
|
|
|
- divider: true,
|
|
|
- },
|
|
|
- {
|
|
|
- name: '企业服务与支持',
|
|
|
- url: 'https://doc.le5le.com/document/119296274',
|
|
|
- target: '_blank',
|
|
|
- divider: true,
|
|
|
- },
|
|
|
- {
|
|
|
- name: '关于我们',
|
|
|
- url: 'https://le5le.com/about.html',
|
|
|
- target: '_blank',
|
|
|
- },
|
|
|
-];
|
|
|
</script>
|
|
|
<style lang="postcss" scoped>
|
|
|
.app-header {
|