Commit 65787c76 by Hayato Kamimura

【規約同意】url, 遷移先修正

parent 95388d39
......@@ -31,6 +31,7 @@
<script type="text/javascript" src="../common/js/constant.js?__UPDATEID__"></script>
<script type="text/javascript" src="../common/js/common.js?__UPDATEID__"></script>
<script type="text/javascript" src="../common/js/header.js"></script>
<script type="text/javascript" src="../js/login/login.js?__UPDATEID__"></script>
<script type="text/javascript" src="../js/agrementToTerms/agrementToTerms.js"></script>
......
//サービスオプション「規約同意」
var agrementToTerms = {};
agrementToTerms.baseApiUrl = COMMON.format(ClientData.conf_apiUrl(), ClientData.userInfo_accountPath());
//言語、規約情報読み込み
agrementToTerms.initAgrement = function(){
......@@ -24,12 +25,9 @@ agrementToTerms.destinationHtml = function(){
//ホーム画面に遷移
COMMON.avwScreenMove("index.html");
}
}else if(data.httpStatus == CONSTANT.HTTP_STATUS.UNAUTHORIZED){
//401error
}else if(data.httpStatus == CONSTANT.HTTP_STATUS.FORBIDDEN){
//403error
}else if(data.httpStatus == CONSTANT.HTTP_STATUS.SERVER_ERROR){
//500error
}else {
COMMON.closeLoading();
COMMON.showAlert('errorOccurred');
}
}
......@@ -37,10 +35,10 @@ agrementToTerms.destinationHtml = function(){
agrementToTerms.requireTerms = function(){
var apiData = {};
var params = {
sid: ClientData.userInfo_sid(),
sid: COMMON.getSid(),
};
const url = COMMON.format(ClientData.conf_apiUrl(), ClientData.userInfo_accountPath()) + "/requireTerms?sid=" + params.sid;
const url = agrementToTerms.baseApiUrl + "/requireTerms/";
COMMON.cmsAjax(
url,
params,
......@@ -63,10 +61,10 @@ agrementToTerms.requireTerms = function(){
agrementToTerms.sendAgreeTerms = function(){
var apiData = agrementToTerms.requireTerms();
params = {
sid: ClientData.userInfo_sid(),
sid: COMMON.getSid(),
termsVersion: apiData.termsVersion,
};
const url = COMMON.format(ClientData.conf_apiUrl(), ClientData.userInfo_accountPath()) + "/agreeTerms?sid=" + params.sid + "&termsVersion=" + params.termsVersion;
const url = agrementToTerms.baseApiUrl + "/agreeTerms/";
COMMON.cmsAjax(
url,
params,
......@@ -89,7 +87,6 @@ agrementToTerms.sendAgreeTerms = function(){
agrementToTerms.disagreeTerm = function(){
if(confirm(I18N.i18nText("msgDisagreeTerm"))){
//ログアウトし、ログイン画面に遷移する
//HEADER.processLogout();
COMMON.avwScreenMove("login.html");
HEADER.processLogout();
}
}
\ No newline at end of file
......@@ -218,7 +218,7 @@ LOGIN.processLogin = function () {
if (data.requirePasswordChange == 0) {
ClientData.userInfo_sid(ClientData.userInfo_sid_local());
//利用規約画面に遷移
//利用規約に同意しているかの確認
agrementToTerms.destinationHtml();
} else if (data.requirePasswordChange == 1) {
$('#getToken').val(data.token);
......@@ -247,8 +247,8 @@ LOGIN.processLogin = function () {
var numDay = date.subtractByDays(skpPwdDt);
if (numDay <= 30) {
ClientData.userInfo_sid(ClientData.userInfo_sid_local());
// move to home.html page
COMMON.avwScreenMove('index.html');
//利用規約に同意しているかの確認
agrementToTerms.destinationHtml();
} else if (numDay > 30) {
LOGIN.OpenChangePasswordDialog();
$('#btnSkip').show();
......@@ -259,7 +259,7 @@ LOGIN.processLogin = function () {
// no need to change password
ClientData.userInfo_sid(ClientData.userInfo_sid_local());
//利用規約画面に遷移
//利用規約に同意しているかの確認
agrementToTerms.destinationHtml();
}
} else if (data.requirePasswordChange == 2) {
......@@ -301,8 +301,8 @@ LOGIN.processLogin = function () {
} else {
// No need to change password
ClientData.userInfo_sid(ClientData.userInfo_sid_local());
// move to home.html page
COMMON.avwScreenMove('index.html');
//利用規約に同意しているかの確認
agrementToTerms.destinationHtml();
}
}
} else {
......@@ -359,8 +359,8 @@ LOGIN.changePasswordProcess = function () {
$('#dialog-error-message').css('display', 'none');
ClientData.userInfo_sid(ClientData.userInfo_sid_local());
// move to home.html page
COMMON.avwScreenMove('index.html');
//利用規約に同意しているかの確認
agrementToTerms.destinationHtml();
} else if (result.httpStatus == '401') {
COMMON.goUrlWithCurrentParams(CONSTANT.PAGE_NAME.LOGIN);
} else if (result.httpStatus == '403') {
......@@ -416,8 +416,8 @@ LOGIN.skipPassFunction = function () {
ClientData.userInfo_pwdSkipDt(date);
ClientData.userInfo_sid(ClientData.userInfo_sid_local());
// move to home.html page
COMMON.avwScreenMove('index.html');
//利用規約に同意しているかの確認
agrementToTerms.destinationHtml();
};
// Open Change Password Dialog
......
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 to comment