Commit 65787c76 by Hayato Kamimura

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

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