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

57 lines
1.1 KiB

<template>
<view class="pageBgImg ">
<topNavbar title="我的合同"></topNavbar>
<view class="pad">
<view class="card">
<image :src="pdfUrl" mode="widthFix"></image>
<nodata v-if="!pdfUrl" style="margin-bottom: 40rpx;">暂无合同</nodata>
</view>
</view>
</view>
</template>
<script>
import { selectContractPdfBase64 } from '@/config/api.js'
export default {
data() {
return {
pdfUrl: ''
}
},
onLoad() {
this.selectContractPdfBase64Fn()
const obj = '123'
console.log(this.getType(window))
},
methods: {
async selectContractPdfBase64Fn() {
const {data: res} = await selectContractPdfBase64({studentId: this.studentId})
this.pdfUrl = res
console.log('this.pdfUrl')
console.log(this.pdfUrl)
},
change() {
console.log('你关你关')
},
getType(obj){
let type = typeof obj;
if (type !== "object") { // typeof
return type;
}
// typeof object
return Object.prototype.toString.call(obj).replace(/^\[object (\S+)\]$/,
'$1');
}
}
}
</script>
<style lang="scss" scoped>
.card {
padding: 8rpx;
margin-bottom: 40rpx;
}
</style>