showZhengshu.vue 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. <template>
  2. <view class="mobile-login-page">
  3. <view class="icon-title-navBar-box">
  4. <view @click="handleBack" class="nav-bar-icon"></view>
  5. <text class="nav-bar-title">录取通知书</text>
  6. </view>
  7. <view class="gsl-sj-listBox custom-certBox">
  8. <image @click="optenImg(data,index)" :src="base64">></image>
  9. </view>
  10. </view>
  11. </template>
  12. <script setup>
  13. import {
  14. toast
  15. } from "@/utils/common";
  16. import {
  17. onLoad
  18. } from "@dcloudio/uni-app";
  19. import {
  20. getAppConfig,
  21. login,
  22. queryCert
  23. } from '@/api/login.js'
  24. import cacheManager from '@/utils/cacheManager.js'
  25. import JSEncrypt from 'jsencrypt';
  26. import {
  27. ref
  28. } from 'vue';
  29. const base64 = ref('')
  30. onLoad(() => {
  31. base64.value = 'data:image/jpeg;base64,'+cacheManager.get('qrCode').base64
  32. console.log('base64.value',base64.value);
  33. })
  34. function optenImg(){
  35. uni.previewImage({
  36. urls: [base64.value], // 直接传入Base64字符串
  37. current: 0,
  38. indicator: "number" // 显示页码指示器
  39. });
  40. }
  41. function handleBack() {
  42. uni.redirectTo({
  43. url: '/pages/login'
  44. });
  45. }
  46. </script>