|
@@ -1,178 +1,188 @@
|
|
<template>
|
|
<template>
|
|
<view>
|
|
<view>
|
|
<view class="search">
|
|
<view class="search">
|
|
- <u-icon name="arrow-left"></u-icon>
|
|
|
|
- <u-search placeholder="魔方" action-text="查询"></u-search>
|
|
|
|
- </view>
|
|
|
|
|
|
+ <u-icon name="arrow-left" @click="backCourse"></u-icon>
|
|
|
|
+ <u-search placeholder="魔方" action-text="查询" v-model="className" @custom="searchClass"></u-search>
|
|
|
|
+ </view>
|
|
<view class="main">
|
|
<view class="main">
|
|
- <view class="result-box">
|
|
|
|
|
|
+ <view class="result-box" v-for="(item,index) in reCoursesList" :key="index"
|
|
|
|
+ @click="gotoUrl('pages/parents/course/confirmOrder?id='+item.course_id)">
|
|
<view class="picture">
|
|
<view class="picture">
|
|
<img src="../../../assets/img/resultP.png" alt="">
|
|
<img src="../../../assets/img/resultP.png" alt="">
|
|
</view>
|
|
</view>
|
|
<view class="infos">
|
|
<view class="infos">
|
|
<view class="title">
|
|
<view class="title">
|
|
- 魔方新生班
|
|
|
|
|
|
+ {{item.className}}
|
|
</view>
|
|
</view>
|
|
<view class="tag">
|
|
<view class="tag">
|
|
- <view class="item">
|
|
|
|
- 基础入门
|
|
|
|
|
|
+ <view class="item" v-if="item.courseDesc != null">
|
|
|
|
+ {{item.courseDesc}}
|
|
</view>
|
|
</view>
|
|
- <view class="item">
|
|
|
|
- 思维训练
|
|
|
|
|
|
+ <view class="item" v-else>
|
|
|
|
+ 暂无简介
|
|
</view>
|
|
</view>
|
|
-
|
|
|
|
</view>
|
|
</view>
|
|
<view class="teacher">
|
|
<view class="teacher">
|
|
<view class="photo">
|
|
<view class="photo">
|
|
- <img src="../../../assets/img/teachercard.png" alt="">
|
|
|
|
|
|
+ <u-avatar class="avatar"
|
|
|
|
+ :src="item.headPhoto != null ? item.headPhoto : '../../assets/img/head.png'" size="64">
|
|
|
|
+ </u-avatar>
|
|
</view>
|
|
</view>
|
|
<view class="name">
|
|
<view class="name">
|
|
- 鲁老师
|
|
|
|
|
|
+ {{item.teacherName}}
|
|
</view>
|
|
</view>
|
|
-
|
|
|
|
</view>
|
|
</view>
|
|
-
|
|
|
|
</view>
|
|
</view>
|
|
-
|
|
|
|
- </view>
|
|
|
|
-
|
|
|
|
- <view class="result-box">
|
|
|
|
- <view class="picture">
|
|
|
|
- <img src="../../../assets/img/resultP.png" alt="">
|
|
|
|
- </view>
|
|
|
|
- <view class="infos">
|
|
|
|
- <view class="title">
|
|
|
|
- 魔方新生班
|
|
|
|
- </view>
|
|
|
|
- <view class="tag">
|
|
|
|
- <view class="item">
|
|
|
|
- 基础入门
|
|
|
|
- </view>
|
|
|
|
- <view class="item">
|
|
|
|
- 思维训练
|
|
|
|
- </view>
|
|
|
|
-
|
|
|
|
- </view>
|
|
|
|
- <view class="teacher">
|
|
|
|
- <view class="photo">
|
|
|
|
- <img src="../../../assets/img/teachercard.png" alt="">
|
|
|
|
- </view>
|
|
|
|
- <view class="name">
|
|
|
|
- 鲁老师
|
|
|
|
- </view>
|
|
|
|
-
|
|
|
|
- </view>
|
|
|
|
-
|
|
|
|
- </view>
|
|
|
|
-
|
|
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
-
|
|
|
|
</view>
|
|
</view>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script>
|
|
<script>
|
|
|
|
+ import * as homePageApi from '@/apis/parents/homePage.js'
|
|
|
|
+
|
|
export default {
|
|
export default {
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
-
|
|
|
|
|
|
+ className: '',
|
|
|
|
+ reCoursesList: []
|
|
}
|
|
}
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
-
|
|
|
|
|
|
+ searchClass() {
|
|
|
|
+ this.getReCoursesList();
|
|
|
|
+ },
|
|
|
|
+ backCourse() {
|
|
|
|
+ uni.navigateBack({
|
|
|
|
+
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+ getReCoursesList() {
|
|
|
|
+ uni.showLoading({
|
|
|
|
+ title: "加载中",
|
|
|
|
+ mask: true,
|
|
|
|
+ })
|
|
|
|
+ homePageApi.loadCoursesForHomeShow({
|
|
|
|
+ className: this.className,
|
|
|
|
+ pageNum: 1,
|
|
|
|
+ pageSize: 10000
|
|
|
|
+ }).then((res) => {
|
|
|
|
+ uni.hideLoading();
|
|
|
|
+ this.reCoursesList = res.data.data;
|
|
|
|
+ }).catch(error => {
|
|
|
|
+ uni.showToast({
|
|
|
|
+ title: error,
|
|
|
|
+ icon: "none"
|
|
|
|
+ })
|
|
|
|
+ })
|
|
|
|
+ },
|
|
}
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
</script>
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
<style lang="scss" scoped>
|
|
- .search{
|
|
|
|
- background-color: #fff;
|
|
|
|
- padding: 16rpx 24rpx;
|
|
|
|
- position: fixed;
|
|
|
|
- left: 0;
|
|
|
|
- right: 0;
|
|
|
|
- top: 0;
|
|
|
|
- display: flex;
|
|
|
|
- /deep/.u-icon--right{
|
|
|
|
- margin-right: 11px;
|
|
|
|
- }
|
|
|
|
- /deep/.u-action{
|
|
|
|
- width: 17.1%;
|
|
|
|
- text-align: center;
|
|
|
|
- line-height: 28px;
|
|
|
|
- border-radius: 50px;
|
|
|
|
- background-color: rgba(13, 186, 199, 1);
|
|
|
|
- color: rgba(255, 255, 255, 1);
|
|
|
|
- }
|
|
|
|
- /deep/.u-content{
|
|
|
|
- background-color: rgba(240, 244, 250, 1) !important;
|
|
|
|
- }
|
|
|
|
- /deep/.u-input{
|
|
|
|
- background-color: rgba(240, 244, 250, 1) !important;
|
|
|
|
- }
|
|
|
|
|
|
+ .search {
|
|
|
|
+ background-color: #fff;
|
|
|
|
+ padding: 16rpx 24rpx;
|
|
|
|
+ position: fixed;
|
|
|
|
+ left: 0;
|
|
|
|
+ right: 0;
|
|
|
|
+ top: 0;
|
|
|
|
+ display: flex;
|
|
|
|
+
|
|
|
|
+ /deep/.u-icon--right {
|
|
|
|
+ margin-right: 11px;
|
|
}
|
|
}
|
|
|
|
|
|
-.main{
|
|
|
|
- margin-top: 120rpx;
|
|
|
|
- .result-box{
|
|
|
|
- border-radius: 12px;
|
|
|
|
- background-color: rgba(255, 255, 255, 1);
|
|
|
|
- margin: 0 16px 12px 16px;
|
|
|
|
- display: flex;
|
|
|
|
- padding: 12px;
|
|
|
|
- .picture{
|
|
|
|
- width: 200rpx;
|
|
|
|
- height: 200rpx;
|
|
|
|
- border-radius: 8rpx;
|
|
|
|
- overflow: hidden;
|
|
|
|
- img{
|
|
|
|
- width: 100%;
|
|
|
|
- height: 100%;
|
|
|
|
- }
|
|
|
|
|
|
+ /deep/.u-action {
|
|
|
|
+ width: 17.1%;
|
|
|
|
+ text-align: center;
|
|
|
|
+ line-height: 28px;
|
|
|
|
+ border-radius: 50px;
|
|
|
|
+ background-color: rgba(13, 186, 199, 1);
|
|
|
|
+ color: rgba(255, 255, 255, 1);
|
|
}
|
|
}
|
|
- .infos{
|
|
|
|
- margin-left: 12px;
|
|
|
|
- .title{
|
|
|
|
- color: rgba(51, 51, 51, 1);
|
|
|
|
- font-size: 16px;
|
|
|
|
- font-weight: bold;
|
|
|
|
- }
|
|
|
|
- .tag{
|
|
|
|
- display: flex;
|
|
|
|
- .item{
|
|
|
|
- width: 128rpx;
|
|
|
|
- height: 40rpx;
|
|
|
|
- line-height: 40rpx;
|
|
|
|
- border-radius: 8rpx;
|
|
|
|
- background-color: rgba(241, 243, 244, 1);
|
|
|
|
- color: rgba(16, 16, 16, 1);
|
|
|
|
- margin-right: 16rpx;
|
|
|
|
- margin-top: 24rpx;
|
|
|
|
- font-size: 12px;
|
|
|
|
- text-align: center;
|
|
|
|
|
|
+
|
|
|
|
+ /deep/.u-content {
|
|
|
|
+ background-color: rgba(240, 244, 250, 1) !important;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ /deep/.u-input {
|
|
|
|
+ background-color: rgba(240, 244, 250, 1) !important;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ .main {
|
|
|
|
+ margin-top: 120rpx;
|
|
|
|
+
|
|
|
|
+ .result-box {
|
|
|
|
+ border-radius: 12px;
|
|
|
|
+ background-color: rgba(255, 255, 255, 1);
|
|
|
|
+ margin: 0 16px 12px 16px;
|
|
|
|
+ display: flex;
|
|
|
|
+ padding: 12px;
|
|
|
|
+
|
|
|
|
+ .picture {
|
|
|
|
+ width: 200rpx;
|
|
|
|
+ height: 200rpx;
|
|
|
|
+ border-radius: 8rpx;
|
|
|
|
+ overflow: hidden;
|
|
|
|
+
|
|
|
|
+ img {
|
|
|
|
+ width: 100%;
|
|
|
|
+ height: 100%;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- .teacher{
|
|
|
|
- display: flex;
|
|
|
|
- align-items:center;
|
|
|
|
- margin-top: 36rpx;
|
|
|
|
- .photo{
|
|
|
|
- width: 64rpx;
|
|
|
|
- height: 64rpx;
|
|
|
|
- border-radius: 100rpx;
|
|
|
|
- overflow: hidden;
|
|
|
|
- margin-right: 12px;
|
|
|
|
- img{
|
|
|
|
- width: 100%;
|
|
|
|
- height: 100%;
|
|
|
|
|
|
+
|
|
|
|
+ .infos {
|
|
|
|
+ margin-left: 12px;
|
|
|
|
+
|
|
|
|
+ .title {
|
|
|
|
+ color: rgba(51, 51, 51, 1);
|
|
|
|
+ font-size: 16px;
|
|
|
|
+ font-weight: bold;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ .tag {
|
|
|
|
+ display: flex;
|
|
|
|
+
|
|
|
|
+ .item {
|
|
|
|
+ width: 128rpx;
|
|
|
|
+ height: 40rpx;
|
|
|
|
+ line-height: 40rpx;
|
|
|
|
+ border-radius: 8rpx;
|
|
|
|
+ background-color: rgba(241, 243, 244, 1);
|
|
|
|
+ color: rgba(16, 16, 16, 1);
|
|
|
|
+ margin-right: 16rpx;
|
|
|
|
+ margin-top: 24rpx;
|
|
|
|
+ font-size: 12px;
|
|
|
|
+ text-align: center;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- .name{
|
|
|
|
- color: rgba(16, 16, 16, 1);
|
|
|
|
|
|
+
|
|
|
|
+ .teacher {
|
|
|
|
+ display: flex;
|
|
|
|
+ align-items: center;
|
|
|
|
+ margin-top: 36rpx;
|
|
|
|
+
|
|
|
|
+ .photo {
|
|
|
|
+ width: 64rpx;
|
|
|
|
+ height: 64rpx;
|
|
|
|
+ border-radius: 100rpx;
|
|
|
|
+ overflow: hidden;
|
|
|
|
+ margin-right: 12px;
|
|
|
|
+
|
|
|
|
+ img {
|
|
|
|
+ width: 100%;
|
|
|
|
+ height: 100%;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ .name {
|
|
|
|
+ color: rgba(16, 16, 16, 1);
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
-}
|
|
|
|
-
|
|
|
|
-</style>
|
|
|
|
|
|
+</style>
|