You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
zhishifufei_uniapp/components/RecommendProblem/index.vue

137 lines
2.6 KiB

9 months ago
<template>
<view class="recommend-problem">
<view class="header">
{{ obj.title }}
<navigator hover-class="none" url="/pages/topic/question_category?type=1">
查看更多<span class="iconfont iconxiangyou"></span>
</navigator>
</view>
<view class="ul">
<navigator class="ul" v-for="item in obj.list" :key="item.id" hover-class="none" url="" @click="jumpProblem(item)">
<view>{{ item.title }}</view>
<view>
{{ item.item_number }}
<view>{{ item.count }}人已答题</view>
<view>
<image class="image" :src="getImgPath('/wap/first/zsff/images/question08.png')" />练习
</view>
</view>
</navigator>
</view>
</view>
</template>
<script>
export default {
props: {
obj: {
type: Object,
default: function () {
return {};
},
},
},
methods: {
jumpProblem(item) {
this.$util.checkLogin(() => {
uni.navigateTo({
url: `/pages/topic/problem_index?id=${item.id}`
})
}, true);
}
}
};
</script>
<style scoped>
.recommend-problem {
padding: 15rpx 20rpx 50rpx;
margin-top: 14rpx;
/* background-color: #ffffff; */
}
.recommend-problem .header {
display: flex;
justify-content: space-between;
height: 50rpx;
/* align-items: center; */
font-weight: bold;
font-size: 32rpx;
color: #333;
margin-left: 20rpx;
}
.recommend-problem>view navigator {
font-weight: normal;
font-size: 22rpx;
color: #999999;
margin-right: 20rpx;
}
.recommend-problem .iconxiangyou {
margin-left: 9rpx;
font-size: 18rpx;
}
.recommend-problem .ul {
width: 686rpx;
margin: auto;
border-radius: 24rpx;
background: #ffffff;
padding: 20rpx 20rpx 20rpx 5rpx;
}
.recommend-problem view:last-child>navigator {
border: none;
}
.recommend-problem view>navigator>view:first-child {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
font-size: 28rpx;
color: #282828;
}
.recommend-problem view>navigator>view:last-child {
display: flex;
align-items: center;
font-size: 22rpx;
color: #ff6b00;
margin-left: 14rpx;
margin-top: 20rpx;
}
.recommend-problem view view:nth-child(1) {
flex: 1;
margin-left: 15rpx;
color: #999999;
}
.recommend-problem view navigator view>view:last-child {
height: 38rpx;
padding-right: 17rpx;
padding-left: 17rpx;
border-radius: 19rpx;
background-color: #f2f8ff;
line-height: 38rpx;
color: #2c8eff;
}
.recommend-problem .image {
width: 17rpx;
height: 19rpx;
margin-right: 10rpx;
-webkit-touch-callout: none;
pointer-events: none;
}
</style>