Commit 5d999ca9 by sunchao

合并冲突

parents 8b0c76ea 114d0b97
<script>
import initApp from "@/util/router.js";
import {interceptor} from '@/util/interceptor.ts';
export default {
onLaunch: function() {
console.log('App Launch')
......
......@@ -30,8 +30,16 @@ export default {
return request(`${cffpURL}/user/register`, "POST", params)
},
//重置密码
resetPassword(){
resetPassword(params){
return request(`${cffpURL}/user/resetPassword`, "POST", params)
},
// 课程查询列表接口
courseList(params){
return request(`${cffpURL}/course/list`,"POST",params)
},
// 讲师信息查询
lecturerQuery(params){
return request(`${apiURL}/college/lecturerQuery`, "POST", params)
}
}
<template>
<view>
课程列表
<h4 v-if="cffpCourseInfos.length<=0" class="noLists">暂无课程列表</h4>
<ul v-if="cffpCourseInfos.length>0">
<li v-for="item in cffpCourseInfos" :key="item.fileId">
<view class="thumbnailBox">
<img src="" alt="">
</view>
<view class="courseDetailBox">
<h4>{{item.fileTitle}}</h4>
<view class="summaryBox">
<text>{{item.fileSynopsis}}</text>
</view>
<view class="dataBox">
<strong>{{item.coursePrice}}</strong>
<text>{{item.salesNumber}}人购买</text>
</view>
<view class="tagListBox">
<view class="tagItem">{{item.fileLecturerName}}</view>
<view class="tagItem">{{item.fileLecturerRanks}}</view>
</view>
</view>
</li>
</ul>
</view>
</template>
<script>
import api from "../../api/api";
export default{
data(){
return;
return{
cffpCourseInfos:[]
}
},
name:'courselist',
components:{
},
onLoad(){
},
methods:{
courseList(){
api.courseList().then(res=>{
if(res['success']){
this.cffpCourseInfos = res['data']['cffpCourseInfos'];
}else{
uni.showToast({
title: res['message'],
duration: 2000,
icon: 'none'
})
}
})
}
}
}
</script>
<style>
<style lang="scss">
ul,li{
list-style: none;
margin: 0;
padding: 0;
display: flex;
}
ul{
flex-direction: column;
}
li{
background-color: #fff;
border-radius: 20rpx;
margin-bottom: 10rpx;
padding: 10rpx;
}
.noLists{
position: absolute;
left: 50%;
top: 50%;
transform: translateX(-50%);
}
.thumbnailBox{
width: 200rpx;
height: 200rpx;
background-color: #888;
margin-right: 26rpx;
img{
max-width: 100%;
height: auto;
}
}
.courseDetailBox{
width: 100%;
color: #333;
h4{
font-size: 32rpx;
}
.summaryBox{
font-size: 24rpx;
margin: 10rpx 0;
text{
margin-right: 20rpx;
}
}
.dataBox{
strong{
color: #F15A1F;
font-size: 30rpx;
margin-right: 20rpx;
}
text{
font-size: 28rpx;
}
}
.tagListBox{
display: flex;
.tagItem{
color: #20279B;
font-size: 28rpx;
border-radius: 20rpx;
border-top-left-radius: 0;
border-bottom-right-radius: 0;
padding: 10rpx 18rpx;
border: 1px solid #20279B;
margin-right: 20rpx;
}
}
}
</style>
\ No newline at end of file
......@@ -13,7 +13,39 @@
"topWindow": false,
"navigationBarTitleText": "CFFP"
}
}
},
{
"path": "components/courselist/courselist",
"style": {
"topWindow": false,
"navigationBarTitleText": "CFFP"
}
}
,{
"path" : "pages/courseDetail/courseDetail",
"style" :
{
"navigationBarTitleText": "",
"enablePullDownRefresh": false
}
}
,{
"path" : "pages/shareFriend/shareFriend",
"style" :
{
"navigationBarTitleText": "",
"enablePullDownRefresh": false
}
},{
"path" : "pages/personalCenter/personalCenter",
"style" :
{
"navigationBarTitleText": "",
"enablePullDownRefresh": false
}
}
],
"tabBar": {
"color": "#7A7E83", // tab 上的文字默认颜色
......
<template>
<view class="container">
<!-- 课程banner图 -->
<view class="courseBannerBox"></view>
<!-- 课程详情图 -->
<view class="courseTitleContent">
<view class="courseTitle">
<h4>CFFP初级认证(报名+培训)</h4>
<view class="shareF">
<view></view>
<!-- <view>送好友</view> -->
</view>
</view>
<view class="dataBox">
<strong>¥6888.00</strong>
<text>5656人购买</text>
</view>
</view>
<!-- 课程介绍,相关课程,讲师 -->
<view class="courseProBox">
<!-- tab区域 -->
<view class="tab">
<text :class="{'actived': tabType===1}" @click="switchTab(1)">介绍</text>
<text :class="{'actived': tabType===2}" @click="switchTab(2)">相关课程</text>
<text :class="{'actived': tabType===3}" @click="switchTab(3)">讲师</text>
</view>
<!-- tabContent区域 -->
<view class="tabContent">
<!-- 讲师介绍 -->
<view class="lecturerContent" v-if="tabType===3">
<view class="lecturerIntro">
<view class="lecturerUrl">
<!-- <img :src="{{lecturerInfo.lecturerUrl}}" alt="" srcset=""> -->
</view>
<view>
<p><text class="lecturerName">{{lecturerInfo.lecturerName}}</text></p>
<template v-if="lecturerInfo?.lecturerRankNames">
<p v-for="item in lecturerInfo.lecturerRankNames.split(',')" class="lecturerTitle"><text>{{item}}</text></p>
</template>
</view>
</view>
<h4>
<text>讲师介绍</text>
</h4>
<view v-html="lecturerInfo?.lecturerIntroduce" class="lecturerText"></view>
</view>
<!-- 购买按钮 -->
<view class="buyBox">
<text>购买</text>
</view>
</view>
</view>
</view>
</template>
<script>
import api from "../../api/api";
export default {
data() {
return {
lecturerId:9,
tabType:3,
lecturerInfo:{}
};
},
methods:{
// 切换tab
switchTab(type) {
this.tabType = type;
if (type === 3) {
this.lecturerQuery();
} else if (type == 2) {
// this.filePathQuery(null, null,this.fileUploadItem.mdDropOptionCode)
} else {
// this.filePathQuery(this.status, this.fileId)
}
},
// 讲师信息查询
lecturerQuery(){
api.lecturerQuery({id:this.lecturerId}).then(res=>{
if(res['success']){
this.lecturerInfo = res['data']['lecturerInfos'][0];
}else{
uni.showToast({
title: res['message'],
duration: 2000,
icon: 'none'
})
}
})
}
},
mounted(){
this.switchTab(this.tabType)
}
}
</script>
<style lang="scss">
.container{
background-color: #FBFBFB;
}
.courseBannerBox{
height: 300rpx;
background-color: #ebebeb;
}
.courseTitleContent{
height: 150rpx;
background-color: #fff;
margin-bottom: 10rpx;
padding: 20rpx 30rpx;
box-sizing: border-box;
.courseTitle{
display: flex;
justify-content: space-between;
margin-bottom: 16rpx;
h4{
font-size: 40rpx;
}
}
.dataBox{
strong{
font-size: 30rpx;
color: #F15A1F;
margin-right: 30rpx;
}
text{
font-size: 28rpx;
color: #333;
}
}
}
.courseProBox{
.tab{
display: flex;
justify-content: space-between;
padding: 40rpx 30rpx 0;
background-color: #fff;
color: #666;
font-size: 32rpx;
text.actived{
border-bottom: 2px solid #20269B;
color: #333;
}
}
.tabContent{
padding-bottom: 200rpx;
background-color: #fff;
.lecturerContent{
.lecturerIntro{
display: flex;
padding: 40rpx 50rpx;
border-bottom: 2rpx solid #fbfbfb;
.lecturerUrl{
width: 200rpx;
height: 200rpx;
border-radius: 50%;
background-color: #ccc;
overflow: hidden;
margin-right: 40rpx;
}
.lecturerName{
display: inline-block;
background: #5359CD;
border-radius: 10rpx;
color: #fff;
font-size: 28rpx;
padding: 4rpx 20rpx;
}
.lecturerTitle{
font-size: 28rpx;
color: #5359CD;
margin-top: 16rpx;
}
}
h4{
padding-left: 30rpx;
padding-top: 10rpx;
padding-bottom: 20rpx;
background-color: #fff;
text{
border-bottom: 1px solid #333;
font-size: 30rpx;
}
}
.lecturerText{
padding: 0 28rpx;
background-color: #fff;
white-space: pre-wrap;
width: 100%;
box-sizing: border-box;
p{
width: auto !important;
}
}
}
.buyBox{
position: fixed;
bottom: 0;
left: 0;
right: 0;
border-radius: 80rpx;
background-color: #20269B;
color: #fff;
font-size: 36rpx;
padding: 20rpx 90rpx;
text-align: center;
max-width: 60%;
margin: 0 auto;
}
}
}
</style>
<template>
<view>
<!-- 头部信息 -->
<view class="basicInfoBox"></view>
<!-- 主要菜单 -->
<view class="mainMenuBox"></view>
<!-- 个人信息 -->
<view class="personalInfo"></view>
</view>
</template>
<script>
export default {
data() {
return {
}
},
methods: {
}
}
</script>
<style>
</style>
<template>
<view>
</view>
</template>
<script>
export default {
data() {
return {
};
}
}
</script>
<style lang="scss">
</style>
import api from "../api/api";
import {baseURL,apiURL,sfpURL} from "../environments/environment";
// import {baseURL,apiURL,cffpURL} from "../environments/environment";
// 白名单,不需要携带token就允许被访问的接口
const whiteApiList = [`/api/authorize/obtainToken`,`/api/authorize/checkToken`]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment