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

56 lines
1.1 KiB

12 months ago
12 months ago
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. <nodata v-if="!pdfUrl" style="margin-bottom: 40rpx;">暂无合同</nodata>
  8. </view>
  9. </view>
  10. </view>
  11. </template>
  12. <script>
  13. import { selectContractPdfBase64 } from '@/config/api.js'
  14. export default {
  15. data() {
  16. return {
  17. pdfUrl: ''
  18. }
  19. },
  20. onLoad() {
  21. this.selectContractPdfBase64Fn()
  22. const obj = '123'
  23. console.log(this.getType(window))
  24. },
  25. methods: {
  26. async selectContractPdfBase64Fn() {
  27. const {data: res} = await selectContractPdfBase64({studentId: this.studentId})
  28. this.pdfUrl = res
  29. console.log('this.pdfUrl')
  30. console.log(this.pdfUrl)
  31. },
  32. change() {
  33. console.log('你关你关')
  34. },
  35. getType(obj){
  36. let type = typeof obj;
  37. if (type !== "object") { // typeof
  38. return type;
  39. }
  40. // typeof object
  41. return Object.prototype.toString.call(obj).replace(/^\[object (\S+)\]$/,
  42. '$1');
  43. }
  44. }
  45. }
  46. </script>
  47. <style lang="scss" scoped>
  48. .card {
  49. padding: 8rpx;
  50. margin-bottom: 40rpx;
  51. }
  52. </style>