showZhengshu.vue 1.0 KB

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