Compare commits

...

2 Commits

Author SHA1 Message Date
Loki fab08ca1ad 合并yh 3 years ago
Loki e051fe3103 列表和直播 3 years ago
  1. 4
      api/knowledge.js
  2. 6
      config/index.js
  3. 14
      manifest.json
  4. 47
      pages/course/detail.vue
  5. 14
      pages/serviceTeacher/courseDetail.vue

4
api/knowledge.js

@ -90,14 +90,14 @@ export function myStudylist(data) {
* 获取课程列表
*/
export function getCourses(data) {
return request.post("/Course/listCourses",data);
return request.get("/lession/lessionList",data);
}
/**
* 获取课程详情
*/
export function getCourseDetail(data) {
return request.post("/Course/courseDetail",data);
return request.post("/lession/lessionDetail",data);
}
/**

6
config/index.js

@ -1,8 +1,14 @@
// export const VUE_APP_API_URL = 'http://natapp.xinxintuan.co/api';
// export const VUE_APP_API_URL = 'https://wxapi.yixiang.co/api'
<<<<<<< HEAD
// export const VUE_APP_API_URL = 'http://139.186.134.205:9006/api'
export const VUE_APP_API_URL = 'http://192.168.0.112:8088/api'
// export const VUE_APP_API_URL = 'https://www.cyjyyjy.com:8096/api'
=======
// export const VUE_APP_API_URL = 'http://192.168.0.112:8088/api'
// export const VUE_APP_API_URL = 'http://192.168.0.114:8088/api'
export const VUE_APP_API_URL = 'https://www.cyjyyjy.com/api'
>>>>>>> 1521d49cdb4b0c5490ac953afbe9910a0a287c45
// export const VUE_APP_API_URL = 'http://natapp.xinxintuan.co/api';
// export const VUE_APP_API_URL = 'https://thapi.xinxintuan.co/api'
// export const VUE_APP_API_URL = 'https://h5api.xinxintuan.co/api';

14
manifest.json

@ -146,15 +146,15 @@
"permission" : {
"scope.userLocation" : {
"desc" : "你的位置信息将用于小程序位置接口的效果展示"
}
},
"plugins" : {
// #ifdef MP-WEIXIN
"live-player-plugin": {
"version": "1.3.0",
"provider": "wx2b03c6e691cd7370"
}
}
// "plugins" : {
// // #ifdef MP-WEIXIN
// "live-player-plugin" : {
// "version" : "1.2.8",
// "provider" : "wx2b03c6e691cd7370"
// }
// }
},
// #endif
"mp-alipay" : {

47
pages/course/detail.vue

@ -3,7 +3,7 @@
<view v-if="$store.getters.token || userInfo.uid">
<view class="swiper-box">
<view class="swiper-item">
<image :src="detail.imageArr[0]" mode="aspectFill" :key="index"></image>
<image :src="detail.coverImg" mode="aspectFill" :key="index"></image>
</view>
<!-- <swiper :indicator-dots="true" :autoplay="true" :interval="3000" :duration="1000">
<swiper-item v-for="(item,index) in detail.imageArr" :key="index">
@ -19,7 +19,7 @@
</view>
<view class="tips-box">
<view class="tip-item blue">{{detail.categoryName}}</view>
<view class="tip-item orange">{{detail.levelName}}</view>
<view class="tip-item orange">{{detail.flag[0]}}</view>
</view>
</view>
<view class="tab-box acea-row row-around" :class="isFixedTop?'fixed':''">
@ -96,11 +96,13 @@
</view>
</view>
<view class="recommend-box content" id="content3">
<!-- 相关推荐 -->
<view class="title-box acea-row row-middle row-center" v-if="detail.similarCourseList.length > 0">
<view class="row-line"></view>
<view class="title">相关推荐</view>
<view class="row-line"></view>
</view>
<view class="knowledge-list">
<view class="knowledge-item acea-row" v-for="(item,index) in detail.similarCourseList" :key="index" @click="toDetail(item.id)">
<view class="img-box">
@ -127,45 +129,31 @@
<view class="footer-box acea-row row-between-wrapper">
<view class="footer-left">
<view class="price" v-if="detail.signState == 1">座位号{{detail.seat}}</view>
<!-- <view class="price" v-if="detail.level > 2">{{detail.level}}级课程</view>
<view class="price" v-if="detail.level == 2"><span class="fz24"></span>{{detail.courseCharge}} </view>
<view class="price colG" v-if="detail.chargeType == 0">免费</view> -->
</view>
<view class="footer-right">
<view class="btn-box acea-row row-between-wrapper" v-if="userInfo.phone != '' && teacherId != null && detail.haveSeller == 0 && detail.enterState == 0">
<view class="count-down">
<view>距离截止时间还剩</view>
<uni-countdown color="#F99C10" :day="day" :hour="hour" :minute="minute" :second="second" />
</view>
<view class="signin-btn" @click="signInClick(2)">立即报名</view>
</view>
<view class="btn-box acea-row row-between-wrapper" v-if="userInfo.phone != '' && detail.haveSeller == 1 && detail.enterState == 0">
<view class="btn-box acea-row row-between-wrapper" v-if="detail.enterState == 0">
<view class="count-down">
<view>距离截止时间还剩</view>
<uni-countdown color="#F99C10" :day="day" :hour="hour" :minute="minute" :second="second" />
</view>
<view class="signin-btn" @click="signInClick(2)">立即报名</view>
</view>
<view class="signin-btn call-btn default-btn" v-if="detail.enterState == 1 && detail.signState == 2" >已报名</view>
<!-- 在线直播 -->
<view class="signin-btn call-btn default-btn" v-if="detail.enterState == 1 && detail.status == 1 && detail.courseType == 1" @click="signInClick(3)" >立即观看</view>
<view class="signin-btn call-btn default-btn" v-if="detail.enterState == 1 && detail.status == 0" @click="signInClick(1)" >等待确认 联系服务老师</view>
<view class="signin-btn call-btn default-btn" v-if="detail.signState == 1" >已签到</view>
<view class="signin-btn call-btn"
@click="signInClick(1)"
v-if="userInfo.phone != '' && detail.haveSeller == 0 && detail.enterState == 0 && teacherId == null">
联系服务老师
</view>
<!-- #ifdef MP-WEIXIN -->
<button open-type="getPhoneNumber"
@getphonenumber="getPhoneNumber" v-if="userInfo.phone == '' && detail.haveSeller == 0 && detail.enterState == 0" class="binding signin-btn call-btn" v-else>
@getphonenumber="getPhoneNumber" v-if="userInfo.phone == '' " class="binding signin-btn call-btn" v-else>
<text>点击绑定手机号</text>
</button>
<!-- #endif -->
<!-- #ifndef MP-WEIXIN -->
<button class="binding" @click="goBindPhone()" v-if="userInfo.phone == '' && detail.haveSeller == 0">
<text>点击绑定手机号</text>
</button>
<!-- #endif -->
</view>
</view>
<view class="mask-box" v-if="maskDialog">
@ -348,7 +336,7 @@
let nowTime = Date.parse(new Date())/1000;
getCourseDetail({id:this.courseId}).then((res)=>{
uni.hideLoading()
res.data.courseIntroduce = res.data.courseIntroduce.replace(/\<img/g, "<img style='width: 100%;'")
//res.data.courseIntroduce = res.data.courseIntroduce.replace(/\<img/g, "<img style='width: 100%;'")
this.detail = res.data
let t = res.data.signEndTime.replace(/-/g, '/');
let endTime = Date.parse(new Date(t))/1000
@ -388,6 +376,13 @@
}
}
})
}else if(type == 3){
console.log("进入直播间");
let roomId = this.detail.roomId;
let customParams = encodeURIComponent(JSON.stringify({ path: 'pages/index/index', pid: 1 }))
wx.navigateTo({
url: `plugin-private://wx2b03c6e691cd7370/pages/live-player-plugin?room_id=${roomId}&custom_params=${customParams}`
})
} else{
this.sign()
}

14
pages/serviceTeacher/courseDetail.vue

@ -1,14 +1,14 @@
<template>
<view class="index-box">
<view class="swiper-box">
<image :src="detail.imageArr[0]" mode="aspectFill"></image>
<image :src="detail.coverImg" mode="aspectFill"></image>
</view>
<view class="course-detail-box">
<view class="course-name-box acea-row row-middle">
<view class="state-box colY" v-if="detail.courseState == 0">未开始</view>
<view class="state-box colG" v-if="detail.courseState == 1">进行中</view>
<view class="state-box colR" v-if="detail.courseState == 2">已结束</view>
<view class="state-box default" v-if="detail.courseState == 3">已取消</view>
<view class="state-box colY" v-if="detail.state == 0">未开始</view>
<view class="state-box colG" v-if="detail.state == 1">进行中</view>
<view class="state-box colR" v-if="detail.state == 2">已结束</view>
<view class="state-box default" v-if="detail.state == 3">已取消</view>
<view class="name">{{detail.courseName}}</view>
</view>
<!-- <view class="desc">{{detail.courseIntroduce}}</view> -->
@ -146,7 +146,7 @@
})
},
toAddMemeber(){
if(this.detail.courseState == 2 || this.detail.courseState == 3){
if(this.detail.state == 2 || this.detail.state == 3){
uni.showToast({
title:'课程已结束!',
icon:'none'
@ -162,7 +162,7 @@
},
submitPlace(){
let courseMemberList = this.detail.courseMemberList;
if(this.detail.courseState == 2 || this.detail.courseState == 3){
if(this.detail.state == 2 || this.detail.state == 3){
uni.showToast({
title:'课程已结束!',
icon:'none'

Loading…
Cancel
Save