Commit 7f2fdd0a authored by 黄奎's avatar 黄奎

页面修改

parent eabba234
<template> <template>
<q-list style="color:#9d9da6"> <q-list style="color: #9d9da6">
<nav-item :menu="x" v-for="x in menus"></nav-item> <nav-item :menu="x" v-for="x in menus"></nav-item>
</q-list> </q-list>
</template> </template>
<script lang="ts"> <script lang="ts">
import { defineComponent,ref,reactive, toRefs, inject } from 'vue' import { defineComponent, ref, reactive, toRefs, inject } from "vue";
import navItem from './nav-item.vue' import navItem from "./nav-item.vue";
import { useMenus, Menu } from '../../utils/menus' import { useMenus, Menu } from "../../utils/menus";
import { DirtionmaryHelper } from '../../config/dictionary'; import { DirtionmaryHelper } from "../../config/dictionary";
export default defineComponent({ export default defineComponent({
components: { navItem }, components: { navItem },
name: 'navs', name: "navs",
setup() { setup() {
const data = reactive({ const data = reactive({
menus: [] as Menu[] menus: [] as Menu[],
}) });
//销售的菜单sell.oytour
const sellMenuList = useMenus.getMenus().filter((x) => {
return x.id == 16;
});
const typicMenuList = []; //台湾PIC菜单
const allMenuList = useMenus.getMenus();
if (allMenuList && allMenuList.length > 0) {
allMenuList.forEach((item) => {
if (item.id != 16 && item.id != 13 && item.id != 20) {
typicMenuList.push(item);
}
});
}
// 根据域名渲染菜单
const menList = useMenus.getMenus().filter(x=>{
return x.id == 16
})
// data.menus = !inject(DirtionmaryHelper.DOMAIN_NAME)?menList:useMenus.getMenus() // data.menus = !inject(DirtionmaryHelper.DOMAIN_NAME)?menList:useMenus.getMenus()
if(inject(DirtionmaryHelper.DOMAIN_NAME)=='sell.oytour') data.menus = menList if (inject(DirtionmaryHelper.DOMAIN_NAME) == "sell.oytour") {
else data.menus = useMenus.getMenus() data.menus = sellMenuList;
} else if (inject(DirtionmaryHelper.DOMAIN_NAME) == "typic.oytour") {
data.menus = typicMenuList;
} else {
data.menus = useMenus.getMenus();
}
return {...toRefs(data)} return { ...toRefs(data) };
} },
}) });
</script> </script>
<style> <style>
.nav-list .nav-group:hover span, .nav-list .nav-group:hover span,
.nav-list .nav-item:hover span, .nav-list .nav-item:hover span,
.nav-list .nav-item.active span, .nav-list .nav-item.active span,
.nav-list .nav-group.active span, .nav-list .nav-group.active span,
.parent-name{ .parent-name {
color: #FFFFFF !important; color: #ffffff !important;
} }
.nav-list .nav-group.active .svg-icon-nav g [fill], .nav-list .nav-group.active .svg-icon-nav g [fill],
.nav-group:hover .svg-icon-nav g [fill], .nav-group:hover .svg-icon-nav g [fill],
.nav-item:hover .svg-icon-nav g [fill], .nav-item:hover .svg-icon-nav g [fill],
.nav-list .nav-item.active .svg-icon-nav g [fill], .nav-list .nav-item.active .svg-icon-nav g [fill],
.nav-active .svg-icon-nav g [fill], .nav-active .svg-icon-nav g [fill],
.nav-parent .svg-icon-nav g [fill]{ .nav-parent .svg-icon-nav g [fill] {
fill: #FFFFFF !important; fill: #ffffff !important;
/* color: #FFFFFF !important; */ /* color: #FFFFFF !important; */
} }
.nav-list .q-focus-helper{ .nav-list .q-focus-helper {
opacity: 0 !important; opacity: 0 !important;
} }
.nav-active{ .nav-active {
color:#FFF !important; color: #fff !important;
transition: color 0.2s ease; transition: color 0.2s ease;
background-color: #2A2A3C; background-color: #2a2a3c;
} }
</style> </style>
...@@ -33,18 +33,18 @@ export function validatAlphabetsName(str: string) { ...@@ -33,18 +33,18 @@ export function validatAlphabetsName(str: string) {
return reg.test(str) return reg.test(str)
} }
export function isEmail(account:string):boolean { export function isEmail(account: string): boolean {
let serchfind:boolean; let serchfind: boolean;
let regexp = new RegExp(/^(([^<>()\[\]\\.,;:\[email protected]"]+(\.[^<>()\[\]\\.,;:\[email protected]"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/); let regexp = new RegExp(/^(([^<>()\[\]\\.,;:\[email protected]"]+(\.[^<>()\[\]\\.,;:\[email protected]"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/);
serchfind = regexp.test(account); serchfind = regexp.test(account);
return serchfind return serchfind
} }
export function isPhone(account:string):boolean { export function isPhone(account: string): boolean {
let serchfind:boolean; let serchfind: boolean;
let regexp = new RegExp(/^((13|14|15|16|17|18|19)[0-9]{1}\d{8})$/); let regexp = new RegExp(/^((13|14|15|16|17|18|19)[0-9]{1}\d{8})$/);
serchfind = regexp.test(account); serchfind = regexp.test(account);
return serchfind return serchfind
} }
/** 比对数组是否相同 */ /** 比对数组是否相同 */
...@@ -66,11 +66,18 @@ export function compareArray(arrA: any[], arrB: any[]) { ...@@ -66,11 +66,18 @@ export function compareArray(arrA: any[], arrB: any[]) {
/** 获取当前域名 localhost、pic.oytour.com、sell.oytour.com*/ /** 获取当前域名 localhost、pic.oytour.com、sell.oytour.com*/
export function getDomainName() { export function getDomainName() {
let domainNameUrl = window.location.hostname; let domainNameUrl = window.location.hostname;
if(domainNameUrl=='localhost'){ if (domainNameUrl == 'localhost') {
return 'pic.oytour' return 'pic.oytour'
}else if(domainNameUrl=='pic.oytour.com'){ } else if (domainNameUrl.indexOf("192.168.10") > -1) {
return 'pic.oytour' console.log("11");
}else if(domainNameUrl=='sell.oytour.com'){ return "typic.oytour"
return 'sell.oytour' }
} else if (domainNameUrl == "typic.oytour.com") {
return "typic.oytour"
}
else if (domainNameUrl == 'pic.oytour.com') {
return 'pic.oytour'
} else if (domainNameUrl == 'sell.oytour.com') {
return 'sell.oytour'
}
} }
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