Commit 6d863aa3 by 罗翻

增加PDF

parent 39f698c3
Showing with 106 additions and 244 deletions
......@@ -26,8 +26,7 @@ android {
release {
keyAlias 'keybigfish'
keyPassword '123456789'
storeFile file('../app_key.jks')
// '/Users/luofan/AndroidStudioProjects/app_key.jks'
storeFile file('../../app_key.jks')
storePassword '123456789'
}
}
......
......@@ -230,8 +230,10 @@ public static final int *;
# 如果使用了 单类注入,即不定义接口实现 IProvider,需添加下面规则,保护实现
-keep class * implements com.alibaba.android.arouter.facade.template.IProvider
-dontwarn com.alibaba.**
#---------------------------------3.与js互相调用的类------------------------
#---------------------------------4.反射相关的类和方法-----------------------
......
......@@ -131,9 +131,6 @@
android:name=".ui.MainActivity"
android:launchMode="singleTask"
android:screenOrientation="portrait" />
<activity
android:name=".ui.PdfWebViewActivity"
android:screenOrientation="portrait" />
</application>
</manifest>
\ No newline at end of file
# Copyright 2012 Mozilla Foundation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# Main toolbar buttons (tooltips and alt text for images)
# LOCALIZATION NOTE (page_label, page_of):
# These strings are concatenated to form the "Page: X of Y" string.
# Do not translate "{{pageCount}}", it will be substituted with a number
# representing the total number of pages.
zoom.title=அளவு
open_file.title=கோப்பினைத் திறக்க
open_file_label=திறக்க
# Secondary toolbar and context menu
# Document properties dialog box
# Tooltips and alt text for side panel toolbar buttons
# (the _label strings are alt text for the buttons, the .title strings are
# tooltips)
# Thumbnails panel item (tooltip and alt text for images)
# LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page
# number.
# LOCALIZATION NOTE (thumb_page_canvas): "{{page}}" will be replaced by the page
# number.
# Find panel button title and messages
find_previous.title=இந்த சொற்றொடரின் முன்னைய நிகழ்வை தேடு
find_next.title=இந்த சொற்றொடரின் அடுத்த நிகழ்வைத் தேடு
# Error panel labels
# LOCALIZATION NOTE (error_version_info): "{{version}}" and "{{build}}" will be
# replaced by the PDF.JS version and build ID.
# LOCALIZATION NOTE (error_message): "{{message}}" will be replaced by an
# english string describing the error.
# LOCALIZATION NOTE (error_stack): "{{stack}}" will be replaced with a stack
# trace.
# LOCALIZATION NOTE (error_file): "{{file}}" will be replaced with a filename
# LOCALIZATION NOTE (error_line): "{{line}}" will be replaced with a line number
# Predefined zoom values
# Loading indicator messages
# LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip.
# "{{type}}" will be replaced with an annotation type from a list defined in
# the PDF spec (32000-1:2008 Table 169 – Annotation types).
# Some common types are e.g.: "Check", "Text", "Comment", "Note"
password_ok=ஆம்
# Copyright 2012 Mozilla Foundation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# Main toolbar buttons (tooltips and alt text for images)
previous.title=Naunang Pahina
next.title=Sunod na Pahina
# LOCALIZATION NOTE (page_label, page_of):
# These strings are concatenated to form the "Page: X of Y" string.
# Do not translate "{{pageCount}}", it will be substituted with a number
# representing the total number of pages.
page_label=Pahina:
page_of=ng {{bilangngPahina}}
open_file.title=Magbukas ng file
open_file_label=Buksan
bookmark.title=Kasalukuyang tingin (kopyahin o buksan sa bagong window)
bookmark_label=Kasalukuyang tingin
# Secondary toolbar and context menu
# Document properties dialog box
document_properties_title=Pamagat:
# Tooltips and alt text for side panel toolbar buttons
# (the _label strings are alt text for the buttons, the .title strings are
# tooltips)
outline.title=Ipakita ang banghay ng dokumento
outline_label=Banghay ng dokumento
thumbs.title=Ipakita ang mga Thumbnails
findbar_label=Hanapin
# Thumbnails panel item (tooltip and alt text for images)
# LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page
# number.
thumb_page_title=Pahina {{pahina}}
# LOCALIZATION NOTE (thumb_page_canvas): "{{page}}" will be replaced by the page
# number.
thumb_page_canvas=Thumbnail ng Pahina {{pahina}}
# Find panel button title and messages
# Error panel labels
error_more_info=Maraming Inpormasyon
error_less_info=Maikling Inpormasyon
# LOCALIZATION NOTE (error_version_info): "{{version}}" and "{{build}}" will be
# replaced by the PDF.JS version and build ID.
# LOCALIZATION NOTE (error_message): "{{message}}" will be replaced by an
# english string describing the error.
error_message=Mensahe: {{message}}
# LOCALIZATION NOTE (error_stack): "{{stack}}" will be replaced with a stack
# trace.
# LOCALIZATION NOTE (error_file): "{{file}}" will be replaced with a filename
# LOCALIZATION NOTE (error_line): "{{line}}" will be replaced with a line number
error_line=Linya: { { linya } }
rendering_error=May naganap na pagkakamali habang pagsasalin sa pahina.
# Predefined zoom values
page_scale_width=Haba ng Pahina
page_scale_fit=ang pahina ay angkop
page_scale_auto=awtomatikong pag-imbulog
# Loading indicator messages
loading_error=May maling nangyari habang kinakarga ang PDF.
# LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip.
# "{{type}}" will be replaced with an annotation type from a list defined in
# the PDF spec (32000-1:2008 Table 169 – Annotation types).
# Some common types are e.g.: "Check", "Text", "Comment", "Note"
password_ok=OK
# Copyright 2012 Mozilla Foundation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# Main toolbar buttons (tooltips and alt text for images)
# LOCALIZATION NOTE (page_label, page_of):
# These strings are concatenated to form the "Page: X of Y" string.
# Do not translate "{{pageCount}}", it will be substituted with a number
# representing the total number of pages.
page_label=Tsebe:
zoom.title=Zuma/gogela
open_file.title=Bula Faele
open_file_label=Bula
# Secondary toolbar and context menu
# Document properties dialog box
document_properties_file_name=Leina la faele:
document_properties_title=Leina:
# Tooltips and alt text for side panel toolbar buttons
# (the _label strings are alt text for the buttons, the .title strings are
# tooltips)
findbar_label=Batla
# Thumbnails panel item (tooltip and alt text for images)
# LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page
# number.
# LOCALIZATION NOTE (thumb_page_canvas): "{{page}}" will be replaced by the page
# number.
# Find panel button title and messages
find_previous.title=Batla tiragalo e e fetileng ya setlhopha sa mafoko
find_next.title=Batla tiragalo e e latelang ya setlhopha sa mafoko
find_not_found=Setlhopha sa mafoko ga se a bonwa
# Error panel labels
error_more_info=Tshedimosetso e Nngwe
# LOCALIZATION NOTE (error_version_info): "{{version}}" and "{{build}}" will be
# replaced by the PDF.JS version and build ID.
# LOCALIZATION NOTE (error_message): "{{message}}" will be replaced by an
# english string describing the error.
# LOCALIZATION NOTE (error_stack): "{{stack}}" will be replaced with a stack
# trace.
# LOCALIZATION NOTE (error_file): "{{file}}" will be replaced with a filename
# LOCALIZATION NOTE (error_line): "{{line}}" will be replaced with a line number
# Predefined zoom values
# LOCALIZATION NOTE (page_scale_percent): "{{scale}}" will be replaced by a
# numerical scale value.
# Loading indicator messages
loading_error_indicator=Phoso
# LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip.
# "{{type}}" will be replaced with an annotation type from a list defined in
# the PDF spec (32000-1:2008 Table 169 – Annotation types).
# Some common types are e.g.: "Check", "Text", "Comment", "Note"
password_ok=Siame
password_cancel=Khansela
......@@ -12,10 +12,6 @@ android {
versionCode version_code
versionName verson_name
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
// ndk {
// abiFilters "armeabi", "armeabi-v7a", "x86", "mips"
// }
}
buildTypes {
......
......@@ -12,16 +12,18 @@ public class Constants {
/**
* 测试环境配置.
*/
// public static final int LOG_LEVEL = LogUtils.LEVEL_ALL;
// public static final String BASE_URL = "http://47.94.101.239:3112";
// public final static String UP_PHOTO = "/file/uploadMore?targetPath=test/sp/mobile/android/business/checkApply";
// public final static String WEB_SOP = "http://47.94.101.239:9004/#/sop";
// public final static String WEB_ZHI_SHI = "http://47.94.101.239:9004/#/detail";
// public static final boolean IS_DEBUG = true;
public static final int LOG_LEVEL = LogUtils.LEVEL_ALL;
public static final String ENVIROMENT = "debug";
public static final String BASE_URL = "http://47.94.101.239:3112";
public final static String UP_PHOTO = "/file/uploadMore?targetPath=test/sp/mobile/android/business/checkApply";
public final static String WEB_SOP = "http://47.94.101.239:9004/#/sop";
public final static String WEB_ZHI_SHI = "http://47.94.101.239:9004/#/detail";
public static final boolean IS_DEBUG = true;
/**
* uat环境配置.
*/
// public static final String ENVIROMENT = "uat";
// public static final int LOG_LEVEL = LogUtils.LEVEL_ALL;
// public static final String BASE_URL = "http://47.95.223.6:3112";
// public final static String UP_PHOTO = "/file/uploadMore?targetPath=test/sp/mobile/android/business/checkApply";
......@@ -32,6 +34,7 @@ public class Constants {
/**
* 正式环境.
*/
// public static final String ENVIROMENT = "release";
// public static final int LOG_LEVEL = LogUtils.LEVEL_OFF;
// public static final String BASE_URL = "https://mobile.kf.ai";
// public final static String UP_PHOTO = "/file/uploadMore?targetPath=online/sp/mobile/android/business/checkApply";
......@@ -42,12 +45,13 @@ public class Constants {
/**
* 演示环境
*/
public final static int LOG_LEVEL = LogUtils.LEVEL_OFF;
public final static String BASE_URL = "http://test.mobile.dayu.ai";
public final static String UP_PHOTO = "/file/uploadMore?targetPath=online/sp/mobile/android/business/checkApply";
public final static String WEB_SOP = "http://test.sop.dayu.ai/#/sop";
public final static String WEB_ZHI_SHI = "http://test.sop.dayu.ai/#/detail";
public final static boolean IS_DEBUG = false;
// public static final String ENVIROMENT = "demons";
// public final static int LOG_LEVEL = LogUtils.LEVEL_OFF;
// public final static String BASE_URL = "http://test.mobile.dayu.ai";
// public final static String UP_PHOTO = "/file/uploadMore?targetPath=online/sp/mobile/android/business/checkApply";
// public final static String WEB_SOP = "http://test.sop.dayu.ai/#/sop";
// public final static String WEB_ZHI_SHI = "http://test.sop.dayu.ai/#/detail";
// public final static boolean IS_DEBUG = false;
/**
* 登录.
......
package com.dayu.utils;
/**
* Created by luofan
* on 2018/3/19.
*/
public class Base64Encoder {
private static final char last2byte = (char) Integer
.parseInt("00000011", 2);
private static final char last4byte = (char) Integer
.parseInt("00001111", 2);
private static final char last6byte = (char) Integer
.parseInt("00111111", 2);
private static final char lead6byte = (char) Integer
.parseInt("11111100", 2);
private static final char lead4byte = (char) Integer
.parseInt("11110000", 2);
private static final char lead2byte = (char) Integer
.parseInt("11000000", 2);
private static final char[] encodeTable = new char[]{'A', 'B', 'C', 'D',
'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q',
'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', 'a', 'b', 'c', 'd',
'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q',
'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', '0', '1', '2', '3',
'4', '5', '6', '7', '8', '9', '+', '/'};
/**
* Base64 encoding.
*
* @param from The src data.
* @return
*/
public static String encode(byte[] from) {
StringBuffer to = new StringBuffer((int) (from.length * 1.34) + 3);
int num = 0;
char currentByte = 0;
for (int i = 0; i < from.length; i++) {
num = num % 8;
while (num < 8) {
switch (num) {
case 0:
currentByte = (char) (from[i] & lead6byte);
currentByte = (char) (currentByte >>> 2);
break;
case 2:
currentByte = (char) (from[i] & last6byte);
break;
case 4:
currentByte = (char) (from[i] & last4byte);
currentByte = (char) (currentByte << 2);
if ((i + 1) < from.length) {
currentByte |= (from[i + 1] & lead2byte) >>> 6;
}
break;
case 6:
currentByte = (char) (from[i] & last2byte);
currentByte = (char) (currentByte << 4);
if ((i + 1) < from.length) {
currentByte |= (from[i + 1] & lead4byte) >>> 4;
}
break;
}
to.append(encodeTable[currentByte]);
num += 6;
}
}
if (to.length() % 4 != 0) {
for (int i = 4 - to.length() % 4; i > 0; i--) {
to.append("=");
}
}
return to.toString();
}
}
......@@ -324,6 +324,13 @@ public class UtilsDate {
}
public static long dayDiffCurr(String first,String second) {
Date firstDate = stringtoDate(first, LONG_DATE_FORMAT);
Date secondDate = stringtoDate(second, LONG_DATE_FORMAT);
return (firstDate.getTime() - secondDate.getTime()) / 86400000;
}
public static boolean isDateOneBigger(String str1, String str2) {
boolean isBigger = false;
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
......
......@@ -106,6 +106,9 @@
<string name="is_loading">正在加载</string>
<string name="have_no_data">没有更多数据</string>
<string name="try_load_again">加载失败(再次上拉试试~)</string>
<string name="enviroment_debug">测试环境%1$s</string>
<string name="enviroment_uat">UAT环境%1$s</string>
<string name="enviroment_demons">演示环境%1$s</string>
<!--提现账户-->
<string name="title_withdrawals">提现账户</string>
<string name="alipay_account">支付宝账号</string>
......@@ -388,6 +391,7 @@
<string name="error_ssl">证书验证错误</string>
<string name="error_connect_time">连接超时</string>
<string name="error_unknow">未知错误</string>
<string name="error_pdf">上传版本错误,请重新上传此文件。</string>
<string name="engineer_identity_auditing">您的身份认证正在审核中,请耐心等待</string>
<string name="engineer_identity_not_audite">您的身份认证审核未通过,请重新修改再次提交</string>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment