This commit is contained in:
2023-08-26 14:10:16 +08:00
parent 77de5d5d6e
commit c3e6002ca3
9 changed files with 95 additions and 45 deletions

View File

@@ -21,7 +21,7 @@
<u-grid :border="false" col="4">
<u-grid-item v-for="(listItem,listIndex) in list" :key="listIndex" @click="toAnswer(listItem.title,listItem.isError,listItem.isNew)">
<view style="width: 84rpx;height: 84rpx;">
<image style="width: 84rpx;" mode="widthFix" :src="listItem.image"></image>
<image style="width: 84rpx;height: 100rpx;" mode="widthFix" :src="listItem.image"></image>
</view>
<text class="grid-text fs14 cor-000">{{listItem.title}}</text>
<text class="grid-text mb10 fs12 cor-999">{{listItem.subTitle}}</text>
@@ -30,10 +30,10 @@
</view>
<view class="mt14 p14 bc-fff" style="border-radius: 20rpx;">
<text class="fs18 cor-000 fw600">常见考点</text>
<view class="flex ai-c wp100 mt15" style="flex-wrap: wrap;">
<view class="wp50 flex ai-c mb25" v-for="(item,index) of testCenterList" :key="index" @tap="toQuestionBank(item)">
<view class="flex ai-c wp100 mt10" style="flex-wrap: wrap;">
<view class="wp50 flex ai-c p15tb" style="border-bottom: 1rpx solid #DDDCDC;" v-for="(item,index) of testCenterList" :key="index" @tap="toQuestionBank(item)">
<view class="dot_item">{{index+1}}</view>
<text class="ml5">{{item.configItemName}}</text>
<text class="ml5 topic_cont_text" style="width: calc(100% - 65rpx);">{{item.configItemName}}</text>
</view>
</view>
</view>
@@ -85,16 +85,21 @@
isError:0,
image:neverWriteIcon
}],
testCenterList:[]
testCenterList:[],
subject:'1'
}
},
onLoad(){
onLoad(op){
if(op.subject){
this.subject=op.subject
}
this.getExamPoint()
},
methods: {
getExamPoint(){
const carTypeId=storage.get('carType') || '1001'
querySysConfigList(carTypeId,'ExamKeys').then(resp=>{
const examKey = this.subject=='1'?'ExamKeysOfSubjectOne':'ExamKeysOfSubjectFour'
querySysConfigList(carTypeId,examKey).then(resp=>{
if(resp.code==='0000'){
this.testCenterList=resp.data
}
@@ -128,10 +133,20 @@
.dot_item{
width: 40rpx;
height: 40rpx;
line-height: 40rpx;
line-height: 41rpx;
color: #fff;
text-align: center;
background: #0BD032;
border-radius: 50%;
}
.topic_cont_text{
height:45rpx;
overflow: hidden;
word-break: break-all; /* break-all(允许在单词内换行。) */
text-overflow: ellipsis; /* 超出部分省略号 */
display: -webkit-box; /** 对象作为伸缩盒子模型显示 **/
-webkit-box-orient: vertical; /** 设置或检索伸缩盒对象的子元素的排列方式 **/
-webkit-line-clamp:1; /** 显示的行数 **/
}
</style>