Explorar el Código

商城:减小证书尺寸以提高生成图片的速度。但也基本没有变快。

任一存 hace 1 año
padre
commit
e229b62eab
Se han modificado 1 ficheros con 11 adiciones y 10 borrados
  1. 11 10
      src/views/ShopView.vue

+ 11 - 10
src/views/ShopView.vue

@@ -220,9 +220,10 @@
         draggable="false"
       >
       <a
+        v-show="$isTablet"
         class="btn-download"
         :href="certImgUrl"
-        download
+        download="锡善云城-证书"
       >
         下载证书
       </a>
@@ -266,6 +267,7 @@ const router = useRouter()
 
 const pageLoading = ref(false)
 const $env = inject('$env')
+const $isTablet = inject('$isTablet')
 
 const {
   windowSizeInCssForRef,
@@ -820,7 +822,6 @@ const getRedeem = async() => {
       object-fit: contain;
     }
     >a.btn-download{
-      display: none;
       position: absolute;
       left: 50%;
       transform: translateX(-50%);
@@ -848,25 +849,25 @@ const getRedeem = async() => {
   position: absolute;
   top: calc(-200% - 1920px);
   left: calc(-200% - 2880px);
-  width: 2672px;
-  height: 1838px;
+  width: 1336px;
+  height: 919px;
   background: url('@/assets/images/cert-min.png') no-repeat center / contain;
 
   p:first-child {
     position: absolute;
-    top: calc(50% - 16px);
+    top: calc(50% - 8px);
     left: 50%;
     color: #CFC49E;
-    font-size: 140px;
-    letter-spacing: 10px;
+    font-size: 70px;
+    letter-spacing: 5px;
     font-family: 'Source Han Sans CN-Bold';
     transform: translate(-50%, -50%);
   }
   p:last-child {
     position: absolute;
-    left: 705px;
-    bottom: 310px;
-    font-size: 40px;
+    left: 352px;
+    bottom: 155px;
+    font-size: 20px;
   }
 }
 </style>