ou
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
<template>
|
||||
<span class="avatar" :class="'avatar-'+size" :style="'background-image: url('+url+')'"></span>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name:"avatar",
|
||||
props: {
|
||||
url: {
|
||||
type: String, // 指定类型
|
||||
},
|
||||
size: {
|
||||
type: String, // 指定类型
|
||||
default:"sm"
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
|
||||
</style>
|
||||
@@ -0,0 +1,33 @@
|
||||
<template>
|
||||
<div class="col-12 col-md-3 border-end">
|
||||
<div class="card-body">
|
||||
<h4 class="subheader">账号设置</h4>
|
||||
<div class="list-group list-group-transparent">
|
||||
<a href="/#/pages/setting/my_info" class="list-group-item list-group-item-action d-flex align-items-center active">信息设置</a>
|
||||
<a href="/setting-security"
|
||||
class="list-group-item list-group-item-action d-flex align-items-center">安全设置</a>
|
||||
</div>
|
||||
<h4 class="subheader mt-4">外部设置</h4>
|
||||
<div class="list-group list-group-transparent">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
|
||||
</style>
|
||||
@@ -0,0 +1,153 @@
|
||||
<template>
|
||||
<footer class="footer footer-transparent d-print-none my_footer">
|
||||
<div class="container-xl">
|
||||
<div class="row text-center align-items-center flex-row-reverse">
|
||||
<div class="col-lg-auto ms-lg-auto">
|
||||
<ul class="list-inline list-inline-dots mb-0">
|
||||
<li class="list-inline-item"><a
|
||||
href="https://git.lmve.net/kevin/gin_saas/-/blob/main/readme.md?ref_type=heads"
|
||||
target="_blank" class="link-secondary" rel="noopener">文档</a></li>
|
||||
<li class="list-inline-item"><a
|
||||
href="https://git.lmve.net/kevin/gin_saas/-/blob/main/LICENSE?ref_type=heads"
|
||||
target="_blank" class="link-secondary">开源协议</a>
|
||||
</li>
|
||||
<li class="list-inline-item"><a href="https://git.lmve.net/kevin/gin_saas" target="_blank"
|
||||
class="link-secondary" rel="noopener">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" class="icon text-orange" width="24" height="24"
|
||||
viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"
|
||||
stroke-linecap="round" stroke-linejoin="round">
|
||||
<path stroke="none" d="M0 0h24v24H0z" fill="none" />
|
||||
<path d="M21 14l-9 7l-9 -7l3 -11l3 7h6l3 -7z" />
|
||||
</svg>
|
||||
源码</a></li>
|
||||
<li class="list-inline-item">
|
||||
<a href="https://wnfed.com" target="_blank" class="link-secondary" rel="noopener">
|
||||
<!-- Download SVG icon from http://tabler-icons.io/i/heart -->
|
||||
<svg xmlns="http://www.w3.org/2000/svg" class="icon text-pink icon-filled icon-inline"
|
||||
width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor"
|
||||
fill="none" stroke-linecap="round" stroke-linejoin="round">
|
||||
<path stroke="none" d="M0 0h24v24H0z" fill="none" />
|
||||
<path
|
||||
d="M19.5 12.572l-7.5 7.428l-7.5 -7.428a5 5 0 1 1 7.5 -6.566a5 5 0 1 1 7.5 6.572" />
|
||||
</svg>
|
||||
博客
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="col-12 col-lg-auto mt-3 mt-lg-0">
|
||||
<ul class="list-inline list-inline-dots mb-0">
|
||||
<li class="list-inline-item">
|
||||
Copyright © 2025
|
||||
<a href="https://lmve.net" target="_blank" class="link-secondary">Lmve.NET</a>.
|
||||
All rights reserved.
|
||||
</li>
|
||||
<li class="list-inline-item">
|
||||
<a href="https://git.lmve.net/kevin/gin_saas/-/commits/main" target="_blank"
|
||||
class="link-secondary" rel="noopener">
|
||||
v0.0.1
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
<div class="offcanvas my_offcanvas_top alert alert-important alert-dismissible" :class="{
|
||||
'alert-success': alertType === 'success',
|
||||
'alert-warning': alertType === 'warning',
|
||||
'alert-danger': alertType === 'danger',
|
||||
'alert-info': alertType === 'info'
|
||||
}" role="alert" tabindex="-1" ref="offcanvas">
|
||||
<div class="d-flex">
|
||||
<div>
|
||||
<!-- Download SVG icon from http://tabler-icons.io/i/check -->
|
||||
<svg v-if="alertType === 'success'" xmlns="http://www.w3.org/2000/svg" class="icon alert-icon" width="24" height="24"
|
||||
viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round"
|
||||
stroke-linejoin="round">
|
||||
<path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
|
||||
<path d="M5 12l5 5l10 -10"></path>
|
||||
</svg>
|
||||
<svg v-if="alertType === 'warning'" xmlns="http://www.w3.org/2000/svg" class="icon alert-icon" width="24" height="24"
|
||||
viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round"
|
||||
stroke-linejoin="round">
|
||||
<path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
|
||||
<path
|
||||
d="M10.24 3.957l-8.422 14.06a1.989 1.989 0 0 0 1.7 2.983h16.845a1.989 1.989 0 0 0 1.7 -2.983l-8.423 -14.06a1.989 1.989 0 0 0 -3.4 0z">
|
||||
</path>
|
||||
<path d="M12 9v4"></path>
|
||||
<path d="M12 17h.01"></path>
|
||||
</svg>
|
||||
<svg v-if="alertType === 'danger'" xmlns="http://www.w3.org/2000/svg" class="icon alert-icon" width="24" height="24"
|
||||
viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round"
|
||||
stroke-linejoin="round">
|
||||
<path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
|
||||
<path d="M3 12a9 9 0 1 0 18 0a9 9 0 0 0 -18 0"></path>
|
||||
<path d="M12 8v4"></path>
|
||||
<path d="M12 16h.01"></path>
|
||||
</svg>
|
||||
<svg v-if="alertType === 'info'" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none"
|
||||
stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"
|
||||
class="icon icon-tabler icons-tabler-outline icon-tabler-brand-hipchat">
|
||||
<path stroke="none" d="M0 0h24v24H0z" fill="none" />
|
||||
<path
|
||||
d="M17.802 17.292s.077 -.055 .2 -.149c1.843 -1.425 3 -3.49 3 -5.789c0 -4.286 -4.03 -7.764 -9 -7.764c-4.97 0 -9 3.478 -9 7.764c0 4.288 4.03 7.646 9 7.646c.424 0 1.12 -.028 2.088 -.084c1.262 .82 3.104 1.493 4.716 1.493c.499 0 .734 -.41 .414 -.828c-.486 -.596 -1.156 -1.551 -1.416 -2.29z" />
|
||||
<path d="M7.5 13.5c2.5 2.5 6.5 2.5 9 0" />
|
||||
</svg>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<div>
|
||||
{{alertText}}
|
||||
</div>
|
||||
</div>
|
||||
<a class="btn-close" data-bs-dismiss="offcanvas" aria-label="close"></a>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
Offcanvas
|
||||
} from 'bootstrap'
|
||||
|
||||
export default {
|
||||
name: "tabler-footer",
|
||||
data() {
|
||||
return {
|
||||
alertType: 'success',
|
||||
alertText: "juest do!",
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
alert(type,text) {
|
||||
this.alertType=type
|
||||
this.alertText=text
|
||||
if (!this.offcanvasInstance) {
|
||||
const el = this.$refs.offcanvas
|
||||
this.offcanvasInstance = new Offcanvas(el, {
|
||||
backdrop: false,
|
||||
})
|
||||
}
|
||||
this.offcanvasInstance.show()
|
||||
setTimeout(() => {
|
||||
|
||||
this.offcanvasInstance?.hide()
|
||||
}, 5000);
|
||||
|
||||
},
|
||||
close() {
|
||||
this.offcanvasInstance?.hide()
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
|
||||
</style>
|
||||
@@ -0,0 +1,246 @@
|
||||
<template>
|
||||
|
||||
<header class="navbar navbar-expand-md d-print-none">
|
||||
<div class="container-xl">
|
||||
<h1 class="navbar-brand navbar-brand-autodark d-none-navbar-horizontal pe-0 pe-md-3">
|
||||
<a href="/">
|
||||
<img src="/static/logo.svg" width="110" height="32" alt="Tabler" class="navbar-brand-image">
|
||||
</a>
|
||||
</h1>
|
||||
<div class="navbar-nav flex-row order-md-last">
|
||||
<!-- 深色模式按钮 -->
|
||||
<div class="d-none d-md-flex">
|
||||
<a @click="switchTheme('dark')" class="nav-link px-0 hide-theme-dark" title="Enable dark mode"
|
||||
data-bs-toggle="tooltip" data-bs-placement="bottom">
|
||||
<!-- Download SVG icon from http://tabler-icons.io/i/moon -->
|
||||
<svg xmlns="http://www.w3.org/2000/svg" class="icon" width="24" height="24" viewBox="0 0 24 24"
|
||||
stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round"
|
||||
stroke-linejoin="round">
|
||||
<path stroke="none" d="M0 0h24v24H0z" fill="none" />
|
||||
<path d="M12 3c.132 0 .263 0 .393 0a7.5 7.5 0 0 0 7.92 12.446a9 9 0 1 1 -8.313 -12.454z" />
|
||||
</svg>
|
||||
</a>
|
||||
<a @click="switchTheme('light')" class="nav-link px-0 hide-theme-light" title="Enable light mode"
|
||||
data-bs-toggle="tooltip" data-bs-placement="bottom">
|
||||
<!-- Download SVG icon from http://tabler-icons.io/i/sun -->
|
||||
<svg xmlns="http://www.w3.org/2000/svg" class="icon" width="24" height="24" viewBox="0 0 24 24"
|
||||
stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round"
|
||||
stroke-linejoin="round">
|
||||
<path stroke="none" d="M0 0h24v24H0z" fill="none" />
|
||||
<path d="M12 12m-4 0a4 4 0 1 0 8 0a4 4 0 1 0 -8 0" />
|
||||
<path
|
||||
d="M3 12h1m8 -9v1m8 8h1m-9 8v1m-6.4 -15.4l.7 .7m12.1 -.7l-.7 .7m0 11.4l.7 .7m-12.1 -.7l-.7 .7" />
|
||||
</svg>
|
||||
</a>
|
||||
</div>
|
||||
<!-- 深色模式按钮 -->
|
||||
|
||||
<div v-if="is_login" class="nav-item dropdown">
|
||||
<a class="nav-link d-flex lh-1 text-reset p-0" data-bs-toggle="dropdown"
|
||||
aria-label="Open user menu">
|
||||
|
||||
<avatar size="sm" :url="user_info.AvatarPath"></avatar>
|
||||
<div class="d-none d-xl-block ps-2">
|
||||
<div>{{user_info.Username}}</div>
|
||||
<div class="mt-1 small text-secondary">{{user_info.FirstName}}</div>
|
||||
</div>
|
||||
</a>
|
||||
<div class="dropdown-menu dropdown-menu-end dropdown-menu-arrow ">
|
||||
<!-- <a href="#" class="dropdown-item">Status</a> -->
|
||||
<a href="./profile" class="dropdown-item">个人资料</a>
|
||||
<!-- <a href="#" class="dropdown-item">Feedback</a> -->
|
||||
<a href="/#/pages/setting/my_info" class="dropdown-item">设置</a>
|
||||
<div class="dropdown-divider"></div>
|
||||
<a href="#" @click="logout(true)" class="dropdown-item">登出</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div v-if="type!='mini' && !is_login" class="nav-item btn-list">
|
||||
<a href="/#/pages/signin" class="btn" rel="noreferrer">
|
||||
<!-- Download SVG icon from http://tabler-icons.io/i/heart -->
|
||||
<svg xmlns="http://www.w3.org/2000/svg" class="icon text-blue" width="24" height="24"
|
||||
viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"
|
||||
stroke-linecap="round" stroke-linejoin="round">
|
||||
<path stroke="none" d="M0 0h24v24H0z" fill="none" />
|
||||
<path d="M12 17v4" />
|
||||
<path d="M10 20l4 -2" />
|
||||
<path d="M10 18l4 2" />
|
||||
<path d="M5 17v4" />
|
||||
<path d="M3 20l4 -2" />
|
||||
<path d="M3 18l4 2" />
|
||||
<path d="M19 17v4" />
|
||||
<path d="M17 20l4 -2" />
|
||||
<path d="M17 18l4 2" />
|
||||
<path d="M9 6a3 3 0 1 0 6 0a3 3 0 0 0 -6 0" />
|
||||
<path d="M7 14a2 2 0 0 1 2 -2h6a2 2 0 0 1 2 2" />
|
||||
</svg>
|
||||
登录/注册
|
||||
</a>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
<header v-if="type!='mini'" class="navbar-expand-md">
|
||||
<div class="collapse navbar-collapse" id="navbar-menu">
|
||||
<div class="navbar">
|
||||
<div class="container-xl">
|
||||
<ul class="navbar-nav">
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="/">
|
||||
<span
|
||||
class="nav-link-icon d-md-none d-lg-inline-block"><!-- Download SVG icon from http://tabler-icons.io/i/home -->
|
||||
<svg xmlns="http://www.w3.org/2000/svg" class="icon" width="24" height="24"
|
||||
viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none"
|
||||
stroke-linecap="round" stroke-linejoin="round">
|
||||
<path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
|
||||
<path d="M5 12l-2 0l9 -9l9 9l-2 0"></path>
|
||||
<path d="M5 12v7a2 2 0 0 0 2 2h10a2 2 0 0 0 2 -2v-7"></path>
|
||||
<path d="M9 21v-6a2 2 0 0 1 2 -2h2a2 2 0 0 1 2 2v6"></path>
|
||||
</svg>
|
||||
</span>
|
||||
<span class="nav-link-title">
|
||||
主页
|
||||
</span>
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="/warehouses">
|
||||
<span
|
||||
class="nav-link-icon d-md-none d-lg-inline-block"><!-- Download SVG icon from http://tabler-icons.io/i/home -->
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"
|
||||
fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"
|
||||
stroke-linejoin="round"
|
||||
class="icon icon-tabler icons-tabler-outline icon-tabler-building-warehouse">
|
||||
<path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
|
||||
<path d="M3 21v-13l9 -4l9 4v13"></path>
|
||||
<path d="M13 13h4v8h-10v-6h6"></path>
|
||||
<path d="M13 21v-9a1 1 0 0 0 -1 -1h-2a1 1 0 0 0 -1 1v3"></path>
|
||||
</svg>
|
||||
</span>
|
||||
<span class="nav-link-title">
|
||||
仓库
|
||||
</span>
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="/workorders">
|
||||
<span
|
||||
class="nav-link-icon d-md-none d-lg-inline-block"><!-- Download SVG icon from http://tabler-icons.io/i/home -->
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"
|
||||
fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"
|
||||
stroke-linejoin="round"
|
||||
class="icon icon-tabler icons-tabler-outline icon-tabler-file-description">
|
||||
<path stroke="none" d="M0 0h24v24H0z" fill="none" />
|
||||
<path d="M14 3v4a1 1 0 0 0 1 1h4" />
|
||||
<path
|
||||
d="M17 21h-10a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2z" />
|
||||
<path d="M9 17h6" />
|
||||
<path d="M9 13h6" />
|
||||
</svg>
|
||||
</span>
|
||||
<span class="nav-link-title">
|
||||
工单
|
||||
</span>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
my_network_func
|
||||
} from '../../my_network_func';
|
||||
import {
|
||||
myfunc
|
||||
} from '../../myfunc';
|
||||
|
||||
|
||||
|
||||
myfunc.setTheme(myfunc.getThemefromStorge(), false);
|
||||
|
||||
|
||||
|
||||
export default {
|
||||
name: "tabler-header",
|
||||
props: {
|
||||
type: {
|
||||
type: String, // 指定类型
|
||||
default: 'normal' // 可选的默认值
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
is_login: false,
|
||||
user_info:{
|
||||
AvatarPath:"",
|
||||
Username:"",
|
||||
FirstName:"",
|
||||
Birthdate:"",
|
||||
}
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
switchTheme(theme) {
|
||||
myfunc.setTheme(theme, true);
|
||||
},
|
||||
logout(logout_server) {
|
||||
if (logout_server) {
|
||||
my_network_func.post_json("/user/logout", null, (c) => {
|
||||
if (c.statusCode == 200) {
|
||||
console.log(c)
|
||||
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
this.is_login = false
|
||||
myfunc.dele("user_info")
|
||||
myfunc.dele("cookie")
|
||||
|
||||
},
|
||||
updata_user_info_to_heard() {
|
||||
//h5先判断有没有cookie
|
||||
var cookie = myfunc.load_json("cookie")
|
||||
if (cookie) {
|
||||
//判断cookie有没有过期
|
||||
const isFuture = new Date(cookie.ExpiresAt) > new Date();
|
||||
if (isFuture) {
|
||||
//没过期
|
||||
this.is_login = true
|
||||
//获取用户信息
|
||||
this.user_info = myfunc.load_json("user_info")
|
||||
|
||||
} else {
|
||||
//过期了
|
||||
this.logout(false)
|
||||
//如何是h5平台 在请求的时候本地cookie应该就被服务器删了
|
||||
}
|
||||
|
||||
} else {
|
||||
this.logout(false)
|
||||
}
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
this.updata_user_info_to_heard()
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
|
||||
</style>
|
||||
Reference in New Issue
Block a user