Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Hooke
/
tswj
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
hookehuyr
2022-05-16 17:01:19 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
44d4320c65a4b03ff208a2b0c2c41380167bf901
44d4320c
1 parent
a71b9201
test
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
35 additions
and
20 deletions
src/route.js
src/views/business/index.vue
src/views/client/index.vue
src/route.js
View file @
44d4320
...
...
@@ -256,11 +256,4 @@ export default [{
title
:
'我的视频'
},
children
:
[]
},
{
path
:
'/image'
,
name
:
'html转图片'
,
component
:
()
=>
import
(
'./views/html2canvas.vue'
),
meta
:
{
title
:
''
}
}];
...
...
src/views/business/index.vue
View file @
44d4320
...
...
@@ -87,10 +87,13 @@ import icon_book from '@images/shu@2x.png'
import BookCard from '@/components/BookCard/index.vue'
import ShortcutFixed from '@/components/ShortcutFixed/index.vue'
import { ref, reactive } from 'vue'
import { ref, reactive
, onMounted
} from 'vue'
import { useRoute, useRouter } from 'vue-router'
import axios from '@/utils/axios';
import { Toast } from 'vant';
import IMAGE from '@/views/html2canvas.vue'
const $route = useRoute();
const $router = useRouter();
...
...
@@ -127,6 +130,28 @@ axios.get('/srv/?a=kg_info')
})
.catch(err => {
console.error(err);
});
// 测试动态路由
/**
* , {
path: '/image',
name: 'html转图片',
component: () => import('./views/html2canvas.vue'),
meta: {
title: ''
}
}
*/
// $router.addRoute({ path: '/image', name: 'html转图片', meta: { title: 'html转图片' }, component: IMAGE})
onMounted(() => {
// setTimeout(() => {
// $router.push({
// path: '/image'
// })
// }, 3000);
})
</script>
...
...
src/views/client/index.vue
View file @
44d4320
...
...
@@ -38,6 +38,13 @@ import axios from '@/utils/axios';
import { wxInfo } from '@/utils/tools';
const $route = useRoute();
const $router = useRouter();
// TAG: keepAlive 缓存页面
const store = mainStore();
store.keepThisPage($route.meta.name);
// 滚动条判断
function hasScrollbar() {
return document.body.scrollHeight > (window.innerHeight || document.documentElement.clientHeight);
...
...
@@ -51,15 +58,10 @@ onMounted(() => {
location.reload()
}
}
// 背景颜色全屏
$('.client-index-page').height($(document).height());
})
const $route = useRoute();
const $router = useRouter();
// TAG: keepAlive 缓存页面
const store = mainStore();
store.keepThisPage($route.meta.name);
// 自定义按钮颜色样式
const styleObject1 = reactive({
backgroundColor: '#FFFFFF',
...
...
@@ -85,11 +87,6 @@ const goSchool = () => { // 跳转选择幼儿园页面
Cookies.set('userType', 'client'); // 客户标识
}
onMounted(() => {
// 背景颜色全屏
$('.client-index-page').height($(document).height());
})
// TEMP:临时测试动画效果
// const show = ref(true);
// const interval = setInterval(() => { // 图标动画效果
...
...
Please
register
or
login
to post a comment