master
xy 2 years ago
parent 6880fda27d
commit f9bda308fc

@ -103,6 +103,7 @@
</template> </template>
<script> <script>
import { getOatoken } from "@/api/oatoken"
import { ossLogin } from "@/api/system/ossLogin"; import { ossLogin } from "@/api/system/ossLogin";
import { Navbar, Sidebar, AppMain } from "./components"; import { Navbar, Sidebar, AppMain } from "./components";
import ResizeMixin from "./mixin/ResizeHandler"; import ResizeMixin from "./mixin/ResizeHandler";
@ -173,6 +174,11 @@ export default {
watch: { watch: {
"$route.path": { "$route.path": {
handler: function (url) { handler: function (url) {
if (/^\/old/.test(url)) {
getOatoken().then(res => {
this.oldUrl = `${process.env.VUE_APP_OUT_OLD}/login/oss_login?auth_token=${res.auth_token}`
})
}
if(/^\/asset/.test(url)) { if(/^\/asset/.test(url)) {
if(this.$store.state.app.sidebar.opened) { if(this.$store.state.app.sidebar.opened) {
this.$store.commit('app/TOGGLE_SIDEBAR') this.$store.commit('app/TOGGLE_SIDEBAR')

Loading…
Cancel
Save