yujialong 3 months ago
parent 4831798670
commit d2e07d8a6c
  1. 174
      course/courseDetail/courseDetail.vue
  2. 3
      course/practiceDetail/practiceDetail.vue
  3. 2
      pages/index/index.vue
  4. 4
      pages/login/login.vue
  5. BIN
      static/image/arrow-down.png
  6. BIN
      static/image/login1.png
  7. BIN
      static/image/login2.png
  8. BIN
      static/image/none.png
  9. BIN
      static/image/person-bg.png
  10. 4
      user/reg/reg.vue

@ -1,26 +1,31 @@
<template>
<view class="wrap">
<view class="file-wrap">
<image v-if="curRow.isPic" class="pic" :src="curRow.fileUrl" mode="widthFix"></image>
<video v-else-if="curRow.isVideo" class="video" :key="curRow.fileUrl" width="100%" height="100%" autoplay controls :src="curRow.fileUrl" type="video/mp4" @fullscreenchange="fullScreenChange"></video>
<!-- -->
<cover-view v-if="videoFullScreen" class="select-epi">
<!-- <web-view class="wv" src="https://view.officeapps.live.com/op/view.aspx?src=https://huoran.oss-cn-shenzhen.aliyuncs.com/1732588133977.xlsx"></web-view> -->
<view v-if="curRow.fileUrl" class="file-wrap">
<image v-if="curRow.isPic" class="pic" :src="curRow.fileUrl" mode="widthFix" @click="hidePlayList"></image>
<video v-else-if="curRow.isVideo" class="video" :key="curRow.fileUrl" width="100%" height="100%" autoplay controls :src="curRow.fileUrl" type="video/mp4" @click="hidePlayList" @fullscreenchange="fullScreenChange"></video>
<web-view v-else-if="curRow.isDoc" class="webview" :webview-styles="webviewStyles" :fullscreen="false" :src="curRow.fileUrl" @click="hidePlayList"></web-view>
<!-- <web-view v-else-if="curRow.isDoc" class="webview" :webview-styles="webviewStyles" :fullscreen="false" src="https://huoran.oss-cn-shenzhen.aliyuncs.com/1732589800544.xlsx"></web-view> -->
<cover-view v-show="!playListVisible" class="select-epi">
<cover-image class="icon" src="https://eduvessel.com/images/occupationlab/list.png" mode="widthFix" @click="showPlayList" />
</cover-view>
<cover-view v-if="chapterList.length && playListVisible" class="chapters-full">
<cover-view v-show="chapterList.length && playListVisible" :class="['chapters-full', {'full-screen': videoFullScreen}]">
<cover-image class="close" src="https://eduvessel.com/images/occupationlab/close.png" mode="widthFix" @click="hidePlayList" />
<cover-view class="chapters-scroll">
<cover-view v-for="(item, i) in chapterList" :key="i" class="chapter">
<cover-view class="chapterName">{{ item.name }}</cover-view>
<cover-view class="section" v-if="item.subsectionList.length">
<cover-view v-for="(section, j) in item.subsectionList" :key="j"class="sectionName" :class="{ active: curLink === `${item.name}${section.name}` }" @click="secClick(section, item)">
<cover-image v-if="section.fileType === 'pptx'" class="ext" src="https://izhixinyun.com/images/exts/ppt.png" alt="" />
<cover-image v-else-if="section.fileType === 'mp4'" class="ext" src="https://izhixinyun.com/images/exts/video.png" alt="" />
<cover-view v-for="(section, j) in item.subsectionList" :key="j"class="sectionName" :class="{ active: curRow.id === section.id }" @click="secClick(section, item)">
<cover-image v-if="section.fileType === 'pptx'" class="ext" src="https://izhixinyun.com/images/exts/ppt.png" alt="" mode="widthFix" />
<cover-image v-else-if="section.fileType === 'mp4'" class="ext" src="https://izhixinyun.com/images/exts/video.png" alt="" mode="widthFix" />
<cover-image v-else-if="section.fileType === 'doc' || section.fileType === 'docx'" class="ext"
src="https://izhixinyun.com/images/exts/word.png" alt="" />
<cover-image v-else-if="section.fileType === 'txt'" class="ext" src="https://izhixinyun.com/images/exts/txt.png" alt="" />
<cover-image v-else-if="section.fileType === 'pdf'" class="ext" src="https://izhixinyun.com/images/exts/pdf.png" alt="" />
<cover-image v-else class="ext" src="https://izhixinyun.com/images/exts/pic.png" alt="" />
src="https://izhixinyun.com/images/exts/word.png" alt="" mode="widthFix" />
<cover-image v-else-if="section.fileType === 'txt'" class="ext" src="https://izhixinyun.com/images/exts/txt.png" alt="" mode="widthFix" />
<cover-image v-else-if="section.fileType === 'pdf'" class="ext" src="https://izhixinyun.com/images/exts/pdf.png" alt="" mode="widthFix" />
<cover-image v-else class="ext" src="https://izhixinyun.com/images/exts/pic.png" alt="" mode="widthFix" />
<cover-view class="text">{{ section.name }}</cover-view>
</cover-view>
</cover-view>
@ -29,10 +34,11 @@
</cover-view>
</view>
<ul class="tabs">
<li v-for="(item, i) in tabs" :key="i" :class="{active: curTab === item.id}" @click="tabChange(item.id)">{{ item.name }}</li>
</ul>
<view class="detail">
<ul class="tabs">
<li v-for="(item, i) in tabs" :key="i" :class="{active: curTab === item.id}" @click="tabChange(item.id)">{{ item.name }}</li>
</ul>
<!-- 课程介绍 -->
<view v-show="!curTab" class="des">
@ -50,7 +56,7 @@
<uni-icons class="arrow" type="bottom" color="#909090"></uni-icons>
</view>
<view class="section" v-if="item.subsectionList.length">
<view v-for="(section, j) in item.subsectionList" :key="j"class="sectionName" :class="{ active: curLink === `${item.name}${section.name}` }" @click="secClick(section, item)">
<view v-for="(section, j) in item.subsectionList" :key="j"class="sectionName" :class="{ active: curRow.id === section.id }" @click="secClick(section, item)">
<image v-if="section.fileType === 'pptx'" class="ext" src="https://izhixinyun.com/images/exts/ppt.png" alt="">
<image v-else-if="section.fileType === 'mp4'" class="ext" src="https://izhixinyun.com/images/exts/video.png" alt="">
<image v-else-if="section.fileType === 'doc' || section.fileType === 'docx'" class="ext"
@ -158,7 +164,14 @@
player: null,
curRow: {},
playListVisible: false,
videoFullScreen: false
videoFullScreen: false,
webviewStyles: {
progress: {
color: '#FF3333'
},
width: '100%',
height: '400'
}
}
},
watch: {
@ -270,25 +283,23 @@
this.$util.to(`../practiceDetail/practiceDetail?cid=${this.cid}&projectId=${row.projectId || ''}&paperId=${row.paperId || ''}`)
},
//
transferType (ext) {
const suf = ext.toLowerCase()
if ('jpg,jpeg,png,gif,svg,psd'.includes(suf)) return '图片'
if ('mp4,3gp,mov,m4v,avi,dat,mkv,flv,vob,rmvb,rm,qlv'.includes(suf)) return '视频'
return suf
},
// //pdf
handleFileType(row) {
if (this.$util.exts.video.includes(row.fileType)) {
const type = row.fileType
if (this.$util.exts.video.includes(type)) {
row.isVideo = true
} else if (this.$util.exts.img.includes(row.fileType)) {
} else if (this.$util.exts.img.includes(type)) {
row.isPic = true
} else if (this.$util.exts.doc.includes(type)) {
row.isDoc = true
if (type === 'pptx' || type === 'ppt') row.fileUrl = 'https://view.officeapps.live.com/op/view.aspx?src=' + row.fileUrl
}
this.curRow = row
},
//
secClick(row) {
this.playListVisible = false
this.videoFullScreen = false
this.handleFileType(row)
// debugger
if (this.curRow.isVideo) {
@ -317,6 +328,36 @@
})
}).catch(res => { });
}
} else {
// const that = this
// uni.downloadFile({
// // url: this.curRow.fileUrl,
// url: 'https://huoran.oss-cn-shenzhen.aliyuncs.com/1732589800544.xlsx',
// success: function(res) {
// console.log(11, res)
// uni.hideLoading();
// uni.showLoading({
// title: '',
// mask: true
// })
// // doc, xls, ppt, pdf, docx, xlsx, pptx
// uni.openDocument({
// filePath: res.tempFilePath,
// // fileType: that.curRow.fileType, // doc, xls, ppt, pdf, docx, xlsx, pptx
// fileType: 'xlsx',
// showMenu: true, //
// success: res => {
// uni.hideLoading()
// },
// fail: openError => {
// uni.hideLoading()
// }
// })
// },
// fail: function(err) {
// uni.hideLoading()
// }
// })
}
},
//
@ -329,18 +370,29 @@
//
showPlayList() {
this.playListVisible = !this.playListVisible
},
hidePlayList() {
this.playListVisible = false
}
}
}
</script>
<style scoped lang="scss">
.wv {
display: block;
height: 100vh !important;
}
.file-wrap {
position: relative;
.pic, .video {
width: 100%;
height: 400rpx;
}
.webview {
display: block;
// height: 400rpx !important;
}
.pic {
object-fit: cover;
}
@ -348,62 +400,88 @@
.select-epi {
z-index: 1000;
position: fixed;
top: 30rpx;
right: -5rpx;
padding: 8rpx;
top: 30px;
right: -5px;
padding: 8px;
background-color: rgba(0, 0, 0, .6);
border-top-left-radius: 10rpx;
border-bottom-left-radius: 10rpx;
border-top-left-radius: 10px;
border-bottom-left-radius: 10px;
.icon {
width: 20rpx;
height: 20rpx;
width: 20px;
// height: 20rpx;
}
}
}
.chapters-full {
z-index: 2;
position: fixed;
top: 0;
right: 0;
width: 50vw;
width: 70vw;
height: 100vh;
padding: 15rpx;
padding: 15px;
margin-bottom: 20px;
color: #fff;
background-color: rgba(0, 0, 0, .6);
box-sizing: border-box;
.close {
position: absolute;
top: 10px;
right: 10px;
width: 24px;
height: 24px;
}
.chapters-scroll {
height: 95vh;
overflow: scroll;
}
.chapter {
margin-bottom: 10rpx;
margin-bottom: 10px;
.chapterName {
display: flex;
justify-content: space-between;
font-size: 14rpx;
font-size: 14px;
}
.section {
margin: 5rpx 0;
margin: 5px 0;
}
.sectionName {
display: flex;
align-items: center;
padding: 0 6rpx;
margin: 8rpx 0;
font-size: 12rpx;
padding: 0 6px;
margin: 8px 0;
font-size: 12px;
&.active {
color: #007EFF;
}
}
.ext {
width: 18px;
height: 18px;
margin-right: 12rpx;
// height: 18px;
margin-right: 12px;
}
.text {
max-width: 95%;
text-overflow: ellipsis;
}
}
&.full-screen {
width: 50vw;
.close {
top: 30px;
right: 30px;
}
}
}
.tabs {
z-index: 1;
position: sticky;
top: 0;
display: flex;
justify-content: space-between;
margin-bottom: 32rpx;
padding: 30rpx;
background-color: #fff;
li {
position: relative;
text-align: center;
@ -427,7 +505,7 @@
}
}
.detail {
padding: 34rpx 32rpx;
padding: 0 30rpx 30rpx;
background-color: #fff;
.chapters {
margin-top: 20rpx;
@ -452,6 +530,10 @@
margin: 30rpx 0;
font-size: 26rpx;
color: #333;
&.active {
color: #007EFF;
}
}
.ext {
width: 36rpx;

@ -143,7 +143,8 @@
// return
//
uni.downloadFile({
url: 'https://eduvessel.com/images/occupationlab/ac校赛试卷四.docx',
// url: 'https://eduvessel.com/images/occupationlab/ac.docx',
url: 'https://huoran.oss-cn-shenzhen.aliyuncs.com/1732592617329.docx',
success: function(res) {
console.log(11, res)
uni.hideLoading();

@ -64,7 +64,7 @@
}, 1500)
},
onShow() {
uni.setStorageSync('token', 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJsb2dpblR5cGUiOiJsb2dpbiIsImxvZ2luSWQiOjM5NTc2LCJyblN0ciI6IlpFVDVjb0k3Y2VBVHRYb0RtaDNiaHc5TlF2OVhmYmNRIiwiYWNjb3VudElkIjozOTU3NiwidXNlcklkIjozOTU3NSwic2Nob29sSWQiOjI4NDYsInVzZXJOYW1lIjoiYWMiLCJwbGF0Zm9ybUlkIjoiMSJ9.2Sltl681nbYYPnE0YX5xbF630uOe8hbEcYZqX3mqwCM')
uni.setStorageSync('token', 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJsb2dpblR5cGUiOiJsb2dpbiIsImxvZ2luSWQiOjM5NTc2LCJyblN0ciI6IlQ2WGY5Vm5XYUNPT0tIYXhSckFscG1jVUNlMXl6M2swIiwiYWNjb3VudElkIjozOTU3NiwidXNlcklkIjozOTU3NSwic2Nob29sSWQiOjI4NDYsInVzZXJOYW1lIjoiYWMiLCJwbGF0Zm9ybUlkIjoiMSJ9.0gR2C3CPMZx00m6K1oLnIKTtQwSbc8vRzNKridDrM3s')
this.getTab()
},
methods: {

@ -160,8 +160,8 @@
.page {
min-height: calc(100vh - 170rpx);
padding-top: 170rpx;
background: url(@/static/image/login1.png) 0 0/175rpx auto no-repeat,
url(@/static/image/login2.png) bottom right/123rpx auto no-repeat;
background: url(https://eduvessel.com/images/occupationlab/login1.png) 0 0/175rpx auto no-repeat,
url(https://eduvessel.com/images/occupationlab/login2.png) bottom right/123rpx auto no-repeat;
overflow: hidden;
}
.wrap {

Binary file not shown.

Before

Width:  |  Height:  |  Size: 257 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 26 KiB

@ -83,8 +83,8 @@
justify-content: center;
min-height: 100%;
text-align: center;
background: url(@/static/image/login1.png) 0 0/175rpx auto no-repeat,
url(@/static/image/login2.png) bottom right/123rpx auto no-repeat;
background: url(https://eduvessel.com/images/occupationlab/login1.png) 0 0/175rpx auto no-repeat,
url(https://eduvessel.com/images/occupationlab/login2.png) bottom right/123rpx auto no-repeat;
.logo {
display: flex;
justify-content: center;

Loading…
Cancel
Save