2022-08-03 13:28:45 +00:00
|
|
|
<template>
|
|
|
|
<view class="disjbac fw">
|
2022-08-05 01:54:15 +00:00
|
|
|
<view @tap="goDetail(item.id)" class="radius8 bacf pad12 boxshow1 width48_6 mar-s20 flexs" v-for="(item,index) in list" :key="index">
|
|
|
|
<image :src="item.cover" style="height: 226rpx;" mode="aspectFill" class="width100" lazy-load></image>
|
2022-08-03 13:28:45 +00:00
|
|
|
<view class="fon24 pad-zy8 disjb fc" style="color: #262626;">
|
2022-08-05 01:54:15 +00:00
|
|
|
<view class="clips2 mar-sx10" style="height: 64rpx;">{{item.name}}</view>
|
2022-08-03 13:28:45 +00:00
|
|
|
<view class="disjbac ae pad-x10">
|
|
|
|
<view class="">
|
2022-08-05 01:54:15 +00:00
|
|
|
<span class="bold colf8">¥{{item.price}}</span>
|
|
|
|
<span class="fon20 mar-z10 tline-through" style="color: #969696;">¥{{item.original_price}}</span>
|
2022-08-03 13:28:45 +00:00
|
|
|
</view>
|
2022-08-05 01:54:15 +00:00
|
|
|
<view v-if="!ifCourse" class="radius18 pad-zy12 disjcac flexs fon20" style="color: #f37617;border: 2rpx solid #f37617;">购买</view>
|
2022-08-03 13:28:45 +00:00
|
|
|
<view v-else class="radius16 pad-zy10 disjcac colf flexs fon20" style="border: 2rpx solid #f37617;background-color: #f37617;">去学习</view>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
export default {
|
|
|
|
name:"list",
|
2022-08-05 01:54:15 +00:00
|
|
|
props:{
|
|
|
|
ifCourse:{
|
|
|
|
type:Boolean,
|
|
|
|
default:false
|
|
|
|
}
|
|
|
|
},
|
2022-08-03 13:28:45 +00:00
|
|
|
data() {
|
|
|
|
return {
|
2022-08-05 01:54:15 +00:00
|
|
|
list:[]
|
2022-08-03 13:28:45 +00:00
|
|
|
};
|
|
|
|
},
|
|
|
|
methods:{
|
|
|
|
goDetail(id){
|
|
|
|
this.$emit('goDetail',id);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<style>
|
|
|
|
|
|
|
|
</style>
|