增加腾讯视频插件
This commit is contained in:
		| @@ -4,7 +4,7 @@ let apps = {list: [], desc: "用于产品库主页面获取应用使用", type: | |||||||
| const getFileInfo = (app, file) => { | const getFileInfo = (app, file) => { | ||||||
|   if (/^App/.test(app.name)) { |   if (/^App/.test(app.name)) { | ||||||
|     let {name, label} = app, |     let {name, label} = app, | ||||||
|         path = app.path.replace(/.+[\\\/]([^\\\/]+)[\\\/]([^\\\/]+)$/g, `/mods/$1/$2`) |       path = app.path.replace(/.+[\\\/]([^\\\/]+)[\\\/]([^\\\/]+)$/g, `/mods/$1/$2`) | ||||||
|     apps.list.push({ |     apps.list.push({ | ||||||
|       id: file.replace(/\.\/?(vue)?/g, '')?.replace(/[\\\/]/g, '_'), |       id: file.replace(/\.\/?(vue)?/g, '')?.replace(/[\\\/]/g, '_'), | ||||||
|       name, |       name, | ||||||
| @@ -36,7 +36,8 @@ const start = () => { | |||||||
|       navigationBarBackgroundColor: "#4181FF", |       navigationBarBackgroundColor: "#4181FF", | ||||||
|       "mp-weixin": { |       "mp-weixin": { | ||||||
|         "usingComponents": { |         "usingComponents": { | ||||||
|           "cell": "plugin://materialPlugin/cell" |           "cell": "plugin://materialPlugin/cell", | ||||||
|  |           "qplayer": "plugin://player/video" | ||||||
|         } |         } | ||||||
|       } |       } | ||||||
|     } |     } | ||||||
|   | |||||||
| @@ -22,8 +22,15 @@ | |||||||
|       "materialPlugin": { |       "materialPlugin": { | ||||||
|         "version": "1.0.5", |         "version": "1.0.5", | ||||||
|         "provider": "wx4d2deeab3aed6e5a" |         "provider": "wx4d2deeab3aed6e5a" | ||||||
|  |       }, | ||||||
|  |       "player": { | ||||||
|  |         "version": "2.1.15", | ||||||
|  |         "provider": "wxa75efa648b60994b" | ||||||
|       } |       } | ||||||
|     }, |     }, | ||||||
|     "requiredPrivateInfos" : ["getLocation", "chooseLocation"] |     "requiredPrivateInfos": [ | ||||||
|  |       "getLocation", | ||||||
|  |       "chooseLocation" | ||||||
|  |     ] | ||||||
|   } |   } | ||||||
| } | } | ||||||
|   | |||||||
| @@ -17,13 +17,13 @@ | |||||||
|       <div class="comment" @click="showComment = true;getComment()"> |       <div class="comment" @click="showComment = true;getComment()"> | ||||||
|         <img src="https://cdn.cunwuyun.cn/qujing/message.png" alt=""> |         <img src="https://cdn.cunwuyun.cn/qujing/message.png" alt=""> | ||||||
|         <div class="comm_num"> |         <div class="comm_num"> | ||||||
|           <span>{{ data.msgCount || 0}}</span><span v-show="data.msgCount > 999">+</span> |           <span>{{ data.msgCount || 0 }}</span><span v-show="data.msgCount > 999">+</span> | ||||||
|         </div> |         </div> | ||||||
|       </div> |       </div> | ||||||
|     </div> |     </div> | ||||||
|  |  | ||||||
|     <u-popup v-model="showComment" mode="bottom" border-radius="32"> |     <u-popup v-model="showComment" mode="bottom" border-radius="32"> | ||||||
| 			<h4 class="message_num">共{{ data.msgCount }}条评论</h4> |       <h4 class="message_num">共{{ data.msgCount }}条评论</h4> | ||||||
|       <scroll-view scroll-y="true" @scrolltolower="scrollLower" class="comment_box" v-if="commentList.length"> |       <scroll-view scroll-y="true" @scrolltolower="scrollLower" class="comment_box" v-if="commentList.length"> | ||||||
|         <div class="comment_card" v-for="item in commentList" :key="item.id"> |         <div class="comment_card" v-for="item in commentList" :key="item.id"> | ||||||
|           <div class="avatar"> |           <div class="avatar"> | ||||||
| @@ -44,10 +44,10 @@ | |||||||
|       <div class="comm_input_btn" @click="showSend = true,showComment= false"> |       <div class="comm_input_btn" @click="showSend = true,showComment= false"> | ||||||
|         <div>我来说两句...</div> |         <div>我来说两句...</div> | ||||||
|       </div> |       </div> | ||||||
| 		</u-popup> |     </u-popup> | ||||||
|  |  | ||||||
|     <u-popup v-model="showSend" mode="bottom" border-radius="32"> |     <u-popup v-model="showSend" mode="bottom" border-radius="32"> | ||||||
| 			<div class="send_box"> |       <div class="send_box"> | ||||||
|         <div class="text"> |         <div class="text"> | ||||||
|           <textarea |           <textarea | ||||||
|               @blur="height = 0" |               @blur="height = 0" | ||||||
| @@ -61,7 +61,7 @@ | |||||||
|         </div> |         </div> | ||||||
|         <div class="send_btn" @click="sendComment">发送</div> |         <div class="send_btn" @click="sendComment">发送</div> | ||||||
|       </div> |       </div> | ||||||
| 		</u-popup> |     </u-popup> | ||||||
|   </div> |   </div> | ||||||
| </template> | </template> | ||||||
|  |  | ||||||
| @@ -87,64 +87,64 @@ export default { | |||||||
|   }, |   }, | ||||||
|   methods: { |   methods: { | ||||||
|     getDetail() { |     getDetail() { | ||||||
|       this.$instance.post(`/app/appcourseinfo/queryDetailById?id=${this.id}`).then(res=> { |       this.$instance.post(`/app/appcourseinfo/queryDetailById?id=${this.id}`).then(res => { | ||||||
|         if(res?.data) { |         if (res?.data) { | ||||||
|           this.data = res.data |           this.data = res.data | ||||||
|         } |         } | ||||||
|       }).catch(err=> this.$u.toast(err.msg)) |       }).catch(err => this.$u.toast(err.msg)) | ||||||
|     }, |     }, | ||||||
|     // 评论集合 |     // 评论集合 | ||||||
|     getComment() { |     getComment() { | ||||||
|       this.$instance.post(`/app/appcoursecomment/listByApplet`,null,{ |       this.$instance.post(`/app/appcoursecomment/listByApplet`, null, { | ||||||
|         params: { |         params: { | ||||||
|           current: this.current, |           current: this.current, | ||||||
|           size: 10, |           size: 10, | ||||||
|           courseId: this.data.id, |           courseId: this.data.id, | ||||||
|         } |         } | ||||||
|       }).then(res=> { |       }).then(res => { | ||||||
|         if(res?.data) { |         if (res?.data) { | ||||||
|           this.commentList = this.current==1? res.data.records: [...this.commentList,...res.data.records] |           this.commentList = this.current == 1 ? res.data.records : [...this.commentList, ...res.data.records] | ||||||
|         } |         } | ||||||
|       }) |       }) | ||||||
|     }, |     }, | ||||||
|     // 新增评论 |     // 新增评论 | ||||||
|     sendComment() { |     sendComment() { | ||||||
|       if(this.flag) return |       if (this.flag) return | ||||||
|  |  | ||||||
|       if(!this.content) { |       if (!this.content) { | ||||||
|         return this.$u.toast('请输入内容') |         return this.$u.toast('请输入内容') | ||||||
|       } |       } | ||||||
|  |  | ||||||
|       this.flag = true |       this.flag = true | ||||||
|       this.$instance.post(`/app/appcoursecomment/add`,{ |       this.$instance.post(`/app/appcoursecomment/add`, { | ||||||
|         courseId: this.data.id, |         courseId: this.data.id, | ||||||
|         content: this.content, |         content: this.content, | ||||||
|         type: '1' |         type: '1' | ||||||
|       }).then(res=> { |       }).then(res => { | ||||||
|         if(res.code==0) { |         if (res.code == 0) { | ||||||
|           this.flag = false |           this.flag = false | ||||||
|           this.showSend = false |           this.showSend = false | ||||||
|           this.content = '' |           this.content = '' | ||||||
|           this.getComment() |           this.getComment() | ||||||
|           this.getDetail() |           this.getDetail() | ||||||
|         } |         } | ||||||
|       }).catch(err=> { |       }).catch(err => { | ||||||
|         this.flag = false |         this.flag = false | ||||||
|         this.showSend = false |         this.showSend = false | ||||||
|         this.$u.toast(err.msg) |         this.$u.toast(err.msg) | ||||||
|       }) |       }) | ||||||
|     }, |     }, | ||||||
|     stop() { |     stop() { | ||||||
|       this.$instance.post(`/app/appcourseinfo/stopLearnById`,null,{ |       this.$instance.post(`/app/appcourseinfo/stopLearnById`, null, { | ||||||
|         params: { |         params: { | ||||||
|           id: this.data.id, |           id: this.data.id, | ||||||
|           recordId: this.data.recordId |           recordId: this.data.recordId | ||||||
|         } |         } | ||||||
|       }).then(res=> { |       }).then(res => { | ||||||
|         if(res.code==0) { |         if (res.code == 0) { | ||||||
|           console.log(res.msg); |           console.log(res.msg); | ||||||
|         } |         } | ||||||
|       }).catch(err=> this.$u.toast(err.msg)) |       }).catch(err => this.$u.toast(err.msg)) | ||||||
|     }, |     }, | ||||||
|     keyboard(e) { |     keyboard(e) { | ||||||
|       console.log(e.detail.height); |       console.log(e.detail.height); | ||||||
| @@ -164,6 +164,7 @@ export default { | |||||||
| .classDetail { | .classDetail { | ||||||
|   padding-bottom: 140px; |   padding-bottom: 140px; | ||||||
|   box-sizing: border-box; |   box-sizing: border-box; | ||||||
|  |  | ||||||
|   .media { |   .media { | ||||||
|     img { |     img { | ||||||
|       width: 100%; |       width: 100%; | ||||||
| @@ -211,7 +212,7 @@ export default { | |||||||
|     box-sizing: border-box; |     box-sizing: border-box; | ||||||
|     display: flex; |     display: flex; | ||||||
|     align-items: center; |     align-items: center; | ||||||
|      |  | ||||||
|     .input_btn { |     .input_btn { | ||||||
|       width: 87%; |       width: 87%; | ||||||
|       height: 80px; |       height: 80px; | ||||||
| @@ -228,6 +229,7 @@ export default { | |||||||
|  |  | ||||||
|     .comment { |     .comment { | ||||||
|       position: relative; |       position: relative; | ||||||
|  |  | ||||||
|       img { |       img { | ||||||
|         width: 48px; |         width: 48px; | ||||||
|         height: 48px; |         height: 48px; | ||||||
| @@ -251,13 +253,14 @@ export default { | |||||||
|     line-height: 100px; |     line-height: 100px; | ||||||
|     text-align: center; |     text-align: center; | ||||||
|     font-weight: 400; |     font-weight: 400; | ||||||
|     font-size: 28rpx; |     font-size: 28px; | ||||||
|     color: #333333; |     color: #333333; | ||||||
|   } |   } | ||||||
|  |  | ||||||
|   .comment_box { |   .comment_box { | ||||||
|     width: 100%; |     width: 100%; | ||||||
|     max-height: 60vh; |     max-height: 60vh; | ||||||
|  |  | ||||||
|     .comment_card { |     .comment_card { | ||||||
|       display: flex; |       display: flex; | ||||||
|       padding: 24px 32px; |       padding: 24px 32px; | ||||||
| @@ -287,6 +290,7 @@ export default { | |||||||
|             font-size: 28px; |             font-size: 28px; | ||||||
|             color: #333333; |             color: #333333; | ||||||
|           } |           } | ||||||
|  |  | ||||||
|           .avatar_time { |           .avatar_time { | ||||||
|             font-weight: 400; |             font-weight: 400; | ||||||
|             font-size: 26px; |             font-size: 26px; | ||||||
| @@ -297,18 +301,20 @@ export default { | |||||||
|         .comm_content { |         .comm_content { | ||||||
|           margin-top: 8px; |           margin-top: 8px; | ||||||
|           font-weight: 400; |           font-weight: 400; | ||||||
|           font-size: 32rpx; |           font-size: 32px; | ||||||
|           color: #333333; |           color: #333333; | ||||||
|         } |         } | ||||||
|       } |       } | ||||||
|     } |     } | ||||||
|   } |   } | ||||||
|  |  | ||||||
|   .comm_input_btn { |   .comm_input_btn { | ||||||
|     width: 100%; |     width: 100%; | ||||||
|     height: 128px; |     height: 128px; | ||||||
|     background: #fff; |     background: #fff; | ||||||
|     padding: 24px 32px; |     padding: 24px 32px; | ||||||
|     box-sizing: border-box; |     box-sizing: border-box; | ||||||
|  |  | ||||||
|     div { |     div { | ||||||
|       width: 100%; |       width: 100%; | ||||||
|       height: 80px; |       height: 80px; | ||||||
| @@ -322,7 +328,7 @@ export default { | |||||||
|       color: #666666; |       color: #666666; | ||||||
|     } |     } | ||||||
|   } |   } | ||||||
|    |  | ||||||
|  |  | ||||||
|   .send_box { |   .send_box { | ||||||
|     display: flex; |     display: flex; | ||||||
| @@ -330,8 +336,9 @@ export default { | |||||||
|     align-items: center; |     align-items: center; | ||||||
|     padding: 32px; |     padding: 32px; | ||||||
|     box-sizing: border-box; |     box-sizing: border-box; | ||||||
|  |  | ||||||
|     .text { |     .text { | ||||||
|       textarea {  |       textarea { | ||||||
|         background: #F4F5FA; |         background: #F4F5FA; | ||||||
|         border-radius: 16px; |         border-radius: 16px; | ||||||
|         padding: 16px; |         padding: 16px; | ||||||
| @@ -340,13 +347,14 @@ export default { | |||||||
|         width: 80vw; |         width: 80vw; | ||||||
|       } |       } | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     .send_btn { |     .send_btn { | ||||||
|       width: 80px; |       width: 80px; | ||||||
|       height: 80px; |       height: 80px; | ||||||
|       line-height: 80px; |       line-height: 80px; | ||||||
|       text-align: right; |       text-align: right; | ||||||
|       font-weight: 500; |       font-weight: 500; | ||||||
|       font-size: 34rpx; |       font-size: 34px; | ||||||
|       color: #2D7DFF; |       color: #2D7DFF; | ||||||
|     } |     } | ||||||
|   } |   } | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user