unknown
4 months ago
8 changed files with 190 additions and 3 deletions
-
1App.vue
-
2main.js
-
29pages.json
-
25pages/exercises/brushQuestions/brushQuestions.vue
-
81pages/exercises/chapter/chapter.vue
-
3pages/index/index.vue
-
44static/css/app.scss
-
8utils/utils.js
@ -0,0 +1,25 @@ |
|||
<template> |
|||
<view class="content"> |
|||
<up-navbar leftText=" " title="" :safeAreaInsetTop="false" :autoBack="true"> |
|||
<template #center> |
|||
<view class="u-nav-slot flex"> |
|||
<view class="btn">答题模式</view> |
|||
<view class="btn">背题模式</view> |
|||
</view> |
|||
</template> |
|||
</up-navbar> |
|||
</view> |
|||
</template> |
|||
|
|||
<script> |
|||
// 观到一念,不要在注重这些行为的表达,觉得我应该这样做好一点那样做好一点,其实心里怎么想的才是最重要的 |
|||
// 当你接纳允许的时候自动又想起来了, |
|||
</script> |
|||
|
|||
<style lang="scss" scoped> |
|||
.u-nav-slot { |
|||
.btn { |
|||
|
|||
} |
|||
} |
|||
</style> |
@ -0,0 +1,81 @@ |
|||
<template> |
|||
<view class="content"> |
|||
<view class="ul padding"> |
|||
<view class="li" v-for="(item,index) in 7" :key="index" @click="goPage(index)"> |
|||
<view class="num" :style="{background: colorArr[index]}">{{index+1}}</view> |
|||
<view class="rightTxt"> |
|||
<view class="h1">安全行车常识</view> |
|||
<view class="flex"> |
|||
<view class="proccess"> |
|||
<up-line-progress :percentage="80" height="8" activeColor="#3776FF" :showText="false"></up-line-progress> |
|||
</view> |
|||
<view class="rate">60/260</view> |
|||
<view class="rate">正确率 100%</view> |
|||
</view> |
|||
</view> |
|||
</view> |
|||
</view> |
|||
</view> |
|||
</template> |
|||
|
|||
<script> |
|||
export default { |
|||
data() { |
|||
return { |
|||
colorArr: ['#3776FF', '#64C76C', '#8484FF', '#F05C1C', '#FDD650', '#6FD568', '#52C1D0'] |
|||
} |
|||
}, |
|||
methods: { |
|||
goPage(index) { |
|||
console.log(index) |
|||
this.$goPage('/pages/exercises/brushQuestions/brushQuestions') |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style lang="scss" scoped> |
|||
.content { |
|||
width: 100%; |
|||
.ul { |
|||
width: 100%; |
|||
.li { |
|||
width: 100%; |
|||
display: flex; |
|||
padding: 30rpx 0; |
|||
border-bottom: 1px solid #F4F4F4; |
|||
.num { |
|||
height: 34rpx; |
|||
width: 34rpx; |
|||
// padding: 10rpx 10rpx; |
|||
text-align: center; |
|||
background: #3776FF; |
|||
border-radius: 50%; |
|||
font-size: 24rpx; |
|||
color: #fff; |
|||
line-height: 34rpx; |
|||
margin-top: 8rpx; |
|||
} |
|||
.h1 { |
|||
font-size: 32rpx; |
|||
color: #333; |
|||
margin-bottom: 20rpx; |
|||
} |
|||
.rightTxt { |
|||
padding-left: 20rpx; |
|||
} |
|||
.flex { |
|||
.proccess { |
|||
margin-right: 20rpx; |
|||
width: 120rpx; |
|||
} |
|||
.rate { |
|||
font-size: 24rpx; |
|||
color: #CCCCCC; |
|||
margin-right: 30rpx; |
|||
} |
|||
} |
|||
} |
|||
} |
|||
} |
|||
</style> |
@ -0,0 +1,44 @@ |
|||
|
|||
|
|||
page { |
|||
background-color: #fff; |
|||
font-size: 32rpx; |
|||
font-family: -apple-system-font, Helvetica Neue, Helvetica, sans-serif; |
|||
} |
|||
view { |
|||
box-sizing: border-box; |
|||
} |
|||
|
|||
.oneRowText { |
|||
white-space: nowrap; |
|||
overflow: hidden; |
|||
text-overflow: ellipsis; |
|||
} |
|||
.towRowText { |
|||
display: -webkit-box; |
|||
overflow: hidden; |
|||
white-space: normal; |
|||
text-overflow: ellipsis; |
|||
word-wrap: break-word; |
|||
-webkit-line-clamp: 2; |
|||
-webkit-box-orient: vertical |
|||
} |
|||
|
|||
.flex { |
|||
display: flex; |
|||
align-items: center; |
|||
} |
|||
.flex-b { |
|||
display: flex; |
|||
justify-content: space-between; |
|||
align-items: center; |
|||
} |
|||
.flex-c { |
|||
display: flex; |
|||
justify-content: center; |
|||
align-items: center; |
|||
} |
|||
|
|||
.padding { |
|||
padding: 0 20px; |
|||
} |
@ -0,0 +1,8 @@ |
|||
|
|||
export let goPage = (url, params={}, type='navigateTo')=> { |
|||
uni.$u.route({ |
|||
url, |
|||
params, |
|||
type |
|||
}) |
|||
} |
Write
Preview
Loading…
Cancel
Save
Reference in new issue