This commit is contained in:
2021-11-04 21:20:31 +08:00
parent c5c2f661a0
commit ec0724c873
38 changed files with 6870 additions and 189 deletions
+13 -8
View File
@@ -9,6 +9,9 @@
<script>
import { tabbar } from '../src/router'
import { getWechatSign } from './api'
import { signToWechat } from './common/wechat-web';
export default {
name: 'App',
data(){
@@ -21,22 +24,24 @@ export default {
provide(){
return {
root: this,
tabbar: this.$refs.tabbar
}
},
computed: {
showTabbar(){
const path = tabbar.map(tab => tab.path);
return path.includes(this.$route.path)
tabbar: this.$refs.tabbar,
showTabbar: false,
}
},
components: {
},
beforeCreate: () => {
getWechatSign(location.href).then(res => {
signToWechat(res)
})
},
watch: {
'$route': {
immediate: true,
handler(to){
const path = tabbar.map(tab => tab.path);
document.title = to.meta.title || '自在福田';
this.showTabbar = path.includes(path)
}
}
},
@@ -52,7 +57,7 @@ export default {
<style>
@import '~@/assets/css/reset.css';
@import '//at.alicdn.com/t/font_2897403_zb1glrkwpij.css';
@import '//at.alicdn.com/t/font_2897403_4wpxnjzf9qy.css';
#app {
font-family: Avenir, Helvetica, Arial, sans-serif;