feat: 课程详情预览文件
This commit is contained in:
@@ -283,7 +283,7 @@ export function setupKeyboardHeightListener(updateCallback) {
|
||||
let userInfo = getUserInfo()
|
||||
let userParams = '/' + (userInfo?.loginName??'')
|
||||
if (getPhoneEnvBool('AND')) {
|
||||
common.navigateTo('/pages/index/preview?fileId=' + fileId +'&fileApiSrc=' + getFileSrc);
|
||||
navigateTo('/pages/index/preview?fileId=' + fileId +'&fileApiSrc=' + getFileSrc);
|
||||
} else {
|
||||
if (isDownloading.value) return
|
||||
const base_url = get_base_url(getFileSrc);
|
||||
|
||||
@@ -44,23 +44,40 @@
|
||||
{{ modelValue.crsCore }}
|
||||
</view>
|
||||
</view>
|
||||
<view class="mb-64" v-if="(modelValue.fileList || []).length>0">
|
||||
<view class="fz-30 font_pf fw-400 mb-4">附件</view>
|
||||
<view class="file-item" v-for="item in modelValue.fileList" @click="previewFile(item)">
|
||||
{{item.fileName}}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import {
|
||||
previewFileFnc
|
||||
} from '@/common/common'
|
||||
const props = defineProps({
|
||||
modelValue: Object
|
||||
});
|
||||
const previewFile = info => {
|
||||
previewFileFnc({
|
||||
fileId: info.ossKey,
|
||||
getFileSrc: '/traapp/traFilePreview/',
|
||||
fileName: info.fileName + '.pdf'
|
||||
})
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.examination_core{
|
||||
.examination_core {
|
||||
padding: 0 15rpx 0 0;
|
||||
line-height: 50rpx;
|
||||
font-size: 30rpx;
|
||||
color: #333;
|
||||
padding-bottom: 20rpx;
|
||||
}
|
||||
|
||||
.course-info {
|
||||
box-sizing: border-box;
|
||||
// width: 100%;
|
||||
@@ -71,12 +88,14 @@
|
||||
// margin-left: 16rpx;
|
||||
// margin-right: 16rpx;
|
||||
}
|
||||
|
||||
.info-top {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
margin-bottom: 62rpx;
|
||||
padding-right: 36rpx;
|
||||
|
||||
.top-right {
|
||||
.rate-text {
|
||||
text-align: right;
|
||||
@@ -84,6 +103,7 @@
|
||||
font-size: 30rpx;
|
||||
margin-bottom: 4rpx;
|
||||
}
|
||||
|
||||
.rate-num {
|
||||
color: #0066ff;
|
||||
font-size: 62rpx;
|
||||
@@ -92,25 +112,30 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.info-middle {
|
||||
margin-bottom: 35rpx;
|
||||
padding-right: 36rpx;
|
||||
}
|
||||
|
||||
.info-bottom {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.bottom-left {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
padding-top: 12rpx;
|
||||
flex: 1;
|
||||
|
||||
.label {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.label-item {
|
||||
text-align: left;
|
||||
border-radius: 22rpx;
|
||||
@@ -121,12 +146,19 @@
|
||||
margin-top: 6rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.bottom-right {
|
||||
width: 50%;
|
||||
|
||||
.right-img {
|
||||
width: 100%;
|
||||
height: auto;
|
||||
object-fit: cover;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
.file-item {
|
||||
padding-top: 12rpx;
|
||||
color: #06f;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user