Skip to content

Commit aff8fd7

Browse files
committed
fix more bug
1 parent 7dcc578 commit aff8fd7

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+1479
-1515
lines changed

src/App.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
}
3131
else {
3232
that.$store.commit('TOGGLE_DEVICE', 'desktop')
33-
that.$store.commit('TOGGLE_SIDEBAR', true)
33+
that.$store.commit('SET_SIDEBAR_TYPE', true)
3434
}
3535
3636
})

src/api/login.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import api from './index'
12
import { axios } from '@/utils/request'
23

34
/**
@@ -19,6 +20,14 @@ export function login(parameter) {
1920
})
2021
}
2122

23+
export function getSmsCaptcha(parameter) {
24+
return axios({
25+
url: api.SendSms,
26+
method: 'post',
27+
data: parameter
28+
})
29+
}
30+
2231
export function getInfo() {
2332
return axios({
2433
url: '/user/info',

src/components/layout/LayoutBaseView.vue

Lines changed: 0 additions & 22 deletions
This file was deleted.

src/components/layout/LayoutFooter.vue

Lines changed: 0 additions & 47 deletions
This file was deleted.

src/components/layout/LayoutView.vue

Lines changed: 0 additions & 22 deletions
This file was deleted.

src/components/layout/RouteView.vue

Lines changed: 0 additions & 16 deletions
This file was deleted.
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
<template>
2+
<global-layout>
3+
<transition name="page-transition">
4+
<keep-alive v-if="keepAlive">
5+
<router-view />
6+
</keep-alive>
7+
<router-view v-else />
8+
</transition>
9+
</global-layout>
10+
</template>
11+
12+
<script>
13+
import GlobalLayout from '@/components/page/GlobalLayout'
14+
15+
export default {
16+
name: "BasicLayout",
17+
components: {
18+
GlobalLayout
19+
},
20+
data () {
21+
return {
22+
23+
}
24+
},
25+
computed: {
26+
keepAlive () {
27+
return this.$route.meta.keepAlive
28+
}
29+
},
30+
methods: {
31+
32+
},
33+
}
34+
</script>
35+
36+
<style lang="scss">
37+
38+
/*
39+
* The following styles are auto-applied to elements with
40+
* transition="page-transition" when their visibility is toggled
41+
* by Vue.js.
42+
*
43+
* You can easily play with the page transition by editing
44+
* these styles.
45+
*/
46+
47+
.page-transition-enter {
48+
opacity: 0;
49+
}
50+
51+
.page-transition-leave-active {
52+
opacity: 0;
53+
}
54+
55+
.page-transition-enter .page-transition-container,
56+
.page-transition-leave-active .page-transition-container {
57+
-webkit-transform: scale(1.1);
58+
transform: scale(1.1);
59+
}
60+
</style>
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<template>
2+
<div>
3+
<router-view />
4+
</div>
5+
</template>
6+
7+
<script>
8+
9+
export default {
10+
name: "BlankLayout",
11+
}
12+
</script>
13+
14+
<style scoped>
15+
16+
</style>
Lines changed: 79 additions & 79 deletions
Original file line numberDiff line numberDiff line change
@@ -1,80 +1,80 @@
1-
<template>
2-
<page-layout :desc="description" :title="getTitle" :link-list="linkList">
3-
<div slot="extra" class="extra-img">
4-
<img :src="extraImage"/>
5-
</div>
6-
<!-- keep-alive -->
7-
<route-view ref="content"></route-view>
8-
</page-layout>
9-
</template>
10-
11-
<script>
12-
import PageLayout from './PageLayout'
13-
import RouteView from './RouteView'
14-
15-
export default {
16-
name: "PageContent",
17-
components: {
18-
RouteView,
19-
PageLayout
20-
},
21-
data () {
22-
return {
23-
title: '',
24-
description: '',
25-
linkList: [],
26-
extraImage: ''
27-
}
28-
},
29-
mounted () {
30-
this.getPageHeaderInfo()
31-
},
32-
updated () {
33-
this.getPageHeaderInfo()
34-
},
35-
computed: {
36-
37-
getTitle () {
38-
return this.$route.meta.title
39-
}
40-
41-
},
42-
methods: {
43-
getPageHeaderInfo () {
44-
// eslint-disable-next-line
45-
this.title = this.$route.meta.title
46-
// 因为套用了一层 route-view 所以要取 ref 对象下的子节点的第一个对象
47-
const content = this.$refs.content && this.$refs.content.$children[0]
48-
if (content) {
49-
this.description = content.description
50-
this.linkList = content.linkList
51-
this.extraImage = content.extraImage
52-
}
53-
}
54-
}
55-
}
56-
</script>
57-
58-
<style lang="scss" scoped>
59-
.extra-img {
60-
margin-top: -60px;
61-
text-align: center;
62-
width: 195px;
63-
64-
img {
65-
width: 100%;
66-
}
67-
}
68-
69-
.mobile {
70-
.extra-img{
71-
margin-top: 0;
72-
text-align: center;
73-
width: 96px;
74-
75-
img{
76-
width: 100%;
77-
}
78-
}
79-
}
1+
<template>
2+
<page-layout :desc="description" :title="getTitle" :link-list="linkList">
3+
<div slot="extra" class="extra-img">
4+
<img :src="extraImage"/>
5+
</div>
6+
<!-- keep-alive -->
7+
<route-view ref="content"></route-view>
8+
</page-layout>
9+
</template>
10+
11+
<script>
12+
import PageLayout from '../page/PageLayout'
13+
import RouteView from './RouteView'
14+
15+
export default {
16+
name: "PageContent",
17+
components: {
18+
RouteView,
19+
PageLayout
20+
},
21+
data () {
22+
return {
23+
title: '',
24+
description: '',
25+
linkList: [],
26+
extraImage: ''
27+
}
28+
},
29+
mounted () {
30+
this.getPageHeaderInfo()
31+
},
32+
updated () {
33+
this.getPageHeaderInfo()
34+
},
35+
computed: {
36+
37+
getTitle () {
38+
return this.$route.meta.title
39+
}
40+
41+
},
42+
methods: {
43+
getPageHeaderInfo () {
44+
// eslint-disable-next-line
45+
this.title = this.$route.meta.title
46+
// 因为套用了一层 route-view 所以要取 ref 对象下的子节点的第一个对象
47+
const content = this.$refs.content && this.$refs.content.$children[0]
48+
if (content) {
49+
this.description = content.description
50+
this.linkList = content.linkList
51+
this.extraImage = content.extraImage
52+
}
53+
}
54+
}
55+
}
56+
</script>
57+
58+
<style lang="scss" scoped>
59+
.extra-img {
60+
margin-top: -60px;
61+
text-align: center;
62+
width: 195px;
63+
64+
img {
65+
width: 100%;
66+
}
67+
}
68+
69+
.mobile {
70+
.extra-img{
71+
margin-top: 0;
72+
text-align: center;
73+
width: 96px;
74+
75+
img{
76+
width: 100%;
77+
}
78+
}
79+
}
8080
</style>

0 commit comments

Comments
 (0)