Commit 807e4736 authored by zhengke's avatar zhengke

logo 上传

parent a71da248
......@@ -64,6 +64,7 @@
"tippy.js": "^6.3.7",
"vue": "^3.4.21",
"vue-konva": "^3.0.2",
"vue-picture-cropper": "^0.7.0",
"vue-router": "^4.0.13",
"vue-waterfall-plugin-next": "^2.4.3",
"vue-waypoint": "^4.3.0",
......
......@@ -554,7 +554,7 @@ const getColorShade = async (newSlides:any) => {
let dark = false
let day = 0
// 根据集团渲染logo
if((tempDatas.value.GId!=userInfo.value.gid&&!searchData.value.isTeamManage)||userInfo.value.IsEnableLogo){
if(tempDatas.value.GId!=userInfo.value.gid&&!searchData.value.isTeamManage){
for(let j=0;j<colorList.value.length;j++){
if (getRgbLevel(colorList.value[j].Color) > 50) dark = true
}
......@@ -611,7 +611,7 @@ const ResolveTripLogoHandler = async (items:any, slideIndex:number,dark:false,da
let tempSize = await FileService.getImageSizeWithoutDownloading(templateObj[i].src)
let scale = parseInt(y.width/y.height)
let url = ''
if(userInfo.value.IsEnableLogo){
if(userInfo.value.IsEnableLogo&&userInfo.value.GroupLogoList&&userInfo.value.GroupLogoList.length>0){
let LOGOS = userInfo.value.GroupLogoList
if(scale>=1&&scale<3&&!day) url = dark==true?LOGOS[0].FilePath:LOGOS[3].FilePath
if(scale>=1&&scale<3&&day) url = acquiesceLogo.value[6]
......
......@@ -174,12 +174,23 @@ const ResolveTripLogoHandler = async (items:any, slideIndex:number,dark:false,da
let tempSize = await FileService.getImageSizeWithoutDownloading(templateObj[i].src)
let scale = parseInt(y.width/y.height)
let url = ''
if(scale>=1&&scale<3&&!day) url = dark==true?acquiesceLogo.value[0]:acquiesceLogo.value[3]
if(scale>=1&&scale<3&&day) url = acquiesceLogo.value[6]
if(scale<1) url = dark==true?acquiesceLogo.value[1]:acquiesceLogo.value[4]
if(scale>=5) url = dark==true?acquiesceLogo.value[2]:acquiesceLogo.value[5]
if(scale>=3&&scale<5&&!day) url = dark==true?acquiesceLogo.value[2]:acquiesceLogo.value[5]
if(scale>=3&&scale<5&&day) url = acquiesceLogo.value[2]
// if(userInfo.value.IsEnableLogo&&userInfo.value.GroupLogoList&&userInfo.value.GroupLogoList.length>0){
// let LOGOS = userInfo.value.GroupLogoList
// if(scale>=1&&scale<3&&!day) url = dark==true?LOGOS[0].FilePath:LOGOS[3].FilePath
// if(scale>=1&&scale<3&&day) url = acquiesceLogo.value[6]
// if(scale<1) url = dark==true?LOGOS[1].FilePath:LOGOS[4].FilePath
// if(scale>=5) url = dark==true?LOGOS[2].FilePath:LOGOS[5].FilePath
// if(scale>=3&&scale<5&&!day) url = dark==true?LOGOS[2].FilePath:LOGOS[5].FilePath
// if(scale>=3&&scale<5&&day) url = LOGOS[2].FilePath
// }else{
// }
if(scale>=1&&scale<3&&!day) url = dark==true?acquiesceLogo.value[0]:acquiesceLogo.value[3]
if(scale>=1&&scale<3&&day) url = acquiesceLogo.value[6]
if(scale<1) url = dark==true?acquiesceLogo.value[1]:acquiesceLogo.value[4]
if(scale>=5) url = dark==true?acquiesceLogo.value[2]:acquiesceLogo.value[5]
if(scale>=3&&scale<5&&!day) url = dark==true?acquiesceLogo.value[2]:acquiesceLogo.value[5]
if(scale>=3&&scale<5&&day) url = acquiesceLogo.value[2]
let newTempSize = await FileService.getImageSizeWithoutDownloading(url)
let width = 0
let height = 0
......
......@@ -42,9 +42,10 @@
<script lang="ts" setup>
import UserCard from "@/components/User/UserCard.vue";
import { useMenuStore } from "@/store";
import { useMenuStore, useUserStore } from "@/store";
import { ref, watch } from "vue";
import { useRouter } from "vue-router";
import { storeToRefs } from 'pinia'
const router = useRouter()
const useMenu = useMenuStore();
......@@ -52,6 +53,7 @@ const menus = ref(useMenu.getTeamMenu);
const activeIndex = ref('0')
const path = ref('')
path.value = router.currentRoute.value.path
const { userInfo } =storeToRefs(useUserStore())
const forwardSpace = () => router.push('/space')
if(menus.value.length==0){
router.push({
......@@ -60,7 +62,9 @@ if(menus.value.length==0){
}
watch(() => router.currentRoute.value.path, (toPath) => {
menus.value = useMenu.getTeamMenu
if(userInfo.value.isp){
menus.value = useMenu.getUserMenu.filter(x=> {return x.url!='/a/l'})
} else menus.value = useMenu.getTeamMenu
if(!menus.value) return
menus.value.forEach((x,i)=>{
if(x.url==router.currentRoute.value.path){
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment