|
|
@@ -2,6 +2,8 @@
|
|
|
import { computed, onMounted } from 'vue'
|
|
|
import { dict } from '@/.cool/store'
|
|
|
import { router } from '@/.cool'
|
|
|
+import { user } from '@/.cool'
|
|
|
+
|
|
|
const menuList = computed(() => {
|
|
|
return [
|
|
|
...dict.getChildrenList('index_subject_id'),
|
|
|
@@ -37,15 +39,14 @@ function handlePage(val: any) {
|
|
|
}
|
|
|
switch (val.code) {
|
|
|
case 'physics':
|
|
|
- params.query.id = val.value
|
|
|
params.path = "/pages/catalog/index"
|
|
|
break;
|
|
|
- // case 'chinese':
|
|
|
- // url = '/pages/index/chinese'
|
|
|
- // break;
|
|
|
- // case 'english':
|
|
|
- // url = '/pages/index/english'
|
|
|
- // break;
|
|
|
+ case 'chinese':
|
|
|
+ params.path = '/pages/chinese/index'
|
|
|
+ break;
|
|
|
+ case 'english':
|
|
|
+ params.path = '/pages/english/select'
|
|
|
+ break;
|
|
|
// case 'mix':
|
|
|
// url = '/pages/index/mix'
|
|
|
// break;
|
|
|
@@ -69,13 +70,15 @@ onMounted(() => {
|
|
|
function handleView(url) {
|
|
|
router.push({ path: url })
|
|
|
}
|
|
|
+const userInfo = computed(() => user.info.value?.userInfo)
|
|
|
|
|
|
</script>
|
|
|
<template>
|
|
|
<cl-page>
|
|
|
<img src="https://oss.xiaoxiongcode.com/static/home/11.png" alt="" class="w-full h-full object-cover" />
|
|
|
<view class="menus ">
|
|
|
- <view v-for="item in menuList" :key="item.code" class="flex flex-col items-center justify-center gap-1"
|
|
|
+ <view v-for="item in menuList" :key="item.code"
|
|
|
+ class="flex flex-col items-center justify-center gap-1 active:scale-[.9] transition-all duration-300"
|
|
|
@tap="handlePage(item)">
|
|
|
<cl-image :src="icons[item.code]" mode="aspectFill" width="40" height="40"></cl-image>
|
|
|
<text class="text-[12px]">{{ item.label }}</text>
|
|
|
@@ -83,31 +86,31 @@ function handleView(url) {
|
|
|
</view>
|
|
|
<view class="bottom">
|
|
|
<view class=" progress">
|
|
|
- <view class="text-[30px] font-bold">学习进度</view>
|
|
|
+ <view class="text-[26px] font-bold">学习进度</view>
|
|
|
<view class=" w-full flex flex-row items-center justify-center gap-2">
|
|
|
|
|
|
<cl-progress class="flex-1" color="linear-gradient(0deg, #1FA5F5 37%, #A2D8FF 100%)" :value="50"
|
|
|
- :show-text="false" :strokeWidth="20"
|
|
|
+ :show-text="false" :strokeWidth="16"
|
|
|
:pt="{ outer: { className: '!rounded-full' }, inner: { className: '!rounded-full' } }"></cl-progress>
|
|
|
|
|
|
- <view class="text-[14px] w-[100px] rounded-full text-black font-bold text-center check
|
|
|
- to-pink-500 h-[30px] ">
|
|
|
+ <view class="text-[12px] w-[100px] rounded-full text-black font-bold text-center check
|
|
|
+ to-pink-500 h-[20px] ">
|
|
|
今日打卡
|
|
|
</view>
|
|
|
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="flex-1 flex flex-col items-center justify-between gap-2 bg1 py-3">
|
|
|
- <cl-image src="https://oss.xiaoxiongcode.com/static/home/17.png" mode="widthFix" width="50%" height="auto" />
|
|
|
+ <cl-image src="https://oss.xiaoxiongcode.com/static/home/17.png" mode="widthFix" width="40%" height="auto" />
|
|
|
<text class="text-[14px]">趣味虚拟实验</text>
|
|
|
</view>
|
|
|
<view class="flex-1 flex flex-col items-center justify-between gap-1 bg2 py-3"
|
|
|
@tap="handleView('/pages/card/index')">
|
|
|
- <cl-image src="https://oss.xiaoxiongcode.com/static/home/19.png" mode="widthFix" width="80%" height="auto" />
|
|
|
+ <cl-image src="https://oss.xiaoxiongcode.com/static/home/19.png" mode="widthFix" width="70%" height="auto" />
|
|
|
<text class="text-[14px]">我的收货</text>
|
|
|
</view>
|
|
|
<view class="flex-1 flex flex-col items-center justify-between gap-1 bg3 py-3">
|
|
|
- <cl-image src="https://oss.xiaoxiongcode.com/static/home/18.png" mode="widthFix" width="45%" height="auto" />
|
|
|
+ <cl-image src="https://oss.xiaoxiongcode.com/static/home/18.png" mode="widthFix" width="35%" height="auto" />
|
|
|
<text class="text-[14px]">学习报告</text>
|
|
|
</view>
|
|
|
</view>
|
|
|
@@ -126,7 +129,7 @@ function handleView(url) {
|
|
|
</template>
|
|
|
<style lang="scss" scoped>
|
|
|
.content {
|
|
|
- @apply absolute top-1/2 left-1/2 transform -translate-x-1/2 -translate-y-1/2 text-white w-[100vh] border-[3px] border-[#fff] border-solid rounded-[30px] px-10 py-4 h-[44vh] flex flex-row items-center justify-between gap-4;
|
|
|
+ @apply absolute top-1/2 left-1/2 transform -translate-x-1/2 -translate-y-1/2 text-white w-[120vh] border-[3px] border-[#fff] border-solid rounded-[30px] px-10 py-4 h-[44vh] flex flex-row items-center justify-between gap-4;
|
|
|
background: linear-gradient(0deg, #C7F0FE 0%, #30B9FF 100%);
|
|
|
|
|
|
}
|
|
|
@@ -137,37 +140,37 @@ function handleView(url) {
|
|
|
}
|
|
|
|
|
|
.bottom {
|
|
|
- @apply absolute bottom-[1vh] left-1/2 w-full max-w-[900px] rounded-[20px] px-10 py-1 flex flex-row items-center justify-between gap-5;
|
|
|
+ @apply absolute bottom-[1vh] left-1/2 w-full max-w-[800px] rounded-[20px] px-10 py-1 flex flex-row items-center justify-between gap-5;
|
|
|
transform: translateX(-50%);
|
|
|
|
|
|
.progress {
|
|
|
- @apply w-[400px] h-[100px] rounded-[50px] flex justify-center gap-2 px-[30px] gap-3;
|
|
|
+ @apply w-[400px] h-[80px] rounded-[40px] flex justify-center gap-2 px-[30px] gap-3;
|
|
|
background: linear-gradient(0deg, #AAE3FF 0%, #DFF4FD 100%);
|
|
|
width: 40%;
|
|
|
}
|
|
|
|
|
|
.check {
|
|
|
background: linear-gradient(0deg, #FBD00E 0%, #FBEC92 100%);
|
|
|
- line-height: 30px;
|
|
|
+ line-height: 20px;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
.bg1 {
|
|
|
background: linear-gradient(0deg, #7597FA 0%, #C1DAFF 100%);
|
|
|
border-radius: 28px;
|
|
|
- height: 100px;
|
|
|
+ height: 80px;
|
|
|
}
|
|
|
|
|
|
.bg2 {
|
|
|
background: linear-gradient(0deg, #3CD3DE 0%, #ADFBFF 100%);
|
|
|
border-radius: 28px;
|
|
|
- height: 100px;
|
|
|
+ height: 80px;
|
|
|
}
|
|
|
|
|
|
.bg3 {
|
|
|
background: linear-gradient(0deg, #FFCE4A 0%, #FFEC88 100%);
|
|
|
border-radius: 28px;
|
|
|
- height: 100px;
|
|
|
+ height: 80px;
|
|
|
}
|
|
|
|
|
|
.ft {
|