|
|
|
@ -12,6 +12,9 @@ |
|
|
|
|
<uni-icons class="icon" type="eye" size="22" color="#007FFF"></uni-icons> |
|
|
|
|
{{ form.totalBrowsing }}人学过 |
|
|
|
|
</view> |
|
|
|
|
<!-- <view class="meta" @click.stop="collect"> |
|
|
|
|
<uni-icons class="icon" :type="form.collectionStatus ? 'star-filled' : 'star'" size="22" color="#007eff"></uni-icons> |
|
|
|
|
</view> --> |
|
|
|
|
<view v-if="form.labelNameList" class="labels"> |
|
|
|
|
<view v-for="(label, j) in form.labelNameList" :key="j" class="label">{{ label }}</view> |
|
|
|
|
</view> |
|
|
|
@ -32,7 +35,7 @@ |
|
|
|
|
</template> |
|
|
|
|
|
|
|
|
|
<script> |
|
|
|
|
import { findById } from '@/apis/modules/article.js' |
|
|
|
|
import { findById, collectCourse } from '@/apis/modules/article.js' |
|
|
|
|
import uParse from '@/components/gaoyia-parse/parse.vue' |
|
|
|
|
export default { |
|
|
|
|
data() { |
|
|
|
@ -117,31 +120,14 @@ |
|
|
|
|
// 下载附件 |
|
|
|
|
download(item) { |
|
|
|
|
this.$util.to(`../send/send?url=${item.filePath}©Writing=${item.fileName}`) |
|
|
|
|
// uni.showLoading({ |
|
|
|
|
// title: '正在下载...', |
|
|
|
|
// mask: true |
|
|
|
|
// }) |
|
|
|
|
// const url = item.filePath |
|
|
|
|
// const that = this |
|
|
|
|
// // 下载文件资源到本地 |
|
|
|
|
// uni.downloadFile({ |
|
|
|
|
// url, |
|
|
|
|
// success: function(res) { |
|
|
|
|
// console.log(444, res) |
|
|
|
|
// uni.saveFile({ |
|
|
|
|
// tempFilePath: res.tempFilePath, |
|
|
|
|
// success: function(res) { |
|
|
|
|
// console.log(555, res) |
|
|
|
|
// uni.hideLoading() |
|
|
|
|
// that.$util.sucMsg('文件已保存!') |
|
|
|
|
// } |
|
|
|
|
// }) |
|
|
|
|
// }, |
|
|
|
|
// fail: function(err) { |
|
|
|
|
// uni.hideLoading() |
|
|
|
|
// } |
|
|
|
|
// }) |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
// 收藏 |
|
|
|
|
collect() { |
|
|
|
|
const state = this.form.collectionStatus ? 0 : 1 |
|
|
|
|
collectCourse(this.form.id, state).then(({ data }) => { |
|
|
|
|
this.form.collectionStatus = state |
|
|
|
|
}).catch(e => {}) |
|
|
|
|
}, |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
</script> |
|
|
|
|