Commit 1495f4ac by kyle

课程详情

parent ce12c0a7
...@@ -3,39 +3,54 @@ ...@@ -3,39 +3,54 @@
export default { export default {
onLaunch: function() { onLaunch: function() {
console.log('App Launch'); console.log('App Launch');
uni.getSystemInfo({ uni.downloadFile({
success:(systemInfo)=> { url: '/cffpUpdate/__UNI__65C4CDC.wgt',
uni.request({ success: (downloadResult) => {
url: '/api/appVersion/checkIsUpdate', if (downloadResult.statusCode === 200) {
method:'POST', plus.runtime.install(downloadResult.tempFilePath, {
data: { force: true
appType: 1, }, function() {
version: systemInfo.appVersion, console.log('install success...');
systemType:systemInfo.osName === 'android' ? 1 : 2 plus.runtime.restart();
}, }, function(e) {
success: (result) => { console.error('install fail...');
const data = result.data.data['appVersionInfo']; });
if (data.isForceUpdate && data.wgtUrl) { }
uni.downloadFile({ }
url: data.wgtUrl, });
success: (downloadResult) => { // uni.getSystemInfo({
if (downloadResult.statusCode === 200) { // success:(systemInfo)=> {
plus.runtime.install(downloadResult.tempFilePath, { // uni.request({
force: false // url: '/api/appVersion/checkIsUpdate',
}, function() { // method:'POST',
console.log('install success...'); // data: {
plus.runtime.restart(); // appType: 1,
}, function(e) { // version: systemInfo.appVersion,
console.error('install fail...'); // systemType:systemInfo.osName.toLowerCase() === 'ios' ? 2 : 1
}); // },
} // success: (result) => {
} // const data = result.data.data['appVersionInfo'];
}); // if (data.isForceUpdate && data.wgtUrl) {
} // uni.downloadFile({
} // url: data.wgtUrl,
}); // success: (downloadResult) => {
} // if (downloadResult.statusCode === 200) {
}) // plus.runtime.install(downloadResult.tempFilePath, {
// force: true
// }, function() {
// console.log('install success...');
// plus.runtime.restart();
// }, function(e) {
// console.error('install fail...');
// });
// }
// }
// });
// }
// }
// });
// }
// })
initApp() initApp()
}, },
onShow: function() { onShow: function() {
......
...@@ -23,9 +23,16 @@ ...@@ -23,9 +23,16 @@
</template> </template>
<script> <script>
import api from "@/api/api";
export default { export default {
name:"courseItem", name:"courseItem",
props:{ props:{
courseInfoItem:{
type:Object
},
fileLecturerId:{
type:String
},
thumbnailPath:{ thumbnailPath:{
type:String type:String
}, },
...@@ -35,9 +42,6 @@ ...@@ -35,9 +42,6 @@
summaryBox:{ summaryBox:{
type:String type:String
}, },
tagList:{
type:Object
},
dataList:{ dataList:{
type:Object type:Object
}, },
...@@ -46,6 +50,9 @@ ...@@ -46,6 +50,9 @@
}, },
orderId:{ orderId:{
type:Number type:Number
},
tagList:{
type:Object
} }
}, },
...@@ -70,7 +77,17 @@ ...@@ -70,7 +77,17 @@
uni.navigateTo({ uni.navigateTo({
url:`/pages/orderDetail/orderDetail?id=${this.orderId}&type=drop` url:`/pages/orderDetail/orderDetail?id=${this.orderId}&type=drop`
}) })
},
lecturerQuery(){
api.lecturerQuery({id:this.fileLecturerId}).then(res=>{
console.log(res);
})
} }
},
mounted() {
console.log(this.fileLecturerId,66666)
console.log(this.courseInfoItem)
} }
} }
</script> </script>
......
...@@ -2,8 +2,8 @@ ...@@ -2,8 +2,8 @@
"name" : "CFFP财富中心", "name" : "CFFP财富中心",
"appid" : "__UNI__65C4CDC", "appid" : "__UNI__65C4CDC",
"description" : "", "description" : "",
"versionName" : "1.1.10", "versionName" : "1.1.12",
"versionCode" : "100", "versionCode" : "102",
"transformPx" : false, "transformPx" : false,
/* 5+App特有相关 */ /* 5+App特有相关 */
"app-plus" : { "app-plus" : {
......
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
<view class="returnDetailContainer"> <view class="returnDetailContainer">
<h4>退款详情</h4> <h4>退款详情</h4>
<template v-if="courseInfoItem"> <template v-if="courseInfoItem">
<course-item :thumbnailPath="courseInfoItem.displayImage" :title="courseInfoItem.fileTitle" :summaryBox="courseInfoItem.fileSynopsis" :dataList="{coursePrice:courseInfoItem.coursePrice,salesNumber:courseInfoItem.salesNumber}" :tagList="{v1:courseInfoItem.fileLecturerRanks,v2:courseInfoItem.fileLecturerName}"></course-item> <course-item :thumbnailPath="courseInfoItem.displayImage" :title="courseInfoItem.fileTitle" :summaryBox="courseInfoItem.fileSynopsis" :dataList="{coursePrice:courseInfoItem.coursePrice,salesNumber:courseInfoItem.salesNumber}" :fileLecturerId="item.fileLecturerId"></course-item>
</template> </template>
<view class="returnInfoContent"> <view class="returnInfoContent">
<view> <view>
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<view class="container"> <view class="container">
<view class="ulBox"> <view class="ulBox">
<view class="liBox" v-for="item in userCourses" :key="item.orderId"> <view class="liBox" v-for="item in userCourses" :key="item.orderId">
<course-item :thumbnailPath="item.displayImage" :title="item.fileTitle" :summaryBox="item.fileSynopsis" :dataList="{coursePrice:item.coursePrice,salesNumber:item.salesNumber}" :tagList="{v1:item.fileLecturerRanks,v2:item.fileLecturerName}"></course-item> <course-item :thumbnailPath="item.displayImage" :title="item.fileTitle" :summaryBox="item.fileSynopsis" :dataList="{coursePrice:item.coursePrice,salesNumber:item.salesNumber}" :fileLecturerId="item.fileLecturerId"></course-item>
<view class="statusBox"> <view class="statusBox">
<text>{{item.orderStatusName}}</text> <text>{{item.orderStatusName}}</text>
<text @click="goDetail(item)">查看详情></text> <text @click="goDetail(item)">查看详情></text>
......
<template> <template>
<view class="container"> <view class="container">
<view class="classInfo"> <view class="classInfo">
<course-item :thumbnailPath="courseInfoItem.displayImage" :title="courseInfoItem.fileTitle" :summaryBox="courseInfoItem.fileSynopsis" :dataList="{coursePrice:courseInfoItem.coursePrice,salesNumber:courseInfoItem.salesNumber}" :tagList="{v1:courseInfoItem.fileLecturerRanks,v2:courseInfoItem.fileLecturerName}"></course-item> <course-item :thumbnailPath="courseInfoItem.displayImage" :title="courseInfoItem.fileTitle" :summaryBox="courseInfoItem.fileSynopsis" :dataList="{coursePrice:courseInfoItem.coursePrice,salesNumber:courseInfoItem.salesNumber}" :fileLecturerId="item.fileLecturerId"></course-item>
</view> </view>
<!-- 订单支付明细 --> <!-- 订单支付明细 -->
<view class="payInfoBox"> <view class="payInfoBox">
......
...@@ -34,10 +34,13 @@ ...@@ -34,10 +34,13 @@
</view> </view>
<!-- 相关课程列表 --> <!-- 相关课程列表 -->
<view class="relationCourseListsContent" v-show="tabType===2"> <view class="relationCourseListsContent" v-show="tabType===2">
<view class="totalCourseCount">{{relatedCoursesLists ? relatedCoursesLists.length : 0}}</view> <view class="totalCourseCount">
<text v-if="requiredCount">{{requiredCount}}节必修</text>
<text v-if="nonRequiredCount">{{nonRequiredCount}}节必修</text>
</view>
<view class="courseItemContent" v-for="(item,index) in relatedCoursesLists" :key="item.fileId"> <view class="courseItemContent" v-for="(item,index) in relatedCoursesLists" :key="item.fileId">
<view class="courseInfoContent"> <view class="courseInfoContent">
<h4>{{index + 1}}.{{item.fileTitle}}</h4> <h4>{{index + 1}}.{{item.fileTitle}}<text class="courseType">{{item.fileType=='1' ? '必修' : '选修'}}</text></h4>
<view class="timeContent"> <view class="timeContent">
<view class="">00:00/{{secondsTransferPipe(Number(item.courseTotalTime))}}</view> <view class="">00:00/{{secondsTransferPipe(Number(item.courseTotalTime))}}</view>
</view> </view>
...@@ -91,7 +94,9 @@ ...@@ -91,7 +94,9 @@
shareUserId:'', shareUserId:'',
shareCode:'', shareCode:'',
shareReadId:'', shareReadId:'',
dataSource:'1' dataSource:'1',
requiredCount:0,
nonRequiredCount:0
}; };
}, },
methods:{ methods:{
...@@ -163,7 +168,9 @@ ...@@ -163,7 +168,9 @@
api.relatedCoursesList({fileId:this.fileId}).then(res=>{ api.relatedCoursesList({fileId:this.fileId}).then(res=>{
console.log('相关课程详情',res); console.log('相关课程详情',res);
if(res['success']){ if(res['success']){
this.relatedCoursesLists = res['data']['data']; this.relatedCoursesLists = res['data']['data']['relatedCourseList'];
this.nonRequiredCount = res['data']['data']['nonRequiredCount'];
this.requiredCount = res['data']['data']['requiredCount'];
console.log(this.relatedCoursesLists) console.log(this.relatedCoursesLists)
} }
}) })
...@@ -291,6 +298,14 @@ ...@@ -291,6 +298,14 @@
box-sizing: border-box; box-sizing: border-box;
} }
.relationCourseListsContent{ .relationCourseListsContent{
.courseType{
background-color: #5359CD;
color: #fff;
border-radius: 2rpx;
padding: 2rpx 10rpx;
font-size: 16rpx;
margin-left: 10rpx;
}
.totalCourseCount{ .totalCourseCount{
color: #20269B; color: #20269B;
font-size: 1rem; font-size: 1rem;
......
...@@ -69,11 +69,11 @@ ...@@ -69,11 +69,11 @@
return [].concat(v2,val) return [].concat(v2,val)
} }
}, },
getCourseList: function(res){ getCourseList(res){
console.log("res=========",res) console.log("res=========",res)
this.queryName = res; this.queryName = res;
this.courseList() this.courseList()
} }
}, },
mounted() { mounted() {
this.courseList(); this.courseList();
......
...@@ -42,7 +42,7 @@ ...@@ -42,7 +42,7 @@
<view class="shareOrderInfoItem" v-for="item in userShareCourses" :key="item.fileId"> <view class="shareOrderInfoItem" v-for="item in userShareCourses" :key="item.fileId">
<view class="timeBox">{{item.shareDate}}</view> <view class="timeBox">{{item.shareDate}}</view>
<view class="courseInfoContent"> <view class="courseInfoContent">
<course-item :thumbnailPath="item.displayImage" :title="item.fileTitle" :summaryBox="item.fileSynopsis" :dataList="{coursePrice:item.coursePrice,salesNumber:item.salesNumber}" :tagList="{v1:item.fileLecturerRanks,v2:item.fileLecturerName}"></course-item> <course-item :thumbnailPath="item.displayImage" :title="item.fileTitle" :summaryBox="item.fileSynopsis" :dataList="{coursePrice:item.coursePrice,salesNumber:item.salesNumber}" :fileLecturerId="item.fileLecturerId"></course-item>
</view> </view>
<view class="countsContent" @click="goDetail(item.fileId)"> <view class="countsContent" @click="goDetail(item.fileId)">
<view> <view>
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<!-- 课程详情 --> <!-- 课程详情 -->
<template v-if="courseInfoItem"> <template v-if="courseInfoItem">
<view class="courseItemBox"> <view class="courseItemBox">
<course-item :thumbnailPath="courseInfoItem.displayImage" :title="courseInfoItem.fileTitle" :summaryBox="courseInfoItem.fileSynopsis" :dataList="{coursePrice:courseInfoItem.coursePrice,salesNumber:courseInfoItem.salesNumber}" :tagList="{v1:courseInfoItem.fileLecturerRanks,v2:courseInfoItem.fileLecturerName}"></course-item> <course-item :thumbnailPath="courseInfoItem.displayImage" :title="courseInfoItem.fileTitle" :summaryBox="courseInfoItem.fileSynopsis" :dataList="{coursePrice:courseInfoItem.coursePrice,salesNumber:courseInfoItem.salesNumber}" :fileLecturerId="courseInfoItem.fileLecturerId" :courseInfoItem="courseInfoItem"></course-item>
</view> </view>
</template> </template>
<!-- 价格明细 --> <!-- 价格明细 -->
...@@ -144,7 +144,7 @@ ...@@ -144,7 +144,7 @@
}, },
deductionCore(){ deductionCore(){
if(this.courseInfoItem.coursePrice / this.intergralInfo.preFortune < this.intergralInfo.yesExchangeFortune){ if(this.courseInfoItem.coursePrice / this.intergralInfo.preFortune < this.intergralInfo.yesExchangeFortune){
return (this.courseInfoItem.coursePrice / this.intergralInfo.preFortune).toFixed(2) return parseFloat((this.courseInfoItem.coursePrice / this.intergralInfo.preFortune)).toFixed(2)
}else{ }else{
return this.intergralInfo.yesExchangeFortune return this.intergralInfo.yesExchangeFortune
} }
...@@ -197,7 +197,9 @@ ...@@ -197,7 +197,9 @@
api.courseDetail({fileId:this.fileId,userId:1}).then(res=>{ api.courseDetail({fileId:this.fileId,userId:1}).then(res=>{
console.log('课程详情',res); console.log('课程详情',res);
if(res['success']){ if(res['success']){
console.log(res, 4567)
this.courseInfoItem = res['data']['data']; this.courseInfoItem = res['data']['data'];
console.log(this.courseInfoItem,55555)
} }
}) })
}, },
...@@ -243,14 +245,14 @@ ...@@ -243,14 +245,14 @@
} }
}, },
onLoad(option){ onLoad(option){
console.log(option)
this.fileId = option.fileId; this.fileId = option.fileId;
this.orderId = option.orderId; this.orderId = option.orderId;
this.courseDetail();
this.queryByUserIdFortuneStatistic()
}, },
mounted() { mounted() {
this.courseDetail();
this.queryByUserIdFortuneStatistic()
} }
} }
</script> </script>
......
...@@ -46,10 +46,10 @@ ...@@ -46,10 +46,10 @@
<template v-if="userCourses && tabType===1"> <template v-if="userCourses && tabType===1">
<view class="saleOrderInfoItem" v-for="item in userCourses" :key="item.fileId"> <view class="saleOrderInfoItem" v-for="item in userCourses" :key="item.fileId">
<view class="courseInfoContent"> <view class="courseInfoContent">
<course-item :thumbnailPath="item.displayImage" :title="item.fileTitle" :summaryBox="item.fileSynopsis" :dataList="{coursePrice:item.coursePrice,salesNumber:item.salesNumber}" :tagList="{v1:item.fileLecturerRanks,v2:item.fileLecturerName}" :isNeedViewDetail="true" :orderId="item.orderId"></course-item> <course-item :thumbnailPath="item.displayImage" :title="item.fileTitle" :summaryBox="item.fileSynopsis" :dataList="{coursePrice:item.coursePrice,salesNumber:item.salesNumber}" :fileLecturerId="item.fileLecturerId" :isNeedViewDetail="true" :orderId="item.orderId"></course-item>
</view> </view>
<view class="countsContent"> <view class="countsContent">
<text>实际支付:¥{{item.paymentAmount.toFixed(2)}}</text> <text>实际支付:¥{{parseFloat(item.paymentAmount).toFixed(2)}}</text>
</view> </view>
</view> </view>
</template> </template>
......
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