yujialong 3 months ago
parent 28cb5f404a
commit f02324cf0b
  1. 53
      course/courseDetail/courseDetail.vue
  2. 1
      pages.json
  3. 2
      pages/index/index.vue
  4. 41
      styles/common.scss
  5. 62
      user/info/info.vue

@ -1,19 +1,22 @@
<template>
<view class="wrap">
<!-- <view class="header">
<uni-icons class="back" type="back" size="20" color="#fff" @click="back"></uni-icons>
<text>课程详情</text>
</view> -->
<!-- <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 class="file-wrap">
<image v-if="!curRow.viewUrl && coverUrl" class="pic" :src="coverUrl" mode="widthFix"></image>
<template v-else>
<image v-if="curRow.isPic" class="pic" :src="curRow.viewUrl" mode="widthFix" @click="hidePlayList"></image>
<video v-else-if="curRow.isVideo" class="video" :key="curRow.viewUrl" width="100%" height="100%" autoplay controls :src="curRow.viewUrl" type="video/mp4" @click="hidePlayList" @fullscreenchange="fullScreenChange"></video>
<!-- pdfwordexcelppt都用webview展示 -->
<view v-else-if="curRow.isDoc" class="webview-wrap">
<web-view class="webview" :webview-styles="webviewStyles" :fullscreen="false" :src="curRow.viewUrl" @click="hidePlayList"></web-view>
<cover-view v-if="curRow.isPpt" class="webview-mask" @click="closePreview">
<cover-view :class="['webview-mask', {ppt: curRow.isPpt}]" @click="closePreview">
<cover-image class="icon" src="https://eduvessel.com/images/occupationlab/close-gray.png" alt="" mode="widthFix" />
</cover-view>
<cover-image v-else class="webview-close" src="https://eduvessel.com/images/occupationlab/close-gray.png" alt="" mode="widthFix" />
</view>
<!-- <web-view class="webview" :webview-styles="webviewStyles" :fullscreen="false" src="https://huoran.oss-cn-shenzhen.aliyuncs.com/1732589800544.xlsx"></web-view> -->
</template>
<cover-view v-show="!playListVisible && curRow.viewUrl && (!curRow.isVideo || videoFullScreen)" class="select-epi">
@ -227,6 +230,7 @@
},
onShow() {
const pages = getCurrentPages()
console.log(444,pages)
const { options } = pages[pages.length - 1]
this.cid = options.cid
this.mallId = options.mallId
@ -369,6 +373,8 @@
row.viewUrl = row.fileUrl
}
this.curRow = row
const pages = getCurrentPages()
console.log('preview:',pages)
},
//
secClick(row) {
@ -395,6 +401,16 @@
closePreview() {
this.curRow = {}
},
//
back() {
if (this.curRow.viewUrl) {
this.curRow = {}
} else {
uni.reLaunch({
url: '/pages/index/index'
})
}
},
}
}
</script>
@ -403,6 +419,22 @@
.wrap {
min-height: 100%;
background-color: #fff;
.header {
position: relative;
width: 100%;
height: 60rpx;
padding: calc(var(--status-bar-height) + 60rpx) 0 10rpx;
font-size: 28rpx;
text-align: center;
color: #fff;
background-color: #007EFF;
// box-sizing: border-box;
.back {
position: absolute;
top: calc(var(--status-bar-height) + 60rpx);
left: 10rpx;
}
}
}
.file-wrap {
position: relative;
@ -441,7 +473,7 @@
.webview-mask {
z-index: 9;
position: fixed;
top: 0;
top: 20rpx;
left: 0;
display: flex;
justify-content: flex-end;
@ -449,21 +481,16 @@
width: 100%;
height: 50rpx;
padding: 0 20rpx;
background-color: #fff;
box-sizing: border-box;
&.ppt {
top: 0;
background-color: #fff;
}
.icon {
width: 44rpx;
height: 44rpx;
}
}
.webview-close {
z-index: 10;
position: fixed;
top: 20rpx;
right: 30rpx;
width: 44rpx;
height: 44rpx;
}
}
.webview {
position: absolute;

@ -43,6 +43,7 @@
{
"navigationBarTitleText": "课程详情",
"enablePullDownRefresh": true
// "navigationStyle": "custom"
}
},
{

@ -56,7 +56,7 @@
}, 1500)
},
onShow() {
// uni.setStorageSync('token', 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJsb2dpblR5cGUiOiJsb2dpbiIsImxvZ2luSWQiOjkwMTAwLCJyblN0ciI6ImI4QWN6VlZuS0t4S3ZnSUE2MkRHTDFOYkdXR0tUREVFIiwiYWNjb3VudElkIjo5MDEwMCwidXNlcklkIjo5MDEwNiwic2Nob29sSWQiOjI4ODYsInVzZXJOYW1lIjoiQWMiLCJwbGF0Zm9ybUlkIjoiMSJ9.Yreqcu2sW9phcRI8N-CQt19XBk_1hwKsy832ZtXnzMo')
// uni.setStorageSync('token', 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJsb2dpblR5cGUiOiJsb2dpbiIsImxvZ2luSWQiOjkwMTEyLCJyblN0ciI6ImFUamlTeGw0WWxIMlZTQzFnaERGUmJBb1dWU1VHU01CIiwiYWNjb3VudElkIjo5MDExMiwidXNlcklkIjo5MDExOCwic2Nob29sSWQiOjI4ODYsInVzZXJOYW1lIjoiUmFpbiIsInBsYXRmb3JtSWQiOiIxIn0.nZYZCgt1ERL6Y4L4cfFid00PwAgKCMYr_f88fzhgjYw')
this.$refs.realName.handleRealName()
this.getTab()
},

@ -168,4 +168,45 @@ ul {
border-radius: 10rpx;
background-color: #007EFF;
}
}
.popup-mask {
z-index: 9;
position: fixed;
top: 0;
left: 0;
bottom: 0;
right: 0;
background-color: rgba(0, 0, 0, .5);
}
.popup {
z-index: 10;
position: fixed;
bottom: 0%;
width: 100%;
height: 90vh;
background-color: #fff;
border-top-left-radius: 8px;
border-top-right-radius: 8px;
.top {
text-align: center;
line-height: 100rpx;
font-size: 28rpx;
color: #333;
border-bottom: 1px solid #f1f1f1;
}
.close {
position: absolute;
top: 30rpx;
right: 30rpx;
}
.list {
max-height: calc(90vh - 206rpx);
padding: 0 30rpx;
overflow: auto;
.item {
line-height: 80rpx;
font-size: 24rpx;
}
}
}

@ -105,9 +105,10 @@
<view class="name">所在国家</view>
<view class="readonly">中国</view>
</view>
<view class="line">
<view class="line" @click="showSchool(archive)">
<view class="name">学校名称</view>
<uni-data-picker class="picker-input" placeholder="请选择学校" popup-title="请选择学校" preload :clear-icon="false" :localdata="schoolList" v-model="archive.schoolId"></uni-data-picker>
<view v-if="archive.schoolName" class="val">{{ archive.schoolName }}</view>
<view v-else :class="['readonly', {val: archive.schoolName}]">{{ archive.schoolName || '请选择学校' }}</view>
</view>
<view class="line">
<view class="name">专业学科</view>
@ -135,6 +136,16 @@
<view class="btn-wrap">
<view class="btn" @click="submit">保存</view>
</view>
<view class="popup-mask" v-show="schoolVisible" @click="closeSchool"></view>
<view class="popup" v-show="schoolVisible">
<view class="top">请选择学校</view>
<uni-icons class="close" type="closeempty" size="20" @click="closeSchool"></uni-icons>
<uni-search-bar class="search" radius="5" placeholder="请输入学校名称" v-model="keyword" clearButton="auto" cancelButton="none" />
<view class="list">
<view class="item" v-for="item in schoolList" @click="schoolChange(item)">{{ item.schoolName }}</view>
</view>
</view>
</view>
</template>
@ -202,7 +213,6 @@
}
],
subjectList: [], //
schoolList: [],
showArch: false,
archivesList: [],
archivesForm: {
@ -218,6 +228,21 @@
professionalId: '',
professionalName: '',
},
schoolVisible: false,
keyword: '',
searchTimer: null,
schoolList: [],
schoolListAll: [],
curArch: {},
}
},
watch: {
keyword () {
clearTimeout(this.searchTimer)
this.searchTimer = setTimeout(() => {
this.filterSchool()
}, 500)
}
},
onShow() {
@ -303,12 +328,35 @@
//
async getSchool(){
const { list } = await querySchool()
list.forEach(e => {
e.value = e.schoolId
e.text = e.schoolName
})
this.schoolList = list
this.schoolListAll = list
},
//
showSchool(item) {
this.curArch = item
this.schoolVisible = true
},
//
filterSchool() {
const { keyword } = this
this.schoolList = keyword ?
this.schoolListAll.filter(e => e.schoolName.includes(keyword)) :
this.schoolListAll
},
//
closeSchool() {
this.schoolVisible = false
this.keyword = ''
this.schoolList = this.schoolListAll
},
//
schoolChange(school) {
const { schoolId } = school
this.curArch.schoolId = schoolId
this.curArch.schoolName = school.schoolName
this.closeSchool()
},
//
onChooseAvatar(e) {
OSS(e.detail.avatarUrl, ({ url }) => {

Loading…
Cancel
Save