fix: ai学习页面调整
This commit is contained in:
@@ -3,3 +3,11 @@ ENV = 'development'
|
||||
# 'development'
|
||||
|
||||
VITE_APP_BASE_API_Url = ''
|
||||
|
||||
VITE_APP_BASE_H5_API_Url = 'http://25.18.122.65:7001'
|
||||
# VITE_APP_BASE_H5_API_Url = 'http://25.18.122.91:9786'
|
||||
# VITE_APP_BASE_H5_API_Url = 'http://25.18.122.78:9786'
|
||||
# VITE_APP_BASE_H5_API_Url_TRAAPP = 'http://192.168.247.200'
|
||||
# VITE_APP_BASE_H5_API_Url_TRASTUDY = 'http://25.64.32.154:9602'
|
||||
VITE_APP_BASE_H5_API_Url_TRAEXAM = ''http://25.64.32.154:9604'
|
||||
# VITE_APP_BASE_H5_API_Url_TRAASK = 'http://25.64.32.154:9605'
|
||||
@@ -1,15 +1,17 @@
|
||||
<template>
|
||||
<view class="course-item-box" @click="clickItem">
|
||||
<view class="item-title">{{itemInfo.crsName}}</view>
|
||||
<view class="img-box-view">
|
||||
<ImagePreview class="img-box" :imgId="itemInfo.imgId" :isCache="true" width="225" height="170" mode="scaleToFill"></ImagePreview>
|
||||
<ImagePreview class="img-box" :imgId="itemInfo.imgId" :isCache="true" width="225" height="170" mode="scaleToFill">
|
||||
</ImagePreview>
|
||||
<view class="item-grade">{{itemInfo.evalGrade}}</view>
|
||||
<!-- <image class="item-grade" mode="aspectFill"></view> -->
|
||||
</view>
|
||||
<view class="cont-box">
|
||||
<view class="item-title">{{itemInfo.crsName}}</view>
|
||||
<scroll-view class="item-tags" :scroll-x="true">
|
||||
<view class="item-tag-view">
|
||||
<view :class="['item-tag', this.activeTag.includes(item.tagId)?'active-tag':'']" v-for="item in tagsShowList">{{item.tagName}}</view>
|
||||
<view :class="['item-tag', this.activeTag.includes(item.tagId)?'active-tag':'']" v-for="item in tagsShowList">
|
||||
{{item.tagName}}</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
<view class="item-publish">更新:{{itemInfo.mtTime}}</view>
|
||||
@@ -18,50 +20,50 @@
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script >
|
||||
<script>
|
||||
import ImagePreview from '@/components/image-preview/image-preview.vue'
|
||||
export default {
|
||||
name:"course-item",
|
||||
components:{
|
||||
name: "course-item",
|
||||
components: {
|
||||
ImagePreview
|
||||
},
|
||||
props:{
|
||||
itemInfo:{
|
||||
props: {
|
||||
itemInfo: {
|
||||
type: Object,
|
||||
default:()=>({
|
||||
default: () => ({
|
||||
crsName: '',
|
||||
tagCataList:[],
|
||||
publicTime:"",
|
||||
learnedNum:''
|
||||
tagCataList: [],
|
||||
publicTime: "",
|
||||
learnedNum: ''
|
||||
})
|
||||
},
|
||||
activeTag:{
|
||||
activeTag: {
|
||||
default: () => [],
|
||||
type: Array
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
||||
|
||||
};
|
||||
},
|
||||
watch:{
|
||||
activeTag:{
|
||||
handler(){},
|
||||
watch: {
|
||||
activeTag: {
|
||||
handler() {},
|
||||
deep: true,
|
||||
immediate: true
|
||||
}
|
||||
},
|
||||
computed:{
|
||||
tagsShowList(){
|
||||
if(!this.activeTag) return this.itemInfo.tagCataList||[]
|
||||
let _arr = (this.itemInfo.tagCataList||[]).filter(t=> this.activeTag.includes(t.tagId))
|
||||
let _arr1 = (this.itemInfo.tagCataList||[]).filter(t=> !this.activeTag.includes(t.tagId))
|
||||
computed: {
|
||||
tagsShowList() {
|
||||
if (!this.activeTag) return this.itemInfo.tagCataList || []
|
||||
let _arr = (this.itemInfo.tagCataList || []).filter(t => this.activeTag.includes(t.tagId))
|
||||
let _arr1 = (this.itemInfo.tagCataList || []).filter(t => !this.activeTag.includes(t.tagId))
|
||||
return _arr.concat(_arr1)
|
||||
}
|
||||
},
|
||||
methods:{
|
||||
clickItem(){
|
||||
methods: {
|
||||
clickItem() {
|
||||
this.$emit('clickItem', this.itemInfo)
|
||||
}
|
||||
}
|
||||
@@ -69,43 +71,42 @@
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.course-item-box{
|
||||
padding: 15rpx;
|
||||
overflow: hidden;
|
||||
width: 100%;
|
||||
.img-box-view{
|
||||
width: 225rpx;
|
||||
height: 170rpx;
|
||||
float: left;
|
||||
position: relative;
|
||||
border-radius: 20rpx;
|
||||
.course-item-box {
|
||||
padding: 8rpx 15rpx;
|
||||
overflow: hidden;
|
||||
box-shadow: 0 0 10rpx #c3c3c3;
|
||||
.img-box{
|
||||
width: 100%;
|
||||
|
||||
.img-box-view {
|
||||
width: 225rpx;
|
||||
height: 170rpx;
|
||||
height: 127rpx;
|
||||
float: left;
|
||||
position: relative;
|
||||
border-radius: 20rpx;
|
||||
overflow: hidden;
|
||||
box-shadow: 0 0 10rpx #c3c3c3;
|
||||
|
||||
.img-box {
|
||||
width: 225rpx;
|
||||
height: 170rpx;
|
||||
}
|
||||
|
||||
.item-grade {
|
||||
position: absolute;
|
||||
right: 0;
|
||||
width: 60rpx;
|
||||
height: 46rpx;
|
||||
background-color: #ff581c;
|
||||
top: 20rpx;
|
||||
border-radius: 8rpx 0 0 8rpx;
|
||||
color: #fff;
|
||||
text-align: center;
|
||||
// padding-right: 10rpx;
|
||||
font-size: 28rpx;
|
||||
line-height: 46rpx;
|
||||
}
|
||||
}
|
||||
.item-grade{
|
||||
position: absolute;
|
||||
right: 0;
|
||||
width: 60rpx;
|
||||
height: 46rpx;
|
||||
background-color: #ff581c;
|
||||
top:20rpx;
|
||||
border-radius: 8rpx 0 0 8rpx;
|
||||
color:#fff;
|
||||
text-align: center;
|
||||
// padding-right: 10rpx;
|
||||
font-size: 28rpx;
|
||||
line-height: 46rpx;
|
||||
}
|
||||
}
|
||||
.cont-box{
|
||||
width: calc(100% - 225rpx);
|
||||
box-sizing: border-box;
|
||||
padding: 0 10rpx 0 20rpx;
|
||||
float: left;
|
||||
.item-title{
|
||||
|
||||
.item-title {
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
@@ -114,47 +115,60 @@
|
||||
font-weight: 500;
|
||||
margin-bottom: 10rpx;
|
||||
}
|
||||
.item-tags{
|
||||
.item-tag-view{
|
||||
white-space: nowrap;
|
||||
height: 44rpx;
|
||||
.item-tag{
|
||||
height: 38rpx;
|
||||
line-height: 34rpx;
|
||||
box-sizing: border-box;
|
||||
font-size: 20rpx;
|
||||
background-color: #fff;
|
||||
color: #ffa150;
|
||||
border: 2rpx solid #ffa150;
|
||||
padding: 0 20rpx;
|
||||
border-radius: 8rpx;
|
||||
margin-right: 20rpx;
|
||||
display: inline-block;
|
||||
|
||||
.cont-box {
|
||||
width: calc(100% - 225rpx);
|
||||
box-sizing: border-box;
|
||||
padding: 0 10rpx 0 20rpx;
|
||||
float: left;
|
||||
|
||||
.item-tags {
|
||||
margin-bottom: 14rpx;
|
||||
|
||||
.item-tag-view {
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
max-width: 200rpx;
|
||||
box-sizing: border-box;
|
||||
&.active-tag{
|
||||
background-color: #ffa150;
|
||||
color: #fff;
|
||||
height: 44rpx;
|
||||
|
||||
.item-tag {
|
||||
height: 38rpx;
|
||||
line-height: 34rpx;
|
||||
box-sizing: border-box;
|
||||
font-size: 20rpx;
|
||||
background-color: #fff;
|
||||
color: #ffa150;
|
||||
border: 2rpx solid #ffa150;
|
||||
padding: 0 20rpx;
|
||||
border-radius: 8rpx;
|
||||
margin-right: 20rpx;
|
||||
display: inline-block;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
max-width: 200rpx;
|
||||
box-sizing: border-box;
|
||||
|
||||
&.active-tag {
|
||||
background-color: #ffa150;
|
||||
color: #fff;
|
||||
border: 2rpx solid #ffa150;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.item-publish,
|
||||
.item-num{
|
||||
|
||||
.item-publish,
|
||||
.item-num {
|
||||
height: 32rpx;
|
||||
line-height: 32rpx;
|
||||
font-size: 20rpx;
|
||||
color: rgb(102,102,102);
|
||||
color: rgb(102, 102, 102);
|
||||
margin-top: 6rpx;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.item-publish{
|
||||
}
|
||||
|
||||
.item-publish {
|
||||
margin-top: 0rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
+886
-748
File diff suppressed because it is too large
Load Diff
Binary file not shown.
|
After Width: | Height: | Size: 1.8 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 1.5 KiB |
Reference in New Issue
Block a user