Selaa lähdekoodia

详情页字体调整

huangct 8 vuotta sitten
vanhempi
commit
d0d6b9c0cc

+ 59 - 0
jpress-commons/src/main/java/io/jpress/utils/MyDecryptUtils.java

@@ -0,0 +1,59 @@
+package io.jpress.utils;
+/**
+ * Created by A007 on 2016/12/29.
+ * 北京滔米科技有限公司 CloudPass项目
+ */
+
+import javax.crypto.Cipher;
+import javax.crypto.SecretKey;
+import javax.crypto.SecretKeyFactory;
+import javax.crypto.spec.DESKeySpec;
+import java.security.SecureRandom;
+
+/**
+ * 解密
+ */
+public class MyDecryptUtils {
+    /**
+     * 对数据进行DES加密.
+     * @param data 待进行DES加密的数据
+     * @return 返回经过DES加密后的数据
+     * @throws Exception
+     * @author <a href="mailto:xiexingxing1121@126.com" mce_href="mailto:xiexingxing1121@126.com">AmigoXie</a>
+     * Creation date: 2007-7-31 - 下午12:06:24
+     */
+    public final static String decrypt(String data) throws Exception {
+        return new String(decrypt(hex2byte(data.getBytes()),"kEHrDooxWHCWtfeSxvDvgqZq".getBytes()));
+    }
+
+
+    private static byte[] decrypt(byte[] data, byte[] key) throws Exception {
+        // DES算法要求有一个可信任的随机数源
+        SecureRandom sr = new SecureRandom();
+        // 从原始密匙数据创建一个DESKeySpec对象
+        DESKeySpec dks = new DESKeySpec(key);
+        // 创建一个密匙工厂,然后用它把DESKeySpec对象转换成
+        // 一个SecretKey对象
+        SecretKeyFactory keyFactory = SecretKeyFactory.getInstance("DES");
+        SecretKey securekey = keyFactory.generateSecret(dks);
+        // Cipher对象实际完成解密操作
+        Cipher cipher = Cipher.getInstance("DES");
+        // 用密匙初始化Cipher对象
+        cipher.init(Cipher.DECRYPT_MODE, securekey, sr);
+        // 现在,获取数据并解密
+        // 正式执行解密操作
+        return cipher.doFinal(data);
+    }
+    public static byte[] hex2byte(byte[] b) {
+        if ((b.length % 2) != 0)
+            throw new IllegalArgumentException("长度不是偶数");
+        byte[] b2 = new byte[b.length / 2];
+        for (int n = 0; n < b.length; n += 2) {
+            String item = new String(b, n, 2);
+            b2[n / 2] = (byte) Integer.parseInt(item, 16);
+        }
+        return b2;
+    }
+
+
+}

+ 14 - 14
jpress-web-template-usoftchina/src/main/webapp/templates/usoftchina/content_uuhelper.html

@@ -26,13 +26,13 @@
         }
         .main .container .header p{
             text-align: left;
-            font-size: 36px;
+            font-size: 18px;
             color: #333;
         }
         .main .container .header div{
             margin: 5px 0;
             text-align: left;
-            font-size: 24px;
+            font-size: 12px;
             color: #999;
         }
         .main .container .header div span:first-child{
@@ -51,7 +51,7 @@
             max-width: 100%;
         }
         .main .container .section p{
-            font-size: 28px;
+            font-size: 14px;
             line-height: 50px;
             color: #333;
             text-indent: 2em;
@@ -66,7 +66,7 @@
             float: left;
         }
         .main .container .section div.readCount div span{
-            font-size: 24px;
+            font-size: 12px;
             color: #999;
             margin-right: 10px;
             cursor: pointer;
@@ -83,7 +83,7 @@
         }
         .main .container .section div.readCount p{
             float: right;
-            font-size: 24px;
+            font-size: 12px;
             color: #999;
         }
         .main .container .section div.readCount img{
@@ -114,7 +114,7 @@
         }
         .main .container .footer .footer-header div span{
             margin-right: 5px;
-            font-size: 24px;
+            font-size: 12px;
             color: #82a6bf;
         }
         .main .container .footer .footer-header div img{
@@ -162,11 +162,11 @@
         .main .container .footer .footer-section .detail .title span:first-child{
             float: left;
             color: #333;
-            font-size: 24px;
+            font-size: 12px;
         }
         .main .container .footer .footer-section .detail .title span:first-child em{
             margin-left: 10px;
-            font-size: 24px;
+            font-size: 12px;
             color: #999;
             font-style: normal;
         }
@@ -182,13 +182,13 @@
         .main .container .footer .footer-section .detail .title span:last-child em{
             margin-left: 10px;
             color: #2f95dd;
-            font-size: 24px;
+            font-size: 12px;
             padding-right: 5px;
             font-style: normal;
         }
         .main .container .footer .footer-section .detail p{
             text-align: left;
-            font-size: 24px;
+            font-size: 12px;
             color: #666;
             margin-bottom: 22px;
         }
@@ -197,7 +197,7 @@
         }
         .main .container .footer .pull{
             margin: 40px 0;
-            font-size: 24px;
+            font-size: 12px;
             color: #999;
         }
         .main .container .footer .loading{
@@ -226,7 +226,7 @@
         .main .container .footer .footer-header .writeMessage textarea{
             width: 100%;
             height: auto;
-            font-size: 24px;
+            font-size: 12px;
         }
         .main .container .footer .footer-header .writeMessage div{
             text-align: right;
@@ -255,12 +255,12 @@
 
         .toast-title {
             font-weight: bold;
-            font-size: 24px;
+            font-size: 12px;
         }
         .toast-message {
             -ms-word-wrap: break-word;
             word-wrap: break-word;
-            font-size: 24px;
+            font-size: 12px;
         }
     </style>
     <script>