学员端小程序
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.

60 lines
1.4 KiB

12 months ago
12 months ago
12 months ago
  1. <template>
  2. <view class="pageBgImg ">
  3. <topNavbar title="我的合同"></topNavbar>
  4. <view class="pad">
  5. <view class="card">
  6. <image :src="pdfUrl" mode="widthFix"></image>
  7. <!-- <web-view :src="pdfUrl"></web-view> -->
  8. <!-- <mumu-previewOffce :fileUrl='pdfUrl' v-model='showPreview' @change="change"></mumu-previewOffce> -->
  9. </view>
  10. </view>
  11. </view>
  12. </template>
  13. <script>
  14. import { selectContractPdfBase64 } from '@/config/api.js'
  15. import MumuPreviewOffce from '@/uni_modules/mumu-previewOffce/components/mumu-previewOffce/mumu-previewOffce.vue'
  16. export default {
  17. components: {
  18. MumuPreviewOffce
  19. },
  20. data() {
  21. return {
  22. pdfUrl: ''
  23. }
  24. },
  25. onLoad() {
  26. this.selectContractPdfBase64Fn()
  27. const obj = '123'
  28. console.log(this.getType(window))
  29. },
  30. methods: {
  31. async selectContractPdfBase64Fn() {
  32. const {data: res} = await selectContractPdfBase64({studentId: this.studentId})
  33. this.pdfUrl = res
  34. console.log('this.pdfUrl')
  35. console.log(this.pdfUrl)
  36. },
  37. change() {
  38. console.log('你关你关')
  39. },
  40. getType(obj){
  41. let type = typeof obj;
  42. if (type !== "object") { // typeof
  43. return type;
  44. }
  45. // typeof object
  46. return Object.prototype.toString.call(obj).replace(/^\[object (\S+)\]$/,
  47. '$1');
  48. }
  49. }
  50. }
  51. </script>
  52. <style lang="scss" scoped>
  53. .card {
  54. padding: 8rpx;
  55. margin-bottom: 40rpx;
  56. }
  57. </style>