Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Fedex
/
iClear-Connect-Pre-Clearance
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
jinhui.wang
2024-11-14 10:26:06 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
91e9f8991ca4d68009d41d4646cbc17de6bf75f9
91e9f899
1 parent
2dcc5106
配置修改
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
79 additions
and
16 deletions
web/.env.development
web/.env.production
web/.env.staging
web/.env.uat
web/src/i18n/en.js
web/src/main.js
web/src/utils/index.js
web/src/utils/request.js
web/.env.development
View file @
91e9f89
...
...
@@ -24,9 +24,9 @@ VUE_APP_REDIRECT_FCL = 'https://www.fedex.com/secure-login/#login-credentials?re
#图文版使用指南
VUE_APP_FEDEX_HANDBOOK = 'http://47.103.140.98/IcTw/operating-guide.pdf'
#隐私政策
VUE_APP_PRIVACT_POLICY = 'https://www.fedex.com/
zh-tw
/privacy-policy.html'
VUE_APP_PRIVACT_POLICY = 'https://www.fedex.com/
en-cn
/privacy-policy.html'
#使用条款
VUE_APP_TERMS_OF_USE = 'https://www.fedex.com/
zh-tw
/terms-of-use.html'
VUE_APP_TERMS_OF_USE = 'https://www.fedex.com/
en-cn
/terms-of-use.html'
#营业执照
VUE_APP_BUSINESS_LICENSE = 'https://www.fedex.com/content/dam/fedex/apac-asia-pacific/MVP-APAC/images/2019/Q3/CN_EN_2019_1_Master_image_NA_business_license_marketing_913515423.jpg'
#快递业务经营许可证
...
...
web/.env.production
View file @
91e9f89
...
...
@@ -16,9 +16,9 @@ VUE_APP_BASE_LOGINOUT = '/'
#图文版使用指南
VUE_APP_FEDEX_HANDBOOK = 'https://exportdeclaration-tw.apac.fedex.com/IcTw/圖文版使用指南.pdf'
#隐私政策
VUE_APP_PRIVACT_POLICY = 'https://www.fedex.com/
zh-tw
/privacy-policy.html'
VUE_APP_PRIVACT_POLICY = 'https://www.fedex.com/
en-cn
/privacy-policy.html'
#使用条款
VUE_APP_TERMS_OF_USE = 'https://www.fedex.com/
zh-tw
/terms-of-use.html'
VUE_APP_TERMS_OF_USE = 'https://www.fedex.com/
en-cn
/terms-of-use.html'
#营业执照
VUE_APP_BUSINESS_LICENSE = 'https://www.fedex.com/content/dam/fedex/apac-asia-pacific/MVP-APAC/images/2019/Q3/CN_EN_2019_1_Master_image_NA_business_license_marketing_913515423.jpg'
#快递业务经营许可证
...
...
web/.env.staging
View file @
91e9f89
...
...
@@ -20,9 +20,9 @@ VUE_APP_REDIRECT_FCL = 'https://www.fedex.com/secure-login/#login-credentials?re
#图文版使用指南
VUE_APP_FEDEX_HANDBOOK = 'http://47.103.140.98/IcTw/圖文版使用指南.pdf'
#隐私政策
VUE_APP_PRIVACT_POLICY = 'https://www.fedex.com/
zh-tw
/privacy-policy.html'
VUE_APP_PRIVACT_POLICY = 'https://www.fedex.com/
en-cn
/privacy-policy.html'
#使用条款
VUE_APP_TERMS_OF_USE = 'https://www.fedex.com/
zh-tw
/terms-of-use.html'
VUE_APP_TERMS_OF_USE = 'https://www.fedex.com/
en-cn
/terms-of-use.html'
#营业执照
VUE_APP_BUSINESS_LICENSE = 'https://www.fedex.com/content/dam/fedex/apac-asia-pacific/MVP-APAC/images/2019/Q3/CN_EN_2019_1_Master_image_NA_business_license_marketing_913515423.jpg'
#快递业务经营许可证
...
...
web/.env.uat
View file @
91e9f89
...
...
@@ -21,9 +21,9 @@ VUE_APP_REDIRECT_FCL = 'https://www.fedex.com/secure-login/#login-credentials?re
#图文版使用指南
VUE_APP_FEDEX_HANDBOOK = 'https://exportdeclarationuat-tw.apac.fedex.com/IcTw/圖文版使用指南.pdf'
#隐私政策
VUE_APP_PRIVACT_POLICY = 'https://www.fedex.com/
zh-tw
/privacy-policy.html'
VUE_APP_PRIVACT_POLICY = 'https://www.fedex.com/
en-cn
/privacy-policy.html'
#使用条款
VUE_APP_TERMS_OF_USE = 'https://www.fedex.com/
zh-tw
/terms-of-use.html'
VUE_APP_TERMS_OF_USE = 'https://www.fedex.com/
en-cn
/terms-of-use.html'
#营业执照
VUE_APP_BUSINESS_LICENSE = 'https://www.fedex.com/content/dam/fedex/apac-asia-pacific/MVP-APAC/images/2019/Q3/CN_EN_2019_1_Master_image_NA_business_license_marketing_913515423.jpg'
#快递业务经营许可证
...
...
web/src/i18n/en.js
View file @
91e9f89
...
...
@@ -30,10 +30,10 @@ export default {
userTitle
:
"Enter your user ID and password to log in"
,
create
:
"註冊線上申報平臺帳號"
,
userNum
:
"User ID"
,
passWord
:
"
p
assword"
,
passWord
:
"
P
assword"
,
checkPassWord
:
"Remember my user ID."
,
loginBtn
:
"L
og in
"
,
loggingBtn
:
"L
ogging in
"
,
loginBtn
:
"L
OG IN
"
,
loggingBtn
:
"L
OGGING IN
"
,
forgetPassWord
:
"忘記了您的用戶密碼?"
,
resetPassWord
:
"重置您的密碼"
,
resetPassWordBtn
:
"提交重置"
,
...
...
@@ -80,11 +80,11 @@ export default {
},
// 全局入口页
layout
:
{
register
:
"Login"
,
fedexLogin
:
"
F
edex.com user account login"
,
register
:
"
Register/
Login"
,
fedexLogin
:
"
f
edex.com user account login"
,
fedexRegister
:
"Employee log in"
,
onlineDeclare
:
"線上申報平臺帳號登錄"
,
registerNumber
:
"
Register a F
edex.com account"
,
registerNumber
:
"
register a f
edex.com account"
,
userInfo
:
"用戶信息維護"
,
logOut
:
"log out"
,
logOutDia
:
"Are you sure to log out and exit the system?"
,
...
...
web/src/main.js
View file @
91e9f89
...
...
@@ -43,7 +43,7 @@ import tableHeaders from "@/assets/languages/tableHeaders";
import
dictLabels
from
"@/assets/languages/dictLabels.js"
;
import
settings
from
"./settings.js"
;
import
*
as
filters
from
"./utils/filters.js"
;
import
{
toHead
}
from
"@/utils/index"
;
import
{
toHead
,
numberRound
,
base64ConvertFile
,
b64ToBlob
,
titleCase
}
from
"@/utils/index"
;
// 全局方法挂载
Vue
.
prototype
.
parseTime
=
parseTime
;
...
...
@@ -62,6 +62,10 @@ Vue.prototype.dictLabels = dictLabels;
Vue
.
prototype
.
settings
=
settings
;
Vue
.
prototype
.
regExp
=
regExp
;
Vue
.
prototype
.
toHead
=
toHead
;
Vue
.
prototype
.
numberRound
=
numberRound
Vue
.
prototype
.
base64ConvertFile
=
base64ConvertFile
Vue
.
prototype
.
b64ToBlob
=
b64ToBlob
Vue
.
prototype
.
titleCase
=
titleCase
Vue
.
prototype
.
msgSuccess
=
function
(
msg
)
{
this
.
$message
({
showClose
:
true
,
message
:
msg
,
type
:
"success"
});
};
...
...
web/src/utils/index.js
View file @
91e9f89
...
...
@@ -558,3 +558,62 @@ export function filterRepeatNewData(arr, key, time) {
);
return
result
;
}
export
function
numberRound
(
num
,
i
)
{
// if (num.toString().indexOf('.') < 0) return Number(num)
// else {
// let arr = num.toString().split('.')
// let decimal = Number(`0.${arr[1]}`).toPrecision(i)
// if (decimal.toString().split('.')[0] != '0') {
// num = Number(`${Number(arr[0]) + Number(decimal.toString().split('.')[0])}.${decimal.toString().split('.')[1]}`)
// } else {
// num = Number(`${arr[0]}.${decimal.toString().split('.')[1]}`)
// }
// return num
// }
if
(
num
>=
0
)
{
var
tempNumber
=
parseInt
((
num
*
Math
.
pow
(
10
,
i
)
+
0.5
))
/
Math
.
pow
(
10
,
i
);
return
tempNumber
;
}
else
{
let
numberRound1
=
-
num
;
var
tempNumber
=
parseInt
((
numberRound1
*
Math
.
pow
(
10
,
i
)
+
0.5
))
/
Math
.
pow
(
10
,
i
);
return
-
tempNumber
;
}
}
//base64转file类型
export
function
base64ConvertFile
(
urlData
,
filename
)
{
let
arr
=
urlData
.
split
(
","
);
let
type
=
arr
[
0
].
match
(
/:
(
.*
?)
;/
)[
1
];
let
fileExt
=
type
.
split
(
"/"
)[
1
];
let
bstr
=
atob
(
arr
[
1
]);
let
n
=
bstr
.
length
;
let
u8arr
=
new
Uint8Array
(
n
);
while
(
n
--
)
{
u8arr
[
n
]
=
bstr
.
charCodeAt
(
n
);
}
return
new
File
([
u8arr
],
filename
,
{
type
:
type
,
});
}
// 将Base64字符串转换为Blob对象
export
function
b64ToBlob
(
b64data
)
{
let
parts
=
b64data
.
split
(
';base64,'
);
let
contentType
=
parts
[
0
].
split
(
':'
)[
1
];
let
raw
=
window
.
atob
(
parts
[
1
]);
let
rawLength
=
raw
.
length
;
let
uInt8Array
=
new
Uint8Array
(
rawLength
);
for
(
let
i
=
0
;
i
<
rawLength
;
++
i
)
{
uInt8Array
[
i
]
=
raw
.
charCodeAt
(
i
);
}
return
new
Blob
([
uInt8Array
],
{
type
:
contentType
});
}
\ No newline at end of file
...
...
web/src/utils/request.js
View file @
91e9f89
...
...
@@ -59,7 +59,7 @@ service.interceptors.response.use(
// 获取错误信息
const
msg
=
errorCode
[
code
]
||
res
.
data
.
msg
||
errorCode
[
"default"
];
if
(
code
===
301
)
{
MessageBox
.
confirm
(
MessageBox
.
alert
(
"The login status has expired. You can continue to stay on this page or log in again."
,
"System prompt"
,
{
...
...
Please
register
or
login
to post a comment