You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
83 lines
1.6 KiB
83 lines
1.6 KiB
<template> |
|
<view class="wrap"> |
|
<view class="title">{{ form.title }}</view> |
|
|
|
<view class="text">{{ form.applicableMajor }}</view> |
|
<view class="text">{{ form.schemeIntroduction }}</view> |
|
<view class="text">{{ form.product }}</view> |
|
<template v-if="form.fileName"> |
|
<view class="file">{{ form.fileName }}</view> |
|
<view class="detail" @click.stop="download">下载</view> |
|
</template> |
|
</view> |
|
</template> |
|
|
|
<script> |
|
import { schemeFindById } from '@/apis/modules/article.js' |
|
export default { |
|
data() { |
|
return { |
|
id: '', |
|
form: { |
|
totalBrowsing: '' |
|
} |
|
} |
|
}, |
|
onShow() { |
|
const pages = getCurrentPages() |
|
const { options } = pages[pages.length - 1] |
|
this.id = options.id |
|
this.getInfo() |
|
}, |
|
methods: { |
|
// 获取详情 |
|
getInfo() { |
|
uni.showLoading({ |
|
title: '加载中' |
|
}) |
|
schemeFindById(this.id).then(({ data }) => { |
|
if (data.productList) data.product = data.productList.map(e => e.productName).join('、') |
|
this.form = data |
|
uni.hideLoading() |
|
}).catch(e => { |
|
uni.hideLoading() |
|
}) |
|
}, |
|
// 下载方案文件 |
|
download() { |
|
uni.setStorageSync('files', { |
|
copyWriting: this.form.title, |
|
fileName: [this.form.fileName], |
|
urls: [this.form.schemeFile] |
|
}) |
|
this.$util.to(`/team/send/send`) |
|
} |
|
} |
|
} |
|
</script> |
|
|
|
<style scoped lang="scss"> |
|
.wrap { |
|
padding: 30rpx; |
|
background-color: #fff; |
|
} |
|
.title { |
|
font-size: 34rpx; |
|
font-weight: 600; |
|
color: #333; |
|
} |
|
.text { |
|
margin: 20rpx 0; |
|
font-size: 28rpx; |
|
line-height: 1.6; |
|
} |
|
.file { |
|
margin: 20rpx 0; |
|
font-size: 26rpx; |
|
word-break: break-all; |
|
} |
|
.detail { |
|
font-size: 30rpx; |
|
color: #1f83ff; |
|
} |
|
</style>
|
|
|