新增首页骨架屏并优化页面体验
This commit is contained in:
@@ -1,5 +1,10 @@
|
||||
<!-- App.vue -->
|
||||
<template>
|
||||
<view>
|
||||
<GlobalLoading />
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
import GlobalLoading from '@/components/global/GlobalLoading.vue'
|
||||
export default {
|
||||
onLaunch: function() {
|
||||
console.log('App Launch')
|
||||
@@ -19,16 +24,6 @@ export default {
|
||||
// 预加载课程数据
|
||||
// #ifdef MP-WEIXIN
|
||||
// 小程序端预请求数据
|
||||
uni.request({
|
||||
url: '/api/course/recommend',
|
||||
method: 'GET',
|
||||
success: (res) => {
|
||||
uni.setStorageSync('course_cache', {
|
||||
data: res.data,
|
||||
time: Date.now()
|
||||
})
|
||||
}
|
||||
})
|
||||
// #endif
|
||||
|
||||
// 预加载训练数据
|
||||
|
||||
Reference in New Issue
Block a user