mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-mobile.git
synced 2025-12-06 17:36:45 +08:00
提交
This commit is contained in:
@@ -12,7 +12,7 @@
|
||||
{{course.name}}
|
||||
</view>
|
||||
<view class="course-text">
|
||||
{{course.teacher || course.sysCreateBy}} | {{course.studys}}人已学
|
||||
{{course.teacher}} | {{course.studys || course.studies}}人已学
|
||||
</view>
|
||||
<view class="course-type">
|
||||
<text class="type-index" v-if="sysTypeName(course.sysType1) != ''">{{sysTypeName(course.sysType1)}}</text>
|
||||
|
||||
@@ -1,7 +1,11 @@
|
||||
<template>
|
||||
<view class="recommend-index">
|
||||
<view class="index-banner">
|
||||
<image style="width: 100%;height:301upx" src="../../static/images/banner-index.png" mode=""></image>
|
||||
<u-swiper
|
||||
:list="resonimg"
|
||||
@change="change"
|
||||
@click="click"
|
||||
></u-swiper>
|
||||
</view>
|
||||
<view class="course-re">
|
||||
<view class="recommend-index-title" style="margin-bottom: 20upx;">
|
||||
@@ -10,29 +14,9 @@
|
||||
<!-- <text class="tetle-text">查看更多</text> -->
|
||||
</view>
|
||||
<course-list :items="courseDataList"></course-list>
|
||||
<!-- <view class="course-re-list">
|
||||
<view class="course-re-index" v-for="course in courseDataList" :key="course.id" @click="toCourseDetail(course)">
|
||||
<view class="course-img">
|
||||
<text class="img-score">
|
||||
<image style="width:28upx;height:28upx;margin-right: 6upx;" src="../../static/images/icon/index-start.png" mode=""></image>
|
||||
{{converToScore(course.score)}}分</text>
|
||||
<course-image :course="course" width="332upx" height="192upx"></course-image>
|
||||
</view>
|
||||
<view class="course-title">
|
||||
{{course.name}}
|
||||
</view>
|
||||
<view class="course-text">
|
||||
{{course.sysCreateBy}} | {{course.studys}}人已学
|
||||
</view>
|
||||
<view class="course-type">
|
||||
<text class="type-index" v-if="sysTypeName(course.sysType1) != ''">{{sysTypeName(course.sysType1)}}</text>
|
||||
<text class="type-tow" v-if="sysTypeName(course.sysType2) != ''">{{sysTypeName(course.sysType2)}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view> -->
|
||||
</view>
|
||||
<view style="margin:30upx 0 60upx 0">
|
||||
<image style="width: 100%;height:220upx" src="../../static/images/banner-tow.png" mode=""></image>
|
||||
<image style="width: 100%;height:220upx" :src="fileUrl+placeholderImg.image" mode=""></image>
|
||||
</view>
|
||||
<view class="ranking-list">
|
||||
<view class="recommend-index-title">
|
||||
@@ -127,6 +111,7 @@
|
||||
|
||||
<script>
|
||||
import apiIndex from '@/api/phase2/index.js';
|
||||
import apiPlace from '@/api/phase2/place.js';
|
||||
import { mapGetters,mapActions} from 'vuex';
|
||||
import apiUser from '@/api/system/user.js';
|
||||
export default {
|
||||
@@ -139,12 +124,15 @@
|
||||
qaRankingList:[],
|
||||
arlRankingList:[],
|
||||
courseRankingList:[],
|
||||
resonimg:[],//轮播图
|
||||
placeholderImg:{},
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapGetters(['userInfo'])
|
||||
},
|
||||
mounted(){
|
||||
this.couresreso();
|
||||
this.getCourseData();
|
||||
// this.getSysTypeTree();
|
||||
// this.findCourseData();
|
||||
@@ -154,8 +142,31 @@
|
||||
this.getArtData();
|
||||
this.getQaData();
|
||||
this.getCourseRanking();
|
||||
|
||||
},
|
||||
methods: {
|
||||
click(e) {
|
||||
// console.log(e,'444')
|
||||
},
|
||||
change(e) {
|
||||
// console.log(e,'333')
|
||||
},
|
||||
couresreso() {
|
||||
let key = 'mobileIndex1';
|
||||
apiPlace.detail(key).then(res => {
|
||||
this.resonimg = [];
|
||||
let lmj = JSON.parse(res.result.content)
|
||||
console.log(lmj,'lmj')
|
||||
lmj.forEach(item=>{
|
||||
this.resonimg.push(this.fileUrl+item.image);
|
||||
})
|
||||
});
|
||||
let keyImg = 'mobileIndex2';
|
||||
apiPlace.detail(keyImg).then(res => {
|
||||
let lmj = JSON.parse(res.result.content)
|
||||
this.placeholderImg = lmj[0];
|
||||
});
|
||||
},
|
||||
//文章跳转详情
|
||||
toArticleDetail(item) {
|
||||
uni.navigateTo({
|
||||
@@ -293,7 +304,7 @@
|
||||
<style scoped lang="scss">
|
||||
.recommend-index{
|
||||
background-color: #fff;
|
||||
padding:8upx 30upx;
|
||||
padding:16upx 30upx;
|
||||
padding-bottom: 100upx;
|
||||
.recommend-index-title{
|
||||
font-size: 36upx;
|
||||
|
||||
@@ -993,7 +993,7 @@
|
||||
width: 32upx;
|
||||
position: absolute;
|
||||
// position: relative;
|
||||
left: 25%;
|
||||
left: 25%;
|
||||
top: 76%;
|
||||
background-color: #387DF7;
|
||||
border-radius: 4upx;
|
||||
|
||||
Reference in New Issue
Block a user