洛阳学员端
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.

75 lines
1.4 KiB

10 months ago
10 months ago
8 months ago
10 months ago
8 months ago
10 months ago
  1. <template>
  2. <view class="pagebg">
  3. <!-- <topNavbar title="培训缴费电子凭证"></topNavbar> -->
  4. <view class="imgBox" style="width: 100%;">
  5. <image :src="imgLink" mode="widthFix"></image>
  6. </view>
  7. <view class="btnBox">
  8. <view class="btnBg" @click="downloadImgClick">保存到手机</view>
  9. </view>
  10. </view>
  11. </template>
  12. <script>
  13. import { getStudentVoucher } from '@/config/api.js'
  14. import { downloadImg } from '../comp/download.js'
  15. export default {
  16. data() {
  17. return {
  18. orderId: '',
  19. imgLink: ''
  20. }
  21. },
  22. onLoad(options) {
  23. if (options.orderId) {
  24. this.orderId = options.orderId
  25. this.getStudentVoucherFn()
  26. }
  27. },
  28. methods: {
  29. async getStudentVoucherFn() {
  30. let obj = {
  31. studentId: this.studentId,
  32. type: 1
  33. }
  34. const {data: res} = await getStudentVoucher(obj)
  35. this.imgLink = res
  36. console.log(res)
  37. },
  38. downloadImgClick() {
  39. downloadImg(this.imgLink)
  40. }
  41. }
  42. }
  43. </script>
  44. <style lang="scss" scoped>
  45. .pageBgImg {
  46. width: 100vw;
  47. height: 100vh;
  48. overflow-x: hidden;
  49. }
  50. .imgBox {
  51. // transform: translateY(200px);
  52. transform: translateX(50px);
  53. transform: rotate(90deg);
  54. width: 100%;
  55. image {
  56. margin-top: 500rpx;
  57. transform: scale(2);
  58. }
  59. }
  60. .btnBox {
  61. display: flex;
  62. justify-content: center;
  63. position: fixed;
  64. bottom: 0;
  65. left: 0;
  66. background-color: #fff;
  67. padding: 30rpx 0;
  68. width: 100%;
  69. .btnBg {
  70. padding: 0 30rpx;
  71. }
  72. }
  73. </style>