Commit af0d263a by kyle

Merge branch '20221121' into dev

parents 6c722c6b c225c30c
...@@ -15,8 +15,14 @@ ...@@ -15,8 +15,14 @@
<strong>{{dataList.coursePrice}}</strong> <strong>{{dataList.coursePrice}}</strong>
<text>{{dataList.salesNumber}}人购买</text> <text>{{dataList.salesNumber}}人购买</text>
</view> </view>
<view class="tagListBox" v-if="tagList"> <view class="tagListBox" v-if="tagList || fileLecturerId">
<template v-if="tagList">
<view class="tagItem" v-for="tagItem in tagConcat(tagList.v1,tagList.v2)">{{tagItem}}</view> <view class="tagItem" v-for="tagItem in tagConcat(tagList.v1,tagList.v2)">{{tagItem}}</view>
</template>
<template v-else-if="_tagList">
<view class="tagItem" v-for="tagItem in tagConcat(_tagList.v1,_tagList.v2)">{{tagItem}}</view>
</template>
</view> </view>
</view> </view>
</view> </view>
...@@ -27,11 +33,8 @@ ...@@ -27,11 +33,8 @@
export default { export default {
name:"courseItem", name:"courseItem",
props:{ props:{
courseInfoItem:{
type:Object
},
fileLecturerId:{ fileLecturerId:{
type:String type:Number
}, },
thumbnailPath:{ thumbnailPath:{
type:String type:String
...@@ -54,11 +57,10 @@ ...@@ -54,11 +57,10 @@
tagList:{ tagList:{
type:Object type:Object
} }
}, },
data() { data() {
return { return {
_tagList:{}
}; };
}, },
methods:{ methods:{
...@@ -80,15 +82,20 @@ ...@@ -80,15 +82,20 @@
}, },
lecturerQuery(){ lecturerQuery(){
api.lecturerQuery({id:this.fileLecturerId}).then(res=>{ api.lecturerQuery({id:this.fileLecturerId}).then(res=>{
console.log(res); if(res['success']){
this._tagList['v1'] = res['data']['lecturerInfos'][0]['lecturerRankNames'];
this._tagList['v2'] = res['data']['lecturerInfos'][0]['lecturerName'];
}
}) })
} }
}, },
mounted() { updated() {
console.log(this.fileLecturerId,66666) if(this.fileLecturerId){
console.log(this.courseInfoItem) this.lecturerQuery()
} }
},
mounted() {}
} }
</script> </script>
......
...@@ -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}" :fileLecturerId="courseInfoItem.fileLecturerId" :courseInfoItem="courseInfoItem"></course-item> <course-item :thumbnailPath="courseInfoItem.displayImage" :title="courseInfoItem.fileTitle" :summaryBox="courseInfoItem.fileSynopsis" :dataList="{coursePrice:courseInfoItem.coursePrice,salesNumber:courseInfoItem.salesNumber}" :fileLecturerId="courseInfoItem.fileLecturerId"></course-item>
</view> </view>
</template> </template>
<!-- 价格明细 --> <!-- 价格明细 -->
...@@ -197,9 +197,7 @@ ...@@ -197,9 +197,7 @@
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)
} }
}) })
}, },
......
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