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

69 lines
1.4 KiB

11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
  1. <template>
  2. <view class="pageBgImg">
  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. .imgBox {
  46. // transform: translateY(200px);
  47. transform: translateX(50px);
  48. transform: rotate(90deg);
  49. width: 100%;
  50. image {
  51. margin-top: 500rpx;
  52. transform: scale(2);
  53. }
  54. }
  55. .btnBox {
  56. display: flex;
  57. justify-content: center;
  58. position: fixed;
  59. bottom: 0;
  60. left: 0;
  61. background-color: #fff;
  62. padding: 30rpx 0;
  63. width: 100%;
  64. .btnBg {
  65. padding: 0 30rpx;
  66. }
  67. }
  68. </style>